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 fix-15632 9995c5c2 Lines: 3341 24845 13.4 %
Date: 2024-04-13 12:30:31 Functions: 260 1868 13.9 %

          Line data    Source code
       1             : 
       2             : /* Python wrapper functions auto-generated by pidl */
       3             : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
       4             : #include "lib/replace/system/python.h"
       5             : #include "python/py3compat.h"
       6             : #include "includes.h"
       7             : #include "python/modules.h"
       8             : #include <pytalloc.h>
       9             : #include "librpc/rpc/pyrpc.h"
      10             : #include "librpc/rpc/pyrpc_util.h"
      11             : #include "bin/default/librpc/gen_ndr/ndr_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      229353 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
      33             : {
      34      229353 :         switch (var_size) {
      35       18366 :         case 8:
      36       18366 :                 return UINT64_MAX;
      37      210735 :         case 4:
      38      210735 :                 return UINT32_MAX;
      39           0 :         case 2:
      40           0 :                 return UINT16_MAX;
      41         252 :         case 1:
      42         252 :                 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_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type;
     110             : static PyTypeObject drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_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 = pytalloc_get_ptr(obj);
     248           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
     286           0 :         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 = 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 = pytalloc_get_ptr(obj);
     310           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(py_obj);
     375           0 :         PyObject *ret = NULL;
     376           0 :         DATA_BLOB blob;
     377           0 :         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 = pytalloc_get_ptr(py_obj);
     398           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
     399           0 :         Py_ssize_t blob_length = 0;
     400           0 :         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 = pytalloc_get_ptr(py_obj);
     433           0 :         PyObject *ret;
     434           0 :         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       46826 : static PyObject *py_drsuapi_DsBindInfo28_get_supported_extensions(PyObject *obj, void *closure)
     462             : {
     463       46826 :         struct drsuapi_DsBindInfo28 *object = pytalloc_get_ptr(obj);
     464           0 :         PyObject *py_supported_extensions;
     465       46826 :         py_supported_extensions = PyLong_FromUnsignedLongLong((uint32_t)(object->supported_extensions));
     466       46826 :         return py_supported_extensions;
     467             : }
     468             : 
     469       45080 : static int py_drsuapi_DsBindInfo28_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
     470             : {
     471       45080 :         struct drsuapi_DsBindInfo28 *object = pytalloc_get_ptr(py_obj);
     472       45080 :         if (value == NULL) {
     473           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions");
     474           0 :                 return -1;
     475             :         }
     476             :         {
     477       45080 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions));
     478       45080 :                 if (PyLong_Check(value)) {
     479           0 :                         unsigned long long test_var;
     480       45080 :                         test_var = PyLong_AsUnsignedLongLong(value);
     481       45080 :                         if (PyErr_Occurred() != NULL) {
     482           0 :                                 return -1;
     483             :                         }
     484       45080 :                         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       45080 :                         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       45080 :         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 = pytalloc_get_ptr(obj);
     502           0 :         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 = 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 = pytalloc_get_ptr(obj);
     526           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
     564           0 :         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 = 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           0 :                         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        1614 : static PyObject *py_drsuapi_DsBindInfo28_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
     628             : {
     629        1614 :         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 = pytalloc_get_ptr(py_obj);
     635           0 :         PyObject *ret = NULL;
     636           0 :         DATA_BLOB blob;
     637           0 :         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 = pytalloc_get_ptr(py_obj);
     658           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
     659           0 :         Py_ssize_t blob_length = 0;
     660           0 :         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 = pytalloc_get_ptr(py_obj);
     693           0 :         PyObject *ret;
     694           0 :         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 = pytalloc_get_ptr(obj);
     724           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
     762           0 :         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 = 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 = pytalloc_get_ptr(obj);
     786           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
     824           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
     862           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(py_obj);
     939           0 :         PyObject *ret = NULL;
     940           0 :         DATA_BLOB blob;
     941           0 :         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 = pytalloc_get_ptr(py_obj);
     962           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
     963           0 :         Py_ssize_t blob_length = 0;
     964           0 :         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 = pytalloc_get_ptr(py_obj);
     997           0 :         PyObject *ret;
     998           0 :         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 = pytalloc_get_ptr(obj);
    1028           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1066           0 :         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 = 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 = pytalloc_get_ptr(obj);
    1090           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1128           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1166           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1204           0 :         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 = 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 = pytalloc_get_ptr(py_obj);
    1273           0 :         PyObject *ret = NULL;
    1274           0 :         DATA_BLOB blob;
    1275           0 :         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 = pytalloc_get_ptr(py_obj);
    1296           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1297           0 :         Py_ssize_t blob_length = 0;
    1298           0 :         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 = pytalloc_get_ptr(py_obj);
    1331           0 :         PyObject *ret;
    1332           0 :         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 = pytalloc_get_ptr(obj);
    1362           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1400           0 :         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 = 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 = pytalloc_get_ptr(obj);
    1424           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1462           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1500           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    1538           0 :         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 = 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 = pytalloc_get_ptr(obj);
    1562           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(py_obj);
    1651           0 :         PyObject *ret = NULL;
    1652           0 :         DATA_BLOB blob;
    1653           0 :         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 = pytalloc_get_ptr(py_obj);
    1674           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1675           0 :         Py_ssize_t blob_length = 0;
    1676           0 :         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 = pytalloc_get_ptr(py_obj);
    1709           0 :         PyObject *ret;
    1710           0 :         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 = pytalloc_get_ptr(obj);
    1740           0 :         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 = 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 = pytalloc_get_ptr(py_obj);
    1774           0 :         PyObject *ret = NULL;
    1775           0 :         DATA_BLOB blob;
    1776           0 :         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 = pytalloc_get_ptr(py_obj);
    1797           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    1798           0 :         Py_ssize_t blob_length = 0;
    1799           0 :         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 = pytalloc_get_ptr(py_obj);
    1832           0 :         PyObject *ret;
    1833           0 :         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       46842 : static PyObject *py_import_drsuapi_DsBindInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsBindInfo *in)
    1860             : {
    1861           0 :         PyObject *ret;
    1862             : 
    1863       46842 :         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       46842 :                 case 28:
    1869       46842 :                         ret = pytalloc_reference_ex(&drsuapi_DsBindInfo28_Type, mem_ctx, &in->info28);
    1870       46842 :                         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        1614 : static union drsuapi_DsBindInfo *py_export_drsuapi_DsBindInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    1894             : {
    1895        1614 :         union drsuapi_DsBindInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsBindInfo);
    1896        1614 :         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        1614 :                 case 28:
    1911        1614 :                         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        1614 :                         PY_CHECK_TYPE(&drsuapi_DsBindInfo28_Type, in, talloc_free(ret); return NULL;);
    1916        1614 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    1917           0 :                                 PyErr_NoMemory();
    1918           0 :                                 talloc_free(ret); return NULL;
    1919             :                         }
    1920        1614 :                         ret->info28 = *(struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(in);
    1921        1614 :                         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        1614 :         return ret;
    1978             : }
    1979             : 
    1980       46842 : static PyObject *py_drsuapi_DsBindInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    1981             : {
    1982       46842 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    1983       46842 :         PyObject *mem_ctx_obj = NULL;
    1984       46842 :         TALLOC_CTX *mem_ctx = NULL;
    1985       46842 :         int level = 0;
    1986       46842 :         PyObject *in_obj = NULL;
    1987       46842 :         union drsuapi_DsBindInfo *in = NULL;
    1988             : 
    1989       46842 :         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       46842 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    1997       46842 :         if (mem_ctx == NULL) {
    1998           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    1999           0 :                 return NULL;
    2000             :         }
    2001       46842 :         in = (union drsuapi_DsBindInfo *)pytalloc_get_ptr(in_obj);
    2002       46842 :         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       46842 :         return py_import_drsuapi_DsBindInfo(mem_ctx, level, in);
    2008             : }
    2009             : 
    2010        1614 : static PyObject *py_drsuapi_DsBindInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2011             : {
    2012        1614 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2013        1614 :         PyObject *mem_ctx_obj = NULL;
    2014        1614 :         TALLOC_CTX *mem_ctx = NULL;
    2015        1614 :         int level = 0;
    2016        1614 :         PyObject *in = NULL;
    2017        1614 :         union drsuapi_DsBindInfo *out = NULL;
    2018             : 
    2019        1614 :         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        1614 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2027        1614 :         if (mem_ctx == NULL) {
    2028           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2029           0 :                 return NULL;
    2030             :         }
    2031             : 
    2032        1614 :         out = py_export_drsuapi_DsBindInfo(mem_ctx, level, in);
    2033        1614 :         if (out == NULL) {
    2034           0 :                 return NULL;
    2035             :         }
    2036             : 
    2037        1614 :         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 = pytalloc_get_ptr(obj);
    2070           0 :         PyObject *py_length;
    2071           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
    2072           0 :         return py_length;
    2073             : }
    2074             : 
    2075        1614 : static int py_drsuapi_DsBindInfoCtr_set_length(PyObject *py_obj, PyObject *value, void *closure)
    2076             : {
    2077        1614 :         struct drsuapi_DsBindInfoCtr *object = pytalloc_get_ptr(py_obj);
    2078        1614 :         if (value == NULL) {
    2079           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    2080           0 :                 return -1;
    2081             :         }
    2082             :         {
    2083        1614 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    2084        1614 :                 if (PyLong_Check(value)) {
    2085           0 :                         unsigned long long test_var;
    2086        1614 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2087        1614 :                         if (PyErr_Occurred() != NULL) {
    2088           0 :                                 return -1;
    2089             :                         }
    2090        1614 :                         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        1614 :                         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        1614 :         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 = pytalloc_get_ptr(obj);
    2108           0 :         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 = 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           0 :                         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       46842 : static PyObject *py_drsuapi_DsBindInfoCtr_get_info(PyObject *obj, void *closure)
    2144             : {
    2145       46842 :         struct drsuapi_DsBindInfoCtr *object = pytalloc_get_ptr(obj);
    2146           0 :         PyObject *py_info;
    2147       46842 :         py_info = pyrpc_import_union(&drsuapi_DsBindInfo_Type, pytalloc_get_mem_ctx(obj), object->length, &object->info, "union drsuapi_DsBindInfo");
    2148       46842 :         if (py_info == NULL) {
    2149           0 :                 return NULL;
    2150             :         }
    2151       46842 :         return py_info;
    2152             : }
    2153             : 
    2154        1614 : static int py_drsuapi_DsBindInfoCtr_set_info(PyObject *py_obj, PyObject *value, void *closure)
    2155             : {
    2156        1614 :         struct drsuapi_DsBindInfoCtr *object = pytalloc_get_ptr(py_obj);
    2157        1614 :         if (value == NULL) {
    2158           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
    2159           0 :                 return -1;
    2160             :         }
    2161             :         {
    2162           0 :                 union drsuapi_DsBindInfo *info_switch_0;
    2163        1614 :                 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        1614 :                 if (info_switch_0 == NULL) {
    2165           0 :                         return -1;
    2166             :                 }
    2167        1614 :                 object->info = *info_switch_0;
    2168             :         }
    2169        1614 :         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        1614 : static PyObject *py_drsuapi_DsBindInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2195             : {
    2196        1614 :         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 = pytalloc_get_ptr(obj);
    2213           0 :         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 = 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           0 :                         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 = pytalloc_get_ptr(obj);
    2251           0 :         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 = 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           0 :                         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      131767 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get_guid(PyObject *obj, void *closure)
    2287             : {
    2288      131767 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(obj);
    2289           0 :         PyObject *py_guid;
    2290      131767 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
    2291      131767 :         return py_guid;
    2292             : }
    2293             : 
    2294         242 : static int py_drsuapi_DsReplicaObjectIdentifier_set_guid(PyObject *py_obj, PyObject *value, void *closure)
    2295             : {
    2296         242 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(py_obj);
    2297         242 :         if (value == NULL) {
    2298           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
    2299           0 :                 return -1;
    2300             :         }
    2301         242 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    2302         242 :         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         242 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
    2307         242 :         return 0;
    2308             : }
    2309             : 
    2310        2746 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get_sid(PyObject *obj, void *closure)
    2311             : {
    2312        2746 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(obj);
    2313           0 :         PyObject *py_sid;
    2314        2746 :         py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
    2315        2746 :         return py_sid;
    2316             : }
    2317             : 
    2318         201 : static int py_drsuapi_DsReplicaObjectIdentifier_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    2319             : {
    2320         201 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(py_obj);
    2321         201 :         if (value == NULL) {
    2322           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
    2323           0 :                 return -1;
    2324             :         }
    2325         201 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    2326         201 :         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         201 :         object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
    2331         201 :         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 = pytalloc_get_ptr(obj);
    2337           0 :         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 = 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           0 :                         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       91381 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get_dn(PyObject *obj, void *closure)
    2373             : {
    2374       91381 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(obj);
    2375           0 :         PyObject *py_dn;
    2376       91381 :         if (object->dn == NULL) {
    2377           0 :                 py_dn = Py_None;
    2378           0 :                 Py_INCREF(py_dn);
    2379             :         } else {
    2380       91381 :                 py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
    2381             :         }
    2382       91381 :         return py_dn;
    2383             : }
    2384             : 
    2385        5852 : static int py_drsuapi_DsReplicaObjectIdentifier_set_dn(PyObject *py_obj, PyObject *value, void *closure)
    2386             : {
    2387        5852 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(py_obj);
    2388        5852 :         if (value == NULL) {
    2389           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dn");
    2390           0 :                 return -1;
    2391             :         }
    2392             :         {
    2393           0 :                 const char *test_str;
    2394           0 :                 const char *talloc_str;
    2395        5852 :                 PyObject *unicode = NULL;
    2396        5852 :                 if (PyUnicode_Check(value)) {
    2397        5816 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2398        5816 :                         if (unicode == NULL) {
    2399           0 :                                 return -1;
    2400             :                         }
    2401        5816 :                         test_str = PyBytes_AS_STRING(unicode);
    2402          36 :                 } else if (PyBytes_Check(value)) {
    2403          36 :                         test_str = PyBytes_AS_STRING(value);
    2404             :                 } else {
    2405           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2406           0 :                         return -1;
    2407             :                 }
    2408        5852 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2409        5852 :                 if (unicode != NULL) {
    2410        4421 :                         Py_DECREF(unicode);
    2411             :                 }
    2412        5852 :                 if (talloc_str == NULL) {
    2413           0 :                         PyErr_NoMemory();
    2414           0 :                         return -1;
    2415             :                 }
    2416        5852 :                 object->dn = talloc_str;
    2417             :         }
    2418        5852 :         return 0;
    2419             : }
    2420             : 
    2421             : static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier_getsetters[] = {
    2422             :         {
    2423             :                 .name = discard_const_p(char, "__ndr_size"),
    2424             :                 .get = py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size,
    2425             :                 .set = py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size,
    2426             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2427             :         },
    2428             :         {
    2429             :                 .name = discard_const_p(char, "__ndr_size_sid"),
    2430             :                 .get = py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_sid,
    2431             :                 .set = py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_sid,
    2432             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2433             :         },
    2434             :         {
    2435             :                 .name = discard_const_p(char, "guid"),
    2436             :                 .get = py_drsuapi_DsReplicaObjectIdentifier_get_guid,
    2437             :                 .set = py_drsuapi_DsReplicaObjectIdentifier_set_guid,
    2438             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    2439             :         },
    2440             :         {
    2441             :                 .name = discard_const_p(char, "sid"),
    2442             :                 .get = py_drsuapi_DsReplicaObjectIdentifier_get_sid,
    2443             :                 .set = py_drsuapi_DsReplicaObjectIdentifier_set_sid,
    2444             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
    2445             :         },
    2446             :         {
    2447             :                 .name = discard_const_p(char, "__ndr_size_dn"),
    2448             :                 .get = py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_dn,
    2449             :                 .set = py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_dn,
    2450             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    2451             :         },
    2452             :         {
    2453             :                 .name = discard_const_p(char, "dn"),
    2454             :                 .get = py_drsuapi_DsReplicaObjectIdentifier_get_dn,
    2455             :                 .set = py_drsuapi_DsReplicaObjectIdentifier_set_dn,
    2456             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    2457             :         },
    2458             :         { .name = NULL }
    2459             : };
    2460             : 
    2461        5566 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2462             : {
    2463        5566 :         return pytalloc_new(struct drsuapi_DsReplicaObjectIdentifier, type);
    2464             : }
    2465             : 
    2466           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    2467             : {
    2468           0 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(py_obj);
    2469           0 :         PyObject *ret = NULL;
    2470           0 :         DATA_BLOB blob;
    2471           0 :         enum ndr_err_code err;
    2472           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    2473           0 :         if (tmp_ctx == NULL) {
    2474           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    2475           0 :                 return NULL;
    2476             :         }
    2477           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier);
    2478           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2479           0 :                 TALLOC_FREE(tmp_ctx);
    2480           0 :                 PyErr_SetNdrError(err);
    2481           0 :                 return NULL;
    2482             :         }
    2483             : 
    2484           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    2485           0 :         TALLOC_FREE(tmp_ctx);
    2486           0 :         return ret;
    2487             : }
    2488             : 
    2489           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    2490             : {
    2491           0 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(py_obj);
    2492           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    2493           0 :         Py_ssize_t blob_length = 0;
    2494           0 :         enum ndr_err_code err;
    2495           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    2496           0 :         PyObject *allow_remaining_obj = NULL;
    2497           0 :         bool allow_remaining = false;
    2498             : 
    2499           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    2500             :                 discard_const_p(char *, kwnames),
    2501             :                 &blob.data, &blob_length,
    2502             :                 &allow_remaining_obj)) {
    2503           0 :                 return NULL;
    2504             :         }
    2505           0 :         blob.length = blob_length;
    2506             : 
    2507           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    2508           0 :                 allow_remaining = true;
    2509             :         }
    2510             : 
    2511           0 :         if (allow_remaining) {
    2512           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier);
    2513             :         } else {
    2514           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier);
    2515             :         }
    2516           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    2517           0 :                 PyErr_SetNdrError(err);
    2518           0 :                 return NULL;
    2519             :         }
    2520             : 
    2521           0 :         Py_RETURN_NONE;
    2522             : }
    2523             : 
    2524           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    2525             : {
    2526           0 :         struct drsuapi_DsReplicaObjectIdentifier *object = pytalloc_get_ptr(py_obj);
    2527           0 :         PyObject *ret;
    2528           0 :         char *retstr;
    2529             : 
    2530           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier, "drsuapi_DsReplicaObjectIdentifier", object);
    2531           0 :         ret = PyUnicode_FromString(retstr);
    2532           0 :         talloc_free(retstr);
    2533             : 
    2534           0 :         return ret;
    2535             : }
    2536             : 
    2537             : static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier_methods[] = {
    2538             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    2539             :         { "__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" },
    2540             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    2541             :         { NULL, NULL, 0, NULL }
    2542             : };
    2543             : 
    2544             : 
    2545             : static PyTypeObject drsuapi_DsReplicaObjectIdentifier_Type = {
    2546             :         PyVarObject_HEAD_INIT(NULL, 0)
    2547             :         .tp_name = "drsuapi.DsReplicaObjectIdentifier",
    2548             :         .tp_getset = py_drsuapi_DsReplicaObjectIdentifier_getsetters,
    2549             :         .tp_methods = py_drsuapi_DsReplicaObjectIdentifier_methods,
    2550             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2551             :         .tp_new = py_drsuapi_DsReplicaObjectIdentifier_new,
    2552             : };
    2553             : 
    2554             : 
    2555           0 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_naming_context(PyObject *obj, void *closure)
    2556             : {
    2557           0 :         struct drsuapi_DsReplicaSyncRequest1 *object = pytalloc_get_ptr(obj);
    2558           0 :         PyObject *py_naming_context;
    2559           0 :         if (object->naming_context == NULL) {
    2560           0 :                 Py_RETURN_NONE;
    2561             :         }
    2562           0 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
    2563           0 :         return py_naming_context;
    2564             : }
    2565             : 
    2566         967 : static int py_drsuapi_DsReplicaSyncRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
    2567             : {
    2568         967 :         struct drsuapi_DsReplicaSyncRequest1 *object = pytalloc_get_ptr(py_obj);
    2569         967 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
    2570         967 :         if (value == NULL) {
    2571           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
    2572           0 :                 return -1;
    2573             :         }
    2574         967 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
    2575         967 :         if (object->naming_context == NULL) {
    2576           0 :                 PyErr_NoMemory();
    2577           0 :                 return -1;
    2578             :         }
    2579         967 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
    2580         967 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2581           0 :                 PyErr_NoMemory();
    2582           0 :                 return -1;
    2583             :         }
    2584         967 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
    2585         967 :         return 0;
    2586             : }
    2587             : 
    2588           0 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_guid(PyObject *obj, void *closure)
    2589             : {
    2590           0 :         struct drsuapi_DsReplicaSyncRequest1 *object = pytalloc_get_ptr(obj);
    2591           0 :         PyObject *py_source_dsa_guid;
    2592           0 :         py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
    2593           0 :         return py_source_dsa_guid;
    2594             : }
    2595             : 
    2596         967 : static int py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
    2597             : {
    2598         967 :         struct drsuapi_DsReplicaSyncRequest1 *object = pytalloc_get_ptr(py_obj);
    2599         967 :         if (value == NULL) {
    2600           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
    2601           0 :                 return -1;
    2602             :         }
    2603         967 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    2604         967 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    2605           0 :                 PyErr_NoMemory();
    2606           0 :                 return -1;
    2607             :         }
    2608         967 :         object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
    2609         967 :         return 0;
    2610             : }
    2611             : 
    2612           0 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_dns(PyObject *obj, void *closure)
    2613             : {
    2614           0 :         struct drsuapi_DsReplicaSyncRequest1 *object = pytalloc_get_ptr(obj);
    2615           0 :         PyObject *py_source_dsa_dns;
    2616           0 :         if (object->source_dsa_dns == NULL) {
    2617           0 :                 Py_RETURN_NONE;
    2618             :         }
    2619           0 :         if (object->source_dsa_dns == NULL) {
    2620           0 :                 py_source_dsa_dns = Py_None;
    2621           0 :                 Py_INCREF(py_source_dsa_dns);
    2622             :         } else {
    2623           0 :                 if (object->source_dsa_dns == NULL) {
    2624           0 :                         py_source_dsa_dns = Py_None;
    2625           0 :                         Py_INCREF(py_source_dsa_dns);
    2626             :                 } else {
    2627           0 :                         py_source_dsa_dns = PyUnicode_Decode(object->source_dsa_dns, strlen(object->source_dsa_dns), "utf-8", "ignore");
    2628             :                 }
    2629             :         }
    2630           0 :         return py_source_dsa_dns;
    2631             : }
    2632             : 
    2633           0 : static int py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_dns(PyObject *py_obj, PyObject *value, void *closure)
    2634             : {
    2635           0 :         struct drsuapi_DsReplicaSyncRequest1 *object = pytalloc_get_ptr(py_obj);
    2636           0 :         if (value == NULL) {
    2637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_dns");
    2638           0 :                 return -1;
    2639             :         }
    2640           0 :         if (value == Py_None) {
    2641           0 :                 object->source_dsa_dns = NULL;
    2642             :         } else {
    2643           0 :                 object->source_dsa_dns = NULL;
    2644             :                 {
    2645           0 :                         const char *test_str;
    2646           0 :                         const char *talloc_str;
    2647           0 :                         PyObject *unicode = NULL;
    2648           0 :                         if (PyUnicode_Check(value)) {
    2649           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    2650           0 :                                 if (unicode == NULL) {
    2651           0 :                                         return -1;
    2652             :                                 }
    2653           0 :                                 test_str = PyBytes_AS_STRING(unicode);
    2654           0 :                         } else if (PyBytes_Check(value)) {
    2655           0 :                                 test_str = PyBytes_AS_STRING(value);
    2656             :                         } else {
    2657           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    2658           0 :                                 return -1;
    2659             :                         }
    2660           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    2661           0 :                         if (unicode != NULL) {
    2662           0 :                                 Py_DECREF(unicode);
    2663             :                         }
    2664           0 :                         if (talloc_str == NULL) {
    2665           0 :                                 PyErr_NoMemory();
    2666           0 :                                 return -1;
    2667             :                         }
    2668           0 :                         object->source_dsa_dns = talloc_str;
    2669             :                 }
    2670             :         }
    2671           0 :         return 0;
    2672             : }
    2673             : 
    2674           0 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_options(PyObject *obj, void *closure)
    2675             : {
    2676           0 :         struct drsuapi_DsReplicaSyncRequest1 *object = pytalloc_get_ptr(obj);
    2677           0 :         PyObject *py_options;
    2678           0 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)(object->options));
    2679           0 :         return py_options;
    2680             : }
    2681             : 
    2682         967 : static int py_drsuapi_DsReplicaSyncRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
    2683             : {
    2684         967 :         struct drsuapi_DsReplicaSyncRequest1 *object = pytalloc_get_ptr(py_obj);
    2685         967 :         if (value == NULL) {
    2686           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
    2687           0 :                 return -1;
    2688             :         }
    2689             :         {
    2690         967 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
    2691         967 :                 if (PyLong_Check(value)) {
    2692           0 :                         unsigned long long test_var;
    2693         967 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2694         967 :                         if (PyErr_Occurred() != NULL) {
    2695           0 :                                 return -1;
    2696             :                         }
    2697         967 :                         if (test_var > uint_max) {
    2698           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2699             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2700           0 :                                 return -1;
    2701             :                         }
    2702         967 :                         object->options = test_var;
    2703             :                 } else {
    2704           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2705             :                           PyLong_Type.tp_name);
    2706           0 :                         return -1;
    2707             :                 }
    2708             :         }
    2709         967 :         return 0;
    2710             : }
    2711             : 
    2712             : static PyGetSetDef py_drsuapi_DsReplicaSyncRequest1_getsetters[] = {
    2713             :         {
    2714             :                 .name = discard_const_p(char, "naming_context"),
    2715             :                 .get = py_drsuapi_DsReplicaSyncRequest1_get_naming_context,
    2716             :                 .set = py_drsuapi_DsReplicaSyncRequest1_set_naming_context,
    2717             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
    2718             :         },
    2719             :         {
    2720             :                 .name = discard_const_p(char, "source_dsa_guid"),
    2721             :                 .get = py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_guid,
    2722             :                 .set = py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_guid,
    2723             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    2724             :         },
    2725             :         {
    2726             :                 .name = discard_const_p(char, "source_dsa_dns"),
    2727             :                 .get = py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_dns,
    2728             :                 .set = py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_dns,
    2729             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    2730             :         },
    2731             :         {
    2732             :                 .name = discard_const_p(char, "options"),
    2733             :                 .get = py_drsuapi_DsReplicaSyncRequest1_get_options,
    2734             :                 .set = py_drsuapi_DsReplicaSyncRequest1_set_options,
    2735             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
    2736             :         },
    2737             :         { .name = NULL }
    2738             : };
    2739             : 
    2740         967 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2741             : {
    2742         967 :         return pytalloc_new(struct drsuapi_DsReplicaSyncRequest1, type);
    2743             : }
    2744             : 
    2745             : 
    2746             : static PyTypeObject drsuapi_DsReplicaSyncRequest1_Type = {
    2747             :         PyVarObject_HEAD_INIT(NULL, 0)
    2748             :         .tp_name = "drsuapi.DsReplicaSyncRequest1",
    2749             :         .tp_getset = py_drsuapi_DsReplicaSyncRequest1_getsetters,
    2750             :         .tp_methods = NULL,
    2751             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2752             :         .tp_new = py_drsuapi_DsReplicaSyncRequest1_new,
    2753             : };
    2754             : 
    2755           0 : static PyObject *py_import_drsuapi_DsReplicaSyncRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaSyncRequest *in)
    2756             : {
    2757           0 :         PyObject *ret;
    2758             : 
    2759           0 :         switch (level) {
    2760           0 :                 case 1:
    2761           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsReplicaSyncRequest1_Type, mem_ctx, &in->req1);
    2762           0 :                         return ret;
    2763             : 
    2764             :         }
    2765           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    2766           0 :         return NULL;
    2767             : }
    2768             : 
    2769         967 : static union drsuapi_DsReplicaSyncRequest *py_export_drsuapi_DsReplicaSyncRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    2770             : {
    2771         967 :         union drsuapi_DsReplicaSyncRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaSyncRequest);
    2772         967 :         switch (level) {
    2773         967 :                 case 1:
    2774         967 :                         if (in == NULL) {
    2775           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
    2776           0 :                                 talloc_free(ret); return NULL;
    2777             :                         }
    2778         967 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaSyncRequest1_Type, in, talloc_free(ret); return NULL;);
    2779         967 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    2780           0 :                                 PyErr_NoMemory();
    2781           0 :                                 talloc_free(ret); return NULL;
    2782             :                         }
    2783         967 :                         ret->req1 = *(struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(in);
    2784         967 :                         break;
    2785             : 
    2786           0 :                 default:
    2787           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    2788           0 :                         talloc_free(ret);
    2789           0 :                         ret = NULL;
    2790             :         }
    2791             : 
    2792         967 :         return ret;
    2793             : }
    2794             : 
    2795           0 : static PyObject *py_drsuapi_DsReplicaSyncRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2796             : {
    2797           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2798           0 :         PyObject *mem_ctx_obj = NULL;
    2799           0 :         TALLOC_CTX *mem_ctx = NULL;
    2800           0 :         int level = 0;
    2801           0 :         PyObject *in_obj = NULL;
    2802           0 :         union drsuapi_DsReplicaSyncRequest *in = NULL;
    2803             : 
    2804           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    2805             :                 discard_const_p(char *, kwnames),
    2806             :                 &mem_ctx_obj,
    2807             :                 &level,
    2808             :                 &in_obj)) {
    2809           0 :                 return NULL;
    2810             :         }
    2811           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2812           0 :         if (mem_ctx == NULL) {
    2813           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2814           0 :                 return NULL;
    2815             :         }
    2816           0 :         in = (union drsuapi_DsReplicaSyncRequest *)pytalloc_get_ptr(in_obj);
    2817           0 :         if (in == NULL) {
    2818           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaSyncRequest!");
    2819           0 :                 return NULL;
    2820             :         }
    2821             : 
    2822           0 :         return py_import_drsuapi_DsReplicaSyncRequest(mem_ctx, level, in);
    2823             : }
    2824             : 
    2825         967 : static PyObject *py_drsuapi_DsReplicaSyncRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2826             : {
    2827         967 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    2828         967 :         PyObject *mem_ctx_obj = NULL;
    2829         967 :         TALLOC_CTX *mem_ctx = NULL;
    2830         967 :         int level = 0;
    2831         967 :         PyObject *in = NULL;
    2832         967 :         union drsuapi_DsReplicaSyncRequest *out = NULL;
    2833             : 
    2834         967 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    2835             :                 discard_const_p(char *, kwnames),
    2836             :                 &mem_ctx_obj,
    2837             :                 &level,
    2838             :                 &in)) {
    2839           0 :                 return NULL;
    2840             :         }
    2841         967 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    2842         967 :         if (mem_ctx == NULL) {
    2843           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    2844           0 :                 return NULL;
    2845             :         }
    2846             : 
    2847         967 :         out = py_export_drsuapi_DsReplicaSyncRequest(mem_ctx, level, in);
    2848         967 :         if (out == NULL) {
    2849           0 :                 return NULL;
    2850             :         }
    2851             : 
    2852         967 :         return pytalloc_GenericObject_reference(out);
    2853             : }
    2854             : 
    2855             : static PyMethodDef py_drsuapi_DsReplicaSyncRequest_methods[] = {
    2856             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSyncRequest_import),
    2857             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2858             :                 "T.__import__(mem_ctx, level, in) => ret." },
    2859             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSyncRequest_export),
    2860             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    2861             :                 "T.__export__(mem_ctx, level, in) => ret." },
    2862             :         { NULL, NULL, 0, NULL }
    2863             : };
    2864             : 
    2865           0 : static PyObject *py_drsuapi_DsReplicaSyncRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    2866             : {
    2867           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    2868           0 :         return NULL;
    2869             : }
    2870             : 
    2871             : 
    2872             : static PyTypeObject drsuapi_DsReplicaSyncRequest_Type = {
    2873             :         PyVarObject_HEAD_INIT(NULL, 0)
    2874             :         .tp_name = "drsuapi.DsReplicaSyncRequest",
    2875             :         .tp_getset = NULL,
    2876             :         .tp_methods = py_drsuapi_DsReplicaSyncRequest_methods,
    2877             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    2878             :         .tp_new = py_drsuapi_DsReplicaSyncRequest_new,
    2879             : };
    2880             : 
    2881             : 
    2882        2546 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_get_tmp_highest_usn(PyObject *obj, void *closure)
    2883             : {
    2884        2546 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(obj);
    2885           0 :         PyObject *py_tmp_highest_usn;
    2886        2546 :         py_tmp_highest_usn = PyLong_FromUnsignedLongLong(object->tmp_highest_usn);
    2887        2546 :         return py_tmp_highest_usn;
    2888             : }
    2889             : 
    2890        5508 : static int py_drsuapi_DsReplicaHighWaterMark_set_tmp_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
    2891             : {
    2892        5508 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(py_obj);
    2893        5508 :         if (value == NULL) {
    2894           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->tmp_highest_usn");
    2895           0 :                 return -1;
    2896             :         }
    2897             :         {
    2898        5508 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->tmp_highest_usn));
    2899        5508 :                 if (PyLong_Check(value)) {
    2900           0 :                         unsigned long long test_var;
    2901        5508 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2902        5508 :                         if (PyErr_Occurred() != NULL) {
    2903           0 :                                 return -1;
    2904             :                         }
    2905        5508 :                         if (test_var > uint_max) {
    2906           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2907             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2908           0 :                                 return -1;
    2909             :                         }
    2910        5508 :                         object->tmp_highest_usn = test_var;
    2911             :                 } else {
    2912           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2913             :                           PyLong_Type.tp_name);
    2914           0 :                         return -1;
    2915             :                 }
    2916             :         }
    2917        5508 :         return 0;
    2918             : }
    2919             : 
    2920        1081 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_get_reserved_usn(PyObject *obj, void *closure)
    2921             : {
    2922        1081 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(obj);
    2923           0 :         PyObject *py_reserved_usn;
    2924        1081 :         py_reserved_usn = PyLong_FromUnsignedLongLong(object->reserved_usn);
    2925        1081 :         return py_reserved_usn;
    2926             : }
    2927             : 
    2928        5508 : static int py_drsuapi_DsReplicaHighWaterMark_set_reserved_usn(PyObject *py_obj, PyObject *value, void *closure)
    2929             : {
    2930        5508 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(py_obj);
    2931        5508 :         if (value == NULL) {
    2932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved_usn");
    2933           0 :                 return -1;
    2934             :         }
    2935             :         {
    2936        5508 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved_usn));
    2937        5508 :                 if (PyLong_Check(value)) {
    2938           0 :                         unsigned long long test_var;
    2939        5508 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2940        5508 :                         if (PyErr_Occurred() != NULL) {
    2941           0 :                                 return -1;
    2942             :                         }
    2943        5508 :                         if (test_var > uint_max) {
    2944           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2945             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2946           0 :                                 return -1;
    2947             :                         }
    2948        5508 :                         object->reserved_usn = test_var;
    2949             :                 } else {
    2950           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2951             :                           PyLong_Type.tp_name);
    2952           0 :                         return -1;
    2953             :                 }
    2954             :         }
    2955        5508 :         return 0;
    2956             : }
    2957             : 
    2958        1204 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_get_highest_usn(PyObject *obj, void *closure)
    2959             : {
    2960        1204 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(obj);
    2961           0 :         PyObject *py_highest_usn;
    2962        1204 :         py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
    2963        1204 :         return py_highest_usn;
    2964             : }
    2965             : 
    2966        5508 : static int py_drsuapi_DsReplicaHighWaterMark_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
    2967             : {
    2968        5508 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(py_obj);
    2969        5508 :         if (value == NULL) {
    2970           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
    2971           0 :                 return -1;
    2972             :         }
    2973             :         {
    2974        5508 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
    2975        5508 :                 if (PyLong_Check(value)) {
    2976           0 :                         unsigned long long test_var;
    2977        5508 :                         test_var = PyLong_AsUnsignedLongLong(value);
    2978        5508 :                         if (PyErr_Occurred() != NULL) {
    2979           0 :                                 return -1;
    2980             :                         }
    2981        5508 :                         if (test_var > uint_max) {
    2982           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    2983             :                                   PyLong_Type.tp_name, uint_max, test_var);
    2984           0 :                                 return -1;
    2985             :                         }
    2986        5508 :                         object->highest_usn = test_var;
    2987             :                 } else {
    2988           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    2989             :                           PyLong_Type.tp_name);
    2990           0 :                         return -1;
    2991             :                 }
    2992             :         }
    2993        5508 :         return 0;
    2994             : }
    2995             : 
    2996             : static PyGetSetDef py_drsuapi_DsReplicaHighWaterMark_getsetters[] = {
    2997             :         {
    2998             :                 .name = discard_const_p(char, "tmp_highest_usn"),
    2999             :                 .get = py_drsuapi_DsReplicaHighWaterMark_get_tmp_highest_usn,
    3000             :                 .set = py_drsuapi_DsReplicaHighWaterMark_set_tmp_highest_usn,
    3001             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    3002             :         },
    3003             :         {
    3004             :                 .name = discard_const_p(char, "reserved_usn"),
    3005             :                 .get = py_drsuapi_DsReplicaHighWaterMark_get_reserved_usn,
    3006             :                 .set = py_drsuapi_DsReplicaHighWaterMark_set_reserved_usn,
    3007             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    3008             :         },
    3009             :         {
    3010             :                 .name = discard_const_p(char, "highest_usn"),
    3011             :                 .get = py_drsuapi_DsReplicaHighWaterMark_get_highest_usn,
    3012             :                 .set = py_drsuapi_DsReplicaHighWaterMark_set_highest_usn,
    3013             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    3014             :         },
    3015             :         { .name = NULL }
    3016             : };
    3017             : 
    3018        4437 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3019             : {
    3020        4437 :         return pytalloc_new(struct drsuapi_DsReplicaHighWaterMark, type);
    3021             : }
    3022             : 
    3023           0 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3024             : {
    3025           0 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(py_obj);
    3026           0 :         PyObject *ret = NULL;
    3027           0 :         DATA_BLOB blob;
    3028           0 :         enum ndr_err_code err;
    3029           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3030           0 :         if (tmp_ctx == NULL) {
    3031           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3032           0 :                 return NULL;
    3033             :         }
    3034           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaHighWaterMark);
    3035           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3036           0 :                 TALLOC_FREE(tmp_ctx);
    3037           0 :                 PyErr_SetNdrError(err);
    3038           0 :                 return NULL;
    3039             :         }
    3040             : 
    3041           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3042           0 :         TALLOC_FREE(tmp_ctx);
    3043           0 :         return ret;
    3044             : }
    3045             : 
    3046           0 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3047             : {
    3048           0 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(py_obj);
    3049           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3050           0 :         Py_ssize_t blob_length = 0;
    3051           0 :         enum ndr_err_code err;
    3052           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3053           0 :         PyObject *allow_remaining_obj = NULL;
    3054           0 :         bool allow_remaining = false;
    3055             : 
    3056           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3057             :                 discard_const_p(char *, kwnames),
    3058             :                 &blob.data, &blob_length,
    3059             :                 &allow_remaining_obj)) {
    3060           0 :                 return NULL;
    3061             :         }
    3062           0 :         blob.length = blob_length;
    3063             : 
    3064           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3065           0 :                 allow_remaining = true;
    3066             :         }
    3067             : 
    3068           0 :         if (allow_remaining) {
    3069           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaHighWaterMark);
    3070             :         } else {
    3071           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaHighWaterMark);
    3072             :         }
    3073           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3074           0 :                 PyErr_SetNdrError(err);
    3075           0 :                 return NULL;
    3076             :         }
    3077             : 
    3078           0 :         Py_RETURN_NONE;
    3079             : }
    3080             : 
    3081           0 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3082             : {
    3083           0 :         struct drsuapi_DsReplicaHighWaterMark *object = pytalloc_get_ptr(py_obj);
    3084           0 :         PyObject *ret;
    3085           0 :         char *retstr;
    3086             : 
    3087           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaHighWaterMark, "drsuapi_DsReplicaHighWaterMark", object);
    3088           0 :         ret = PyUnicode_FromString(retstr);
    3089           0 :         talloc_free(retstr);
    3090             : 
    3091           0 :         return ret;
    3092             : }
    3093             : 
    3094             : static PyMethodDef py_drsuapi_DsReplicaHighWaterMark_methods[] = {
    3095             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaHighWaterMark_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3096             :         { "__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" },
    3097             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaHighWaterMark_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3098             :         { NULL, NULL, 0, NULL }
    3099             : };
    3100             : 
    3101             : 
    3102             : static PyTypeObject drsuapi_DsReplicaHighWaterMark_Type = {
    3103             :         PyVarObject_HEAD_INIT(NULL, 0)
    3104             :         .tp_name = "drsuapi.DsReplicaHighWaterMark",
    3105             :         .tp_getset = py_drsuapi_DsReplicaHighWaterMark_getsetters,
    3106             :         .tp_methods = py_drsuapi_DsReplicaHighWaterMark_methods,
    3107             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3108             :         .tp_new = py_drsuapi_DsReplicaHighWaterMark_new,
    3109             : };
    3110             : 
    3111             : 
    3112           0 : static PyObject *py_drsuapi_DsReplicaCursor_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    3113             : {
    3114           0 :         struct drsuapi_DsReplicaCursor *object = pytalloc_get_ptr(obj);
    3115           0 :         PyObject *py_source_dsa_invocation_id;
    3116           0 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    3117           0 :         return py_source_dsa_invocation_id;
    3118             : }
    3119             : 
    3120         353 : static int py_drsuapi_DsReplicaCursor_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    3121             : {
    3122         353 :         struct drsuapi_DsReplicaCursor *object = pytalloc_get_ptr(py_obj);
    3123         353 :         if (value == NULL) {
    3124           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    3125           0 :                 return -1;
    3126             :         }
    3127         353 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    3128         353 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3129           0 :                 PyErr_NoMemory();
    3130           0 :                 return -1;
    3131             :         }
    3132         353 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    3133         353 :         return 0;
    3134             : }
    3135             : 
    3136           0 : static PyObject *py_drsuapi_DsReplicaCursor_get_highest_usn(PyObject *obj, void *closure)
    3137             : {
    3138           0 :         struct drsuapi_DsReplicaCursor *object = pytalloc_get_ptr(obj);
    3139           0 :         PyObject *py_highest_usn;
    3140           0 :         py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
    3141           0 :         return py_highest_usn;
    3142             : }
    3143             : 
    3144         353 : static int py_drsuapi_DsReplicaCursor_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
    3145             : {
    3146         353 :         struct drsuapi_DsReplicaCursor *object = pytalloc_get_ptr(py_obj);
    3147         353 :         if (value == NULL) {
    3148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
    3149           0 :                 return -1;
    3150             :         }
    3151             :         {
    3152         353 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
    3153         353 :                 if (PyLong_Check(value)) {
    3154           0 :                         unsigned long long test_var;
    3155         353 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3156         353 :                         if (PyErr_Occurred() != NULL) {
    3157           0 :                                 return -1;
    3158             :                         }
    3159         353 :                         if (test_var > uint_max) {
    3160           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3161             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3162           0 :                                 return -1;
    3163             :                         }
    3164         353 :                         object->highest_usn = test_var;
    3165             :                 } else {
    3166           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3167             :                           PyLong_Type.tp_name);
    3168           0 :                         return -1;
    3169             :                 }
    3170             :         }
    3171         353 :         return 0;
    3172             : }
    3173             : 
    3174             : static PyGetSetDef py_drsuapi_DsReplicaCursor_getsetters[] = {
    3175             :         {
    3176             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
    3177             :                 .get = py_drsuapi_DsReplicaCursor_get_source_dsa_invocation_id,
    3178             :                 .set = py_drsuapi_DsReplicaCursor_set_source_dsa_invocation_id,
    3179             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    3180             :         },
    3181             :         {
    3182             :                 .name = discard_const_p(char, "highest_usn"),
    3183             :                 .get = py_drsuapi_DsReplicaCursor_get_highest_usn,
    3184             :                 .set = py_drsuapi_DsReplicaCursor_set_highest_usn,
    3185             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    3186             :         },
    3187             :         { .name = NULL }
    3188             : };
    3189             : 
    3190         353 : static PyObject *py_drsuapi_DsReplicaCursor_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3191             : {
    3192         353 :         return pytalloc_new(struct drsuapi_DsReplicaCursor, type);
    3193             : }
    3194             : 
    3195           0 : static PyObject *py_drsuapi_DsReplicaCursor_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    3196             : {
    3197           0 :         struct drsuapi_DsReplicaCursor *object = pytalloc_get_ptr(py_obj);
    3198           0 :         PyObject *ret = NULL;
    3199           0 :         DATA_BLOB blob;
    3200           0 :         enum ndr_err_code err;
    3201           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    3202           0 :         if (tmp_ctx == NULL) {
    3203           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    3204           0 :                 return NULL;
    3205             :         }
    3206           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaCursor);
    3207           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3208           0 :                 TALLOC_FREE(tmp_ctx);
    3209           0 :                 PyErr_SetNdrError(err);
    3210           0 :                 return NULL;
    3211             :         }
    3212             : 
    3213           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    3214           0 :         TALLOC_FREE(tmp_ctx);
    3215           0 :         return ret;
    3216             : }
    3217             : 
    3218           0 : static PyObject *py_drsuapi_DsReplicaCursor_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    3219             : {
    3220           0 :         struct drsuapi_DsReplicaCursor *object = pytalloc_get_ptr(py_obj);
    3221           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    3222           0 :         Py_ssize_t blob_length = 0;
    3223           0 :         enum ndr_err_code err;
    3224           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    3225           0 :         PyObject *allow_remaining_obj = NULL;
    3226           0 :         bool allow_remaining = false;
    3227             : 
    3228           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    3229             :                 discard_const_p(char *, kwnames),
    3230             :                 &blob.data, &blob_length,
    3231             :                 &allow_remaining_obj)) {
    3232           0 :                 return NULL;
    3233             :         }
    3234           0 :         blob.length = blob_length;
    3235             : 
    3236           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    3237           0 :                 allow_remaining = true;
    3238             :         }
    3239             : 
    3240           0 :         if (allow_remaining) {
    3241           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor);
    3242             :         } else {
    3243           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor);
    3244             :         }
    3245           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    3246           0 :                 PyErr_SetNdrError(err);
    3247           0 :                 return NULL;
    3248             :         }
    3249             : 
    3250           0 :         Py_RETURN_NONE;
    3251             : }
    3252             : 
    3253           0 : static PyObject *py_drsuapi_DsReplicaCursor_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    3254             : {
    3255           0 :         struct drsuapi_DsReplicaCursor *object = pytalloc_get_ptr(py_obj);
    3256           0 :         PyObject *ret;
    3257           0 :         char *retstr;
    3258             : 
    3259           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaCursor, "drsuapi_DsReplicaCursor", object);
    3260           0 :         ret = PyUnicode_FromString(retstr);
    3261           0 :         talloc_free(retstr);
    3262             : 
    3263           0 :         return ret;
    3264             : }
    3265             : 
    3266             : static PyMethodDef py_drsuapi_DsReplicaCursor_methods[] = {
    3267             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaCursor_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    3268             :         { "__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" },
    3269             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaCursor_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    3270             :         { NULL, NULL, 0, NULL }
    3271             : };
    3272             : 
    3273             : 
    3274             : static PyTypeObject drsuapi_DsReplicaCursor_Type = {
    3275             :         PyVarObject_HEAD_INIT(NULL, 0)
    3276             :         .tp_name = "drsuapi.DsReplicaCursor",
    3277             :         .tp_getset = py_drsuapi_DsReplicaCursor_getsetters,
    3278             :         .tp_methods = py_drsuapi_DsReplicaCursor_methods,
    3279             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3280             :         .tp_new = py_drsuapi_DsReplicaCursor_new,
    3281             : };
    3282             : 
    3283             : 
    3284           0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_version(PyObject *obj, void *closure)
    3285             : {
    3286           0 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(obj);
    3287           0 :         PyObject *py_version;
    3288           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    3289           0 :         return py_version;
    3290             : }
    3291             : 
    3292          86 : static int py_drsuapi_DsReplicaCursorCtrEx_set_version(PyObject *py_obj, PyObject *value, void *closure)
    3293             : {
    3294          86 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(py_obj);
    3295          86 :         if (value == NULL) {
    3296           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    3297           0 :                 return -1;
    3298             :         }
    3299             :         {
    3300          86 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    3301          86 :                 if (PyLong_Check(value)) {
    3302           0 :                         unsigned long long test_var;
    3303          86 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3304          86 :                         if (PyErr_Occurred() != NULL) {
    3305           0 :                                 return -1;
    3306             :                         }
    3307          86 :                         if (test_var > uint_max) {
    3308           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3309             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3310           0 :                                 return -1;
    3311             :                         }
    3312          86 :                         object->version = test_var;
    3313             :                 } else {
    3314           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3315             :                           PyLong_Type.tp_name);
    3316           0 :                         return -1;
    3317             :                 }
    3318             :         }
    3319          86 :         return 0;
    3320             : }
    3321             : 
    3322           0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_reserved1(PyObject *obj, void *closure)
    3323             : {
    3324           0 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(obj);
    3325           0 :         PyObject *py_reserved1;
    3326           0 :         py_reserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved1));
    3327           0 :         return py_reserved1;
    3328             : }
    3329             : 
    3330          86 : static int py_drsuapi_DsReplicaCursorCtrEx_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
    3331             : {
    3332          86 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(py_obj);
    3333          86 :         if (value == NULL) {
    3334           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
    3335           0 :                 return -1;
    3336             :         }
    3337             :         {
    3338          86 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
    3339          86 :                 if (PyLong_Check(value)) {
    3340           0 :                         unsigned long long test_var;
    3341          86 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3342          86 :                         if (PyErr_Occurred() != NULL) {
    3343           0 :                                 return -1;
    3344             :                         }
    3345          86 :                         if (test_var > uint_max) {
    3346           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3347             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3348           0 :                                 return -1;
    3349             :                         }
    3350          86 :                         object->reserved1 = test_var;
    3351             :                 } else {
    3352           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3353             :                           PyLong_Type.tp_name);
    3354           0 :                         return -1;
    3355             :                 }
    3356             :         }
    3357          86 :         return 0;
    3358             : }
    3359             : 
    3360           0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_count(PyObject *obj, void *closure)
    3361             : {
    3362           0 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(obj);
    3363           0 :         PyObject *py_count;
    3364           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    3365           0 :         return py_count;
    3366             : }
    3367             : 
    3368         208 : static int py_drsuapi_DsReplicaCursorCtrEx_set_count(PyObject *py_obj, PyObject *value, void *closure)
    3369             : {
    3370         208 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(py_obj);
    3371         208 :         if (value == NULL) {
    3372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    3373           0 :                 return -1;
    3374             :         }
    3375             :         {
    3376         208 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    3377         208 :                 if (PyLong_Check(value)) {
    3378           0 :                         unsigned long long test_var;
    3379         208 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3380         208 :                         if (PyErr_Occurred() != NULL) {
    3381           0 :                                 return -1;
    3382             :                         }
    3383         208 :                         if (test_var > uint_max) {
    3384           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3385             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3386           0 :                                 return -1;
    3387             :                         }
    3388         208 :                         object->count = test_var;
    3389             :                 } else {
    3390           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3391             :                           PyLong_Type.tp_name);
    3392           0 :                         return -1;
    3393             :                 }
    3394             :         }
    3395         208 :         return 0;
    3396             : }
    3397             : 
    3398           0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_reserved2(PyObject *obj, void *closure)
    3399             : {
    3400           0 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(obj);
    3401           0 :         PyObject *py_reserved2;
    3402           0 :         py_reserved2 = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved2));
    3403           0 :         return py_reserved2;
    3404             : }
    3405             : 
    3406          86 : static int py_drsuapi_DsReplicaCursorCtrEx_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
    3407             : {
    3408          86 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(py_obj);
    3409          86 :         if (value == NULL) {
    3410           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved2");
    3411           0 :                 return -1;
    3412             :         }
    3413             :         {
    3414          86 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved2));
    3415          86 :                 if (PyLong_Check(value)) {
    3416           0 :                         unsigned long long test_var;
    3417          86 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3418          86 :                         if (PyErr_Occurred() != NULL) {
    3419           0 :                                 return -1;
    3420             :                         }
    3421          86 :                         if (test_var > uint_max) {
    3422           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3423             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3424           0 :                                 return -1;
    3425             :                         }
    3426          86 :                         object->reserved2 = test_var;
    3427             :                 } else {
    3428           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3429             :                           PyLong_Type.tp_name);
    3430           0 :                         return -1;
    3431             :                 }
    3432             :         }
    3433          86 :         return 0;
    3434             : }
    3435             : 
    3436           0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_cursors(PyObject *obj, void *closure)
    3437             : {
    3438           0 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(obj);
    3439           0 :         PyObject *py_cursors;
    3440           0 :         py_cursors = PyList_New(object->count);
    3441           0 :         if (py_cursors == NULL) {
    3442           0 :                 return NULL;
    3443             :         }
    3444             :         {
    3445             :                 int cursors_cntr_0;
    3446           0 :                 for (cursors_cntr_0 = 0; cursors_cntr_0 < (object->count); cursors_cntr_0++) {
    3447           0 :                         PyObject *py_cursors_0;
    3448           0 :                         py_cursors_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor_Type, object->cursors, &(object->cursors)[cursors_cntr_0]);
    3449           0 :                         PyList_SetItem(py_cursors, cursors_cntr_0, py_cursors_0);
    3450             :                 }
    3451             :         }
    3452           0 :         return py_cursors;
    3453             : }
    3454             : 
    3455         208 : static int py_drsuapi_DsReplicaCursorCtrEx_set_cursors(PyObject *py_obj, PyObject *value, void *closure)
    3456             : {
    3457         208 :         struct drsuapi_DsReplicaCursorCtrEx *object = pytalloc_get_ptr(py_obj);
    3458         208 :         if (value == NULL) {
    3459           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cursors");
    3460           0 :                 return -1;
    3461             :         }
    3462         208 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    3463             :         {
    3464           0 :                 int cursors_cntr_0;
    3465         208 :                 object->cursors = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cursors, PyList_GET_SIZE(value));
    3466         208 :                 if (!object->cursors) { return -1; }
    3467         208 :                 talloc_set_name_const(object->cursors, "ARRAY: object->cursors");
    3468         561 :                 for (cursors_cntr_0 = 0; cursors_cntr_0 < PyList_GET_SIZE(value); cursors_cntr_0++) {
    3469         353 :                         if (PyList_GET_ITEM(value, cursors_cntr_0) == NULL) {
    3470           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->cursors)[cursors_cntr_0]");
    3471           0 :                                 return -1;
    3472             :                         }
    3473         353 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaCursor_Type, PyList_GET_ITEM(value, cursors_cntr_0), return -1;);
    3474         353 :                         if (talloc_reference(object->cursors, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, cursors_cntr_0))) == NULL) {
    3475           0 :                                 PyErr_NoMemory();
    3476           0 :                                 return -1;
    3477             :                         }
    3478         353 :                         (object->cursors)[cursors_cntr_0] = *(struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(PyList_GET_ITEM(value, cursors_cntr_0));
    3479             :                 }
    3480             :         }
    3481         208 :         return 0;
    3482             : }
    3483             : 
    3484             : static PyGetSetDef py_drsuapi_DsReplicaCursorCtrEx_getsetters[] = {
    3485             :         {
    3486             :                 .name = discard_const_p(char, "version"),
    3487             :                 .get = py_drsuapi_DsReplicaCursorCtrEx_get_version,
    3488             :                 .set = py_drsuapi_DsReplicaCursorCtrEx_set_version,
    3489             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3490             :         },
    3491             :         {
    3492             :                 .name = discard_const_p(char, "reserved1"),
    3493             :                 .get = py_drsuapi_DsReplicaCursorCtrEx_get_reserved1,
    3494             :                 .set = py_drsuapi_DsReplicaCursorCtrEx_set_reserved1,
    3495             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3496             :         },
    3497             :         {
    3498             :                 .name = discard_const_p(char, "count"),
    3499             :                 .get = py_drsuapi_DsReplicaCursorCtrEx_get_count,
    3500             :                 .set = py_drsuapi_DsReplicaCursorCtrEx_set_count,
    3501             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3502             :         },
    3503             :         {
    3504             :                 .name = discard_const_p(char, "reserved2"),
    3505             :                 .get = py_drsuapi_DsReplicaCursorCtrEx_get_reserved2,
    3506             :                 .set = py_drsuapi_DsReplicaCursorCtrEx_set_reserved2,
    3507             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3508             :         },
    3509             :         {
    3510             :                 .name = discard_const_p(char, "cursors"),
    3511             :                 .get = py_drsuapi_DsReplicaCursorCtrEx_get_cursors,
    3512             :                 .set = py_drsuapi_DsReplicaCursorCtrEx_set_cursors,
    3513             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor")
    3514             :         },
    3515             :         { .name = NULL }
    3516             : };
    3517             : 
    3518         208 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3519             : {
    3520         208 :         return pytalloc_new(struct drsuapi_DsReplicaCursorCtrEx, type);
    3521             : }
    3522             : 
    3523             : 
    3524             : static PyTypeObject drsuapi_DsReplicaCursorCtrEx_Type = {
    3525             :         PyVarObject_HEAD_INIT(NULL, 0)
    3526             :         .tp_name = "drsuapi.DsReplicaCursorCtrEx",
    3527             :         .tp_getset = py_drsuapi_DsReplicaCursorCtrEx_getsetters,
    3528             :         .tp_methods = NULL,
    3529             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3530             :         .tp_new = py_drsuapi_DsReplicaCursorCtrEx_new,
    3531             : };
    3532             : 
    3533             : 
    3534           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_destination_dsa_guid(PyObject *obj, void *closure)
    3535             : {
    3536           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3537           0 :         PyObject *py_destination_dsa_guid;
    3538           0 :         py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
    3539           0 :         return py_destination_dsa_guid;
    3540             : }
    3541             : 
    3542           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
    3543             : {
    3544           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3545           0 :         if (value == NULL) {
    3546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->destination_dsa_guid");
    3547           0 :                 return -1;
    3548             :         }
    3549           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    3550           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3551           0 :                 PyErr_NoMemory();
    3552           0 :                 return -1;
    3553             :         }
    3554           0 :         object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
    3555           0 :         return 0;
    3556             : }
    3557             : 
    3558           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    3559             : {
    3560           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3561           0 :         PyObject *py_source_dsa_invocation_id;
    3562           0 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    3563           0 :         return py_source_dsa_invocation_id;
    3564             : }
    3565             : 
    3566           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    3567             : {
    3568           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3569           0 :         if (value == NULL) {
    3570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    3571           0 :                 return -1;
    3572             :         }
    3573           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    3574           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3575           0 :                 PyErr_NoMemory();
    3576           0 :                 return -1;
    3577             :         }
    3578           0 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    3579           0 :         return 0;
    3580             : }
    3581             : 
    3582           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_naming_context(PyObject *obj, void *closure)
    3583             : {
    3584           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3585           0 :         PyObject *py_naming_context;
    3586           0 :         if (object->naming_context == NULL) {
    3587           0 :                 Py_RETURN_NONE;
    3588             :         }
    3589           0 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
    3590           0 :         return py_naming_context;
    3591             : }
    3592             : 
    3593           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
    3594             : {
    3595           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3596           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
    3597           0 :         if (value == NULL) {
    3598           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
    3599           0 :                 return -1;
    3600             :         }
    3601           0 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
    3602           0 :         if (object->naming_context == NULL) {
    3603           0 :                 PyErr_NoMemory();
    3604           0 :                 return -1;
    3605             :         }
    3606           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
    3607           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3608           0 :                 PyErr_NoMemory();
    3609           0 :                 return -1;
    3610             :         }
    3611           0 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
    3612           0 :         return 0;
    3613             : }
    3614             : 
    3615           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_highwatermark(PyObject *obj, void *closure)
    3616             : {
    3617           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3618           0 :         PyObject *py_highwatermark;
    3619           0 :         py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
    3620           0 :         return py_highwatermark;
    3621             : }
    3622             : 
    3623           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    3624             : {
    3625           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3626           0 :         if (value == NULL) {
    3627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
    3628           0 :                 return -1;
    3629             :         }
    3630           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    3631           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3632           0 :                 PyErr_NoMemory();
    3633           0 :                 return -1;
    3634             :         }
    3635           0 :         object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    3636           0 :         return 0;
    3637             : }
    3638             : 
    3639           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_uptodateness_vector(PyObject *obj, void *closure)
    3640             : {
    3641           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3642           0 :         PyObject *py_uptodateness_vector;
    3643           0 :         if (object->uptodateness_vector == NULL) {
    3644           0 :                 Py_RETURN_NONE;
    3645             :         }
    3646           0 :         if (object->uptodateness_vector == NULL) {
    3647           0 :                 py_uptodateness_vector = Py_None;
    3648           0 :                 Py_INCREF(py_uptodateness_vector);
    3649             :         } else {
    3650           0 :                 py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
    3651             :         }
    3652           0 :         return py_uptodateness_vector;
    3653             : }
    3654             : 
    3655           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
    3656             : {
    3657           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3658           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
    3659           0 :         if (value == NULL) {
    3660           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
    3661           0 :                 return -1;
    3662             :         }
    3663           0 :         if (value == Py_None) {
    3664           0 :                 object->uptodateness_vector = NULL;
    3665             :         } else {
    3666           0 :                 object->uptodateness_vector = NULL;
    3667           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
    3668           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    3669           0 :                         PyErr_NoMemory();
    3670           0 :                         return -1;
    3671             :                 }
    3672           0 :                 object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
    3673             :         }
    3674           0 :         return 0;
    3675             : }
    3676             : 
    3677           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_replica_flags(PyObject *obj, void *closure)
    3678             : {
    3679           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3680           0 :         PyObject *py_replica_flags;
    3681           0 :         py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->replica_flags));
    3682           0 :         return py_replica_flags;
    3683             : }
    3684             : 
    3685           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
    3686             : {
    3687           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3688           0 :         if (value == NULL) {
    3689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
    3690           0 :                 return -1;
    3691             :         }
    3692             :         {
    3693           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
    3694           0 :                 if (PyLong_Check(value)) {
    3695           0 :                         unsigned long long test_var;
    3696           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3697           0 :                         if (PyErr_Occurred() != NULL) {
    3698           0 :                                 return -1;
    3699             :                         }
    3700           0 :                         if (test_var > uint_max) {
    3701           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3702             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3703           0 :                                 return -1;
    3704             :                         }
    3705           0 :                         object->replica_flags = test_var;
    3706             :                 } else {
    3707           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3708             :                           PyLong_Type.tp_name);
    3709           0 :                         return -1;
    3710             :                 }
    3711             :         }
    3712           0 :         return 0;
    3713             : }
    3714             : 
    3715           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_max_object_count(PyObject *obj, void *closure)
    3716             : {
    3717           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3718           0 :         PyObject *py_max_object_count;
    3719           0 :         py_max_object_count = PyLong_FromUnsignedLongLong((uint32_t)(object->max_object_count));
    3720           0 :         return py_max_object_count;
    3721             : }
    3722             : 
    3723           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
    3724             : {
    3725           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3726           0 :         if (value == NULL) {
    3727           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_object_count");
    3728           0 :                 return -1;
    3729             :         }
    3730             :         {
    3731           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_object_count));
    3732           0 :                 if (PyLong_Check(value)) {
    3733           0 :                         unsigned long long test_var;
    3734           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3735           0 :                         if (PyErr_Occurred() != NULL) {
    3736           0 :                                 return -1;
    3737             :                         }
    3738           0 :                         if (test_var > uint_max) {
    3739           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3740             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3741           0 :                                 return -1;
    3742             :                         }
    3743           0 :                         object->max_object_count = test_var;
    3744             :                 } else {
    3745           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3746             :                           PyLong_Type.tp_name);
    3747           0 :                         return -1;
    3748             :                 }
    3749             :         }
    3750           0 :         return 0;
    3751             : }
    3752             : 
    3753           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_max_ndr_size(PyObject *obj, void *closure)
    3754             : {
    3755           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3756           0 :         PyObject *py_max_ndr_size;
    3757           0 :         py_max_ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->max_ndr_size));
    3758           0 :         return py_max_ndr_size;
    3759             : }
    3760             : 
    3761           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    3762             : {
    3763           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3764           0 :         if (value == NULL) {
    3765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_ndr_size");
    3766           0 :                 return -1;
    3767             :         }
    3768             :         {
    3769           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_ndr_size));
    3770           0 :                 if (PyLong_Check(value)) {
    3771           0 :                         unsigned long long test_var;
    3772           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3773           0 :                         if (PyErr_Occurred() != NULL) {
    3774           0 :                                 return -1;
    3775             :                         }
    3776           0 :                         if (test_var > uint_max) {
    3777           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3778             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3779           0 :                                 return -1;
    3780             :                         }
    3781           0 :                         object->max_ndr_size = test_var;
    3782             :                 } else {
    3783           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3784             :                           PyLong_Type.tp_name);
    3785           0 :                         return -1;
    3786             :                 }
    3787             :         }
    3788           0 :         return 0;
    3789             : }
    3790             : 
    3791           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_extended_op(PyObject *obj, void *closure)
    3792             : {
    3793           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3794           0 :         PyObject *py_extended_op;
    3795           0 :         py_extended_op = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_op));
    3796           0 :         return py_extended_op;
    3797             : }
    3798             : 
    3799           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
    3800             : {
    3801           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3802           0 :         if (value == NULL) {
    3803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_op");
    3804           0 :                 return -1;
    3805             :         }
    3806             :         {
    3807           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_op));
    3808           0 :                 if (PyLong_Check(value)) {
    3809           0 :                         unsigned long long test_var;
    3810           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3811           0 :                         if (PyErr_Occurred() != NULL) {
    3812           0 :                                 return -1;
    3813             :                         }
    3814           0 :                         if (test_var > uint_max) {
    3815           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3816             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3817           0 :                                 return -1;
    3818             :                         }
    3819           0 :                         object->extended_op = test_var;
    3820             :                 } else {
    3821           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3822             :                           PyLong_Type.tp_name);
    3823           0 :                         return -1;
    3824             :                 }
    3825             :         }
    3826           0 :         return 0;
    3827             : }
    3828             : 
    3829           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_fsmo_info(PyObject *obj, void *closure)
    3830             : {
    3831           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(obj);
    3832           0 :         PyObject *py_fsmo_info;
    3833           0 :         py_fsmo_info = PyLong_FromUnsignedLongLong(object->fsmo_info);
    3834           0 :         return py_fsmo_info;
    3835             : }
    3836             : 
    3837           0 : static int py_drsuapi_DsGetNCChangesRequest5_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
    3838             : {
    3839           0 :         struct drsuapi_DsGetNCChangesRequest5 *object = pytalloc_get_ptr(py_obj);
    3840           0 :         if (value == NULL) {
    3841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fsmo_info");
    3842           0 :                 return -1;
    3843             :         }
    3844             :         {
    3845           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fsmo_info));
    3846           0 :                 if (PyLong_Check(value)) {
    3847           0 :                         unsigned long long test_var;
    3848           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3849           0 :                         if (PyErr_Occurred() != NULL) {
    3850           0 :                                 return -1;
    3851             :                         }
    3852           0 :                         if (test_var > uint_max) {
    3853           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3854             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3855           0 :                                 return -1;
    3856             :                         }
    3857           0 :                         object->fsmo_info = test_var;
    3858             :                 } else {
    3859           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3860             :                           PyLong_Type.tp_name);
    3861           0 :                         return -1;
    3862             :                 }
    3863             :         }
    3864           0 :         return 0;
    3865             : }
    3866             : 
    3867             : static PyGetSetDef py_drsuapi_DsGetNCChangesRequest5_getsetters[] = {
    3868             :         {
    3869             :                 .name = discard_const_p(char, "destination_dsa_guid"),
    3870             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_destination_dsa_guid,
    3871             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_destination_dsa_guid,
    3872             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    3873             :         },
    3874             :         {
    3875             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
    3876             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_source_dsa_invocation_id,
    3877             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_source_dsa_invocation_id,
    3878             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    3879             :         },
    3880             :         {
    3881             :                 .name = discard_const_p(char, "naming_context"),
    3882             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_naming_context,
    3883             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_naming_context,
    3884             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
    3885             :         },
    3886             :         {
    3887             :                 .name = discard_const_p(char, "highwatermark"),
    3888             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_highwatermark,
    3889             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_highwatermark,
    3890             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
    3891             :         },
    3892             :         {
    3893             :                 .name = discard_const_p(char, "uptodateness_vector"),
    3894             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_uptodateness_vector,
    3895             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_uptodateness_vector,
    3896             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursorCtrEx")
    3897             :         },
    3898             :         {
    3899             :                 .name = discard_const_p(char, "replica_flags"),
    3900             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_replica_flags,
    3901             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_replica_flags,
    3902             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
    3903             :         },
    3904             :         {
    3905             :                 .name = discard_const_p(char, "max_object_count"),
    3906             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_max_object_count,
    3907             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_max_object_count,
    3908             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3909             :         },
    3910             :         {
    3911             :                 .name = discard_const_p(char, "max_ndr_size"),
    3912             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_max_ndr_size,
    3913             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_max_ndr_size,
    3914             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    3915             :         },
    3916             :         {
    3917             :                 .name = discard_const_p(char, "extended_op"),
    3918             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_extended_op,
    3919             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_extended_op,
    3920             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedOperation")
    3921             :         },
    3922             :         {
    3923             :                 .name = discard_const_p(char, "fsmo_info"),
    3924             :                 .get = py_drsuapi_DsGetNCChangesRequest5_get_fsmo_info,
    3925             :                 .set = py_drsuapi_DsGetNCChangesRequest5_set_fsmo_info,
    3926             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    3927             :         },
    3928             :         { .name = NULL }
    3929             : };
    3930             : 
    3931           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    3932             : {
    3933           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesRequest5, type);
    3934             : }
    3935             : 
    3936             : 
    3937             : static PyTypeObject drsuapi_DsGetNCChangesRequest5_Type = {
    3938             :         PyVarObject_HEAD_INIT(NULL, 0)
    3939             :         .tp_name = "drsuapi.DsGetNCChangesRequest5",
    3940             :         .tp_getset = py_drsuapi_DsGetNCChangesRequest5_getsetters,
    3941             :         .tp_methods = NULL,
    3942             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    3943             :         .tp_new = py_drsuapi_DsGetNCChangesRequest5_new,
    3944             : };
    3945             : 
    3946             : 
    3947           0 : static PyObject *py_drsuapi_DsReplicaOID_get_length(PyObject *obj, void *closure)
    3948             : {
    3949           0 :         struct drsuapi_DsReplicaOID *object = pytalloc_get_ptr(obj);
    3950           0 :         PyObject *py_length;
    3951           0 :         py_length = PyLong_FromUnsignedLongLong((uint32_t)(object->length));
    3952           0 :         return py_length;
    3953             : }
    3954             : 
    3955          12 : static int py_drsuapi_DsReplicaOID_set_length(PyObject *py_obj, PyObject *value, void *closure)
    3956             : {
    3957          12 :         struct drsuapi_DsReplicaOID *object = pytalloc_get_ptr(py_obj);
    3958          12 :         if (value == NULL) {
    3959           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
    3960           0 :                 return -1;
    3961             :         }
    3962             :         {
    3963          12 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
    3964          12 :                 if (PyLong_Check(value)) {
    3965           0 :                         unsigned long long test_var;
    3966          12 :                         test_var = PyLong_AsUnsignedLongLong(value);
    3967          12 :                         if (PyErr_Occurred() != NULL) {
    3968           0 :                                 return -1;
    3969             :                         }
    3970          12 :                         if (test_var > uint_max) {
    3971           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    3972             :                                   PyLong_Type.tp_name, uint_max, test_var);
    3973           0 :                                 return -1;
    3974             :                         }
    3975          12 :                         object->length = test_var;
    3976             :                 } else {
    3977           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    3978             :                           PyLong_Type.tp_name);
    3979           0 :                         return -1;
    3980             :                 }
    3981             :         }
    3982          12 :         return 0;
    3983             : }
    3984             : 
    3985         498 : static PyObject *py_drsuapi_DsReplicaOID_get_binary_oid(PyObject *obj, void *closure)
    3986             : {
    3987         498 :         struct drsuapi_DsReplicaOID *object = pytalloc_get_ptr(obj);
    3988           0 :         PyObject *py_binary_oid;
    3989         498 :         if (object->binary_oid == NULL) {
    3990           0 :                 Py_RETURN_NONE;
    3991             :         }
    3992         498 :         if (object->binary_oid == NULL) {
    3993           0 :                 py_binary_oid = Py_None;
    3994           0 :                 Py_INCREF(py_binary_oid);
    3995             :         } else {
    3996         498 :                 py_binary_oid = PyList_New(object->length);
    3997         498 :                 if (py_binary_oid == NULL) {
    3998           0 :                         return NULL;
    3999             :                 }
    4000             :                 {
    4001             :                         int binary_oid_cntr_1;
    4002        4554 :                         for (binary_oid_cntr_1 = 0; binary_oid_cntr_1 < (object->length); binary_oid_cntr_1++) {
    4003           0 :                                 PyObject *py_binary_oid_1;
    4004        4056 :                                 py_binary_oid_1 = PyLong_FromLong((uint16_t)((object->binary_oid)[binary_oid_cntr_1]));
    4005        4056 :                                 PyList_SetItem(py_binary_oid, binary_oid_cntr_1, py_binary_oid_1);
    4006             :                         }
    4007             :                 }
    4008             :         }
    4009         498 :         return py_binary_oid;
    4010             : }
    4011             : 
    4012          12 : static int py_drsuapi_DsReplicaOID_set_binary_oid(PyObject *py_obj, PyObject *value, void *closure)
    4013             : {
    4014          12 :         struct drsuapi_DsReplicaOID *object = pytalloc_get_ptr(py_obj);
    4015          12 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->binary_oid));
    4016          12 :         if (value == NULL) {
    4017           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary_oid");
    4018           0 :                 return -1;
    4019             :         }
    4020          12 :         if (value == Py_None) {
    4021           0 :                 object->binary_oid = NULL;
    4022             :         } else {
    4023          12 :                 object->binary_oid = NULL;
    4024          12 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4025             :                 {
    4026           0 :                         int binary_oid_cntr_1;
    4027          12 :                         object->binary_oid = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary_oid, PyList_GET_SIZE(value));
    4028          12 :                         if (!object->binary_oid) { return -1; }
    4029          12 :                         talloc_set_name_const(object->binary_oid, "ARRAY: object->binary_oid");
    4030         264 :                         for (binary_oid_cntr_1 = 0; binary_oid_cntr_1 < PyList_GET_SIZE(value); binary_oid_cntr_1++) {
    4031         252 :                                 if (PyList_GET_ITEM(value, binary_oid_cntr_1) == NULL) {
    4032           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->binary_oid)[binary_oid_cntr_1]");
    4033           0 :                                         return -1;
    4034             :                                 }
    4035             :                                 {
    4036         252 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->binary_oid)[binary_oid_cntr_1]));
    4037         252 :                                         if (PyLong_Check(PyList_GET_ITEM(value, binary_oid_cntr_1))) {
    4038           0 :                                                 unsigned long long test_var;
    4039         252 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, binary_oid_cntr_1));
    4040         252 :                                                 if (PyErr_Occurred() != NULL) {
    4041           0 :                                                         return -1;
    4042             :                                                 }
    4043         252 :                                                 if (test_var > uint_max) {
    4044           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4045             :                                                           PyLong_Type.tp_name, uint_max, test_var);
    4046           0 :                                                         return -1;
    4047             :                                                 }
    4048         252 :                                                 (object->binary_oid)[binary_oid_cntr_1] = test_var;
    4049             :                                         } else {
    4050           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
    4051             :                                                   PyLong_Type.tp_name);
    4052           0 :                                                 return -1;
    4053             :                                         }
    4054             :                                 }
    4055             :                         }
    4056             :                 }
    4057             :         }
    4058          12 :         return 0;
    4059             : }
    4060             : 
    4061             : static PyGetSetDef py_drsuapi_DsReplicaOID_getsetters[] = {
    4062             :         {
    4063             :                 .name = discard_const_p(char, "length"),
    4064             :                 .get = py_drsuapi_DsReplicaOID_get_length,
    4065             :                 .set = py_drsuapi_DsReplicaOID_set_length,
    4066             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4067             :         },
    4068             :         {
    4069             :                 .name = discard_const_p(char, "binary_oid"),
    4070             :                 .get = py_drsuapi_DsReplicaOID_get_binary_oid,
    4071             :                 .set = py_drsuapi_DsReplicaOID_set_binary_oid,
    4072             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
    4073             :         },
    4074             :         { .name = NULL }
    4075             : };
    4076             : 
    4077           0 : static PyObject *py_drsuapi_DsReplicaOID_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4078             : {
    4079           0 :         return pytalloc_new(struct drsuapi_DsReplicaOID, type);
    4080             : }
    4081             : 
    4082             : 
    4083             : static PyTypeObject drsuapi_DsReplicaOID_Type = {
    4084             :         PyVarObject_HEAD_INIT(NULL, 0)
    4085             :         .tp_name = "drsuapi.DsReplicaOID",
    4086             :         .tp_getset = py_drsuapi_DsReplicaOID_getsetters,
    4087             :         .tp_methods = NULL,
    4088             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4089             :         .tp_new = py_drsuapi_DsReplicaOID_new,
    4090             : };
    4091             : 
    4092             : 
    4093          12 : static PyObject *py_drsuapi_DsReplicaOIDMapping_get_id_prefix(PyObject *obj, void *closure)
    4094             : {
    4095          12 :         struct drsuapi_DsReplicaOIDMapping *object = pytalloc_get_ptr(obj);
    4096           0 :         PyObject *py_id_prefix;
    4097          12 :         py_id_prefix = PyLong_FromUnsignedLongLong((uint32_t)(object->id_prefix));
    4098          12 :         return py_id_prefix;
    4099             : }
    4100             : 
    4101          24 : static int py_drsuapi_DsReplicaOIDMapping_set_id_prefix(PyObject *py_obj, PyObject *value, void *closure)
    4102             : {
    4103          24 :         struct drsuapi_DsReplicaOIDMapping *object = pytalloc_get_ptr(py_obj);
    4104          24 :         if (value == NULL) {
    4105           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id_prefix");
    4106           0 :                 return -1;
    4107             :         }
    4108             :         {
    4109          24 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->id_prefix));
    4110          24 :                 if (PyLong_Check(value)) {
    4111           0 :                         unsigned long long test_var;
    4112          24 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4113          24 :                         if (PyErr_Occurred() != NULL) {
    4114           0 :                                 return -1;
    4115             :                         }
    4116          24 :                         if (test_var > uint_max) {
    4117           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4118             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4119           0 :                                 return -1;
    4120             :                         }
    4121          24 :                         object->id_prefix = test_var;
    4122             :                 } else {
    4123           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4124             :                           PyLong_Type.tp_name);
    4125           0 :                         return -1;
    4126             :                 }
    4127             :         }
    4128          24 :         return 0;
    4129             : }
    4130             : 
    4131         522 : static PyObject *py_drsuapi_DsReplicaOIDMapping_get_oid(PyObject *obj, void *closure)
    4132             : {
    4133         522 :         struct drsuapi_DsReplicaOIDMapping *object = pytalloc_get_ptr(obj);
    4134           0 :         PyObject *py_oid;
    4135         522 :         py_oid = pytalloc_reference_ex(&drsuapi_DsReplicaOID_Type, pytalloc_get_mem_ctx(obj), &object->oid);
    4136         522 :         return py_oid;
    4137             : }
    4138             : 
    4139           0 : static int py_drsuapi_DsReplicaOIDMapping_set_oid(PyObject *py_obj, PyObject *value, void *closure)
    4140             : {
    4141           0 :         struct drsuapi_DsReplicaOIDMapping *object = pytalloc_get_ptr(py_obj);
    4142           0 :         if (value == NULL) {
    4143           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oid");
    4144           0 :                 return -1;
    4145             :         }
    4146           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaOID_Type, value, return -1;);
    4147           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4148           0 :                 PyErr_NoMemory();
    4149           0 :                 return -1;
    4150             :         }
    4151           0 :         object->oid = *(struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(value);
    4152           0 :         return 0;
    4153             : }
    4154             : 
    4155             : static PyGetSetDef py_drsuapi_DsReplicaOIDMapping_getsetters[] = {
    4156             :         {
    4157             :                 .name = discard_const_p(char, "id_prefix"),
    4158             :                 .get = py_drsuapi_DsReplicaOIDMapping_get_id_prefix,
    4159             :                 .set = py_drsuapi_DsReplicaOIDMapping_set_id_prefix,
    4160             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4161             :         },
    4162             :         {
    4163             :                 .name = discard_const_p(char, "oid"),
    4164             :                 .get = py_drsuapi_DsReplicaOIDMapping_get_oid,
    4165             :                 .set = py_drsuapi_DsReplicaOIDMapping_set_oid,
    4166             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOID")
    4167             :         },
    4168             :         { .name = NULL }
    4169             : };
    4170             : 
    4171          12 : static PyObject *py_drsuapi_DsReplicaOIDMapping_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4172             : {
    4173          12 :         return pytalloc_new(struct drsuapi_DsReplicaOIDMapping, type);
    4174             : }
    4175             : 
    4176             : 
    4177             : static PyTypeObject drsuapi_DsReplicaOIDMapping_Type = {
    4178             :         PyVarObject_HEAD_INIT(NULL, 0)
    4179             :         .tp_name = "drsuapi.DsReplicaOIDMapping",
    4180             :         .tp_getset = py_drsuapi_DsReplicaOIDMapping_getsetters,
    4181             :         .tp_methods = NULL,
    4182             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4183             :         .tp_new = py_drsuapi_DsReplicaOIDMapping_new,
    4184             : };
    4185             : 
    4186             : 
    4187          12 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_get_num_mappings(PyObject *obj, void *closure)
    4188             : {
    4189          12 :         struct drsuapi_DsReplicaOIDMapping_Ctr *object = pytalloc_get_ptr(obj);
    4190           0 :         PyObject *py_num_mappings;
    4191          12 :         py_num_mappings = PyLong_FromUnsignedLongLong((uint32_t)(object->num_mappings));
    4192          12 :         return py_num_mappings;
    4193             : }
    4194             : 
    4195        4290 : static int py_drsuapi_DsReplicaOIDMapping_Ctr_set_num_mappings(PyObject *py_obj, PyObject *value, void *closure)
    4196             : {
    4197        4290 :         struct drsuapi_DsReplicaOIDMapping_Ctr *object = pytalloc_get_ptr(py_obj);
    4198        4290 :         if (value == NULL) {
    4199           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_mappings");
    4200           0 :                 return -1;
    4201             :         }
    4202             :         {
    4203        4290 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_mappings));
    4204        4290 :                 if (PyLong_Check(value)) {
    4205           0 :                         unsigned long long test_var;
    4206        4290 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4207        4290 :                         if (PyErr_Occurred() != NULL) {
    4208           0 :                                 return -1;
    4209             :                         }
    4210        4290 :                         if (test_var > uint_max) {
    4211           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4212             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4213           0 :                                 return -1;
    4214             :                         }
    4215        4290 :                         object->num_mappings = test_var;
    4216             :                 } else {
    4217           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4218             :                           PyLong_Type.tp_name);
    4219           0 :                         return -1;
    4220             :                 }
    4221             :         }
    4222        4290 :         return 0;
    4223             : }
    4224             : 
    4225          48 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_get_mappings(PyObject *obj, void *closure)
    4226             : {
    4227          48 :         struct drsuapi_DsReplicaOIDMapping_Ctr *object = pytalloc_get_ptr(obj);
    4228           0 :         PyObject *py_mappings;
    4229          48 :         if (object->mappings == NULL) {
    4230           0 :                 Py_RETURN_NONE;
    4231             :         }
    4232          48 :         if (object->mappings == NULL) {
    4233           0 :                 py_mappings = Py_None;
    4234           0 :                 Py_INCREF(py_mappings);
    4235             :         } else {
    4236          48 :                 py_mappings = PyList_New(object->num_mappings);
    4237          48 :                 if (py_mappings == NULL) {
    4238           0 :                         return NULL;
    4239             :                 }
    4240             :                 {
    4241             :                         int mappings_cntr_1;
    4242        2052 :                         for (mappings_cntr_1 = 0; mappings_cntr_1 < (object->num_mappings); mappings_cntr_1++) {
    4243           0 :                                 PyObject *py_mappings_1;
    4244        2004 :                                 py_mappings_1 = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Type, object->mappings, &(object->mappings)[mappings_cntr_1]);
    4245        2004 :                                 PyList_SetItem(py_mappings, mappings_cntr_1, py_mappings_1);
    4246             :                         }
    4247             :                 }
    4248             :         }
    4249          48 :         return py_mappings;
    4250             : }
    4251             : 
    4252        4296 : static int py_drsuapi_DsReplicaOIDMapping_Ctr_set_mappings(PyObject *py_obj, PyObject *value, void *closure)
    4253             : {
    4254        4296 :         struct drsuapi_DsReplicaOIDMapping_Ctr *object = pytalloc_get_ptr(py_obj);
    4255        4296 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->mappings));
    4256        4296 :         if (value == NULL) {
    4257           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mappings");
    4258           0 :                 return -1;
    4259             :         }
    4260        4296 :         if (value == Py_None) {
    4261        4278 :                 object->mappings = NULL;
    4262             :         } else {
    4263          18 :                 object->mappings = NULL;
    4264          18 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4265             :                 {
    4266           0 :                         int mappings_cntr_1;
    4267          18 :                         object->mappings = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->mappings, PyList_GET_SIZE(value));
    4268          18 :                         if (!object->mappings) { return -1; }
    4269          18 :                         talloc_set_name_const(object->mappings, "ARRAY: object->mappings");
    4270         774 :                         for (mappings_cntr_1 = 0; mappings_cntr_1 < PyList_GET_SIZE(value); mappings_cntr_1++) {
    4271         756 :                                 if (PyList_GET_ITEM(value, mappings_cntr_1) == NULL) {
    4272           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->mappings)[mappings_cntr_1]");
    4273           0 :                                         return -1;
    4274             :                                 }
    4275         756 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Type, PyList_GET_ITEM(value, mappings_cntr_1), return -1;);
    4276         756 :                                 if (talloc_reference(object->mappings, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, mappings_cntr_1))) == NULL) {
    4277           0 :                                         PyErr_NoMemory();
    4278           0 :                                         return -1;
    4279             :                                 }
    4280         756 :                                 (object->mappings)[mappings_cntr_1] = *(struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(PyList_GET_ITEM(value, mappings_cntr_1));
    4281             :                         }
    4282             :                 }
    4283             :         }
    4284        4296 :         return 0;
    4285             : }
    4286             : 
    4287             : static PyGetSetDef py_drsuapi_DsReplicaOIDMapping_Ctr_getsetters[] = {
    4288             :         {
    4289             :                 .name = discard_const_p(char, "num_mappings"),
    4290             :                 .get = py_drsuapi_DsReplicaOIDMapping_Ctr_get_num_mappings,
    4291             :                 .set = py_drsuapi_DsReplicaOIDMapping_Ctr_set_num_mappings,
    4292             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4293             :         },
    4294             :         {
    4295             :                 .name = discard_const_p(char, "mappings"),
    4296             :                 .get = py_drsuapi_DsReplicaOIDMapping_Ctr_get_mappings,
    4297             :                 .set = py_drsuapi_DsReplicaOIDMapping_Ctr_set_mappings,
    4298             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping")
    4299             :         },
    4300             :         { .name = NULL }
    4301             : };
    4302             : 
    4303           0 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4304             : {
    4305           0 :         return pytalloc_new(struct drsuapi_DsReplicaOIDMapping_Ctr, type);
    4306             : }
    4307             : 
    4308           0 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    4309             : {
    4310           0 :         struct drsuapi_DsReplicaOIDMapping_Ctr *object = pytalloc_get_ptr(py_obj);
    4311           0 :         PyObject *ret = NULL;
    4312           0 :         DATA_BLOB blob;
    4313           0 :         enum ndr_err_code err;
    4314           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    4315           0 :         if (tmp_ctx == NULL) {
    4316           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    4317           0 :                 return NULL;
    4318             :         }
    4319           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaOIDMapping_Ctr);
    4320           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4321           0 :                 TALLOC_FREE(tmp_ctx);
    4322           0 :                 PyErr_SetNdrError(err);
    4323           0 :                 return NULL;
    4324             :         }
    4325             : 
    4326           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    4327           0 :         TALLOC_FREE(tmp_ctx);
    4328           0 :         return ret;
    4329             : }
    4330             : 
    4331           0 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    4332             : {
    4333           0 :         struct drsuapi_DsReplicaOIDMapping_Ctr *object = pytalloc_get_ptr(py_obj);
    4334           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    4335           0 :         Py_ssize_t blob_length = 0;
    4336           0 :         enum ndr_err_code err;
    4337           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    4338           0 :         PyObject *allow_remaining_obj = NULL;
    4339           0 :         bool allow_remaining = false;
    4340             : 
    4341           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    4342             :                 discard_const_p(char *, kwnames),
    4343             :                 &blob.data, &blob_length,
    4344             :                 &allow_remaining_obj)) {
    4345           0 :                 return NULL;
    4346             :         }
    4347           0 :         blob.length = blob_length;
    4348             : 
    4349           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    4350           0 :                 allow_remaining = true;
    4351             :         }
    4352             : 
    4353           0 :         if (allow_remaining) {
    4354           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr);
    4355             :         } else {
    4356           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);
    4357             :         }
    4358           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    4359           0 :                 PyErr_SetNdrError(err);
    4360           0 :                 return NULL;
    4361             :         }
    4362             : 
    4363           0 :         Py_RETURN_NONE;
    4364             : }
    4365             : 
    4366           0 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    4367             : {
    4368           0 :         struct drsuapi_DsReplicaOIDMapping_Ctr *object = pytalloc_get_ptr(py_obj);
    4369           0 :         PyObject *ret;
    4370           0 :         char *retstr;
    4371             : 
    4372           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);
    4373           0 :         ret = PyUnicode_FromString(retstr);
    4374           0 :         talloc_free(retstr);
    4375             : 
    4376           0 :         return ret;
    4377             : }
    4378             : 
    4379             : static PyMethodDef py_drsuapi_DsReplicaOIDMapping_Ctr_methods[] = {
    4380             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    4381             :         { "__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" },
    4382             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    4383             :         { NULL, NULL, 0, NULL }
    4384             : };
    4385             : 
    4386             : 
    4387             : static PyTypeObject drsuapi_DsReplicaOIDMapping_Ctr_Type = {
    4388             :         PyVarObject_HEAD_INIT(NULL, 0)
    4389             :         .tp_name = "drsuapi.DsReplicaOIDMapping_Ctr",
    4390             :         .tp_getset = py_drsuapi_DsReplicaOIDMapping_Ctr_getsetters,
    4391             :         .tp_methods = py_drsuapi_DsReplicaOIDMapping_Ctr_methods,
    4392             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4393             :         .tp_new = py_drsuapi_DsReplicaOIDMapping_Ctr_new,
    4394             : };
    4395             : 
    4396             : 
    4397           0 : static PyObject *py_drsuapi_DsPartialAttributeSet_get_version(PyObject *obj, void *closure)
    4398             : {
    4399           0 :         struct drsuapi_DsPartialAttributeSet *object = pytalloc_get_ptr(obj);
    4400           0 :         PyObject *py_version;
    4401           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    4402           0 :         return py_version;
    4403             : }
    4404             : 
    4405        2903 : static int py_drsuapi_DsPartialAttributeSet_set_version(PyObject *py_obj, PyObject *value, void *closure)
    4406             : {
    4407        2903 :         struct drsuapi_DsPartialAttributeSet *object = pytalloc_get_ptr(py_obj);
    4408        2903 :         if (value == NULL) {
    4409           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    4410           0 :                 return -1;
    4411             :         }
    4412             :         {
    4413        2903 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    4414        2903 :                 if (PyLong_Check(value)) {
    4415           1 :                         unsigned long long test_var;
    4416        2903 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4417        2903 :                         if (PyErr_Occurred() != NULL) {
    4418           0 :                                 return -1;
    4419             :                         }
    4420        2903 :                         if (test_var > uint_max) {
    4421           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4422             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4423           0 :                                 return -1;
    4424             :                         }
    4425        2903 :                         object->version = test_var;
    4426             :                 } else {
    4427           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4428             :                           PyLong_Type.tp_name);
    4429           0 :                         return -1;
    4430             :                 }
    4431             :         }
    4432        2903 :         return 0;
    4433             : }
    4434             : 
    4435           0 : static PyObject *py_drsuapi_DsPartialAttributeSet_get_reserved1(PyObject *obj, void *closure)
    4436             : {
    4437           0 :         struct drsuapi_DsPartialAttributeSet *object = pytalloc_get_ptr(obj);
    4438           0 :         PyObject *py_reserved1;
    4439           0 :         py_reserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved1));
    4440           0 :         return py_reserved1;
    4441             : }
    4442             : 
    4443           0 : static int py_drsuapi_DsPartialAttributeSet_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
    4444             : {
    4445           0 :         struct drsuapi_DsPartialAttributeSet *object = pytalloc_get_ptr(py_obj);
    4446           0 :         if (value == NULL) {
    4447           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
    4448           0 :                 return -1;
    4449             :         }
    4450             :         {
    4451           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
    4452           0 :                 if (PyLong_Check(value)) {
    4453           0 :                         unsigned long long test_var;
    4454           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4455           0 :                         if (PyErr_Occurred() != NULL) {
    4456           0 :                                 return -1;
    4457             :                         }
    4458           0 :                         if (test_var > uint_max) {
    4459           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4460             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4461           0 :                                 return -1;
    4462             :                         }
    4463           0 :                         object->reserved1 = test_var;
    4464             :                 } else {
    4465           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4466             :                           PyLong_Type.tp_name);
    4467           0 :                         return -1;
    4468             :                 }
    4469             :         }
    4470           0 :         return 0;
    4471             : }
    4472             : 
    4473           0 : static PyObject *py_drsuapi_DsPartialAttributeSet_get_num_attids(PyObject *obj, void *closure)
    4474             : {
    4475           0 :         struct drsuapi_DsPartialAttributeSet *object = pytalloc_get_ptr(obj);
    4476           0 :         PyObject *py_num_attids;
    4477           0 :         py_num_attids = PyLong_FromUnsignedLongLong((uint32_t)(object->num_attids));
    4478           0 :         return py_num_attids;
    4479             : }
    4480             : 
    4481        2943 : static int py_drsuapi_DsPartialAttributeSet_set_num_attids(PyObject *py_obj, PyObject *value, void *closure)
    4482             : {
    4483        2943 :         struct drsuapi_DsPartialAttributeSet *object = pytalloc_get_ptr(py_obj);
    4484        2943 :         if (value == NULL) {
    4485           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_attids");
    4486           0 :                 return -1;
    4487             :         }
    4488             :         {
    4489        2943 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_attids));
    4490        2943 :                 if (PyLong_Check(value)) {
    4491           1 :                         unsigned long long test_var;
    4492        2943 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4493        2943 :                         if (PyErr_Occurred() != NULL) {
    4494           0 :                                 return -1;
    4495             :                         }
    4496        2943 :                         if (test_var > uint_max) {
    4497           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4498             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4499           0 :                                 return -1;
    4500             :                         }
    4501        2943 :                         object->num_attids = test_var;
    4502             :                 } else {
    4503           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4504             :                           PyLong_Type.tp_name);
    4505           0 :                         return -1;
    4506             :                 }
    4507             :         }
    4508        2943 :         return 0;
    4509             : }
    4510             : 
    4511           1 : static PyObject *py_drsuapi_DsPartialAttributeSet_get_attids(PyObject *obj, void *closure)
    4512             : {
    4513           1 :         struct drsuapi_DsPartialAttributeSet *object = pytalloc_get_ptr(obj);
    4514           1 :         PyObject *py_attids;
    4515           1 :         py_attids = PyList_New(object->num_attids);
    4516           1 :         if (py_attids == NULL) {
    4517           0 :                 return NULL;
    4518             :         }
    4519             :         {
    4520             :                 int attids_cntr_0;
    4521           4 :                 for (attids_cntr_0 = 0; attids_cntr_0 < (object->num_attids); attids_cntr_0++) {
    4522           3 :                         PyObject *py_attids_0;
    4523           3 :                         py_attids_0 = PyLong_FromUnsignedLongLong((uint32_t)((object->attids)[attids_cntr_0]));
    4524           3 :                         PyList_SetItem(py_attids, attids_cntr_0, py_attids_0);
    4525             :                 }
    4526             :         }
    4527           0 :         return py_attids;
    4528             : }
    4529             : 
    4530        2943 : static int py_drsuapi_DsPartialAttributeSet_set_attids(PyObject *py_obj, PyObject *value, void *closure)
    4531             : {
    4532        2943 :         struct drsuapi_DsPartialAttributeSet *object = pytalloc_get_ptr(py_obj);
    4533        2943 :         if (value == NULL) {
    4534           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attids");
    4535           0 :                 return -1;
    4536             :         }
    4537        2943 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    4538             :         {
    4539           1 :                 int attids_cntr_0;
    4540        2943 :                 object->attids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attids, PyList_GET_SIZE(value));
    4541        2943 :                 if (!object->attids) { return -1; }
    4542        2943 :                 talloc_set_name_const(object->attids, "ARRAY: object->attids");
    4543      129467 :                 for (attids_cntr_0 = 0; attids_cntr_0 < PyList_GET_SIZE(value); attids_cntr_0++) {
    4544      126523 :                         if (PyList_GET_ITEM(value, attids_cntr_0) == NULL) {
    4545           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->attids)[attids_cntr_0]");
    4546           0 :                                 return -1;
    4547             :                         }
    4548             :                         {
    4549      126523 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->attids)[attids_cntr_0]));
    4550      126523 :                                 if (PyLong_Check(PyList_GET_ITEM(value, attids_cntr_0))) {
    4551           3 :                                         unsigned long long test_var;
    4552      126523 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, attids_cntr_0));
    4553      126523 :                                         if (PyErr_Occurred() != NULL) {
    4554           0 :                                                 return -1;
    4555             :                                         }
    4556      126523 :                                         if (test_var > uint_max) {
    4557           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4558             :                                                   PyLong_Type.tp_name, uint_max, test_var);
    4559           0 :                                                 return -1;
    4560             :                                         }
    4561      126523 :                                         (object->attids)[attids_cntr_0] = test_var;
    4562             :                                 } else {
    4563           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4564             :                                           PyLong_Type.tp_name);
    4565           0 :                                         return -1;
    4566             :                                 }
    4567             :                         }
    4568             :                 }
    4569             :         }
    4570        2942 :         return 0;
    4571             : }
    4572             : 
    4573             : static PyGetSetDef py_drsuapi_DsPartialAttributeSet_getsetters[] = {
    4574             :         {
    4575             :                 .name = discard_const_p(char, "version"),
    4576             :                 .get = py_drsuapi_DsPartialAttributeSet_get_version,
    4577             :                 .set = py_drsuapi_DsPartialAttributeSet_set_version,
    4578             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4579             :         },
    4580             :         {
    4581             :                 .name = discard_const_p(char, "reserved1"),
    4582             :                 .get = py_drsuapi_DsPartialAttributeSet_get_reserved1,
    4583             :                 .set = py_drsuapi_DsPartialAttributeSet_set_reserved1,
    4584             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4585             :         },
    4586             :         {
    4587             :                 .name = discard_const_p(char, "num_attids"),
    4588             :                 .get = py_drsuapi_DsPartialAttributeSet_get_num_attids,
    4589             :                 .set = py_drsuapi_DsPartialAttributeSet_set_num_attids,
    4590             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    4591             :         },
    4592             :         {
    4593             :                 .name = discard_const_p(char, "attids"),
    4594             :                 .get = py_drsuapi_DsPartialAttributeSet_get_attids,
    4595             :                 .set = py_drsuapi_DsPartialAttributeSet_set_attids,
    4596             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
    4597             :         },
    4598             :         { .name = NULL }
    4599             : };
    4600             : 
    4601        2943 : static PyObject *py_drsuapi_DsPartialAttributeSet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    4602             : {
    4603        2943 :         return pytalloc_new(struct drsuapi_DsPartialAttributeSet, type);
    4604             : }
    4605             : 
    4606             : 
    4607             : static PyTypeObject drsuapi_DsPartialAttributeSet_Type = {
    4608             :         PyVarObject_HEAD_INIT(NULL, 0)
    4609             :         .tp_name = "drsuapi.DsPartialAttributeSet",
    4610             :         .tp_getset = py_drsuapi_DsPartialAttributeSet_getsetters,
    4611             :         .tp_methods = NULL,
    4612             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    4613             :         .tp_new = py_drsuapi_DsPartialAttributeSet_new,
    4614             : };
    4615             : 
    4616             : 
    4617           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_destination_dsa_guid(PyObject *obj, void *closure)
    4618             : {
    4619           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4620           0 :         PyObject *py_destination_dsa_guid;
    4621           0 :         py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
    4622           0 :         return py_destination_dsa_guid;
    4623             : }
    4624             : 
    4625        2988 : static int py_drsuapi_DsGetNCChangesRequest8_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
    4626             : {
    4627        2988 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4628        2988 :         if (value == NULL) {
    4629           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->destination_dsa_guid");
    4630           0 :                 return -1;
    4631             :         }
    4632        2988 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    4633        2988 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4634           0 :                 PyErr_NoMemory();
    4635           0 :                 return -1;
    4636             :         }
    4637        2988 :         object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
    4638        2988 :         return 0;
    4639             : }
    4640             : 
    4641           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    4642             : {
    4643           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4644           0 :         PyObject *py_source_dsa_invocation_id;
    4645           0 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    4646           0 :         return py_source_dsa_invocation_id;
    4647             : }
    4648             : 
    4649        3048 : static int py_drsuapi_DsGetNCChangesRequest8_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    4650             : {
    4651        3048 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4652        3048 :         if (value == NULL) {
    4653           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    4654           0 :                 return -1;
    4655             :         }
    4656        3048 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    4657        3048 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4658           0 :                 PyErr_NoMemory();
    4659           0 :                 return -1;
    4660             :         }
    4661        3048 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    4662        3048 :         return 0;
    4663             : }
    4664             : 
    4665         269 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_naming_context(PyObject *obj, void *closure)
    4666             : {
    4667         269 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4668           0 :         PyObject *py_naming_context;
    4669         269 :         if (object->naming_context == NULL) {
    4670           0 :                 Py_RETURN_NONE;
    4671             :         }
    4672         269 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
    4673         269 :         return py_naming_context;
    4674             : }
    4675             : 
    4676        3048 : static int py_drsuapi_DsGetNCChangesRequest8_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
    4677             : {
    4678        3048 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4679        3048 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
    4680        3048 :         if (value == NULL) {
    4681           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
    4682           0 :                 return -1;
    4683             :         }
    4684        3048 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
    4685        3048 :         if (object->naming_context == NULL) {
    4686           0 :                 PyErr_NoMemory();
    4687           0 :                 return -1;
    4688             :         }
    4689        3048 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
    4690        3048 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4691           0 :                 PyErr_NoMemory();
    4692           0 :                 return -1;
    4693             :         }
    4694        3048 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
    4695        3048 :         return 0;
    4696             : }
    4697             : 
    4698         723 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_highwatermark(PyObject *obj, void *closure)
    4699             : {
    4700         723 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4701           0 :         PyObject *py_highwatermark;
    4702         723 :         py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
    4703         723 :         return py_highwatermark;
    4704             : }
    4705             : 
    4706        3094 : static int py_drsuapi_DsGetNCChangesRequest8_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    4707             : {
    4708        3094 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4709        3094 :         if (value == NULL) {
    4710           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
    4711           0 :                 return -1;
    4712             :         }
    4713        3094 :         PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    4714        3094 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4715           0 :                 PyErr_NoMemory();
    4716           0 :                 return -1;
    4717             :         }
    4718        3094 :         object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    4719        3094 :         return 0;
    4720             : }
    4721             : 
    4722           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_uptodateness_vector(PyObject *obj, void *closure)
    4723             : {
    4724           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4725           0 :         PyObject *py_uptodateness_vector;
    4726           0 :         if (object->uptodateness_vector == NULL) {
    4727           0 :                 Py_RETURN_NONE;
    4728             :         }
    4729           0 :         if (object->uptodateness_vector == NULL) {
    4730           0 :                 py_uptodateness_vector = Py_None;
    4731           0 :                 Py_INCREF(py_uptodateness_vector);
    4732             :         } else {
    4733           0 :                 py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
    4734             :         }
    4735           0 :         return py_uptodateness_vector;
    4736             : }
    4737             : 
    4738        3048 : static int py_drsuapi_DsGetNCChangesRequest8_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
    4739             : {
    4740        3048 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4741        3048 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
    4742        3048 :         if (value == NULL) {
    4743           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
    4744           0 :                 return -1;
    4745             :         }
    4746        3048 :         if (value == Py_None) {
    4747        3048 :                 object->uptodateness_vector = NULL;
    4748             :         } else {
    4749           0 :                 object->uptodateness_vector = NULL;
    4750           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
    4751           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4752           0 :                         PyErr_NoMemory();
    4753           0 :                         return -1;
    4754             :                 }
    4755           0 :                 object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
    4756             :         }
    4757        3048 :         return 0;
    4758             : }
    4759             : 
    4760           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_replica_flags(PyObject *obj, void *closure)
    4761             : {
    4762           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4763           0 :         PyObject *py_replica_flags;
    4764           0 :         py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->replica_flags));
    4765           0 :         return py_replica_flags;
    4766             : }
    4767             : 
    4768        3048 : static int py_drsuapi_DsGetNCChangesRequest8_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
    4769             : {
    4770        3048 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4771        3048 :         if (value == NULL) {
    4772           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
    4773           0 :                 return -1;
    4774             :         }
    4775             :         {
    4776        3048 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
    4777        3048 :                 if (PyLong_Check(value)) {
    4778           0 :                         unsigned long long test_var;
    4779        3048 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4780        3048 :                         if (PyErr_Occurred() != NULL) {
    4781           0 :                                 return -1;
    4782             :                         }
    4783        3048 :                         if (test_var > uint_max) {
    4784           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4785             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4786           0 :                                 return -1;
    4787             :                         }
    4788        3048 :                         object->replica_flags = test_var;
    4789             :                 } else {
    4790           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4791             :                           PyLong_Type.tp_name);
    4792           0 :                         return -1;
    4793             :                 }
    4794             :         }
    4795        3048 :         return 0;
    4796             : }
    4797             : 
    4798           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_max_object_count(PyObject *obj, void *closure)
    4799             : {
    4800           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4801           0 :         PyObject *py_max_object_count;
    4802           0 :         py_max_object_count = PyLong_FromUnsignedLongLong((uint32_t)(object->max_object_count));
    4803           0 :         return py_max_object_count;
    4804             : }
    4805             : 
    4806        3048 : static int py_drsuapi_DsGetNCChangesRequest8_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
    4807             : {
    4808        3048 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4809        3048 :         if (value == NULL) {
    4810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_object_count");
    4811           0 :                 return -1;
    4812             :         }
    4813             :         {
    4814        3048 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_object_count));
    4815        3048 :                 if (PyLong_Check(value)) {
    4816           0 :                         unsigned long long test_var;
    4817        3048 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4818        3048 :                         if (PyErr_Occurred() != NULL) {
    4819           0 :                                 return -1;
    4820             :                         }
    4821        3048 :                         if (test_var > uint_max) {
    4822           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4823             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4824           0 :                                 return -1;
    4825             :                         }
    4826        3048 :                         object->max_object_count = test_var;
    4827             :                 } else {
    4828           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4829             :                           PyLong_Type.tp_name);
    4830           0 :                         return -1;
    4831             :                 }
    4832             :         }
    4833        3048 :         return 0;
    4834             : }
    4835             : 
    4836           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_max_ndr_size(PyObject *obj, void *closure)
    4837             : {
    4838           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4839           0 :         PyObject *py_max_ndr_size;
    4840           0 :         py_max_ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->max_ndr_size));
    4841           0 :         return py_max_ndr_size;
    4842             : }
    4843             : 
    4844        3048 : static int py_drsuapi_DsGetNCChangesRequest8_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    4845             : {
    4846        3048 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4847        3048 :         if (value == NULL) {
    4848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_ndr_size");
    4849           0 :                 return -1;
    4850             :         }
    4851             :         {
    4852        3048 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_ndr_size));
    4853        3048 :                 if (PyLong_Check(value)) {
    4854           0 :                         unsigned long long test_var;
    4855        3048 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4856        3048 :                         if (PyErr_Occurred() != NULL) {
    4857           0 :                                 return -1;
    4858             :                         }
    4859        3048 :                         if (test_var > uint_max) {
    4860           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4861             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4862           0 :                                 return -1;
    4863             :                         }
    4864        3048 :                         object->max_ndr_size = test_var;
    4865             :                 } else {
    4866           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4867             :                           PyLong_Type.tp_name);
    4868           0 :                         return -1;
    4869             :                 }
    4870             :         }
    4871        3048 :         return 0;
    4872             : }
    4873             : 
    4874           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_extended_op(PyObject *obj, void *closure)
    4875             : {
    4876           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4877           0 :         PyObject *py_extended_op;
    4878           0 :         py_extended_op = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_op));
    4879           0 :         return py_extended_op;
    4880             : }
    4881             : 
    4882        3048 : static int py_drsuapi_DsGetNCChangesRequest8_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
    4883             : {
    4884        3048 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4885        3048 :         if (value == NULL) {
    4886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_op");
    4887           0 :                 return -1;
    4888             :         }
    4889             :         {
    4890        3048 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_op));
    4891        3048 :                 if (PyLong_Check(value)) {
    4892           0 :                         unsigned long long test_var;
    4893        3048 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4894        3048 :                         if (PyErr_Occurred() != NULL) {
    4895           0 :                                 return -1;
    4896             :                         }
    4897        3048 :                         if (test_var > uint_max) {
    4898           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4899             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4900           0 :                                 return -1;
    4901             :                         }
    4902        3048 :                         object->extended_op = test_var;
    4903             :                 } else {
    4904           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4905             :                           PyLong_Type.tp_name);
    4906           0 :                         return -1;
    4907             :                 }
    4908             :         }
    4909        3048 :         return 0;
    4910             : }
    4911             : 
    4912           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_fsmo_info(PyObject *obj, void *closure)
    4913             : {
    4914           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4915           0 :         PyObject *py_fsmo_info;
    4916           0 :         py_fsmo_info = PyLong_FromUnsignedLongLong(object->fsmo_info);
    4917           0 :         return py_fsmo_info;
    4918             : }
    4919             : 
    4920         241 : static int py_drsuapi_DsGetNCChangesRequest8_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
    4921             : {
    4922         241 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4923         241 :         if (value == NULL) {
    4924           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fsmo_info");
    4925           0 :                 return -1;
    4926             :         }
    4927             :         {
    4928         241 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fsmo_info));
    4929         241 :                 if (PyLong_Check(value)) {
    4930           0 :                         unsigned long long test_var;
    4931         241 :                         test_var = PyLong_AsUnsignedLongLong(value);
    4932         241 :                         if (PyErr_Occurred() != NULL) {
    4933           0 :                                 return -1;
    4934             :                         }
    4935         241 :                         if (test_var > uint_max) {
    4936           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    4937             :                                   PyLong_Type.tp_name, uint_max, test_var);
    4938           0 :                                 return -1;
    4939             :                         }
    4940         241 :                         object->fsmo_info = test_var;
    4941             :                 } else {
    4942           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    4943             :                           PyLong_Type.tp_name);
    4944           0 :                         return -1;
    4945             :                 }
    4946             :         }
    4947         241 :         return 0;
    4948             : }
    4949             : 
    4950           1 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set(PyObject *obj, void *closure)
    4951             : {
    4952           1 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4953           1 :         PyObject *py_partial_attribute_set;
    4954           1 :         if (object->partial_attribute_set == NULL) {
    4955           0 :                 Py_RETURN_NONE;
    4956             :         }
    4957           1 :         if (object->partial_attribute_set == NULL) {
    4958           0 :                 py_partial_attribute_set = Py_None;
    4959           0 :                 Py_INCREF(py_partial_attribute_set);
    4960             :         } else {
    4961           1 :                 py_partial_attribute_set = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set, object->partial_attribute_set);
    4962             :         }
    4963           1 :         return py_partial_attribute_set;
    4964             : }
    4965             : 
    4966        3049 : static int py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set(PyObject *py_obj, PyObject *value, void *closure)
    4967             : {
    4968        3049 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    4969        3049 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->partial_attribute_set));
    4970        3049 :         if (value == NULL) {
    4971           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->partial_attribute_set");
    4972           0 :                 return -1;
    4973             :         }
    4974        3049 :         if (value == Py_None) {
    4975         204 :                 object->partial_attribute_set = NULL;
    4976             :         } else {
    4977        2845 :                 object->partial_attribute_set = NULL;
    4978        2845 :                 PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
    4979        2845 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    4980           0 :                         PyErr_NoMemory();
    4981           0 :                         return -1;
    4982             :                 }
    4983        2845 :                 object->partial_attribute_set = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
    4984             :         }
    4985        3048 :         return 0;
    4986             : }
    4987             : 
    4988           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set_ex(PyObject *obj, void *closure)
    4989             : {
    4990           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    4991           0 :         PyObject *py_partial_attribute_set_ex;
    4992           0 :         if (object->partial_attribute_set_ex == NULL) {
    4993           0 :                 Py_RETURN_NONE;
    4994             :         }
    4995           0 :         if (object->partial_attribute_set_ex == NULL) {
    4996           0 :                 py_partial_attribute_set_ex = Py_None;
    4997           0 :                 Py_INCREF(py_partial_attribute_set_ex);
    4998             :         } else {
    4999           0 :                 py_partial_attribute_set_ex = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set_ex, object->partial_attribute_set_ex);
    5000             :         }
    5001           0 :         return py_partial_attribute_set_ex;
    5002             : }
    5003             : 
    5004        3048 : static int py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set_ex(PyObject *py_obj, PyObject *value, void *closure)
    5005             : {
    5006        3048 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    5007        3048 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->partial_attribute_set_ex));
    5008        3048 :         if (value == NULL) {
    5009           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->partial_attribute_set_ex");
    5010           0 :                 return -1;
    5011             :         }
    5012        3048 :         if (value == Py_None) {
    5013        3045 :                 object->partial_attribute_set_ex = NULL;
    5014             :         } else {
    5015           3 :                 object->partial_attribute_set_ex = NULL;
    5016           3 :                 PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
    5017           3 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5018           0 :                         PyErr_NoMemory();
    5019           0 :                         return -1;
    5020             :                 }
    5021           3 :                 object->partial_attribute_set_ex = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
    5022             :         }
    5023        3048 :         return 0;
    5024             : }
    5025             : 
    5026        6060 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_mapping_ctr(PyObject *obj, void *closure)
    5027             : {
    5028        6060 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(obj);
    5029           0 :         PyObject *py_mapping_ctr;
    5030        6060 :         py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
    5031        6060 :         return py_mapping_ctr;
    5032             : }
    5033             : 
    5034          18 : static int py_drsuapi_DsGetNCChangesRequest8_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
    5035             : {
    5036          18 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    5037          18 :         if (value == NULL) {
    5038           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mapping_ctr");
    5039           0 :                 return -1;
    5040             :         }
    5041          18 :         PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
    5042          18 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5043           0 :                 PyErr_NoMemory();
    5044           0 :                 return -1;
    5045             :         }
    5046          18 :         object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
    5047          18 :         return 0;
    5048             : }
    5049             : 
    5050             : static PyGetSetDef py_drsuapi_DsGetNCChangesRequest8_getsetters[] = {
    5051             :         {
    5052             :                 .name = discard_const_p(char, "destination_dsa_guid"),
    5053             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_destination_dsa_guid,
    5054             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_destination_dsa_guid,
    5055             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    5056             :         },
    5057             :         {
    5058             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
    5059             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_source_dsa_invocation_id,
    5060             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_source_dsa_invocation_id,
    5061             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    5062             :         },
    5063             :         {
    5064             :                 .name = discard_const_p(char, "naming_context"),
    5065             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_naming_context,
    5066             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_naming_context,
    5067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
    5068             :         },
    5069             :         {
    5070             :                 .name = discard_const_p(char, "highwatermark"),
    5071             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_highwatermark,
    5072             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_highwatermark,
    5073             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
    5074             :         },
    5075             :         {
    5076             :                 .name = discard_const_p(char, "uptodateness_vector"),
    5077             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_uptodateness_vector,
    5078             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_uptodateness_vector,
    5079             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursorCtrEx")
    5080             :         },
    5081             :         {
    5082             :                 .name = discard_const_p(char, "replica_flags"),
    5083             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_replica_flags,
    5084             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_replica_flags,
    5085             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
    5086             :         },
    5087             :         {
    5088             :                 .name = discard_const_p(char, "max_object_count"),
    5089             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_max_object_count,
    5090             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_max_object_count,
    5091             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5092             :         },
    5093             :         {
    5094             :                 .name = discard_const_p(char, "max_ndr_size"),
    5095             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_max_ndr_size,
    5096             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_max_ndr_size,
    5097             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5098             :         },
    5099             :         {
    5100             :                 .name = discard_const_p(char, "extended_op"),
    5101             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_extended_op,
    5102             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_extended_op,
    5103             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedOperation")
    5104             :         },
    5105             :         {
    5106             :                 .name = discard_const_p(char, "fsmo_info"),
    5107             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_fsmo_info,
    5108             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_fsmo_info,
    5109             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    5110             :         },
    5111             :         {
    5112             :                 .name = discard_const_p(char, "partial_attribute_set"),
    5113             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set,
    5114             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set,
    5115             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsPartialAttributeSet")
    5116             :         },
    5117             :         {
    5118             :                 .name = discard_const_p(char, "partial_attribute_set_ex"),
    5119             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set_ex,
    5120             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set_ex,
    5121             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsPartialAttributeSet")
    5122             :         },
    5123             :         {
    5124             :                 .name = discard_const_p(char, "mapping_ctr"),
    5125             :                 .get = py_drsuapi_DsGetNCChangesRequest8_get_mapping_ctr,
    5126             :                 .set = py_drsuapi_DsGetNCChangesRequest8_set_mapping_ctr,
    5127             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping_Ctr")
    5128             :         },
    5129             :         { .name = NULL }
    5130             : };
    5131             : 
    5132        3049 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5133             : {
    5134        3049 :         return pytalloc_new(struct drsuapi_DsGetNCChangesRequest8, type);
    5135             : }
    5136             : 
    5137           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5138             : {
    5139           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    5140           0 :         PyObject *ret = NULL;
    5141           0 :         DATA_BLOB blob;
    5142           0 :         enum ndr_err_code err;
    5143           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5144           0 :         if (tmp_ctx == NULL) {
    5145           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5146           0 :                 return NULL;
    5147             :         }
    5148           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesRequest8);
    5149           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5150           0 :                 TALLOC_FREE(tmp_ctx);
    5151           0 :                 PyErr_SetNdrError(err);
    5152           0 :                 return NULL;
    5153             :         }
    5154             : 
    5155           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5156           0 :         TALLOC_FREE(tmp_ctx);
    5157           0 :         return ret;
    5158             : }
    5159             : 
    5160           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5161             : {
    5162           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    5163           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5164           0 :         Py_ssize_t blob_length = 0;
    5165           0 :         enum ndr_err_code err;
    5166           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5167           0 :         PyObject *allow_remaining_obj = NULL;
    5168           0 :         bool allow_remaining = false;
    5169             : 
    5170           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5171             :                 discard_const_p(char *, kwnames),
    5172             :                 &blob.data, &blob_length,
    5173             :                 &allow_remaining_obj)) {
    5174           0 :                 return NULL;
    5175             :         }
    5176           0 :         blob.length = blob_length;
    5177             : 
    5178           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5179           0 :                 allow_remaining = true;
    5180             :         }
    5181             : 
    5182           0 :         if (allow_remaining) {
    5183           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesRequest8);
    5184             :         } else {
    5185           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesRequest8);
    5186             :         }
    5187           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5188           0 :                 PyErr_SetNdrError(err);
    5189           0 :                 return NULL;
    5190             :         }
    5191             : 
    5192           0 :         Py_RETURN_NONE;
    5193             : }
    5194             : 
    5195           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5196             : {
    5197           0 :         struct drsuapi_DsGetNCChangesRequest8 *object = pytalloc_get_ptr(py_obj);
    5198           0 :         PyObject *ret;
    5199           0 :         char *retstr;
    5200             : 
    5201           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesRequest8, "drsuapi_DsGetNCChangesRequest8", object);
    5202           0 :         ret = PyUnicode_FromString(retstr);
    5203           0 :         talloc_free(retstr);
    5204             : 
    5205           0 :         return ret;
    5206             : }
    5207             : 
    5208             : static PyMethodDef py_drsuapi_DsGetNCChangesRequest8_methods[] = {
    5209             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesRequest8_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5210             :         { "__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" },
    5211             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesRequest8_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5212             :         { NULL, NULL, 0, NULL }
    5213             : };
    5214             : 
    5215             : 
    5216             : static PyTypeObject drsuapi_DsGetNCChangesRequest8_Type = {
    5217             :         PyVarObject_HEAD_INIT(NULL, 0)
    5218             :         .tp_name = "drsuapi.DsGetNCChangesRequest8",
    5219             :         .tp_getset = py_drsuapi_DsGetNCChangesRequest8_getsetters,
    5220             :         .tp_methods = py_drsuapi_DsGetNCChangesRequest8_methods,
    5221             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5222             :         .tp_new = py_drsuapi_DsGetNCChangesRequest8_new,
    5223             : };
    5224             : 
    5225             : 
    5226           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_destination_dsa_guid(PyObject *obj, void *closure)
    5227             : {
    5228           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5229           0 :         PyObject *py_destination_dsa_guid;
    5230           0 :         py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
    5231           0 :         return py_destination_dsa_guid;
    5232             : }
    5233             : 
    5234        1248 : static int py_drsuapi_DsGetNCChangesRequest10_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
    5235             : {
    5236        1248 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5237        1248 :         if (value == NULL) {
    5238           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->destination_dsa_guid");
    5239           0 :                 return -1;
    5240             :         }
    5241        1248 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    5242        1248 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5243           0 :                 PyErr_NoMemory();
    5244           0 :                 return -1;
    5245             :         }
    5246        1248 :         object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
    5247        1248 :         return 0;
    5248             : }
    5249             : 
    5250           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    5251             : {
    5252           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5253           0 :         PyObject *py_source_dsa_invocation_id;
    5254           0 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    5255           0 :         return py_source_dsa_invocation_id;
    5256             : }
    5257             : 
    5258        1248 : static int py_drsuapi_DsGetNCChangesRequest10_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    5259             : {
    5260        1248 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5261        1248 :         if (value == NULL) {
    5262           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    5263           0 :                 return -1;
    5264             :         }
    5265        1248 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    5266        1248 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5267           0 :                 PyErr_NoMemory();
    5268           0 :                 return -1;
    5269             :         }
    5270        1248 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    5271        1248 :         return 0;
    5272             : }
    5273             : 
    5274        1249 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_naming_context(PyObject *obj, void *closure)
    5275             : {
    5276        1249 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5277           0 :         PyObject *py_naming_context;
    5278        1249 :         if (object->naming_context == NULL) {
    5279           0 :                 Py_RETURN_NONE;
    5280             :         }
    5281        1249 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
    5282        1249 :         return py_naming_context;
    5283             : }
    5284             : 
    5285        1248 : static int py_drsuapi_DsGetNCChangesRequest10_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
    5286             : {
    5287        1248 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5288        1248 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
    5289        1248 :         if (value == NULL) {
    5290           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
    5291           0 :                 return -1;
    5292             :         }
    5293        1248 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
    5294        1248 :         if (object->naming_context == NULL) {
    5295           0 :                 PyErr_NoMemory();
    5296           0 :                 return -1;
    5297             :         }
    5298        1248 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
    5299        1248 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5300           0 :                 PyErr_NoMemory();
    5301           0 :                 return -1;
    5302             :         }
    5303        1248 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
    5304        1248 :         return 0;
    5305             : }
    5306             : 
    5307        3031 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_highwatermark(PyObject *obj, void *closure)
    5308             : {
    5309        3031 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5310           0 :         PyObject *py_highwatermark;
    5311        3031 :         py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
    5312        3031 :         return py_highwatermark;
    5313             : }
    5314             : 
    5315        1878 : static int py_drsuapi_DsGetNCChangesRequest10_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    5316             : {
    5317        1878 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5318        1878 :         if (value == NULL) {
    5319           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
    5320           0 :                 return -1;
    5321             :         }
    5322        1878 :         PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    5323        1878 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5324           0 :                 PyErr_NoMemory();
    5325           0 :                 return -1;
    5326             :         }
    5327        1878 :         object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    5328        1878 :         return 0;
    5329             : }
    5330             : 
    5331           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_uptodateness_vector(PyObject *obj, void *closure)
    5332             : {
    5333           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5334           0 :         PyObject *py_uptodateness_vector;
    5335           0 :         if (object->uptodateness_vector == NULL) {
    5336           0 :                 Py_RETURN_NONE;
    5337             :         }
    5338           0 :         if (object->uptodateness_vector == NULL) {
    5339           0 :                 py_uptodateness_vector = Py_None;
    5340           0 :                 Py_INCREF(py_uptodateness_vector);
    5341             :         } else {
    5342           0 :                 py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
    5343             :         }
    5344           0 :         return py_uptodateness_vector;
    5345             : }
    5346             : 
    5347        1273 : static int py_drsuapi_DsGetNCChangesRequest10_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
    5348             : {
    5349        1273 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5350        1273 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
    5351        1273 :         if (value == NULL) {
    5352           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
    5353           0 :                 return -1;
    5354             :         }
    5355        1273 :         if (value == Py_None) {
    5356        1162 :                 object->uptodateness_vector = NULL;
    5357             :         } else {
    5358         111 :                 object->uptodateness_vector = NULL;
    5359         111 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
    5360         111 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5361           0 :                         PyErr_NoMemory();
    5362           0 :                         return -1;
    5363             :                 }
    5364         111 :                 object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
    5365             :         }
    5366        1273 :         return 0;
    5367             : }
    5368             : 
    5369          83 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_replica_flags(PyObject *obj, void *closure)
    5370             : {
    5371          83 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5372           0 :         PyObject *py_replica_flags;
    5373          83 :         py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->replica_flags));
    5374          83 :         return py_replica_flags;
    5375             : }
    5376             : 
    5377        1330 : static int py_drsuapi_DsGetNCChangesRequest10_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
    5378             : {
    5379        1330 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5380        1330 :         if (value == NULL) {
    5381           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
    5382           0 :                 return -1;
    5383             :         }
    5384             :         {
    5385        1330 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
    5386        1330 :                 if (PyLong_Check(value)) {
    5387           0 :                         unsigned long long test_var;
    5388        1330 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5389        1330 :                         if (PyErr_Occurred() != NULL) {
    5390           0 :                                 return -1;
    5391             :                         }
    5392        1330 :                         if (test_var > uint_max) {
    5393           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5394             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5395           0 :                                 return -1;
    5396             :                         }
    5397        1330 :                         object->replica_flags = test_var;
    5398             :                 } else {
    5399           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5400             :                           PyLong_Type.tp_name);
    5401           0 :                         return -1;
    5402             :                 }
    5403             :         }
    5404        1330 :         return 0;
    5405             : }
    5406             : 
    5407           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_max_object_count(PyObject *obj, void *closure)
    5408             : {
    5409           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5410           0 :         PyObject *py_max_object_count;
    5411           0 :         py_max_object_count = PyLong_FromUnsignedLongLong((uint32_t)(object->max_object_count));
    5412           0 :         return py_max_object_count;
    5413             : }
    5414             : 
    5415        1248 : static int py_drsuapi_DsGetNCChangesRequest10_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
    5416             : {
    5417        1248 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5418        1248 :         if (value == NULL) {
    5419           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_object_count");
    5420           0 :                 return -1;
    5421             :         }
    5422             :         {
    5423        1248 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_object_count));
    5424        1248 :                 if (PyLong_Check(value)) {
    5425           0 :                         unsigned long long test_var;
    5426        1248 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5427        1248 :                         if (PyErr_Occurred() != NULL) {
    5428           0 :                                 return -1;
    5429             :                         }
    5430        1248 :                         if (test_var > uint_max) {
    5431           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5432             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5433           0 :                                 return -1;
    5434             :                         }
    5435        1248 :                         object->max_object_count = test_var;
    5436             :                 } else {
    5437           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5438             :                           PyLong_Type.tp_name);
    5439           0 :                         return -1;
    5440             :                 }
    5441             :         }
    5442        1248 :         return 0;
    5443             : }
    5444             : 
    5445           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_max_ndr_size(PyObject *obj, void *closure)
    5446             : {
    5447           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5448           0 :         PyObject *py_max_ndr_size;
    5449           0 :         py_max_ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->max_ndr_size));
    5450           0 :         return py_max_ndr_size;
    5451             : }
    5452             : 
    5453        1248 : static int py_drsuapi_DsGetNCChangesRequest10_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    5454             : {
    5455        1248 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5456        1248 :         if (value == NULL) {
    5457           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_ndr_size");
    5458           0 :                 return -1;
    5459             :         }
    5460             :         {
    5461        1248 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_ndr_size));
    5462        1248 :                 if (PyLong_Check(value)) {
    5463           0 :                         unsigned long long test_var;
    5464        1248 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5465        1248 :                         if (PyErr_Occurred() != NULL) {
    5466           0 :                                 return -1;
    5467             :                         }
    5468        1248 :                         if (test_var > uint_max) {
    5469           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5470             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5471           0 :                                 return -1;
    5472             :                         }
    5473        1248 :                         object->max_ndr_size = test_var;
    5474             :                 } else {
    5475           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5476             :                           PyLong_Type.tp_name);
    5477           0 :                         return -1;
    5478             :                 }
    5479             :         }
    5480        1248 :         return 0;
    5481             : }
    5482             : 
    5483           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_extended_op(PyObject *obj, void *closure)
    5484             : {
    5485           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5486           0 :         PyObject *py_extended_op;
    5487           0 :         py_extended_op = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_op));
    5488           0 :         return py_extended_op;
    5489             : }
    5490             : 
    5491        1248 : static int py_drsuapi_DsGetNCChangesRequest10_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
    5492             : {
    5493        1248 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5494        1248 :         if (value == NULL) {
    5495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_op");
    5496           0 :                 return -1;
    5497             :         }
    5498             :         {
    5499        1248 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_op));
    5500        1248 :                 if (PyLong_Check(value)) {
    5501           0 :                         unsigned long long test_var;
    5502        1248 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5503        1248 :                         if (PyErr_Occurred() != NULL) {
    5504           0 :                                 return -1;
    5505             :                         }
    5506        1248 :                         if (test_var > uint_max) {
    5507           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5508             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5509           0 :                                 return -1;
    5510             :                         }
    5511        1248 :                         object->extended_op = test_var;
    5512             :                 } else {
    5513           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5514             :                           PyLong_Type.tp_name);
    5515           0 :                         return -1;
    5516             :                 }
    5517             :         }
    5518        1248 :         return 0;
    5519             : }
    5520             : 
    5521           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_fsmo_info(PyObject *obj, void *closure)
    5522             : {
    5523           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5524           0 :         PyObject *py_fsmo_info;
    5525           0 :         py_fsmo_info = PyLong_FromUnsignedLongLong(object->fsmo_info);
    5526           0 :         return py_fsmo_info;
    5527             : }
    5528             : 
    5529        1248 : static int py_drsuapi_DsGetNCChangesRequest10_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
    5530             : {
    5531        1248 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5532        1248 :         if (value == NULL) {
    5533           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fsmo_info");
    5534           0 :                 return -1;
    5535             :         }
    5536             :         {
    5537        1248 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fsmo_info));
    5538        1248 :                 if (PyLong_Check(value)) {
    5539           0 :                         unsigned long long test_var;
    5540        1248 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5541        1248 :                         if (PyErr_Occurred() != NULL) {
    5542           0 :                                 return -1;
    5543             :                         }
    5544        1248 :                         if (test_var > uint_max) {
    5545           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5546             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5547           0 :                                 return -1;
    5548             :                         }
    5549        1248 :                         object->fsmo_info = test_var;
    5550             :                 } else {
    5551           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5552             :                           PyLong_Type.tp_name);
    5553           0 :                         return -1;
    5554             :                 }
    5555             :         }
    5556        1248 :         return 0;
    5557             : }
    5558             : 
    5559           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set(PyObject *obj, void *closure)
    5560             : {
    5561           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5562           0 :         PyObject *py_partial_attribute_set;
    5563           0 :         if (object->partial_attribute_set == NULL) {
    5564           0 :                 Py_RETURN_NONE;
    5565             :         }
    5566           0 :         if (object->partial_attribute_set == NULL) {
    5567           0 :                 py_partial_attribute_set = Py_None;
    5568           0 :                 Py_INCREF(py_partial_attribute_set);
    5569             :         } else {
    5570           0 :                 py_partial_attribute_set = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set, object->partial_attribute_set);
    5571             :         }
    5572           0 :         return py_partial_attribute_set;
    5573             : }
    5574             : 
    5575        1332 : static int py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set(PyObject *py_obj, PyObject *value, void *closure)
    5576             : {
    5577        1332 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5578        1332 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->partial_attribute_set));
    5579        1332 :         if (value == NULL) {
    5580           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->partial_attribute_set");
    5581           0 :                 return -1;
    5582             :         }
    5583        1332 :         if (value == Py_None) {
    5584        1237 :                 object->partial_attribute_set = NULL;
    5585             :         } else {
    5586          95 :                 object->partial_attribute_set = NULL;
    5587          95 :                 PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
    5588          95 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5589           0 :                         PyErr_NoMemory();
    5590           0 :                         return -1;
    5591             :                 }
    5592          95 :                 object->partial_attribute_set = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
    5593             :         }
    5594        1332 :         return 0;
    5595             : }
    5596             : 
    5597           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set_ex(PyObject *obj, void *closure)
    5598             : {
    5599           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5600           0 :         PyObject *py_partial_attribute_set_ex;
    5601           0 :         if (object->partial_attribute_set_ex == NULL) {
    5602           0 :                 Py_RETURN_NONE;
    5603             :         }
    5604           0 :         if (object->partial_attribute_set_ex == NULL) {
    5605           0 :                 py_partial_attribute_set_ex = Py_None;
    5606           0 :                 Py_INCREF(py_partial_attribute_set_ex);
    5607             :         } else {
    5608           0 :                 py_partial_attribute_set_ex = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set_ex, object->partial_attribute_set_ex);
    5609             :         }
    5610           0 :         return py_partial_attribute_set_ex;
    5611             : }
    5612             : 
    5613        1248 : static int py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set_ex(PyObject *py_obj, PyObject *value, void *closure)
    5614             : {
    5615        1248 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5616        1248 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->partial_attribute_set_ex));
    5617        1248 :         if (value == NULL) {
    5618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->partial_attribute_set_ex");
    5619           0 :                 return -1;
    5620             :         }
    5621        1248 :         if (value == Py_None) {
    5622        1248 :                 object->partial_attribute_set_ex = NULL;
    5623             :         } else {
    5624           0 :                 object->partial_attribute_set_ex = NULL;
    5625           0 :                 PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
    5626           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5627           0 :                         PyErr_NoMemory();
    5628           0 :                         return -1;
    5629             :                 }
    5630           0 :                 object->partial_attribute_set_ex = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
    5631             :         }
    5632        1248 :         return 0;
    5633             : }
    5634             : 
    5635        2496 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_mapping_ctr(PyObject *obj, void *closure)
    5636             : {
    5637        2496 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5638           0 :         PyObject *py_mapping_ctr;
    5639        2496 :         py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
    5640        2496 :         return py_mapping_ctr;
    5641             : }
    5642             : 
    5643           0 : static int py_drsuapi_DsGetNCChangesRequest10_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
    5644             : {
    5645           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5646           0 :         if (value == NULL) {
    5647           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mapping_ctr");
    5648           0 :                 return -1;
    5649             :         }
    5650           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
    5651           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    5652           0 :                 PyErr_NoMemory();
    5653           0 :                 return -1;
    5654             :         }
    5655           0 :         object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
    5656           0 :         return 0;
    5657             : }
    5658             : 
    5659          52 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_more_flags(PyObject *obj, void *closure)
    5660             : {
    5661          52 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(obj);
    5662           0 :         PyObject *py_more_flags;
    5663          52 :         py_more_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->more_flags));
    5664          52 :         return py_more_flags;
    5665             : }
    5666             : 
    5667        1274 : static int py_drsuapi_DsGetNCChangesRequest10_set_more_flags(PyObject *py_obj, PyObject *value, void *closure)
    5668             : {
    5669        1274 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5670        1274 :         if (value == NULL) {
    5671           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->more_flags");
    5672           0 :                 return -1;
    5673             :         }
    5674             :         {
    5675        1274 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->more_flags));
    5676        1274 :                 if (PyLong_Check(value)) {
    5677           0 :                         unsigned long long test_var;
    5678        1274 :                         test_var = PyLong_AsUnsignedLongLong(value);
    5679        1274 :                         if (PyErr_Occurred() != NULL) {
    5680           0 :                                 return -1;
    5681             :                         }
    5682        1274 :                         if (test_var > uint_max) {
    5683           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    5684             :                                   PyLong_Type.tp_name, uint_max, test_var);
    5685           0 :                                 return -1;
    5686             :                         }
    5687        1274 :                         object->more_flags = test_var;
    5688             :                 } else {
    5689           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    5690             :                           PyLong_Type.tp_name);
    5691           0 :                         return -1;
    5692             :                 }
    5693             :         }
    5694        1274 :         return 0;
    5695             : }
    5696             : 
    5697             : static PyGetSetDef py_drsuapi_DsGetNCChangesRequest10_getsetters[] = {
    5698             :         {
    5699             :                 .name = discard_const_p(char, "destination_dsa_guid"),
    5700             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_destination_dsa_guid,
    5701             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_destination_dsa_guid,
    5702             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    5703             :         },
    5704             :         {
    5705             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
    5706             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_source_dsa_invocation_id,
    5707             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_source_dsa_invocation_id,
    5708             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    5709             :         },
    5710             :         {
    5711             :                 .name = discard_const_p(char, "naming_context"),
    5712             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_naming_context,
    5713             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_naming_context,
    5714             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
    5715             :         },
    5716             :         {
    5717             :                 .name = discard_const_p(char, "highwatermark"),
    5718             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_highwatermark,
    5719             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_highwatermark,
    5720             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
    5721             :         },
    5722             :         {
    5723             :                 .name = discard_const_p(char, "uptodateness_vector"),
    5724             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_uptodateness_vector,
    5725             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_uptodateness_vector,
    5726             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursorCtrEx")
    5727             :         },
    5728             :         {
    5729             :                 .name = discard_const_p(char, "replica_flags"),
    5730             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_replica_flags,
    5731             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_replica_flags,
    5732             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
    5733             :         },
    5734             :         {
    5735             :                 .name = discard_const_p(char, "max_object_count"),
    5736             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_max_object_count,
    5737             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_max_object_count,
    5738             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5739             :         },
    5740             :         {
    5741             :                 .name = discard_const_p(char, "max_ndr_size"),
    5742             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_max_ndr_size,
    5743             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_max_ndr_size,
    5744             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    5745             :         },
    5746             :         {
    5747             :                 .name = discard_const_p(char, "extended_op"),
    5748             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_extended_op,
    5749             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_extended_op,
    5750             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedOperation")
    5751             :         },
    5752             :         {
    5753             :                 .name = discard_const_p(char, "fsmo_info"),
    5754             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_fsmo_info,
    5755             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_fsmo_info,
    5756             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    5757             :         },
    5758             :         {
    5759             :                 .name = discard_const_p(char, "partial_attribute_set"),
    5760             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set,
    5761             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set,
    5762             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsPartialAttributeSet")
    5763             :         },
    5764             :         {
    5765             :                 .name = discard_const_p(char, "partial_attribute_set_ex"),
    5766             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set_ex,
    5767             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set_ex,
    5768             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsPartialAttributeSet")
    5769             :         },
    5770             :         {
    5771             :                 .name = discard_const_p(char, "mapping_ctr"),
    5772             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_mapping_ctr,
    5773             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_mapping_ctr,
    5774             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping_Ctr")
    5775             :         },
    5776             :         {
    5777             :                 .name = discard_const_p(char, "more_flags"),
    5778             :                 .get = py_drsuapi_DsGetNCChangesRequest10_get_more_flags,
    5779             :                 .set = py_drsuapi_DsGetNCChangesRequest10_set_more_flags,
    5780             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsMoreOptions")
    5781             :         },
    5782             :         { .name = NULL }
    5783             : };
    5784             : 
    5785        1248 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5786             : {
    5787        1248 :         return pytalloc_new(struct drsuapi_DsGetNCChangesRequest10, type);
    5788             : }
    5789             : 
    5790           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    5791             : {
    5792           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5793           0 :         PyObject *ret = NULL;
    5794           0 :         DATA_BLOB blob;
    5795           0 :         enum ndr_err_code err;
    5796           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    5797           0 :         if (tmp_ctx == NULL) {
    5798           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    5799           0 :                 return NULL;
    5800             :         }
    5801           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesRequest10);
    5802           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5803           0 :                 TALLOC_FREE(tmp_ctx);
    5804           0 :                 PyErr_SetNdrError(err);
    5805           0 :                 return NULL;
    5806             :         }
    5807             : 
    5808           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    5809           0 :         TALLOC_FREE(tmp_ctx);
    5810           0 :         return ret;
    5811             : }
    5812             : 
    5813           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    5814             : {
    5815           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5816           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    5817           0 :         Py_ssize_t blob_length = 0;
    5818           0 :         enum ndr_err_code err;
    5819           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    5820           0 :         PyObject *allow_remaining_obj = NULL;
    5821           0 :         bool allow_remaining = false;
    5822             : 
    5823           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    5824             :                 discard_const_p(char *, kwnames),
    5825             :                 &blob.data, &blob_length,
    5826             :                 &allow_remaining_obj)) {
    5827           0 :                 return NULL;
    5828             :         }
    5829           0 :         blob.length = blob_length;
    5830             : 
    5831           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    5832           0 :                 allow_remaining = true;
    5833             :         }
    5834             : 
    5835           0 :         if (allow_remaining) {
    5836           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesRequest10);
    5837             :         } else {
    5838           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesRequest10);
    5839             :         }
    5840           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    5841           0 :                 PyErr_SetNdrError(err);
    5842           0 :                 return NULL;
    5843             :         }
    5844             : 
    5845           0 :         Py_RETURN_NONE;
    5846             : }
    5847             : 
    5848           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    5849             : {
    5850           0 :         struct drsuapi_DsGetNCChangesRequest10 *object = pytalloc_get_ptr(py_obj);
    5851           0 :         PyObject *ret;
    5852           0 :         char *retstr;
    5853             : 
    5854           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesRequest10, "drsuapi_DsGetNCChangesRequest10", object);
    5855           0 :         ret = PyUnicode_FromString(retstr);
    5856           0 :         talloc_free(retstr);
    5857             : 
    5858           0 :         return ret;
    5859             : }
    5860             : 
    5861             : static PyMethodDef py_drsuapi_DsGetNCChangesRequest10_methods[] = {
    5862             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesRequest10_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    5863             :         { "__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" },
    5864             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesRequest10_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    5865             :         { NULL, NULL, 0, NULL }
    5866             : };
    5867             : 
    5868             : 
    5869             : static PyTypeObject drsuapi_DsGetNCChangesRequest10_Type = {
    5870             :         PyVarObject_HEAD_INIT(NULL, 0)
    5871             :         .tp_name = "drsuapi.DsGetNCChangesRequest10",
    5872             :         .tp_getset = py_drsuapi_DsGetNCChangesRequest10_getsetters,
    5873             :         .tp_methods = py_drsuapi_DsGetNCChangesRequest10_methods,
    5874             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    5875             :         .tp_new = py_drsuapi_DsGetNCChangesRequest10_new,
    5876             : };
    5877             : 
    5878           0 : static PyObject *py_import_drsuapi_DsGetNCChangesRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesRequest *in)
    5879             : {
    5880           0 :         PyObject *ret;
    5881             : 
    5882           0 :         switch (level) {
    5883           0 :                 case 5:
    5884           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest5_Type, mem_ctx, &in->req5);
    5885           0 :                         return ret;
    5886             : 
    5887           0 :                 case 8:
    5888           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest8_Type, mem_ctx, &in->req8);
    5889           0 :                         return ret;
    5890             : 
    5891           0 :                 case 10:
    5892           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest10_Type, mem_ctx, &in->req10);
    5893           0 :                         return ret;
    5894             : 
    5895             :         }
    5896           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
    5897           0 :         return NULL;
    5898             : }
    5899             : 
    5900        5455 : static union drsuapi_DsGetNCChangesRequest *py_export_drsuapi_DsGetNCChangesRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
    5901             : {
    5902        5455 :         union drsuapi_DsGetNCChangesRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesRequest);
    5903        5455 :         switch (level) {
    5904           0 :                 case 5:
    5905           0 :                         if (in == NULL) {
    5906           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req5");
    5907           0 :                                 talloc_free(ret); return NULL;
    5908             :                         }
    5909           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest5_Type, in, talloc_free(ret); return NULL;);
    5910           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5911           0 :                                 PyErr_NoMemory();
    5912           0 :                                 talloc_free(ret); return NULL;
    5913             :                         }
    5914           0 :                         ret->req5 = *(struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(in);
    5915           0 :                         break;
    5916             : 
    5917        3096 :                 case 8:
    5918        3096 :                         if (in == NULL) {
    5919           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req8");
    5920           0 :                                 talloc_free(ret); return NULL;
    5921             :                         }
    5922        3096 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest8_Type, in, talloc_free(ret); return NULL;);
    5923        3096 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5924           0 :                                 PyErr_NoMemory();
    5925           0 :                                 talloc_free(ret); return NULL;
    5926             :                         }
    5927        3096 :                         ret->req8 = *(struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(in);
    5928        3096 :                         break;
    5929             : 
    5930        2359 :                 case 10:
    5931        2359 :                         if (in == NULL) {
    5932           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req10");
    5933           0 :                                 talloc_free(ret); return NULL;
    5934             :                         }
    5935        2359 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest10_Type, in, talloc_free(ret); return NULL;);
    5936        2359 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
    5937           0 :                                 PyErr_NoMemory();
    5938           0 :                                 talloc_free(ret); return NULL;
    5939             :                         }
    5940        2359 :                         ret->req10 = *(struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(in);
    5941        2359 :                         break;
    5942             : 
    5943           0 :                 default:
    5944           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
    5945           0 :                         talloc_free(ret);
    5946           0 :                         ret = NULL;
    5947             :         }
    5948             : 
    5949        5455 :         return ret;
    5950             : }
    5951             : 
    5952           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5953             : {
    5954           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5955           0 :         PyObject *mem_ctx_obj = NULL;
    5956           0 :         TALLOC_CTX *mem_ctx = NULL;
    5957           0 :         int level = 0;
    5958           0 :         PyObject *in_obj = NULL;
    5959           0 :         union drsuapi_DsGetNCChangesRequest *in = NULL;
    5960             : 
    5961           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
    5962             :                 discard_const_p(char *, kwnames),
    5963             :                 &mem_ctx_obj,
    5964             :                 &level,
    5965             :                 &in_obj)) {
    5966           0 :                 return NULL;
    5967             :         }
    5968           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5969           0 :         if (mem_ctx == NULL) {
    5970           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    5971           0 :                 return NULL;
    5972             :         }
    5973           0 :         in = (union drsuapi_DsGetNCChangesRequest *)pytalloc_get_ptr(in_obj);
    5974           0 :         if (in == NULL) {
    5975           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNCChangesRequest!");
    5976           0 :                 return NULL;
    5977             :         }
    5978             : 
    5979           0 :         return py_import_drsuapi_DsGetNCChangesRequest(mem_ctx, level, in);
    5980             : }
    5981             : 
    5982        5455 : static PyObject *py_drsuapi_DsGetNCChangesRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    5983             : {
    5984        5455 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
    5985        5455 :         PyObject *mem_ctx_obj = NULL;
    5986        5455 :         TALLOC_CTX *mem_ctx = NULL;
    5987        5455 :         int level = 0;
    5988        5455 :         PyObject *in = NULL;
    5989        5455 :         union drsuapi_DsGetNCChangesRequest *out = NULL;
    5990             : 
    5991        5455 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
    5992             :                 discard_const_p(char *, kwnames),
    5993             :                 &mem_ctx_obj,
    5994             :                 &level,
    5995             :                 &in)) {
    5996           0 :                 return NULL;
    5997             :         }
    5998        5455 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
    5999        5455 :         if (mem_ctx == NULL) {
    6000           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
    6001           0 :                 return NULL;
    6002             :         }
    6003             : 
    6004        5455 :         out = py_export_drsuapi_DsGetNCChangesRequest(mem_ctx, level, in);
    6005        5455 :         if (out == NULL) {
    6006           0 :                 return NULL;
    6007             :         }
    6008             : 
    6009        5455 :         return pytalloc_GenericObject_reference(out);
    6010             : }
    6011             : 
    6012             : static PyMethodDef py_drsuapi_DsGetNCChangesRequest_methods[] = {
    6013             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesRequest_import),
    6014             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    6015             :                 "T.__import__(mem_ctx, level, in) => ret." },
    6016             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesRequest_export),
    6017             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
    6018             :                 "T.__export__(mem_ctx, level, in) => ret." },
    6019             :         { NULL, NULL, 0, NULL }
    6020             : };
    6021             : 
    6022           0 : static PyObject *py_drsuapi_DsGetNCChangesRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6023             : {
    6024           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
    6025           0 :         return NULL;
    6026             : }
    6027             : 
    6028             : 
    6029             : static PyTypeObject drsuapi_DsGetNCChangesRequest_Type = {
    6030             :         PyVarObject_HEAD_INIT(NULL, 0)
    6031             :         .tp_name = "drsuapi.DsGetNCChangesRequest",
    6032             :         .tp_getset = NULL,
    6033             :         .tp_methods = py_drsuapi_DsGetNCChangesRequest_methods,
    6034             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6035             :         .tp_new = py_drsuapi_DsGetNCChangesRequest_new,
    6036             : };
    6037             : 
    6038             : 
    6039         917 : static PyObject *py_drsuapi_DsReplicaCursor2_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    6040             : {
    6041         917 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(obj);
    6042           0 :         PyObject *py_source_dsa_invocation_id;
    6043         917 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    6044         917 :         return py_source_dsa_invocation_id;
    6045             : }
    6046             : 
    6047           0 : static int py_drsuapi_DsReplicaCursor2_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    6048             : {
    6049           0 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(py_obj);
    6050           0 :         if (value == NULL) {
    6051           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    6052           0 :                 return -1;
    6053             :         }
    6054           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    6055           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6056           0 :                 PyErr_NoMemory();
    6057           0 :                 return -1;
    6058             :         }
    6059           0 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    6060           0 :         return 0;
    6061             : }
    6062             : 
    6063         634 : static PyObject *py_drsuapi_DsReplicaCursor2_get_highest_usn(PyObject *obj, void *closure)
    6064             : {
    6065         634 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(obj);
    6066           0 :         PyObject *py_highest_usn;
    6067         634 :         py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
    6068         634 :         return py_highest_usn;
    6069             : }
    6070             : 
    6071           0 : static int py_drsuapi_DsReplicaCursor2_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
    6072             : {
    6073           0 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(py_obj);
    6074           0 :         if (value == NULL) {
    6075           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
    6076           0 :                 return -1;
    6077             :         }
    6078             :         {
    6079           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
    6080           0 :                 if (PyLong_Check(value)) {
    6081           0 :                         unsigned long long test_var;
    6082           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6083           0 :                         if (PyErr_Occurred() != NULL) {
    6084           0 :                                 return -1;
    6085             :                         }
    6086           0 :                         if (test_var > uint_max) {
    6087           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6088             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6089           0 :                                 return -1;
    6090             :                         }
    6091           0 :                         object->highest_usn = test_var;
    6092             :                 } else {
    6093           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6094             :                           PyLong_Type.tp_name);
    6095           0 :                         return -1;
    6096             :                 }
    6097             :         }
    6098           0 :         return 0;
    6099             : }
    6100             : 
    6101         424 : static PyObject *py_drsuapi_DsReplicaCursor2_get_last_sync_success(PyObject *obj, void *closure)
    6102             : {
    6103         424 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(obj);
    6104           0 :         PyObject *py_last_sync_success;
    6105         424 :         py_last_sync_success = PyLong_FromUnsignedLongLong(object->last_sync_success);
    6106         424 :         return py_last_sync_success;
    6107             : }
    6108             : 
    6109           0 : static int py_drsuapi_DsReplicaCursor2_set_last_sync_success(PyObject *py_obj, PyObject *value, void *closure)
    6110             : {
    6111           0 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(py_obj);
    6112           0 :         if (value == NULL) {
    6113           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_sync_success");
    6114           0 :                 return -1;
    6115             :         }
    6116             :         {
    6117           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_sync_success));
    6118           0 :                 if (PyLong_Check(value)) {
    6119           0 :                         unsigned long long test_var;
    6120           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6121           0 :                         if (PyErr_Occurred() != NULL) {
    6122           0 :                                 return -1;
    6123             :                         }
    6124           0 :                         if (test_var > uint_max) {
    6125           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6126             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6127           0 :                                 return -1;
    6128             :                         }
    6129           0 :                         object->last_sync_success = test_var;
    6130             :                 } else {
    6131           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6132             :                           PyLong_Type.tp_name);
    6133           0 :                         return -1;
    6134             :                 }
    6135             :         }
    6136           0 :         return 0;
    6137             : }
    6138             : 
    6139             : static PyGetSetDef py_drsuapi_DsReplicaCursor2_getsetters[] = {
    6140             :         {
    6141             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
    6142             :                 .get = py_drsuapi_DsReplicaCursor2_get_source_dsa_invocation_id,
    6143             :                 .set = py_drsuapi_DsReplicaCursor2_set_source_dsa_invocation_id,
    6144             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    6145             :         },
    6146             :         {
    6147             :                 .name = discard_const_p(char, "highest_usn"),
    6148             :                 .get = py_drsuapi_DsReplicaCursor2_get_highest_usn,
    6149             :                 .set = py_drsuapi_DsReplicaCursor2_set_highest_usn,
    6150             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    6151             :         },
    6152             :         {
    6153             :                 .name = discard_const_p(char, "last_sync_success"),
    6154             :                 .get = py_drsuapi_DsReplicaCursor2_get_last_sync_success,
    6155             :                 .set = py_drsuapi_DsReplicaCursor2_set_last_sync_success,
    6156             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
    6157             :         },
    6158             :         { .name = NULL }
    6159             : };
    6160             : 
    6161           0 : static PyObject *py_drsuapi_DsReplicaCursor2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6162             : {
    6163           0 :         return pytalloc_new(struct drsuapi_DsReplicaCursor2, type);
    6164             : }
    6165             : 
    6166           0 : static PyObject *py_drsuapi_DsReplicaCursor2_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    6167             : {
    6168           0 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(py_obj);
    6169           0 :         PyObject *ret = NULL;
    6170           0 :         DATA_BLOB blob;
    6171           0 :         enum ndr_err_code err;
    6172           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    6173           0 :         if (tmp_ctx == NULL) {
    6174           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    6175           0 :                 return NULL;
    6176             :         }
    6177           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaCursor2);
    6178           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6179           0 :                 TALLOC_FREE(tmp_ctx);
    6180           0 :                 PyErr_SetNdrError(err);
    6181           0 :                 return NULL;
    6182             :         }
    6183             : 
    6184           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    6185           0 :         TALLOC_FREE(tmp_ctx);
    6186           0 :         return ret;
    6187             : }
    6188             : 
    6189           0 : static PyObject *py_drsuapi_DsReplicaCursor2_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    6190             : {
    6191           0 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(py_obj);
    6192           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    6193           0 :         Py_ssize_t blob_length = 0;
    6194           0 :         enum ndr_err_code err;
    6195           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    6196           0 :         PyObject *allow_remaining_obj = NULL;
    6197           0 :         bool allow_remaining = false;
    6198             : 
    6199           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    6200             :                 discard_const_p(char *, kwnames),
    6201             :                 &blob.data, &blob_length,
    6202             :                 &allow_remaining_obj)) {
    6203           0 :                 return NULL;
    6204             :         }
    6205           0 :         blob.length = blob_length;
    6206             : 
    6207           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    6208           0 :                 allow_remaining = true;
    6209             :         }
    6210             : 
    6211           0 :         if (allow_remaining) {
    6212           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor2);
    6213             :         } else {
    6214           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor2);
    6215             :         }
    6216           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    6217           0 :                 PyErr_SetNdrError(err);
    6218           0 :                 return NULL;
    6219             :         }
    6220             : 
    6221           0 :         Py_RETURN_NONE;
    6222             : }
    6223             : 
    6224           0 : static PyObject *py_drsuapi_DsReplicaCursor2_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    6225             : {
    6226           0 :         struct drsuapi_DsReplicaCursor2 *object = pytalloc_get_ptr(py_obj);
    6227           0 :         PyObject *ret;
    6228           0 :         char *retstr;
    6229             : 
    6230           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaCursor2, "drsuapi_DsReplicaCursor2", object);
    6231           0 :         ret = PyUnicode_FromString(retstr);
    6232           0 :         talloc_free(retstr);
    6233             : 
    6234           0 :         return ret;
    6235             : }
    6236             : 
    6237             : static PyMethodDef py_drsuapi_DsReplicaCursor2_methods[] = {
    6238             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaCursor2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    6239             :         { "__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" },
    6240             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaCursor2_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    6241             :         { NULL, NULL, 0, NULL }
    6242             : };
    6243             : 
    6244             : 
    6245             : static PyTypeObject drsuapi_DsReplicaCursor2_Type = {
    6246             :         PyVarObject_HEAD_INIT(NULL, 0)
    6247             :         .tp_name = "drsuapi.DsReplicaCursor2",
    6248             :         .tp_getset = py_drsuapi_DsReplicaCursor2_getsetters,
    6249             :         .tp_methods = py_drsuapi_DsReplicaCursor2_methods,
    6250             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6251             :         .tp_new = py_drsuapi_DsReplicaCursor2_new,
    6252             : };
    6253             : 
    6254             : 
    6255           0 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_version(PyObject *obj, void *closure)
    6256             : {
    6257           0 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(obj);
    6258           0 :         PyObject *py_version;
    6259           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    6260           0 :         return py_version;
    6261             : }
    6262             : 
    6263           0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_version(PyObject *py_obj, PyObject *value, void *closure)
    6264             : {
    6265           0 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(py_obj);
    6266           0 :         if (value == NULL) {
    6267           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    6268           0 :                 return -1;
    6269             :         }
    6270             :         {
    6271           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    6272           0 :                 if (PyLong_Check(value)) {
    6273           0 :                         unsigned long long test_var;
    6274           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6275           0 :                         if (PyErr_Occurred() != NULL) {
    6276           0 :                                 return -1;
    6277             :                         }
    6278           0 :                         if (test_var > uint_max) {
    6279           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6280             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6281           0 :                                 return -1;
    6282             :                         }
    6283           0 :                         object->version = test_var;
    6284             :                 } else {
    6285           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6286             :                           PyLong_Type.tp_name);
    6287           0 :                         return -1;
    6288             :                 }
    6289             :         }
    6290           0 :         return 0;
    6291             : }
    6292             : 
    6293           0 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_reserved1(PyObject *obj, void *closure)
    6294             : {
    6295           0 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(obj);
    6296           0 :         PyObject *py_reserved1;
    6297           0 :         py_reserved1 = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved1));
    6298           0 :         return py_reserved1;
    6299             : }
    6300             : 
    6301           0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
    6302             : {
    6303           0 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(py_obj);
    6304           0 :         if (value == NULL) {
    6305           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
    6306           0 :                 return -1;
    6307             :         }
    6308             :         {
    6309           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
    6310           0 :                 if (PyLong_Check(value)) {
    6311           0 :                         unsigned long long test_var;
    6312           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6313           0 :                         if (PyErr_Occurred() != NULL) {
    6314           0 :                                 return -1;
    6315             :                         }
    6316           0 :                         if (test_var > uint_max) {
    6317           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6318             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6319           0 :                                 return -1;
    6320             :                         }
    6321           0 :                         object->reserved1 = test_var;
    6322             :                 } else {
    6323           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6324             :                           PyLong_Type.tp_name);
    6325           0 :                         return -1;
    6326             :                 }
    6327             :         }
    6328           0 :         return 0;
    6329             : }
    6330             : 
    6331          25 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_count(PyObject *obj, void *closure)
    6332             : {
    6333          25 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(obj);
    6334           0 :         PyObject *py_count;
    6335          25 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    6336          25 :         return py_count;
    6337             : }
    6338             : 
    6339           0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_count(PyObject *py_obj, PyObject *value, void *closure)
    6340             : {
    6341           0 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(py_obj);
    6342           0 :         if (value == NULL) {
    6343           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    6344           0 :                 return -1;
    6345             :         }
    6346             :         {
    6347           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    6348           0 :                 if (PyLong_Check(value)) {
    6349           0 :                         unsigned long long test_var;
    6350           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6351           0 :                         if (PyErr_Occurred() != NULL) {
    6352           0 :                                 return -1;
    6353             :                         }
    6354           0 :                         if (test_var > uint_max) {
    6355           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6356             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6357           0 :                                 return -1;
    6358             :                         }
    6359           0 :                         object->count = test_var;
    6360             :                 } else {
    6361           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6362             :                           PyLong_Type.tp_name);
    6363           0 :                         return -1;
    6364             :                 }
    6365             :         }
    6366           0 :         return 0;
    6367             : }
    6368             : 
    6369           0 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_reserved2(PyObject *obj, void *closure)
    6370             : {
    6371           0 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(obj);
    6372           0 :         PyObject *py_reserved2;
    6373           0 :         py_reserved2 = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved2));
    6374           0 :         return py_reserved2;
    6375             : }
    6376             : 
    6377           0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
    6378             : {
    6379           0 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(py_obj);
    6380           0 :         if (value == NULL) {
    6381           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved2");
    6382           0 :                 return -1;
    6383             :         }
    6384             :         {
    6385           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved2));
    6386           0 :                 if (PyLong_Check(value)) {
    6387           0 :                         unsigned long long test_var;
    6388           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6389           0 :                         if (PyErr_Occurred() != NULL) {
    6390           0 :                                 return -1;
    6391             :                         }
    6392           0 :                         if (test_var > uint_max) {
    6393           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6394             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6395           0 :                                 return -1;
    6396             :                         }
    6397           0 :                         object->reserved2 = test_var;
    6398             :                 } else {
    6399           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6400             :                           PyLong_Type.tp_name);
    6401           0 :                         return -1;
    6402             :                 }
    6403             :         }
    6404           0 :         return 0;
    6405             : }
    6406             : 
    6407          50 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_cursors(PyObject *obj, void *closure)
    6408             : {
    6409          50 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(obj);
    6410           0 :         PyObject *py_cursors;
    6411          50 :         py_cursors = PyList_New(object->count);
    6412          50 :         if (py_cursors == NULL) {
    6413           0 :                 return NULL;
    6414             :         }
    6415             :         {
    6416             :                 int cursors_cntr_0;
    6417         150 :                 for (cursors_cntr_0 = 0; cursors_cntr_0 < (object->count); cursors_cntr_0++) {
    6418           0 :                         PyObject *py_cursors_0;
    6419         100 :                         py_cursors_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2_Type, object->cursors, &(object->cursors)[cursors_cntr_0]);
    6420         100 :                         PyList_SetItem(py_cursors, cursors_cntr_0, py_cursors_0);
    6421             :                 }
    6422             :         }
    6423          50 :         return py_cursors;
    6424             : }
    6425             : 
    6426           0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_cursors(PyObject *py_obj, PyObject *value, void *closure)
    6427             : {
    6428           0 :         struct drsuapi_DsReplicaCursor2CtrEx *object = pytalloc_get_ptr(py_obj);
    6429           0 :         if (value == NULL) {
    6430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cursors");
    6431           0 :                 return -1;
    6432             :         }
    6433           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    6434             :         {
    6435           0 :                 int cursors_cntr_0;
    6436           0 :                 object->cursors = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cursors, PyList_GET_SIZE(value));
    6437           0 :                 if (!object->cursors) { return -1; }
    6438           0 :                 talloc_set_name_const(object->cursors, "ARRAY: object->cursors");
    6439           0 :                 for (cursors_cntr_0 = 0; cursors_cntr_0 < PyList_GET_SIZE(value); cursors_cntr_0++) {
    6440           0 :                         if (PyList_GET_ITEM(value, cursors_cntr_0) == NULL) {
    6441           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->cursors)[cursors_cntr_0]");
    6442           0 :                                 return -1;
    6443             :                         }
    6444           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2_Type, PyList_GET_ITEM(value, cursors_cntr_0), return -1;);
    6445           0 :                         if (talloc_reference(object->cursors, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, cursors_cntr_0))) == NULL) {
    6446           0 :                                 PyErr_NoMemory();
    6447           0 :                                 return -1;
    6448             :                         }
    6449           0 :                         (object->cursors)[cursors_cntr_0] = *(struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, cursors_cntr_0));
    6450             :                 }
    6451             :         }
    6452           0 :         return 0;
    6453             : }
    6454             : 
    6455             : static PyGetSetDef py_drsuapi_DsReplicaCursor2CtrEx_getsetters[] = {
    6456             :         {
    6457             :                 .name = discard_const_p(char, "version"),
    6458             :                 .get = py_drsuapi_DsReplicaCursor2CtrEx_get_version,
    6459             :                 .set = py_drsuapi_DsReplicaCursor2CtrEx_set_version,
    6460             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6461             :         },
    6462             :         {
    6463             :                 .name = discard_const_p(char, "reserved1"),
    6464             :                 .get = py_drsuapi_DsReplicaCursor2CtrEx_get_reserved1,
    6465             :                 .set = py_drsuapi_DsReplicaCursor2CtrEx_set_reserved1,
    6466             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6467             :         },
    6468             :         {
    6469             :                 .name = discard_const_p(char, "count"),
    6470             :                 .get = py_drsuapi_DsReplicaCursor2CtrEx_get_count,
    6471             :                 .set = py_drsuapi_DsReplicaCursor2CtrEx_set_count,
    6472             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6473             :         },
    6474             :         {
    6475             :                 .name = discard_const_p(char, "reserved2"),
    6476             :                 .get = py_drsuapi_DsReplicaCursor2CtrEx_get_reserved2,
    6477             :                 .set = py_drsuapi_DsReplicaCursor2CtrEx_set_reserved2,
    6478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6479             :         },
    6480             :         {
    6481             :                 .name = discard_const_p(char, "cursors"),
    6482             :                 .get = py_drsuapi_DsReplicaCursor2CtrEx_get_cursors,
    6483             :                 .set = py_drsuapi_DsReplicaCursor2CtrEx_set_cursors,
    6484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor2")
    6485             :         },
    6486             :         { .name = NULL }
    6487             : };
    6488             : 
    6489           0 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6490             : {
    6491           0 :         return pytalloc_new(struct drsuapi_DsReplicaCursor2CtrEx, type);
    6492             : }
    6493             : 
    6494             : 
    6495             : static PyTypeObject drsuapi_DsReplicaCursor2CtrEx_Type = {
    6496             :         PyVarObject_HEAD_INIT(NULL, 0)
    6497             :         .tp_name = "drsuapi.DsReplicaCursor2CtrEx",
    6498             :         .tp_getset = py_drsuapi_DsReplicaCursor2CtrEx_getsetters,
    6499             :         .tp_methods = NULL,
    6500             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6501             :         .tp_new = py_drsuapi_DsReplicaCursor2CtrEx_new,
    6502             : };
    6503             : 
    6504             : 
    6505           0 : static PyObject *py_drsuapi_DsAttributeValue_get___ndr_size(PyObject *obj, void *closure)
    6506             : {
    6507           0 :         struct drsuapi_DsAttributeValue *object = pytalloc_get_ptr(obj);
    6508           0 :         PyObject *py___ndr_size;
    6509           0 :         py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size));
    6510           0 :         return py___ndr_size;
    6511             : }
    6512             : 
    6513           0 : static int py_drsuapi_DsAttributeValue_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    6514             : {
    6515           0 :         struct drsuapi_DsAttributeValue *object = pytalloc_get_ptr(py_obj);
    6516           0 :         if (value == NULL) {
    6517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
    6518           0 :                 return -1;
    6519             :         }
    6520             :         {
    6521           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
    6522           0 :                 if (PyLong_Check(value)) {
    6523           0 :                         unsigned long long test_var;
    6524           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6525           0 :                         if (PyErr_Occurred() != NULL) {
    6526           0 :                                 return -1;
    6527             :                         }
    6528           0 :                         if (test_var > uint_max) {
    6529           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6530             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6531           0 :                                 return -1;
    6532             :                         }
    6533           0 :                         object->__ndr_size = test_var;
    6534             :                 } else {
    6535           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6536             :                           PyLong_Type.tp_name);
    6537           0 :                         return -1;
    6538             :                 }
    6539             :         }
    6540           0 :         return 0;
    6541             : }
    6542             : 
    6543       13281 : static PyObject *py_drsuapi_DsAttributeValue_get_blob(PyObject *obj, void *closure)
    6544             : {
    6545       13281 :         struct drsuapi_DsAttributeValue *object = pytalloc_get_ptr(obj);
    6546           0 :         PyObject *py_blob;
    6547       13281 :         if (object->blob == NULL) {
    6548           0 :                 Py_RETURN_NONE;
    6549             :         }
    6550       13281 :         if (object->blob == NULL) {
    6551           0 :                 py_blob = Py_None;
    6552           0 :                 Py_INCREF(py_blob);
    6553             :         } else {
    6554       13281 :                 py_blob = PyBytes_FromStringAndSize((char *)(*object->blob).data, (*object->blob).length);
    6555             :         }
    6556       13281 :         return py_blob;
    6557             : }
    6558             : 
    6559          28 : static int py_drsuapi_DsAttributeValue_set_blob(PyObject *py_obj, PyObject *value, void *closure)
    6560             : {
    6561          28 :         struct drsuapi_DsAttributeValue *object = pytalloc_get_ptr(py_obj);
    6562          28 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->blob));
    6563          28 :         if (value == NULL) {
    6564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->blob");
    6565           0 :                 return -1;
    6566             :         }
    6567          28 :         if (value == Py_None) {
    6568           0 :                 object->blob = NULL;
    6569             :         } else {
    6570          28 :                 object->blob = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->blob);
    6571          28 :                 if (object->blob == NULL) {
    6572           0 :                         PyErr_NoMemory();
    6573           0 :                         return -1;
    6574             :                 }
    6575          28 :                 *object->blob = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    6576             :         }
    6577          28 :         return 0;
    6578             : }
    6579             : 
    6580             : static PyGetSetDef py_drsuapi_DsAttributeValue_getsetters[] = {
    6581             :         {
    6582             :                 .name = discard_const_p(char, "__ndr_size"),
    6583             :                 .get = py_drsuapi_DsAttributeValue_get___ndr_size,
    6584             :                 .set = py_drsuapi_DsAttributeValue_set___ndr_size,
    6585             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6586             :         },
    6587             :         {
    6588             :                 .name = discard_const_p(char, "blob"),
    6589             :                 .get = py_drsuapi_DsAttributeValue_get_blob,
    6590             :                 .set = py_drsuapi_DsAttributeValue_set_blob,
    6591             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    6592             :         },
    6593             :         { .name = NULL }
    6594             : };
    6595             : 
    6596           0 : static PyObject *py_drsuapi_DsAttributeValue_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6597             : {
    6598           0 :         return pytalloc_new(struct drsuapi_DsAttributeValue, type);
    6599             : }
    6600             : 
    6601             : 
    6602             : static PyTypeObject drsuapi_DsAttributeValue_Type = {
    6603             :         PyVarObject_HEAD_INIT(NULL, 0)
    6604             :         .tp_name = "drsuapi.DsAttributeValue",
    6605             :         .tp_getset = py_drsuapi_DsAttributeValue_getsetters,
    6606             :         .tp_methods = NULL,
    6607             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6608             :         .tp_new = py_drsuapi_DsAttributeValue_new,
    6609             : };
    6610             : 
    6611             : 
    6612        5484 : static PyObject *py_drsuapi_DsAttributeValueCtr_get_num_values(PyObject *obj, void *closure)
    6613             : {
    6614        5484 :         struct drsuapi_DsAttributeValueCtr *object = pytalloc_get_ptr(obj);
    6615           0 :         PyObject *py_num_values;
    6616        5484 :         py_num_values = PyLong_FromUnsignedLongLong((uint32_t)(object->num_values));
    6617        5484 :         return py_num_values;
    6618             : }
    6619             : 
    6620           0 : static int py_drsuapi_DsAttributeValueCtr_set_num_values(PyObject *py_obj, PyObject *value, void *closure)
    6621             : {
    6622           0 :         struct drsuapi_DsAttributeValueCtr *object = pytalloc_get_ptr(py_obj);
    6623           0 :         if (value == NULL) {
    6624           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_values");
    6625           0 :                 return -1;
    6626             :         }
    6627             :         {
    6628           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_values));
    6629           0 :                 if (PyLong_Check(value)) {
    6630           0 :                         unsigned long long test_var;
    6631           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6632           0 :                         if (PyErr_Occurred() != NULL) {
    6633           0 :                                 return -1;
    6634             :                         }
    6635           0 :                         if (test_var > uint_max) {
    6636           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6637             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6638           0 :                                 return -1;
    6639             :                         }
    6640           0 :                         object->num_values = test_var;
    6641             :                 } else {
    6642           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6643             :                           PyLong_Type.tp_name);
    6644           0 :                         return -1;
    6645             :                 }
    6646             :         }
    6647           0 :         return 0;
    6648             : }
    6649             : 
    6650        5404 : static PyObject *py_drsuapi_DsAttributeValueCtr_get_values(PyObject *obj, void *closure)
    6651             : {
    6652        5404 :         struct drsuapi_DsAttributeValueCtr *object = pytalloc_get_ptr(obj);
    6653           0 :         PyObject *py_values;
    6654        5404 :         if (object->values == NULL) {
    6655           4 :                 Py_RETURN_NONE;
    6656             :         }
    6657        5400 :         if (object->values == NULL) {
    6658           0 :                 py_values = Py_None;
    6659           0 :                 Py_INCREF(py_values);
    6660             :         } else {
    6661        5400 :                 py_values = PyList_New(object->num_values);
    6662        5400 :                 if (py_values == NULL) {
    6663           0 :                         return NULL;
    6664             :                 }
    6665             :                 {
    6666             :                         int values_cntr_1;
    6667       10800 :                         for (values_cntr_1 = 0; values_cntr_1 < (object->num_values); values_cntr_1++) {
    6668           0 :                                 PyObject *py_values_1;
    6669        5400 :                                 py_values_1 = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, object->values, &(object->values)[values_cntr_1]);
    6670        5400 :                                 PyList_SetItem(py_values, values_cntr_1, py_values_1);
    6671             :                         }
    6672             :                 }
    6673             :         }
    6674        5400 :         return py_values;
    6675             : }
    6676             : 
    6677           0 : static int py_drsuapi_DsAttributeValueCtr_set_values(PyObject *py_obj, PyObject *value, void *closure)
    6678             : {
    6679           0 :         struct drsuapi_DsAttributeValueCtr *object = pytalloc_get_ptr(py_obj);
    6680           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->values));
    6681           0 :         if (value == NULL) {
    6682           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->values");
    6683           0 :                 return -1;
    6684             :         }
    6685           0 :         if (value == Py_None) {
    6686           0 :                 object->values = NULL;
    6687             :         } else {
    6688           0 :                 object->values = NULL;
    6689           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    6690             :                 {
    6691           0 :                         int values_cntr_1;
    6692           0 :                         object->values = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->values, PyList_GET_SIZE(value));
    6693           0 :                         if (!object->values) { return -1; }
    6694           0 :                         talloc_set_name_const(object->values, "ARRAY: object->values");
    6695           0 :                         for (values_cntr_1 = 0; values_cntr_1 < PyList_GET_SIZE(value); values_cntr_1++) {
    6696           0 :                                 if (PyList_GET_ITEM(value, values_cntr_1) == NULL) {
    6697           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->values)[values_cntr_1]");
    6698           0 :                                         return -1;
    6699             :                                 }
    6700           0 :                                 PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, PyList_GET_ITEM(value, values_cntr_1), return -1;);
    6701           0 :                                 if (talloc_reference(object->values, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, values_cntr_1))) == NULL) {
    6702           0 :                                         PyErr_NoMemory();
    6703           0 :                                         return -1;
    6704             :                                 }
    6705           0 :                                 (object->values)[values_cntr_1] = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(PyList_GET_ITEM(value, values_cntr_1));
    6706             :                         }
    6707             :                 }
    6708             :         }
    6709           0 :         return 0;
    6710             : }
    6711             : 
    6712             : static PyGetSetDef py_drsuapi_DsAttributeValueCtr_getsetters[] = {
    6713             :         {
    6714             :                 .name = discard_const_p(char, "num_values"),
    6715             :                 .get = py_drsuapi_DsAttributeValueCtr_get_num_values,
    6716             :                 .set = py_drsuapi_DsAttributeValueCtr_set_num_values,
    6717             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6718             :         },
    6719             :         {
    6720             :                 .name = discard_const_p(char, "values"),
    6721             :                 .get = py_drsuapi_DsAttributeValueCtr_get_values,
    6722             :                 .set = py_drsuapi_DsAttributeValueCtr_set_values,
    6723             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeValue")
    6724             :         },
    6725             :         { .name = NULL }
    6726             : };
    6727             : 
    6728           0 : static PyObject *py_drsuapi_DsAttributeValueCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6729             : {
    6730           0 :         return pytalloc_new(struct drsuapi_DsAttributeValueCtr, type);
    6731             : }
    6732             : 
    6733             : 
    6734             : static PyTypeObject drsuapi_DsAttributeValueCtr_Type = {
    6735             :         PyVarObject_HEAD_INIT(NULL, 0)
    6736             :         .tp_name = "drsuapi.DsAttributeValueCtr",
    6737             :         .tp_getset = py_drsuapi_DsAttributeValueCtr_getsetters,
    6738             :         .tp_methods = NULL,
    6739             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    6740             :         .tp_new = py_drsuapi_DsAttributeValueCtr_new,
    6741             : };
    6742             : 
    6743             : 
    6744           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size(PyObject *obj, void *closure)
    6745             : {
    6746           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(obj);
    6747           0 :         PyObject *py___ndr_size;
    6748           0 :         py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size));
    6749           0 :         return py___ndr_size;
    6750             : }
    6751             : 
    6752           0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    6753             : {
    6754           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    6755           0 :         if (value == NULL) {
    6756           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
    6757           0 :                 return -1;
    6758             :         }
    6759             :         {
    6760           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
    6761           0 :                 if (PyLong_Check(value)) {
    6762           0 :                         unsigned long long test_var;
    6763           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6764           0 :                         if (PyErr_Occurred() != NULL) {
    6765           0 :                                 return -1;
    6766             :                         }
    6767           0 :                         if (test_var > uint_max) {
    6768           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6769             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6770           0 :                                 return -1;
    6771             :                         }
    6772           0 :                         object->__ndr_size = test_var;
    6773             :                 } else {
    6774           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6775             :                           PyLong_Type.tp_name);
    6776           0 :                         return -1;
    6777             :                 }
    6778             :         }
    6779           0 :         return 0;
    6780             : }
    6781             : 
    6782           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_sid(PyObject *obj, void *closure)
    6783             : {
    6784           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(obj);
    6785           0 :         PyObject *py___ndr_size_sid;
    6786           0 :         py___ndr_size_sid = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size_sid));
    6787           0 :         return py___ndr_size_sid;
    6788             : }
    6789             : 
    6790           0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_sid(PyObject *py_obj, PyObject *value, void *closure)
    6791             : {
    6792           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    6793           0 :         if (value == NULL) {
    6794           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_sid");
    6795           0 :                 return -1;
    6796             :         }
    6797             :         {
    6798           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_sid));
    6799           0 :                 if (PyLong_Check(value)) {
    6800           0 :                         unsigned long long test_var;
    6801           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6802           0 :                         if (PyErr_Occurred() != NULL) {
    6803           0 :                                 return -1;
    6804             :                         }
    6805           0 :                         if (test_var > uint_max) {
    6806           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6807             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6808           0 :                                 return -1;
    6809             :                         }
    6810           0 :                         object->__ndr_size_sid = test_var;
    6811             :                 } else {
    6812           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6813             :                           PyLong_Type.tp_name);
    6814           0 :                         return -1;
    6815             :                 }
    6816             :         }
    6817           0 :         return 0;
    6818             : }
    6819             : 
    6820        7595 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get_guid(PyObject *obj, void *closure)
    6821             : {
    6822        7595 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(obj);
    6823           0 :         PyObject *py_guid;
    6824        7595 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
    6825        7595 :         return py_guid;
    6826             : }
    6827             : 
    6828           0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set_guid(PyObject *py_obj, PyObject *value, void *closure)
    6829             : {
    6830           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    6831           0 :         if (value == NULL) {
    6832           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
    6833           0 :                 return -1;
    6834             :         }
    6835           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    6836           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6837           0 :                 PyErr_NoMemory();
    6838           0 :                 return -1;
    6839             :         }
    6840           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
    6841           0 :         return 0;
    6842             : }
    6843             : 
    6844           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get_sid(PyObject *obj, void *closure)
    6845             : {
    6846           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(obj);
    6847           0 :         PyObject *py_sid;
    6848           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
    6849           0 :         return py_sid;
    6850             : }
    6851             : 
    6852           0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    6853             : {
    6854           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    6855           0 :         if (value == NULL) {
    6856           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
    6857           0 :                 return -1;
    6858             :         }
    6859           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    6860           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    6861           0 :                 PyErr_NoMemory();
    6862           0 :                 return -1;
    6863             :         }
    6864           0 :         object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
    6865           0 :         return 0;
    6866             : }
    6867             : 
    6868           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_dn(PyObject *obj, void *closure)
    6869             : {
    6870           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(obj);
    6871           0 :         PyObject *py___ndr_size_dn;
    6872           0 :         py___ndr_size_dn = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size_dn));
    6873           0 :         return py___ndr_size_dn;
    6874             : }
    6875             : 
    6876           0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_dn(PyObject *py_obj, PyObject *value, void *closure)
    6877             : {
    6878           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    6879           0 :         if (value == NULL) {
    6880           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_dn");
    6881           0 :                 return -1;
    6882             :         }
    6883             :         {
    6884           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_dn));
    6885           0 :                 if (PyLong_Check(value)) {
    6886           0 :                         unsigned long long test_var;
    6887           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    6888           0 :                         if (PyErr_Occurred() != NULL) {
    6889           0 :                                 return -1;
    6890             :                         }
    6891           0 :                         if (test_var > uint_max) {
    6892           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    6893             :                                   PyLong_Type.tp_name, uint_max, test_var);
    6894           0 :                                 return -1;
    6895             :                         }
    6896           0 :                         object->__ndr_size_dn = test_var;
    6897             :                 } else {
    6898           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    6899             :                           PyLong_Type.tp_name);
    6900           0 :                         return -1;
    6901             :                 }
    6902             :         }
    6903           0 :         return 0;
    6904             : }
    6905             : 
    6906        7486 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get_dn(PyObject *obj, void *closure)
    6907             : {
    6908        7486 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(obj);
    6909           0 :         PyObject *py_dn;
    6910        7486 :         if (object->dn == NULL) {
    6911           0 :                 py_dn = Py_None;
    6912           0 :                 Py_INCREF(py_dn);
    6913             :         } else {
    6914        7486 :                 py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
    6915             :         }
    6916        7486 :         return py_dn;
    6917             : }
    6918             : 
    6919           0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set_dn(PyObject *py_obj, PyObject *value, void *closure)
    6920             : {
    6921           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    6922           0 :         if (value == NULL) {
    6923           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dn");
    6924           0 :                 return -1;
    6925             :         }
    6926             :         {
    6927           0 :                 const char *test_str;
    6928           0 :                 const char *talloc_str;
    6929           0 :                 PyObject *unicode = NULL;
    6930           0 :                 if (PyUnicode_Check(value)) {
    6931           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    6932           0 :                         if (unicode == NULL) {
    6933           0 :                                 return -1;
    6934             :                         }
    6935           0 :                         test_str = PyBytes_AS_STRING(unicode);
    6936           0 :                 } else if (PyBytes_Check(value)) {
    6937           0 :                         test_str = PyBytes_AS_STRING(value);
    6938             :                 } else {
    6939           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    6940           0 :                         return -1;
    6941             :                 }
    6942           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    6943           0 :                 if (unicode != NULL) {
    6944           0 :                         Py_DECREF(unicode);
    6945             :                 }
    6946           0 :                 if (talloc_str == NULL) {
    6947           0 :                         PyErr_NoMemory();
    6948           0 :                         return -1;
    6949             :                 }
    6950           0 :                 object->dn = talloc_str;
    6951             :         }
    6952           0 :         return 0;
    6953             : }
    6954             : 
    6955             : static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier3_getsetters[] = {
    6956             :         {
    6957             :                 .name = discard_const_p(char, "__ndr_size"),
    6958             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size,
    6959             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size,
    6960             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6961             :         },
    6962             :         {
    6963             :                 .name = discard_const_p(char, "__ndr_size_sid"),
    6964             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_sid,
    6965             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_sid,
    6966             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6967             :         },
    6968             :         {
    6969             :                 .name = discard_const_p(char, "guid"),
    6970             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3_get_guid,
    6971             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3_set_guid,
    6972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    6973             :         },
    6974             :         {
    6975             :                 .name = discard_const_p(char, "sid"),
    6976             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3_get_sid,
    6977             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3_set_sid,
    6978             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
    6979             :         },
    6980             :         {
    6981             :                 .name = discard_const_p(char, "__ndr_size_dn"),
    6982             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_dn,
    6983             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_dn,
    6984             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    6985             :         },
    6986             :         {
    6987             :                 .name = discard_const_p(char, "dn"),
    6988             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3_get_dn,
    6989             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3_set_dn,
    6990             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    6991             :         },
    6992             :         { .name = NULL }
    6993             : };
    6994             : 
    6995        7763 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    6996             : {
    6997        7763 :         return pytalloc_new(struct drsuapi_DsReplicaObjectIdentifier3, type);
    6998             : }
    6999             : 
    7000           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7001             : {
    7002           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    7003           0 :         PyObject *ret = NULL;
    7004           0 :         DATA_BLOB blob;
    7005           0 :         enum ndr_err_code err;
    7006           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7007           0 :         if (tmp_ctx == NULL) {
    7008           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7009           0 :                 return NULL;
    7010             :         }
    7011           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
    7012           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7013           0 :                 TALLOC_FREE(tmp_ctx);
    7014           0 :                 PyErr_SetNdrError(err);
    7015           0 :                 return NULL;
    7016             :         }
    7017             : 
    7018           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7019           0 :         TALLOC_FREE(tmp_ctx);
    7020           0 :         return ret;
    7021             : }
    7022             : 
    7023        7763 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7024             : {
    7025        7763 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    7026        7763 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7027        7763 :         Py_ssize_t blob_length = 0;
    7028           0 :         enum ndr_err_code err;
    7029        7763 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7030        7763 :         PyObject *allow_remaining_obj = NULL;
    7031        7763 :         bool allow_remaining = false;
    7032             : 
    7033        7763 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7034             :                 discard_const_p(char *, kwnames),
    7035             :                 &blob.data, &blob_length,
    7036             :                 &allow_remaining_obj)) {
    7037           0 :                 return NULL;
    7038             :         }
    7039        7763 :         blob.length = blob_length;
    7040             : 
    7041        7763 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7042           0 :                 allow_remaining = true;
    7043             :         }
    7044             : 
    7045        7763 :         if (allow_remaining) {
    7046           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
    7047             :         } else {
    7048        7763 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
    7049             :         }
    7050        7763 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7051         150 :                 PyErr_SetNdrError(err);
    7052         150 :                 return NULL;
    7053             :         }
    7054             : 
    7055        7613 :         Py_RETURN_NONE;
    7056             : }
    7057             : 
    7058           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7059             : {
    7060           0 :         struct drsuapi_DsReplicaObjectIdentifier3 *object = pytalloc_get_ptr(py_obj);
    7061           0 :         PyObject *ret;
    7062           0 :         char *retstr;
    7063             : 
    7064           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier3, "drsuapi_DsReplicaObjectIdentifier3", object);
    7065           0 :         ret = PyUnicode_FromString(retstr);
    7066           0 :         talloc_free(retstr);
    7067             : 
    7068           0 :         return ret;
    7069             : }
    7070             : 
    7071             : static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier3_methods[] = {
    7072             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7073             :         { "__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" },
    7074             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7075             :         { NULL, NULL, 0, NULL }
    7076             : };
    7077             : 
    7078             : 
    7079             : static PyTypeObject drsuapi_DsReplicaObjectIdentifier3_Type = {
    7080             :         PyVarObject_HEAD_INIT(NULL, 0)
    7081             :         .tp_name = "drsuapi.DsReplicaObjectIdentifier3",
    7082             :         .tp_getset = py_drsuapi_DsReplicaObjectIdentifier3_getsetters,
    7083             :         .tp_methods = py_drsuapi_DsReplicaObjectIdentifier3_methods,
    7084             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7085             :         .tp_new = py_drsuapi_DsReplicaObjectIdentifier3_new,
    7086             : };
    7087             : 
    7088             : 
    7089           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size(PyObject *obj, void *closure)
    7090             : {
    7091           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(obj);
    7092           0 :         PyObject *py___ndr_size;
    7093           0 :         py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size));
    7094           0 :         return py___ndr_size;
    7095             : }
    7096             : 
    7097           0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    7098             : {
    7099           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7100           0 :         if (value == NULL) {
    7101           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
    7102           0 :                 return -1;
    7103             :         }
    7104             :         {
    7105           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
    7106           0 :                 if (PyLong_Check(value)) {
    7107           0 :                         unsigned long long test_var;
    7108           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7109           0 :                         if (PyErr_Occurred() != NULL) {
    7110           0 :                                 return -1;
    7111             :                         }
    7112           0 :                         if (test_var > uint_max) {
    7113           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7114             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7115           0 :                                 return -1;
    7116             :                         }
    7117           0 :                         object->__ndr_size = test_var;
    7118             :                 } else {
    7119           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7120             :                           PyLong_Type.tp_name);
    7121           0 :                         return -1;
    7122             :                 }
    7123             :         }
    7124           0 :         return 0;
    7125             : }
    7126             : 
    7127           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_sid(PyObject *obj, void *closure)
    7128             : {
    7129           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(obj);
    7130           0 :         PyObject *py___ndr_size_sid;
    7131           0 :         py___ndr_size_sid = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size_sid));
    7132           0 :         return py___ndr_size_sid;
    7133             : }
    7134             : 
    7135           0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_sid(PyObject *py_obj, PyObject *value, void *closure)
    7136             : {
    7137           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7138           0 :         if (value == NULL) {
    7139           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_sid");
    7140           0 :                 return -1;
    7141             :         }
    7142             :         {
    7143           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_sid));
    7144           0 :                 if (PyLong_Check(value)) {
    7145           0 :                         unsigned long long test_var;
    7146           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7147           0 :                         if (PyErr_Occurred() != NULL) {
    7148           0 :                                 return -1;
    7149             :                         }
    7150           0 :                         if (test_var > uint_max) {
    7151           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7152             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7153           0 :                                 return -1;
    7154             :                         }
    7155           0 :                         object->__ndr_size_sid = test_var;
    7156             :                 } else {
    7157           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7158             :                           PyLong_Type.tp_name);
    7159           0 :                         return -1;
    7160             :                 }
    7161             :         }
    7162           0 :         return 0;
    7163             : }
    7164             : 
    7165         150 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_guid(PyObject *obj, void *closure)
    7166             : {
    7167         150 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(obj);
    7168           0 :         PyObject *py_guid;
    7169         150 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
    7170         150 :         return py_guid;
    7171             : }
    7172             : 
    7173           0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_guid(PyObject *py_obj, PyObject *value, void *closure)
    7174             : {
    7175           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7176           0 :         if (value == NULL) {
    7177           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
    7178           0 :                 return -1;
    7179             :         }
    7180           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    7181           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7182           0 :                 PyErr_NoMemory();
    7183           0 :                 return -1;
    7184             :         }
    7185           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
    7186           0 :         return 0;
    7187             : }
    7188             : 
    7189           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_sid(PyObject *obj, void *closure)
    7190             : {
    7191           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(obj);
    7192           0 :         PyObject *py_sid;
    7193           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
    7194           0 :         return py_sid;
    7195             : }
    7196             : 
    7197           0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_sid(PyObject *py_obj, PyObject *value, void *closure)
    7198             : {
    7199           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7200           0 :         if (value == NULL) {
    7201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
    7202           0 :                 return -1;
    7203             :         }
    7204           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
    7205           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7206           0 :                 PyErr_NoMemory();
    7207           0 :                 return -1;
    7208             :         }
    7209           0 :         object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
    7210           0 :         return 0;
    7211             : }
    7212             : 
    7213           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_dn(PyObject *obj, void *closure)
    7214             : {
    7215           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(obj);
    7216           0 :         PyObject *py___ndr_size_dn;
    7217           0 :         py___ndr_size_dn = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size_dn));
    7218           0 :         return py___ndr_size_dn;
    7219             : }
    7220             : 
    7221           0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_dn(PyObject *py_obj, PyObject *value, void *closure)
    7222             : {
    7223           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7224           0 :         if (value == NULL) {
    7225           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_dn");
    7226           0 :                 return -1;
    7227             :         }
    7228             :         {
    7229           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_dn));
    7230           0 :                 if (PyLong_Check(value)) {
    7231           0 :                         unsigned long long test_var;
    7232           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7233           0 :                         if (PyErr_Occurred() != NULL) {
    7234           0 :                                 return -1;
    7235             :                         }
    7236           0 :                         if (test_var > uint_max) {
    7237           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7238             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7239           0 :                                 return -1;
    7240             :                         }
    7241           0 :                         object->__ndr_size_dn = test_var;
    7242             :                 } else {
    7243           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7244             :                           PyLong_Type.tp_name);
    7245           0 :                         return -1;
    7246             :                 }
    7247             :         }
    7248           0 :         return 0;
    7249             : }
    7250             : 
    7251         120 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_dn(PyObject *obj, void *closure)
    7252             : {
    7253         120 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(obj);
    7254           0 :         PyObject *py_dn;
    7255         120 :         if (object->dn == NULL) {
    7256           0 :                 py_dn = Py_None;
    7257           0 :                 Py_INCREF(py_dn);
    7258             :         } else {
    7259         120 :                 py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
    7260             :         }
    7261         120 :         return py_dn;
    7262             : }
    7263             : 
    7264           0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_dn(PyObject *py_obj, PyObject *value, void *closure)
    7265             : {
    7266           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7267           0 :         if (value == NULL) {
    7268           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dn");
    7269           0 :                 return -1;
    7270             :         }
    7271             :         {
    7272           0 :                 const char *test_str;
    7273           0 :                 const char *talloc_str;
    7274           0 :                 PyObject *unicode = NULL;
    7275           0 :                 if (PyUnicode_Check(value)) {
    7276           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
    7277           0 :                         if (unicode == NULL) {
    7278           0 :                                 return -1;
    7279             :                         }
    7280           0 :                         test_str = PyBytes_AS_STRING(unicode);
    7281           0 :                 } else if (PyBytes_Check(value)) {
    7282           0 :                         test_str = PyBytes_AS_STRING(value);
    7283             :                 } else {
    7284           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
    7285           0 :                         return -1;
    7286             :                 }
    7287           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
    7288           0 :                 if (unicode != NULL) {
    7289           0 :                         Py_DECREF(unicode);
    7290             :                 }
    7291           0 :                 if (talloc_str == NULL) {
    7292           0 :                         PyErr_NoMemory();
    7293           0 :                         return -1;
    7294             :                 }
    7295           0 :                 object->dn = talloc_str;
    7296             :         }
    7297           0 :         return 0;
    7298             : }
    7299             : 
    7300           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_binary(PyObject *obj, void *closure)
    7301             : {
    7302           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(obj);
    7303           0 :         PyObject *py___ndr_size_binary;
    7304           0 :         py___ndr_size_binary = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size_binary));
    7305           0 :         return py___ndr_size_binary;
    7306             : }
    7307             : 
    7308           0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
    7309             : {
    7310           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7311           0 :         if (value == NULL) {
    7312           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_binary");
    7313           0 :                 return -1;
    7314             :         }
    7315             :         {
    7316           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_binary));
    7317           0 :                 if (PyLong_Check(value)) {
    7318           0 :                         unsigned long long test_var;
    7319           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7320           0 :                         if (PyErr_Occurred() != NULL) {
    7321           0 :                                 return -1;
    7322             :                         }
    7323           0 :                         if (test_var > uint_max) {
    7324           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7325             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7326           0 :                                 return -1;
    7327             :                         }
    7328           0 :                         object->__ndr_size_binary = test_var;
    7329             :                 } else {
    7330           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7331             :                           PyLong_Type.tp_name);
    7332           0 :                         return -1;
    7333             :                 }
    7334             :         }
    7335           0 :         return 0;
    7336             : }
    7337             : 
    7338           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_binary(PyObject *obj, void *closure)
    7339             : {
    7340           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(obj);
    7341           0 :         PyObject *py_binary;
    7342           0 :         py_binary = PyBytes_FromStringAndSize((char *)(object->binary).data, (object->binary).length);
    7343           0 :         return py_binary;
    7344             : }
    7345             : 
    7346           0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_binary(PyObject *py_obj, PyObject *value, void *closure)
    7347             : {
    7348           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7349           0 :         if (value == NULL) {
    7350           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary");
    7351           0 :                 return -1;
    7352             :         }
    7353           0 :         object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
    7354           0 :         return 0;
    7355             : }
    7356             : 
    7357             : static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier3Binary_getsetters[] = {
    7358             :         {
    7359             :                 .name = discard_const_p(char, "__ndr_size"),
    7360             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size,
    7361             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size,
    7362             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7363             :         },
    7364             :         {
    7365             :                 .name = discard_const_p(char, "__ndr_size_sid"),
    7366             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_sid,
    7367             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_sid,
    7368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7369             :         },
    7370             :         {
    7371             :                 .name = discard_const_p(char, "guid"),
    7372             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get_guid,
    7373             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set_guid,
    7374             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    7375             :         },
    7376             :         {
    7377             :                 .name = discard_const_p(char, "sid"),
    7378             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get_sid,
    7379             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set_sid,
    7380             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
    7381             :         },
    7382             :         {
    7383             :                 .name = discard_const_p(char, "__ndr_size_dn"),
    7384             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_dn,
    7385             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_dn,
    7386             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7387             :         },
    7388             :         {
    7389             :                 .name = discard_const_p(char, "dn"),
    7390             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get_dn,
    7391             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set_dn,
    7392             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
    7393             :         },
    7394             :         {
    7395             :                 .name = discard_const_p(char, "__ndr_size_binary"),
    7396             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_binary,
    7397             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_binary,
    7398             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7399             :         },
    7400             :         {
    7401             :                 .name = discard_const_p(char, "binary"),
    7402             :                 .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get_binary,
    7403             :                 .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set_binary,
    7404             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
    7405             :         },
    7406             :         { .name = NULL }
    7407             : };
    7408             : 
    7409         150 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7410             : {
    7411         150 :         return pytalloc_new(struct drsuapi_DsReplicaObjectIdentifier3Binary, type);
    7412             : }
    7413             : 
    7414           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7415             : {
    7416           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7417           0 :         PyObject *ret = NULL;
    7418           0 :         DATA_BLOB blob;
    7419           0 :         enum ndr_err_code err;
    7420           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7421           0 :         if (tmp_ctx == NULL) {
    7422           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7423           0 :                 return NULL;
    7424             :         }
    7425           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
    7426           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7427           0 :                 TALLOC_FREE(tmp_ctx);
    7428           0 :                 PyErr_SetNdrError(err);
    7429           0 :                 return NULL;
    7430             :         }
    7431             : 
    7432           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7433           0 :         TALLOC_FREE(tmp_ctx);
    7434           0 :         return ret;
    7435             : }
    7436             : 
    7437         150 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7438             : {
    7439         150 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7440         150 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7441         150 :         Py_ssize_t blob_length = 0;
    7442           0 :         enum ndr_err_code err;
    7443         150 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7444         150 :         PyObject *allow_remaining_obj = NULL;
    7445         150 :         bool allow_remaining = false;
    7446             : 
    7447         150 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7448             :                 discard_const_p(char *, kwnames),
    7449             :                 &blob.data, &blob_length,
    7450             :                 &allow_remaining_obj)) {
    7451           0 :                 return NULL;
    7452             :         }
    7453         150 :         blob.length = blob_length;
    7454             : 
    7455         150 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7456           0 :                 allow_remaining = true;
    7457             :         }
    7458             : 
    7459         150 :         if (allow_remaining) {
    7460           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
    7461             :         } else {
    7462         150 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
    7463             :         }
    7464         150 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7465           0 :                 PyErr_SetNdrError(err);
    7466           0 :                 return NULL;
    7467             :         }
    7468             : 
    7469         150 :         Py_RETURN_NONE;
    7470             : }
    7471             : 
    7472           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7473             : {
    7474           0 :         struct drsuapi_DsReplicaObjectIdentifier3Binary *object = pytalloc_get_ptr(py_obj);
    7475           0 :         PyObject *ret;
    7476           0 :         char *retstr;
    7477             : 
    7478           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary, "drsuapi_DsReplicaObjectIdentifier3Binary", object);
    7479           0 :         ret = PyUnicode_FromString(retstr);
    7480           0 :         talloc_free(retstr);
    7481             : 
    7482           0 :         return ret;
    7483             : }
    7484             : 
    7485             : static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier3Binary_methods[] = {
    7486             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7487             :         { "__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" },
    7488             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7489             :         { NULL, NULL, 0, NULL }
    7490             : };
    7491             : 
    7492             : 
    7493             : static PyTypeObject drsuapi_DsReplicaObjectIdentifier3Binary_Type = {
    7494             :         PyVarObject_HEAD_INIT(NULL, 0)
    7495             :         .tp_name = "drsuapi.DsReplicaObjectIdentifier3Binary",
    7496             :         .tp_getset = py_drsuapi_DsReplicaObjectIdentifier3Binary_getsetters,
    7497             :         .tp_methods = py_drsuapi_DsReplicaObjectIdentifier3Binary_methods,
    7498             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7499             :         .tp_new = py_drsuapi_DsReplicaObjectIdentifier3Binary_new,
    7500             : };
    7501             : 
    7502             : 
    7503       26382 : static PyObject *py_drsuapi_DsReplicaAttribute_get_attid(PyObject *obj, void *closure)
    7504             : {
    7505       26382 :         struct drsuapi_DsReplicaAttribute *object = pytalloc_get_ptr(obj);
    7506           0 :         PyObject *py_attid;
    7507       26382 :         py_attid = PyLong_FromUnsignedLongLong((uint32_t)(object->attid));
    7508       26382 :         return py_attid;
    7509             : }
    7510             : 
    7511           0 : static int py_drsuapi_DsReplicaAttribute_set_attid(PyObject *py_obj, PyObject *value, void *closure)
    7512             : {
    7513           0 :         struct drsuapi_DsReplicaAttribute *object = pytalloc_get_ptr(py_obj);
    7514           0 :         if (value == NULL) {
    7515           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attid");
    7516           0 :                 return -1;
    7517             :         }
    7518             :         {
    7519           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attid));
    7520           0 :                 if (PyLong_Check(value)) {
    7521           0 :                         unsigned long long test_var;
    7522           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7523           0 :                         if (PyErr_Occurred() != NULL) {
    7524           0 :                                 return -1;
    7525             :                         }
    7526           0 :                         if (test_var > uint_max) {
    7527           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7528             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7529           0 :                                 return -1;
    7530             :                         }
    7531           0 :                         object->attid = test_var;
    7532             :                 } else {
    7533           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7534             :                           PyLong_Type.tp_name);
    7535           0 :                         return -1;
    7536             :                 }
    7537             :         }
    7538           0 :         return 0;
    7539             : }
    7540             : 
    7541       10888 : static PyObject *py_drsuapi_DsReplicaAttribute_get_value_ctr(PyObject *obj, void *closure)
    7542             : {
    7543       10888 :         struct drsuapi_DsReplicaAttribute *object = pytalloc_get_ptr(obj);
    7544           0 :         PyObject *py_value_ctr;
    7545       10888 :         py_value_ctr = pytalloc_reference_ex(&drsuapi_DsAttributeValueCtr_Type, pytalloc_get_mem_ctx(obj), &object->value_ctr);
    7546       10888 :         return py_value_ctr;
    7547             : }
    7548             : 
    7549           0 : static int py_drsuapi_DsReplicaAttribute_set_value_ctr(PyObject *py_obj, PyObject *value, void *closure)
    7550             : {
    7551           0 :         struct drsuapi_DsReplicaAttribute *object = pytalloc_get_ptr(py_obj);
    7552           0 :         if (value == NULL) {
    7553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value_ctr");
    7554           0 :                 return -1;
    7555             :         }
    7556           0 :         PY_CHECK_TYPE(&drsuapi_DsAttributeValueCtr_Type, value, return -1;);
    7557           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7558           0 :                 PyErr_NoMemory();
    7559           0 :                 return -1;
    7560             :         }
    7561           0 :         object->value_ctr = *(struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(value);
    7562           0 :         return 0;
    7563             : }
    7564             : 
    7565             : static PyGetSetDef py_drsuapi_DsReplicaAttribute_getsetters[] = {
    7566             :         {
    7567             :                 .name = discard_const_p(char, "attid"),
    7568             :                 .get = py_drsuapi_DsReplicaAttribute_get_attid,
    7569             :                 .set = py_drsuapi_DsReplicaAttribute_set_attid,
    7570             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
    7571             :         },
    7572             :         {
    7573             :                 .name = discard_const_p(char, "value_ctr"),
    7574             :                 .get = py_drsuapi_DsReplicaAttribute_get_value_ctr,
    7575             :                 .set = py_drsuapi_DsReplicaAttribute_set_value_ctr,
    7576             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeValueCtr")
    7577             :         },
    7578             :         { .name = NULL }
    7579             : };
    7580             : 
    7581           0 : static PyObject *py_drsuapi_DsReplicaAttribute_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7582             : {
    7583           0 :         return pytalloc_new(struct drsuapi_DsReplicaAttribute, type);
    7584             : }
    7585             : 
    7586           0 : static PyObject *py_drsuapi_DsReplicaAttribute_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7587             : {
    7588           0 :         struct drsuapi_DsReplicaAttribute *object = pytalloc_get_ptr(py_obj);
    7589           0 :         PyObject *ret = NULL;
    7590           0 :         DATA_BLOB blob;
    7591           0 :         enum ndr_err_code err;
    7592           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7593           0 :         if (tmp_ctx == NULL) {
    7594           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7595           0 :                 return NULL;
    7596             :         }
    7597           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaAttribute);
    7598           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7599           0 :                 TALLOC_FREE(tmp_ctx);
    7600           0 :                 PyErr_SetNdrError(err);
    7601           0 :                 return NULL;
    7602             :         }
    7603             : 
    7604           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7605           0 :         TALLOC_FREE(tmp_ctx);
    7606           0 :         return ret;
    7607             : }
    7608             : 
    7609           0 : static PyObject *py_drsuapi_DsReplicaAttribute_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7610             : {
    7611           0 :         struct drsuapi_DsReplicaAttribute *object = pytalloc_get_ptr(py_obj);
    7612           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7613           0 :         Py_ssize_t blob_length = 0;
    7614           0 :         enum ndr_err_code err;
    7615           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7616           0 :         PyObject *allow_remaining_obj = NULL;
    7617           0 :         bool allow_remaining = false;
    7618             : 
    7619           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7620             :                 discard_const_p(char *, kwnames),
    7621             :                 &blob.data, &blob_length,
    7622             :                 &allow_remaining_obj)) {
    7623           0 :                 return NULL;
    7624             :         }
    7625           0 :         blob.length = blob_length;
    7626             : 
    7627           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7628           0 :                 allow_remaining = true;
    7629             :         }
    7630             : 
    7631           0 :         if (allow_remaining) {
    7632           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaAttribute);
    7633             :         } else {
    7634           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaAttribute);
    7635             :         }
    7636           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7637           0 :                 PyErr_SetNdrError(err);
    7638           0 :                 return NULL;
    7639             :         }
    7640             : 
    7641           0 :         Py_RETURN_NONE;
    7642             : }
    7643             : 
    7644           0 : static PyObject *py_drsuapi_DsReplicaAttribute_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7645             : {
    7646           0 :         struct drsuapi_DsReplicaAttribute *object = pytalloc_get_ptr(py_obj);
    7647           0 :         PyObject *ret;
    7648           0 :         char *retstr;
    7649             : 
    7650           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaAttribute, "drsuapi_DsReplicaAttribute", object);
    7651           0 :         ret = PyUnicode_FromString(retstr);
    7652           0 :         talloc_free(retstr);
    7653             : 
    7654           0 :         return ret;
    7655             : }
    7656             : 
    7657             : static PyMethodDef py_drsuapi_DsReplicaAttribute_methods[] = {
    7658             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaAttribute_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    7659             :         { "__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" },
    7660             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaAttribute_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    7661             :         { NULL, NULL, 0, NULL }
    7662             : };
    7663             : 
    7664             : 
    7665             : static PyTypeObject drsuapi_DsReplicaAttribute_Type = {
    7666             :         PyVarObject_HEAD_INIT(NULL, 0)
    7667             :         .tp_name = "drsuapi.DsReplicaAttribute",
    7668             :         .tp_getset = py_drsuapi_DsReplicaAttribute_getsetters,
    7669             :         .tp_methods = py_drsuapi_DsReplicaAttribute_methods,
    7670             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7671             :         .tp_new = py_drsuapi_DsReplicaAttribute_new,
    7672             : };
    7673             : 
    7674             : 
    7675           2 : static PyObject *py_drsuapi_DsReplicaAttributeCtr_get_num_attributes(PyObject *obj, void *closure)
    7676             : {
    7677           2 :         struct drsuapi_DsReplicaAttributeCtr *object = pytalloc_get_ptr(obj);
    7678           0 :         PyObject *py_num_attributes;
    7679           2 :         py_num_attributes = PyLong_FromUnsignedLongLong((uint32_t)(object->num_attributes));
    7680           2 :         return py_num_attributes;
    7681             : }
    7682             : 
    7683          90 : static int py_drsuapi_DsReplicaAttributeCtr_set_num_attributes(PyObject *py_obj, PyObject *value, void *closure)
    7684             : {
    7685          90 :         struct drsuapi_DsReplicaAttributeCtr *object = pytalloc_get_ptr(py_obj);
    7686          90 :         if (value == NULL) {
    7687           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_attributes");
    7688           0 :                 return -1;
    7689             :         }
    7690             :         {
    7691          90 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_attributes));
    7692          90 :                 if (PyLong_Check(value)) {
    7693           0 :                         unsigned long long test_var;
    7694          90 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7695          90 :                         if (PyErr_Occurred() != NULL) {
    7696           0 :                                 return -1;
    7697             :                         }
    7698          90 :                         if (test_var > uint_max) {
    7699           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7700             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7701           0 :                                 return -1;
    7702             :                         }
    7703          90 :                         object->num_attributes = test_var;
    7704             :                 } else {
    7705           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7706             :                           PyLong_Type.tp_name);
    7707           0 :                         return -1;
    7708             :                 }
    7709             :         }
    7710          90 :         return 0;
    7711             : }
    7712             : 
    7713        2958 : static PyObject *py_drsuapi_DsReplicaAttributeCtr_get_attributes(PyObject *obj, void *closure)
    7714             : {
    7715        2958 :         struct drsuapi_DsReplicaAttributeCtr *object = pytalloc_get_ptr(obj);
    7716           0 :         PyObject *py_attributes;
    7717        2958 :         if (object->attributes == NULL) {
    7718           0 :                 Py_RETURN_NONE;
    7719             :         }
    7720        2958 :         if (object->attributes == NULL) {
    7721           0 :                 py_attributes = Py_None;
    7722           0 :                 Py_INCREF(py_attributes);
    7723             :         } else {
    7724        2958 :                 py_attributes = PyList_New(object->num_attributes);
    7725        2958 :                 if (py_attributes == NULL) {
    7726           0 :                         return NULL;
    7727             :                 }
    7728             :                 {
    7729             :                         int attributes_cntr_1;
    7730       20608 :                         for (attributes_cntr_1 = 0; attributes_cntr_1 < (object->num_attributes); attributes_cntr_1++) {
    7731           0 :                                 PyObject *py_attributes_1;
    7732       17650 :                                 py_attributes_1 = pytalloc_reference_ex(&drsuapi_DsReplicaAttribute_Type, object->attributes, &(object->attributes)[attributes_cntr_1]);
    7733       17650 :                                 PyList_SetItem(py_attributes, attributes_cntr_1, py_attributes_1);
    7734             :                         }
    7735             :                 }
    7736             :         }
    7737        2958 :         return py_attributes;
    7738             : }
    7739             : 
    7740          90 : static int py_drsuapi_DsReplicaAttributeCtr_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
    7741             : {
    7742          90 :         struct drsuapi_DsReplicaAttributeCtr *object = pytalloc_get_ptr(py_obj);
    7743          90 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->attributes));
    7744          90 :         if (value == NULL) {
    7745           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attributes");
    7746           0 :                 return -1;
    7747             :         }
    7748          90 :         if (value == Py_None) {
    7749           0 :                 object->attributes = NULL;
    7750             :         } else {
    7751          90 :                 object->attributes = NULL;
    7752          90 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    7753             :                 {
    7754           0 :                         int attributes_cntr_1;
    7755          90 :                         object->attributes = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attributes, PyList_GET_SIZE(value));
    7756          90 :                         if (!object->attributes) { return -1; }
    7757          90 :                         talloc_set_name_const(object->attributes, "ARRAY: object->attributes");
    7758         951 :                         for (attributes_cntr_1 = 0; attributes_cntr_1 < PyList_GET_SIZE(value); attributes_cntr_1++) {
    7759         861 :                                 if (PyList_GET_ITEM(value, attributes_cntr_1) == NULL) {
    7760           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->attributes)[attributes_cntr_1]");
    7761           0 :                                         return -1;
    7762             :                                 }
    7763         861 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaAttribute_Type, PyList_GET_ITEM(value, attributes_cntr_1), return -1;);
    7764         861 :                                 if (talloc_reference(object->attributes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, attributes_cntr_1))) == NULL) {
    7765           0 :                                         PyErr_NoMemory();
    7766           0 :                                         return -1;
    7767             :                                 }
    7768         861 :                                 (object->attributes)[attributes_cntr_1] = *(struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(PyList_GET_ITEM(value, attributes_cntr_1));
    7769             :                         }
    7770             :                 }
    7771             :         }
    7772          90 :         return 0;
    7773             : }
    7774             : 
    7775             : static PyGetSetDef py_drsuapi_DsReplicaAttributeCtr_getsetters[] = {
    7776             :         {
    7777             :                 .name = discard_const_p(char, "num_attributes"),
    7778             :                 .get = py_drsuapi_DsReplicaAttributeCtr_get_num_attributes,
    7779             :                 .set = py_drsuapi_DsReplicaAttributeCtr_set_num_attributes,
    7780             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    7781             :         },
    7782             :         {
    7783             :                 .name = discard_const_p(char, "attributes"),
    7784             :                 .get = py_drsuapi_DsReplicaAttributeCtr_get_attributes,
    7785             :                 .set = py_drsuapi_DsReplicaAttributeCtr_set_attributes,
    7786             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAttribute")
    7787             :         },
    7788             :         { .name = NULL }
    7789             : };
    7790             : 
    7791          90 : static PyObject *py_drsuapi_DsReplicaAttributeCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7792             : {
    7793          90 :         return pytalloc_new(struct drsuapi_DsReplicaAttributeCtr, type);
    7794             : }
    7795             : 
    7796             : 
    7797             : static PyTypeObject drsuapi_DsReplicaAttributeCtr_Type = {
    7798             :         PyVarObject_HEAD_INIT(NULL, 0)
    7799             :         .tp_name = "drsuapi.DsReplicaAttributeCtr",
    7800             :         .tp_getset = py_drsuapi_DsReplicaAttributeCtr_getsetters,
    7801             :         .tp_methods = NULL,
    7802             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    7803             :         .tp_new = py_drsuapi_DsReplicaAttributeCtr_new,
    7804             : };
    7805             : 
    7806             : 
    7807      215086 : static PyObject *py_drsuapi_DsReplicaObject_get_identifier(PyObject *obj, void *closure)
    7808             : {
    7809      215086 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(obj);
    7810           0 :         PyObject *py_identifier;
    7811      215086 :         if (object->identifier == NULL) {
    7812           0 :                 Py_RETURN_NONE;
    7813             :         }
    7814      215086 :         if (object->identifier == NULL) {
    7815           0 :                 py_identifier = Py_None;
    7816           0 :                 Py_INCREF(py_identifier);
    7817             :         } else {
    7818      215086 :                 py_identifier = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->identifier, object->identifier);
    7819             :         }
    7820      215086 :         return py_identifier;
    7821             : }
    7822             : 
    7823          90 : static int py_drsuapi_DsReplicaObject_set_identifier(PyObject *py_obj, PyObject *value, void *closure)
    7824             : {
    7825          90 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(py_obj);
    7826          90 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->identifier));
    7827          90 :         if (value == NULL) {
    7828           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identifier");
    7829           0 :                 return -1;
    7830             :         }
    7831          90 :         if (value == Py_None) {
    7832           0 :                 object->identifier = NULL;
    7833             :         } else {
    7834          90 :                 object->identifier = NULL;
    7835          90 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
    7836          90 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7837           0 :                         PyErr_NoMemory();
    7838           0 :                         return -1;
    7839             :                 }
    7840          90 :                 object->identifier = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
    7841             :         }
    7842          90 :         return 0;
    7843             : }
    7844             : 
    7845           0 : static PyObject *py_drsuapi_DsReplicaObject_get_flags(PyObject *obj, void *closure)
    7846             : {
    7847           0 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(obj);
    7848           0 :         PyObject *py_flags;
    7849           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
    7850           0 :         return py_flags;
    7851             : }
    7852             : 
    7853           0 : static int py_drsuapi_DsReplicaObject_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    7854             : {
    7855           0 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(py_obj);
    7856           0 :         if (value == NULL) {
    7857           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
    7858           0 :                 return -1;
    7859             :         }
    7860             :         {
    7861           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    7862           0 :                 if (PyLong_Check(value)) {
    7863           0 :                         unsigned long long test_var;
    7864           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    7865           0 :                         if (PyErr_Occurred() != NULL) {
    7866           0 :                                 return -1;
    7867             :                         }
    7868           0 :                         if (test_var > uint_max) {
    7869           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    7870             :                                   PyLong_Type.tp_name, uint_max, test_var);
    7871           0 :                                 return -1;
    7872             :                         }
    7873           0 :                         object->flags = test_var;
    7874             :                 } else {
    7875           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    7876             :                           PyLong_Type.tp_name);
    7877           0 :                         return -1;
    7878             :                 }
    7879             :         }
    7880           0 :         return 0;
    7881             : }
    7882             : 
    7883        2960 : static PyObject *py_drsuapi_DsReplicaObject_get_attribute_ctr(PyObject *obj, void *closure)
    7884             : {
    7885        2960 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(obj);
    7886           0 :         PyObject *py_attribute_ctr;
    7887        2960 :         py_attribute_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaAttributeCtr_Type, pytalloc_get_mem_ctx(obj), &object->attribute_ctr);
    7888        2960 :         return py_attribute_ctr;
    7889             : }
    7890             : 
    7891          90 : static int py_drsuapi_DsReplicaObject_set_attribute_ctr(PyObject *py_obj, PyObject *value, void *closure)
    7892             : {
    7893          90 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(py_obj);
    7894          90 :         if (value == NULL) {
    7895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_ctr");
    7896           0 :                 return -1;
    7897             :         }
    7898          90 :         PY_CHECK_TYPE(&drsuapi_DsReplicaAttributeCtr_Type, value, return -1;);
    7899          90 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    7900           0 :                 PyErr_NoMemory();
    7901           0 :                 return -1;
    7902             :         }
    7903          90 :         object->attribute_ctr = *(struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(value);
    7904          90 :         return 0;
    7905             : }
    7906             : 
    7907             : static PyGetSetDef py_drsuapi_DsReplicaObject_getsetters[] = {
    7908             :         {
    7909             :                 .name = discard_const_p(char, "identifier"),
    7910             :                 .get = py_drsuapi_DsReplicaObject_get_identifier,
    7911             :                 .set = py_drsuapi_DsReplicaObject_set_identifier,
    7912             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
    7913             :         },
    7914             :         {
    7915             :                 .name = discard_const_p(char, "flags"),
    7916             :                 .get = py_drsuapi_DsReplicaObject_get_flags,
    7917             :                 .set = py_drsuapi_DsReplicaObject_set_flags,
    7918             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectFlags")
    7919             :         },
    7920             :         {
    7921             :                 .name = discard_const_p(char, "attribute_ctr"),
    7922             :                 .get = py_drsuapi_DsReplicaObject_get_attribute_ctr,
    7923             :                 .set = py_drsuapi_DsReplicaObject_set_attribute_ctr,
    7924             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAttributeCtr")
    7925             :         },
    7926             :         { .name = NULL }
    7927             : };
    7928             : 
    7929          90 : static PyObject *py_drsuapi_DsReplicaObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    7930             : {
    7931          90 :         return pytalloc_new(struct drsuapi_DsReplicaObject, type);
    7932             : }
    7933             : 
    7934           0 : static PyObject *py_drsuapi_DsReplicaObject_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    7935             : {
    7936           0 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(py_obj);
    7937           0 :         PyObject *ret = NULL;
    7938           0 :         DATA_BLOB blob;
    7939           0 :         enum ndr_err_code err;
    7940           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    7941           0 :         if (tmp_ctx == NULL) {
    7942           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    7943           0 :                 return NULL;
    7944             :         }
    7945           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObject);
    7946           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7947           0 :                 TALLOC_FREE(tmp_ctx);
    7948           0 :                 PyErr_SetNdrError(err);
    7949           0 :                 return NULL;
    7950             :         }
    7951             : 
    7952           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    7953           0 :         TALLOC_FREE(tmp_ctx);
    7954           0 :         return ret;
    7955             : }
    7956             : 
    7957           0 : static PyObject *py_drsuapi_DsReplicaObject_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    7958             : {
    7959           0 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(py_obj);
    7960           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    7961           0 :         Py_ssize_t blob_length = 0;
    7962           0 :         enum ndr_err_code err;
    7963           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    7964           0 :         PyObject *allow_remaining_obj = NULL;
    7965           0 :         bool allow_remaining = false;
    7966             : 
    7967           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    7968             :                 discard_const_p(char *, kwnames),
    7969             :                 &blob.data, &blob_length,
    7970             :                 &allow_remaining_obj)) {
    7971           0 :                 return NULL;
    7972             :         }
    7973           0 :         blob.length = blob_length;
    7974             : 
    7975           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    7976           0 :                 allow_remaining = true;
    7977             :         }
    7978             : 
    7979           0 :         if (allow_remaining) {
    7980           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObject);
    7981             :         } else {
    7982           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObject);
    7983             :         }
    7984           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    7985           0 :                 PyErr_SetNdrError(err);
    7986           0 :                 return NULL;
    7987             :         }
    7988             : 
    7989           0 :         Py_RETURN_NONE;
    7990             : }
    7991             : 
    7992           0 : static PyObject *py_drsuapi_DsReplicaObject_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    7993             : {
    7994           0 :         struct drsuapi_DsReplicaObject *object = pytalloc_get_ptr(py_obj);
    7995           0 :         PyObject *ret;
    7996           0 :         char *retstr;
    7997             : 
    7998           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObject, "drsuapi_DsReplicaObject", object);
    7999           0 :         ret = PyUnicode_FromString(retstr);
    8000           0 :         talloc_free(retstr);
    8001             : 
    8002           0 :         return ret;
    8003             : }
    8004             : 
    8005             : static PyMethodDef py_drsuapi_DsReplicaObject_methods[] = {
    8006             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObject_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    8007             :         { "__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" },
    8008             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObject_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    8009             :         { NULL, NULL, 0, NULL }
    8010             : };
    8011             : 
    8012             : 
    8013             : static PyTypeObject drsuapi_DsReplicaObject_Type = {
    8014             :         PyVarObject_HEAD_INIT(NULL, 0)
    8015             :         .tp_name = "drsuapi.DsReplicaObject",
    8016             :         .tp_getset = py_drsuapi_DsReplicaObject_getsetters,
    8017             :         .tp_methods = py_drsuapi_DsReplicaObject_methods,
    8018             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8019             :         .tp_new = py_drsuapi_DsReplicaObject_new,
    8020             : };
    8021             : 
    8022             : 
    8023         122 : static PyObject *py_drsuapi_DsReplicaMetaData_get_version(PyObject *obj, void *closure)
    8024             : {
    8025         122 :         struct drsuapi_DsReplicaMetaData *object = pytalloc_get_ptr(obj);
    8026           0 :         PyObject *py_version;
    8027         122 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
    8028         122 :         return py_version;
    8029             : }
    8030             : 
    8031           0 : static int py_drsuapi_DsReplicaMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
    8032             : {
    8033           0 :         struct drsuapi_DsReplicaMetaData *object = pytalloc_get_ptr(py_obj);
    8034           0 :         if (value == NULL) {
    8035           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
    8036           0 :                 return -1;
    8037             :         }
    8038             :         {
    8039           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
    8040           0 :                 if (PyLong_Check(value)) {
    8041           0 :                         unsigned long long test_var;
    8042           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8043           0 :                         if (PyErr_Occurred() != NULL) {
    8044           0 :                                 return -1;
    8045             :                         }
    8046           0 :                         if (test_var > uint_max) {
    8047           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8048             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8049           0 :                                 return -1;
    8050             :                         }
    8051           0 :                         object->version = test_var;
    8052             :                 } else {
    8053           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8054             :                           PyLong_Type.tp_name);
    8055           0 :                         return -1;
    8056             :                 }
    8057             :         }
    8058           0 :         return 0;
    8059             : }
    8060             : 
    8061           0 : static PyObject *py_drsuapi_DsReplicaMetaData_get_originating_change_time(PyObject *obj, void *closure)
    8062             : {
    8063           0 :         struct drsuapi_DsReplicaMetaData *object = pytalloc_get_ptr(obj);
    8064           0 :         PyObject *py_originating_change_time;
    8065           0 :         py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
    8066           0 :         return py_originating_change_time;
    8067             : }
    8068             : 
    8069           0 : static int py_drsuapi_DsReplicaMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
    8070             : {
    8071           0 :         struct drsuapi_DsReplicaMetaData *object = pytalloc_get_ptr(py_obj);
    8072           0 :         if (value == NULL) {
    8073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
    8074           0 :                 return -1;
    8075             :         }
    8076             :         {
    8077           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
    8078           0 :                 if (PyLong_Check(value)) {
    8079           0 :                         unsigned long long test_var;
    8080           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8081           0 :                         if (PyErr_Occurred() != NULL) {
    8082           0 :                                 return -1;
    8083             :                         }
    8084           0 :                         if (test_var > uint_max) {
    8085           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8086             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8087           0 :                                 return -1;
    8088             :                         }
    8089           0 :                         object->originating_change_time = test_var;
    8090             :                 } else {
    8091           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8092             :                           PyLong_Type.tp_name);
    8093           0 :                         return -1;
    8094             :                 }
    8095             :         }
    8096           0 :         return 0;
    8097             : }
    8098             : 
    8099         120 : static PyObject *py_drsuapi_DsReplicaMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
    8100             : {
    8101         120 :         struct drsuapi_DsReplicaMetaData *object = pytalloc_get_ptr(obj);
    8102           0 :         PyObject *py_originating_invocation_id;
    8103         120 :         py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
    8104         120 :         return py_originating_invocation_id;
    8105             : }
    8106             : 
    8107           0 : static int py_drsuapi_DsReplicaMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    8108             : {
    8109           0 :         struct drsuapi_DsReplicaMetaData *object = pytalloc_get_ptr(py_obj);
    8110           0 :         if (value == NULL) {
    8111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
    8112           0 :                 return -1;
    8113             :         }
    8114           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    8115           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8116           0 :                 PyErr_NoMemory();
    8117           0 :                 return -1;
    8118             :         }
    8119           0 :         object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    8120           0 :         return 0;
    8121             : }
    8122             : 
    8123           0 : static PyObject *py_drsuapi_DsReplicaMetaData_get_originating_usn(PyObject *obj, void *closure)
    8124             : {
    8125           0 :         struct drsuapi_DsReplicaMetaData *object = pytalloc_get_ptr(obj);
    8126           0 :         PyObject *py_originating_usn;
    8127           0 :         py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
    8128           0 :         return py_originating_usn;
    8129             : }
    8130             : 
    8131           0 : static int py_drsuapi_DsReplicaMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
    8132             : {
    8133           0 :         struct drsuapi_DsReplicaMetaData *object = pytalloc_get_ptr(py_obj);
    8134           0 :         if (value == NULL) {
    8135           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
    8136           0 :                 return -1;
    8137             :         }
    8138             :         {
    8139           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
    8140           0 :                 if (PyLong_Check(value)) {
    8141           0 :                         unsigned long long test_var;
    8142           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8143           0 :                         if (PyErr_Occurred() != NULL) {
    8144           0 :                                 return -1;
    8145             :                         }
    8146           0 :                         if (test_var > uint_max) {
    8147           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8148             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8149           0 :                                 return -1;
    8150             :                         }
    8151           0 :                         object->originating_usn = test_var;
    8152             :                 } else {
    8153           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8154             :                           PyLong_Type.tp_name);
    8155           0 :                         return -1;
    8156             :                 }
    8157             :         }
    8158           0 :         return 0;
    8159             : }
    8160             : 
    8161             : static PyGetSetDef py_drsuapi_DsReplicaMetaData_getsetters[] = {
    8162             :         {
    8163             :                 .name = discard_const_p(char, "version"),
    8164             :                 .get = py_drsuapi_DsReplicaMetaData_get_version,
    8165             :                 .set = py_drsuapi_DsReplicaMetaData_set_version,
    8166             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8167             :         },
    8168             :         {
    8169             :                 .name = discard_const_p(char, "originating_change_time"),
    8170             :                 .get = py_drsuapi_DsReplicaMetaData_get_originating_change_time,
    8171             :                 .set = py_drsuapi_DsReplicaMetaData_set_originating_change_time,
    8172             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
    8173             :         },
    8174             :         {
    8175             :                 .name = discard_const_p(char, "originating_invocation_id"),
    8176             :                 .get = py_drsuapi_DsReplicaMetaData_get_originating_invocation_id,
    8177             :                 .set = py_drsuapi_DsReplicaMetaData_set_originating_invocation_id,
    8178             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    8179             :         },
    8180             :         {
    8181             :                 .name = discard_const_p(char, "originating_usn"),
    8182             :                 .get = py_drsuapi_DsReplicaMetaData_get_originating_usn,
    8183             :                 .set = py_drsuapi_DsReplicaMetaData_set_originating_usn,
    8184             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
    8185             :         },
    8186             :         { .name = NULL }
    8187             : };
    8188             : 
    8189           0 : static PyObject *py_drsuapi_DsReplicaMetaData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8190             : {
    8191           0 :         return pytalloc_new(struct drsuapi_DsReplicaMetaData, type);
    8192             : }
    8193             : 
    8194             : 
    8195             : static PyTypeObject drsuapi_DsReplicaMetaData_Type = {
    8196             :         PyVarObject_HEAD_INIT(NULL, 0)
    8197             :         .tp_name = "drsuapi.DsReplicaMetaData",
    8198             :         .tp_getset = py_drsuapi_DsReplicaMetaData_getsetters,
    8199             :         .tp_methods = NULL,
    8200             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8201             :         .tp_new = py_drsuapi_DsReplicaMetaData_new,
    8202             : };
    8203             : 
    8204             : 
    8205           0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_get_count(PyObject *obj, void *closure)
    8206             : {
    8207           0 :         struct drsuapi_DsReplicaMetaDataCtr *object = pytalloc_get_ptr(obj);
    8208           0 :         PyObject *py_count;
    8209           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
    8210           0 :         return py_count;
    8211             : }
    8212             : 
    8213           0 : static int py_drsuapi_DsReplicaMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
    8214             : {
    8215           0 :         struct drsuapi_DsReplicaMetaDataCtr *object = pytalloc_get_ptr(py_obj);
    8216           0 :         if (value == NULL) {
    8217           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
    8218           0 :                 return -1;
    8219             :         }
    8220             :         {
    8221           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
    8222           0 :                 if (PyLong_Check(value)) {
    8223           0 :                         unsigned long long test_var;
    8224           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8225           0 :                         if (PyErr_Occurred() != NULL) {
    8226           0 :                                 return -1;
    8227             :                         }
    8228           0 :                         if (test_var > uint_max) {
    8229           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8230             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8231           0 :                                 return -1;
    8232             :                         }
    8233           0 :                         object->count = test_var;
    8234             :                 } else {
    8235           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8236             :                           PyLong_Type.tp_name);
    8237           0 :                         return -1;
    8238             :                 }
    8239             :         }
    8240           0 :         return 0;
    8241             : }
    8242             : 
    8243         120 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_get_meta_data(PyObject *obj, void *closure)
    8244             : {
    8245         120 :         struct drsuapi_DsReplicaMetaDataCtr *object = pytalloc_get_ptr(obj);
    8246           0 :         PyObject *py_meta_data;
    8247         120 :         py_meta_data = PyList_New(object->count);
    8248         120 :         if (py_meta_data == NULL) {
    8249           0 :                 return NULL;
    8250             :         }
    8251             :         {
    8252             :                 int meta_data_cntr_0;
    8253        2840 :                 for (meta_data_cntr_0 = 0; meta_data_cntr_0 < (object->count); meta_data_cntr_0++) {
    8254           0 :                         PyObject *py_meta_data_0;
    8255        2720 :                         py_meta_data_0 = pytalloc_reference_ex(&drsuapi_DsReplicaMetaData_Type, object->meta_data, &(object->meta_data)[meta_data_cntr_0]);
    8256        2720 :                         PyList_SetItem(py_meta_data, meta_data_cntr_0, py_meta_data_0);
    8257             :                 }
    8258             :         }
    8259         120 :         return py_meta_data;
    8260             : }
    8261             : 
    8262           0 : static int py_drsuapi_DsReplicaMetaDataCtr_set_meta_data(PyObject *py_obj, PyObject *value, void *closure)
    8263             : {
    8264           0 :         struct drsuapi_DsReplicaMetaDataCtr *object = pytalloc_get_ptr(py_obj);
    8265           0 :         if (value == NULL) {
    8266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->meta_data");
    8267           0 :                 return -1;
    8268             :         }
    8269           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
    8270             :         {
    8271           0 :                 int meta_data_cntr_0;
    8272           0 :                 object->meta_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->meta_data, PyList_GET_SIZE(value));
    8273           0 :                 if (!object->meta_data) { return -1; }
    8274           0 :                 talloc_set_name_const(object->meta_data, "ARRAY: object->meta_data");
    8275           0 :                 for (meta_data_cntr_0 = 0; meta_data_cntr_0 < PyList_GET_SIZE(value); meta_data_cntr_0++) {
    8276           0 :                         if (PyList_GET_ITEM(value, meta_data_cntr_0) == NULL) {
    8277           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->meta_data)[meta_data_cntr_0]");
    8278           0 :                                 return -1;
    8279             :                         }
    8280           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaMetaData_Type, PyList_GET_ITEM(value, meta_data_cntr_0), return -1;);
    8281           0 :                         if (talloc_reference(object->meta_data, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, meta_data_cntr_0))) == NULL) {
    8282           0 :                                 PyErr_NoMemory();
    8283           0 :                                 return -1;
    8284             :                         }
    8285           0 :                         (object->meta_data)[meta_data_cntr_0] = *(struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, meta_data_cntr_0));
    8286             :                 }
    8287             :         }
    8288           0 :         return 0;
    8289             : }
    8290             : 
    8291             : static PyGetSetDef py_drsuapi_DsReplicaMetaDataCtr_getsetters[] = {
    8292             :         {
    8293             :                 .name = discard_const_p(char, "count"),
    8294             :                 .get = py_drsuapi_DsReplicaMetaDataCtr_get_count,
    8295             :                 .set = py_drsuapi_DsReplicaMetaDataCtr_set_count,
    8296             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8297             :         },
    8298             :         {
    8299             :                 .name = discard_const_p(char, "meta_data"),
    8300             :                 .get = py_drsuapi_DsReplicaMetaDataCtr_get_meta_data,
    8301             :                 .set = py_drsuapi_DsReplicaMetaDataCtr_set_meta_data,
    8302             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaMetaData")
    8303             :         },
    8304             :         { .name = NULL }
    8305             : };
    8306             : 
    8307           0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8308             : {
    8309           0 :         return pytalloc_new(struct drsuapi_DsReplicaMetaDataCtr, type);
    8310             : }
    8311             : 
    8312           0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    8313             : {
    8314           0 :         struct drsuapi_DsReplicaMetaDataCtr *object = pytalloc_get_ptr(py_obj);
    8315           0 :         PyObject *ret = NULL;
    8316           0 :         DATA_BLOB blob;
    8317           0 :         enum ndr_err_code err;
    8318           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    8319           0 :         if (tmp_ctx == NULL) {
    8320           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8321           0 :                 return NULL;
    8322             :         }
    8323           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaMetaDataCtr);
    8324           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8325           0 :                 TALLOC_FREE(tmp_ctx);
    8326           0 :                 PyErr_SetNdrError(err);
    8327           0 :                 return NULL;
    8328             :         }
    8329             : 
    8330           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    8331           0 :         TALLOC_FREE(tmp_ctx);
    8332           0 :         return ret;
    8333             : }
    8334             : 
    8335           0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8336             : {
    8337           0 :         struct drsuapi_DsReplicaMetaDataCtr *object = pytalloc_get_ptr(py_obj);
    8338           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    8339           0 :         Py_ssize_t blob_length = 0;
    8340           0 :         enum ndr_err_code err;
    8341           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    8342           0 :         PyObject *allow_remaining_obj = NULL;
    8343           0 :         bool allow_remaining = false;
    8344             : 
    8345           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    8346             :                 discard_const_p(char *, kwnames),
    8347             :                 &blob.data, &blob_length,
    8348             :                 &allow_remaining_obj)) {
    8349           0 :                 return NULL;
    8350             :         }
    8351           0 :         blob.length = blob_length;
    8352             : 
    8353           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8354           0 :                 allow_remaining = true;
    8355             :         }
    8356             : 
    8357           0 :         if (allow_remaining) {
    8358           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaMetaDataCtr);
    8359             :         } else {
    8360           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaMetaDataCtr);
    8361             :         }
    8362           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8363           0 :                 PyErr_SetNdrError(err);
    8364           0 :                 return NULL;
    8365             :         }
    8366             : 
    8367           0 :         Py_RETURN_NONE;
    8368             : }
    8369             : 
    8370           0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8371             : {
    8372           0 :         struct drsuapi_DsReplicaMetaDataCtr *object = pytalloc_get_ptr(py_obj);
    8373           0 :         PyObject *ret;
    8374           0 :         char *retstr;
    8375             : 
    8376           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaMetaDataCtr, "drsuapi_DsReplicaMetaDataCtr", object);
    8377           0 :         ret = PyUnicode_FromString(retstr);
    8378           0 :         talloc_free(retstr);
    8379             : 
    8380           0 :         return ret;
    8381             : }
    8382             : 
    8383             : static PyMethodDef py_drsuapi_DsReplicaMetaDataCtr_methods[] = {
    8384             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaMetaDataCtr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    8385             :         { "__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" },
    8386             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaMetaDataCtr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    8387             :         { NULL, NULL, 0, NULL }
    8388             : };
    8389             : 
    8390             : 
    8391             : static PyTypeObject drsuapi_DsReplicaMetaDataCtr_Type = {
    8392             :         PyVarObject_HEAD_INIT(NULL, 0)
    8393             :         .tp_name = "drsuapi.DsReplicaMetaDataCtr",
    8394             :         .tp_getset = py_drsuapi_DsReplicaMetaDataCtr_getsetters,
    8395             :         .tp_methods = py_drsuapi_DsReplicaMetaDataCtr_methods,
    8396             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8397             :         .tp_new = py_drsuapi_DsReplicaMetaDataCtr_new,
    8398             : };
    8399             : 
    8400             : 
    8401      211831 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_next_object(PyObject *obj, void *closure)
    8402             : {
    8403      211831 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(obj);
    8404           0 :         PyObject *py_next_object;
    8405      211831 :         if (object->next_object == NULL) {
    8406        2340 :                 Py_RETURN_NONE;
    8407             :         }
    8408      209491 :         if (object->next_object == NULL) {
    8409           0 :                 py_next_object = Py_None;
    8410           0 :                 Py_INCREF(py_next_object);
    8411             :         } else {
    8412      209491 :                 py_next_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->next_object, object->next_object);
    8413             :         }
    8414      209491 :         return py_next_object;
    8415             : }
    8416             : 
    8417           0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_next_object(PyObject *py_obj, PyObject *value, void *closure)
    8418             : {
    8419           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(py_obj);
    8420           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next_object));
    8421           0 :         if (value == NULL) {
    8422           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next_object");
    8423           0 :                 return -1;
    8424             :         }
    8425           0 :         if (value == Py_None) {
    8426           0 :                 object->next_object = NULL;
    8427             :         } else {
    8428           0 :                 object->next_object = NULL;
    8429           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
    8430           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8431           0 :                         PyErr_NoMemory();
    8432           0 :                         return -1;
    8433             :                 }
    8434           0 :                 object->next_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
    8435             :         }
    8436           0 :         return 0;
    8437             : }
    8438             : 
    8439      217610 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_object(PyObject *obj, void *closure)
    8440             : {
    8441      217610 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(obj);
    8442           0 :         PyObject *py_object;
    8443      217610 :         py_object = pytalloc_reference_ex(&drsuapi_DsReplicaObject_Type, pytalloc_get_mem_ctx(obj), &object->object);
    8444      217610 :         return py_object;
    8445             : }
    8446             : 
    8447           0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_object(PyObject *py_obj, PyObject *value, void *closure)
    8448             : {
    8449           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(py_obj);
    8450           0 :         if (value == NULL) {
    8451           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object");
    8452           0 :                 return -1;
    8453             :         }
    8454           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObject_Type, value, return -1;);
    8455           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8456           0 :                 PyErr_NoMemory();
    8457           0 :                 return -1;
    8458             :         }
    8459           0 :         object->object = *(struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(value);
    8460           0 :         return 0;
    8461             : }
    8462             : 
    8463           0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_is_nc_prefix(PyObject *obj, void *closure)
    8464             : {
    8465           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(obj);
    8466           0 :         PyObject *py_is_nc_prefix;
    8467           0 :         py_is_nc_prefix = PyLong_FromUnsignedLongLong((uint32_t)(object->is_nc_prefix));
    8468           0 :         return py_is_nc_prefix;
    8469             : }
    8470             : 
    8471           0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_is_nc_prefix(PyObject *py_obj, PyObject *value, void *closure)
    8472             : {
    8473           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(py_obj);
    8474           0 :         if (value == NULL) {
    8475           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_nc_prefix");
    8476           0 :                 return -1;
    8477             :         }
    8478             :         {
    8479           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_nc_prefix));
    8480           0 :                 if (PyLong_Check(value)) {
    8481           0 :                         unsigned long long test_var;
    8482           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8483           0 :                         if (PyErr_Occurred() != NULL) {
    8484           0 :                                 return -1;
    8485             :                         }
    8486           0 :                         if (test_var > uint_max) {
    8487           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8488             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8489           0 :                                 return -1;
    8490             :                         }
    8491           0 :                         object->is_nc_prefix = test_var;
    8492             :                 } else {
    8493           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8494             :                           PyLong_Type.tp_name);
    8495           0 :                         return -1;
    8496             :                 }
    8497             :         }
    8498           0 :         return 0;
    8499             : }
    8500             : 
    8501         293 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_parent_object_guid(PyObject *obj, void *closure)
    8502             : {
    8503         293 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(obj);
    8504           0 :         PyObject *py_parent_object_guid;
    8505         293 :         if (object->parent_object_guid == NULL) {
    8506           1 :                 Py_RETURN_NONE;
    8507             :         }
    8508         292 :         if (object->parent_object_guid == NULL) {
    8509           0 :                 py_parent_object_guid = Py_None;
    8510           0 :                 Py_INCREF(py_parent_object_guid);
    8511             :         } else {
    8512         292 :                 py_parent_object_guid = pytalloc_reference_ex(GUID_Type, object->parent_object_guid, object->parent_object_guid);
    8513             :         }
    8514         292 :         return py_parent_object_guid;
    8515             : }
    8516             : 
    8517           0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_parent_object_guid(PyObject *py_obj, PyObject *value, void *closure)
    8518             : {
    8519           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(py_obj);
    8520           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->parent_object_guid));
    8521           0 :         if (value == NULL) {
    8522           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parent_object_guid");
    8523           0 :                 return -1;
    8524             :         }
    8525           0 :         if (value == Py_None) {
    8526           0 :                 object->parent_object_guid = NULL;
    8527             :         } else {
    8528           0 :                 object->parent_object_guid = NULL;
    8529           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
    8530           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8531           0 :                         PyErr_NoMemory();
    8532           0 :                         return -1;
    8533             :                 }
    8534           0 :                 object->parent_object_guid = (struct GUID *)pytalloc_get_ptr(value);
    8535             :         }
    8536           0 :         return 0;
    8537             : }
    8538             : 
    8539         120 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_meta_data_ctr(PyObject *obj, void *closure)
    8540             : {
    8541         120 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(obj);
    8542           0 :         PyObject *py_meta_data_ctr;
    8543         120 :         if (object->meta_data_ctr == NULL) {
    8544           0 :                 Py_RETURN_NONE;
    8545             :         }
    8546         120 :         if (object->meta_data_ctr == NULL) {
    8547           0 :                 py_meta_data_ctr = Py_None;
    8548           0 :                 Py_INCREF(py_meta_data_ctr);
    8549             :         } else {
    8550         120 :                 py_meta_data_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaMetaDataCtr_Type, object->meta_data_ctr, object->meta_data_ctr);
    8551             :         }
    8552         120 :         return py_meta_data_ctr;
    8553             : }
    8554             : 
    8555           0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_meta_data_ctr(PyObject *py_obj, PyObject *value, void *closure)
    8556             : {
    8557           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(py_obj);
    8558           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->meta_data_ctr));
    8559           0 :         if (value == NULL) {
    8560           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->meta_data_ctr");
    8561           0 :                 return -1;
    8562             :         }
    8563           0 :         if (value == Py_None) {
    8564           0 :                 object->meta_data_ctr = NULL;
    8565             :         } else {
    8566           0 :                 object->meta_data_ctr = NULL;
    8567           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaMetaDataCtr_Type, value, return -1;);
    8568           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8569           0 :                         PyErr_NoMemory();
    8570           0 :                         return -1;
    8571             :                 }
    8572           0 :                 object->meta_data_ctr = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(value);
    8573             :         }
    8574           0 :         return 0;
    8575             : }
    8576             : 
    8577             : static PyGetSetDef py_drsuapi_DsReplicaObjectListItemEx_getsetters[] = {
    8578             :         {
    8579             :                 .name = discard_const_p(char, "next_object"),
    8580             :                 .get = py_drsuapi_DsReplicaObjectListItemEx_get_next_object,
    8581             :                 .set = py_drsuapi_DsReplicaObjectListItemEx_set_next_object,
    8582             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItemEx")
    8583             :         },
    8584             :         {
    8585             :                 .name = discard_const_p(char, "object"),
    8586             :                 .get = py_drsuapi_DsReplicaObjectListItemEx_get_object,
    8587             :                 .set = py_drsuapi_DsReplicaObjectListItemEx_set_object,
    8588             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObject")
    8589             :         },
    8590             :         {
    8591             :                 .name = discard_const_p(char, "is_nc_prefix"),
    8592             :                 .get = py_drsuapi_DsReplicaObjectListItemEx_get_is_nc_prefix,
    8593             :                 .set = py_drsuapi_DsReplicaObjectListItemEx_set_is_nc_prefix,
    8594             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    8595             :         },
    8596             :         {
    8597             :                 .name = discard_const_p(char, "parent_object_guid"),
    8598             :                 .get = py_drsuapi_DsReplicaObjectListItemEx_get_parent_object_guid,
    8599             :                 .set = py_drsuapi_DsReplicaObjectListItemEx_set_parent_object_guid,
    8600             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    8601             :         },
    8602             :         {
    8603             :                 .name = discard_const_p(char, "meta_data_ctr"),
    8604             :                 .get = py_drsuapi_DsReplicaObjectListItemEx_get_meta_data_ctr,
    8605             :                 .set = py_drsuapi_DsReplicaObjectListItemEx_set_meta_data_ctr,
    8606             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaMetaDataCtr")
    8607             :         },
    8608             :         { .name = NULL }
    8609             : };
    8610             : 
    8611           0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    8612             : {
    8613           0 :         return pytalloc_new(struct drsuapi_DsReplicaObjectListItemEx, type);
    8614             : }
    8615             : 
    8616           0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    8617             : {
    8618           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(py_obj);
    8619           0 :         PyObject *ret = NULL;
    8620           0 :         DATA_BLOB blob;
    8621           0 :         enum ndr_err_code err;
    8622           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    8623           0 :         if (tmp_ctx == NULL) {
    8624           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    8625           0 :                 return NULL;
    8626             :         }
    8627           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectListItemEx);
    8628           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8629           0 :                 TALLOC_FREE(tmp_ctx);
    8630           0 :                 PyErr_SetNdrError(err);
    8631           0 :                 return NULL;
    8632             :         }
    8633             : 
    8634           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    8635           0 :         TALLOC_FREE(tmp_ctx);
    8636           0 :         return ret;
    8637             : }
    8638             : 
    8639           0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    8640             : {
    8641           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(py_obj);
    8642           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    8643           0 :         Py_ssize_t blob_length = 0;
    8644           0 :         enum ndr_err_code err;
    8645           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    8646           0 :         PyObject *allow_remaining_obj = NULL;
    8647           0 :         bool allow_remaining = false;
    8648             : 
    8649           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    8650             :                 discard_const_p(char *, kwnames),
    8651             :                 &blob.data, &blob_length,
    8652             :                 &allow_remaining_obj)) {
    8653           0 :                 return NULL;
    8654             :         }
    8655           0 :         blob.length = blob_length;
    8656             : 
    8657           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    8658           0 :                 allow_remaining = true;
    8659             :         }
    8660             : 
    8661           0 :         if (allow_remaining) {
    8662           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItemEx);
    8663             :         } else {
    8664           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItemEx);
    8665             :         }
    8666           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    8667           0 :                 PyErr_SetNdrError(err);
    8668           0 :                 return NULL;
    8669             :         }
    8670             : 
    8671           0 :         Py_RETURN_NONE;
    8672             : }
    8673             : 
    8674           0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    8675             : {
    8676           0 :         struct drsuapi_DsReplicaObjectListItemEx *object = pytalloc_get_ptr(py_obj);
    8677           0 :         PyObject *ret;
    8678           0 :         char *retstr;
    8679             : 
    8680           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectListItemEx, "drsuapi_DsReplicaObjectListItemEx", object);
    8681           0 :         ret = PyUnicode_FromString(retstr);
    8682           0 :         talloc_free(retstr);
    8683             : 
    8684           0 :         return ret;
    8685             : }
    8686             : 
    8687             : static PyMethodDef py_drsuapi_DsReplicaObjectListItemEx_methods[] = {
    8688             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectListItemEx_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    8689             :         { "__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" },
    8690             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectListItemEx_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    8691             :         { NULL, NULL, 0, NULL }
    8692             : };
    8693             : 
    8694             : 
    8695             : static PyTypeObject drsuapi_DsReplicaObjectListItemEx_Type = {
    8696             :         PyVarObject_HEAD_INIT(NULL, 0)
    8697             :         .tp_name = "drsuapi.DsReplicaObjectListItemEx",
    8698             :         .tp_getset = py_drsuapi_DsReplicaObjectListItemEx_getsetters,
    8699             :         .tp_methods = py_drsuapi_DsReplicaObjectListItemEx_methods,
    8700             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    8701             :         .tp_new = py_drsuapi_DsReplicaObjectListItemEx_new,
    8702             : };
    8703             : 
    8704             : 
    8705           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_guid(PyObject *obj, void *closure)
    8706             : {
    8707           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8708           0 :         PyObject *py_source_dsa_guid;
    8709           0 :         py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
    8710           0 :         return py_source_dsa_guid;
    8711             : }
    8712             : 
    8713           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
    8714             : {
    8715           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8716           0 :         if (value == NULL) {
    8717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
    8718           0 :                 return -1;
    8719             :         }
    8720           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    8721           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8722           0 :                 PyErr_NoMemory();
    8723           0 :                 return -1;
    8724             :         }
    8725           0 :         object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
    8726           0 :         return 0;
    8727             : }
    8728             : 
    8729           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    8730             : {
    8731           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8732           0 :         PyObject *py_source_dsa_invocation_id;
    8733           0 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    8734           0 :         return py_source_dsa_invocation_id;
    8735             : }
    8736             : 
    8737           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    8738             : {
    8739           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8740           0 :         if (value == NULL) {
    8741           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    8742           0 :                 return -1;
    8743             :         }
    8744           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    8745           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8746           0 :                 PyErr_NoMemory();
    8747           0 :                 return -1;
    8748             :         }
    8749           0 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    8750           0 :         return 0;
    8751             : }
    8752             : 
    8753           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_naming_context(PyObject *obj, void *closure)
    8754             : {
    8755           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8756           0 :         PyObject *py_naming_context;
    8757           0 :         if (object->naming_context == NULL) {
    8758           0 :                 Py_RETURN_NONE;
    8759             :         }
    8760           0 :         if (object->naming_context == NULL) {
    8761           0 :                 py_naming_context = Py_None;
    8762           0 :                 Py_INCREF(py_naming_context);
    8763             :         } else {
    8764           0 :                 py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
    8765             :         }
    8766           0 :         return py_naming_context;
    8767             : }
    8768             : 
    8769           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
    8770             : {
    8771           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8772           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
    8773           0 :         if (value == NULL) {
    8774           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
    8775           0 :                 return -1;
    8776             :         }
    8777           0 :         if (value == Py_None) {
    8778           0 :                 object->naming_context = NULL;
    8779             :         } else {
    8780           0 :                 object->naming_context = NULL;
    8781           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
    8782           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8783           0 :                         PyErr_NoMemory();
    8784           0 :                         return -1;
    8785             :                 }
    8786           0 :                 object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
    8787             :         }
    8788           0 :         return 0;
    8789             : }
    8790             : 
    8791           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_old_highwatermark(PyObject *obj, void *closure)
    8792             : {
    8793           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8794           0 :         PyObject *py_old_highwatermark;
    8795           0 :         py_old_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->old_highwatermark);
    8796           0 :         return py_old_highwatermark;
    8797             : }
    8798             : 
    8799           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_old_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    8800             : {
    8801           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8802           0 :         if (value == NULL) {
    8803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_highwatermark");
    8804           0 :                 return -1;
    8805             :         }
    8806           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    8807           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8808           0 :                 PyErr_NoMemory();
    8809           0 :                 return -1;
    8810             :         }
    8811           0 :         object->old_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    8812           0 :         return 0;
    8813             : }
    8814             : 
    8815           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_new_highwatermark(PyObject *obj, void *closure)
    8816             : {
    8817           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8818           0 :         PyObject *py_new_highwatermark;
    8819           0 :         py_new_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->new_highwatermark);
    8820           0 :         return py_new_highwatermark;
    8821             : }
    8822             : 
    8823           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_new_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    8824             : {
    8825           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8826           0 :         if (value == NULL) {
    8827           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->new_highwatermark");
    8828           0 :                 return -1;
    8829             :         }
    8830           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    8831           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8832           0 :                 PyErr_NoMemory();
    8833           0 :                 return -1;
    8834             :         }
    8835           0 :         object->new_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    8836           0 :         return 0;
    8837             : }
    8838             : 
    8839           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_uptodateness_vector(PyObject *obj, void *closure)
    8840             : {
    8841           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8842           0 :         PyObject *py_uptodateness_vector;
    8843           0 :         if (object->uptodateness_vector == NULL) {
    8844           0 :                 Py_RETURN_NONE;
    8845             :         }
    8846           0 :         if (object->uptodateness_vector == NULL) {
    8847           0 :                 py_uptodateness_vector = Py_None;
    8848           0 :                 Py_INCREF(py_uptodateness_vector);
    8849             :         } else {
    8850           0 :                 py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
    8851             :         }
    8852           0 :         return py_uptodateness_vector;
    8853             : }
    8854             : 
    8855           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
    8856             : {
    8857           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8858           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
    8859           0 :         if (value == NULL) {
    8860           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
    8861           0 :                 return -1;
    8862             :         }
    8863           0 :         if (value == Py_None) {
    8864           0 :                 object->uptodateness_vector = NULL;
    8865             :         } else {
    8866           0 :                 object->uptodateness_vector = NULL;
    8867           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
    8868           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8869           0 :                         PyErr_NoMemory();
    8870           0 :                         return -1;
    8871             :                 }
    8872           0 :                 object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
    8873             :         }
    8874           0 :         return 0;
    8875             : }
    8876             : 
    8877           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_mapping_ctr(PyObject *obj, void *closure)
    8878             : {
    8879           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8880           0 :         PyObject *py_mapping_ctr;
    8881           0 :         py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
    8882           0 :         return py_mapping_ctr;
    8883             : }
    8884             : 
    8885           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
    8886             : {
    8887           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8888           0 :         if (value == NULL) {
    8889           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mapping_ctr");
    8890           0 :                 return -1;
    8891             :         }
    8892           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
    8893           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    8894           0 :                 PyErr_NoMemory();
    8895           0 :                 return -1;
    8896             :         }
    8897           0 :         object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
    8898           0 :         return 0;
    8899             : }
    8900             : 
    8901           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_extended_ret(PyObject *obj, void *closure)
    8902             : {
    8903           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8904           0 :         PyObject *py_extended_ret;
    8905           0 :         py_extended_ret = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_ret));
    8906           0 :         return py_extended_ret;
    8907             : }
    8908             : 
    8909           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_extended_ret(PyObject *py_obj, PyObject *value, void *closure)
    8910             : {
    8911           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8912           0 :         if (value == NULL) {
    8913           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_ret");
    8914           0 :                 return -1;
    8915             :         }
    8916             :         {
    8917           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_ret));
    8918           0 :                 if (PyLong_Check(value)) {
    8919           0 :                         unsigned long long test_var;
    8920           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8921           0 :                         if (PyErr_Occurred() != NULL) {
    8922           0 :                                 return -1;
    8923             :                         }
    8924           0 :                         if (test_var > uint_max) {
    8925           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8926             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8927           0 :                                 return -1;
    8928             :                         }
    8929           0 :                         object->extended_ret = test_var;
    8930             :                 } else {
    8931           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8932             :                           PyLong_Type.tp_name);
    8933           0 :                         return -1;
    8934             :                 }
    8935             :         }
    8936           0 :         return 0;
    8937             : }
    8938             : 
    8939           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_object_count(PyObject *obj, void *closure)
    8940             : {
    8941           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8942           0 :         PyObject *py_object_count;
    8943           0 :         py_object_count = PyLong_FromUnsignedLongLong((uint32_t)(object->object_count));
    8944           0 :         return py_object_count;
    8945             : }
    8946             : 
    8947           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_object_count(PyObject *py_obj, PyObject *value, void *closure)
    8948             : {
    8949           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8950           0 :         if (value == NULL) {
    8951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_count");
    8952           0 :                 return -1;
    8953             :         }
    8954             :         {
    8955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->object_count));
    8956           0 :                 if (PyLong_Check(value)) {
    8957           0 :                         unsigned long long test_var;
    8958           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8959           0 :                         if (PyErr_Occurred() != NULL) {
    8960           0 :                                 return -1;
    8961             :                         }
    8962           0 :                         if (test_var > uint_max) {
    8963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    8964             :                                   PyLong_Type.tp_name, uint_max, test_var);
    8965           0 :                                 return -1;
    8966             :                         }
    8967           0 :                         object->object_count = test_var;
    8968             :                 } else {
    8969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    8970             :                           PyLong_Type.tp_name);
    8971           0 :                         return -1;
    8972             :                 }
    8973             :         }
    8974           0 :         return 0;
    8975             : }
    8976             : 
    8977           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get___ndr_size(PyObject *obj, void *closure)
    8978             : {
    8979           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    8980           0 :         PyObject *py___ndr_size;
    8981           0 :         py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size));
    8982           0 :         return py___ndr_size;
    8983             : }
    8984             : 
    8985           0 : static int py_drsuapi_DsGetNCChangesCtr1_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    8986             : {
    8987           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    8988           0 :         if (value == NULL) {
    8989           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
    8990           0 :                 return -1;
    8991             :         }
    8992             :         {
    8993           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
    8994           0 :                 if (PyLong_Check(value)) {
    8995           0 :                         unsigned long long test_var;
    8996           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    8997           0 :                         if (PyErr_Occurred() != NULL) {
    8998           0 :                                 return -1;
    8999             :                         }
    9000           0 :                         if (test_var > uint_max) {
    9001           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9002             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9003           0 :                                 return -1;
    9004             :                         }
    9005           0 :                         object->__ndr_size = test_var;
    9006             :                 } else {
    9007           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9008             :                           PyLong_Type.tp_name);
    9009           0 :                         return -1;
    9010             :                 }
    9011             :         }
    9012           0 :         return 0;
    9013             : }
    9014             : 
    9015           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_first_object(PyObject *obj, void *closure)
    9016             : {
    9017           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    9018           0 :         PyObject *py_first_object;
    9019           0 :         if (object->first_object == NULL) {
    9020           0 :                 Py_RETURN_NONE;
    9021             :         }
    9022           0 :         if (object->first_object == NULL) {
    9023           0 :                 py_first_object = Py_None;
    9024           0 :                 Py_INCREF(py_first_object);
    9025             :         } else {
    9026           0 :                 py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->first_object, object->first_object);
    9027             :         }
    9028           0 :         return py_first_object;
    9029             : }
    9030             : 
    9031           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
    9032             : {
    9033           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    9034           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->first_object));
    9035           0 :         if (value == NULL) {
    9036           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_object");
    9037           0 :                 return -1;
    9038             :         }
    9039           0 :         if (value == Py_None) {
    9040           0 :                 object->first_object = NULL;
    9041             :         } else {
    9042           0 :                 object->first_object = NULL;
    9043           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
    9044           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9045           0 :                         PyErr_NoMemory();
    9046           0 :                         return -1;
    9047             :                 }
    9048           0 :                 object->first_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
    9049             :         }
    9050           0 :         return 0;
    9051             : }
    9052             : 
    9053           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_more_data(PyObject *obj, void *closure)
    9054             : {
    9055           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(obj);
    9056           0 :         PyObject *py_more_data;
    9057           0 :         py_more_data = PyLong_FromUnsignedLongLong((uint32_t)(object->more_data));
    9058           0 :         return py_more_data;
    9059             : }
    9060             : 
    9061           0 : static int py_drsuapi_DsGetNCChangesCtr1_set_more_data(PyObject *py_obj, PyObject *value, void *closure)
    9062             : {
    9063           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    9064           0 :         if (value == NULL) {
    9065           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->more_data");
    9066           0 :                 return -1;
    9067             :         }
    9068             :         {
    9069           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->more_data));
    9070           0 :                 if (PyLong_Check(value)) {
    9071           0 :                         unsigned long long test_var;
    9072           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9073           0 :                         if (PyErr_Occurred() != NULL) {
    9074           0 :                                 return -1;
    9075             :                         }
    9076           0 :                         if (test_var > uint_max) {
    9077           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9078             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9079           0 :                                 return -1;
    9080             :                         }
    9081           0 :                         object->more_data = test_var;
    9082             :                 } else {
    9083           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9084             :                           PyLong_Type.tp_name);
    9085           0 :                         return -1;
    9086             :                 }
    9087             :         }
    9088           0 :         return 0;
    9089             : }
    9090             : 
    9091             : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr1_getsetters[] = {
    9092             :         {
    9093             :                 .name = discard_const_p(char, "source_dsa_guid"),
    9094             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_guid,
    9095             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_guid,
    9096             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    9097             :         },
    9098             :         {
    9099             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
    9100             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_invocation_id,
    9101             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_invocation_id,
    9102             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
    9103             :         },
    9104             :         {
    9105             :                 .name = discard_const_p(char, "naming_context"),
    9106             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_naming_context,
    9107             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_naming_context,
    9108             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
    9109             :         },
    9110             :         {
    9111             :                 .name = discard_const_p(char, "old_highwatermark"),
    9112             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_old_highwatermark,
    9113             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_old_highwatermark,
    9114             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
    9115             :         },
    9116             :         {
    9117             :                 .name = discard_const_p(char, "new_highwatermark"),
    9118             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_new_highwatermark,
    9119             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_new_highwatermark,
    9120             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
    9121             :         },
    9122             :         {
    9123             :                 .name = discard_const_p(char, "uptodateness_vector"),
    9124             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_uptodateness_vector,
    9125             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_uptodateness_vector,
    9126             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursorCtrEx")
    9127             :         },
    9128             :         {
    9129             :                 .name = discard_const_p(char, "mapping_ctr"),
    9130             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_mapping_ctr,
    9131             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_mapping_ctr,
    9132             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping_Ctr")
    9133             :         },
    9134             :         {
    9135             :                 .name = discard_const_p(char, "extended_ret"),
    9136             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_extended_ret,
    9137             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_extended_ret,
    9138             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedError")
    9139             :         },
    9140             :         {
    9141             :                 .name = discard_const_p(char, "object_count"),
    9142             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_object_count,
    9143             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_object_count,
    9144             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9145             :         },
    9146             :         {
    9147             :                 .name = discard_const_p(char, "__ndr_size"),
    9148             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get___ndr_size,
    9149             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set___ndr_size,
    9150             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9151             :         },
    9152             :         {
    9153             :                 .name = discard_const_p(char, "first_object"),
    9154             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_first_object,
    9155             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_first_object,
    9156             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItemEx")
    9157             :         },
    9158             :         {
    9159             :                 .name = discard_const_p(char, "more_data"),
    9160             :                 .get = py_drsuapi_DsGetNCChangesCtr1_get_more_data,
    9161             :                 .set = py_drsuapi_DsGetNCChangesCtr1_set_more_data,
    9162             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
    9163             :         },
    9164             :         { .name = NULL }
    9165             : };
    9166             : 
    9167           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9168             : {
    9169           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesCtr1, type);
    9170             : }
    9171             : 
    9172           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    9173             : {
    9174           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    9175           0 :         PyObject *ret = NULL;
    9176           0 :         DATA_BLOB blob;
    9177           0 :         enum ndr_err_code err;
    9178           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    9179           0 :         if (tmp_ctx == NULL) {
    9180           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9181           0 :                 return NULL;
    9182             :         }
    9183           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1);
    9184           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9185           0 :                 TALLOC_FREE(tmp_ctx);
    9186           0 :                 PyErr_SetNdrError(err);
    9187           0 :                 return NULL;
    9188             :         }
    9189             : 
    9190           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9191           0 :         TALLOC_FREE(tmp_ctx);
    9192           0 :         return ret;
    9193             : }
    9194             : 
    9195           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9196             : {
    9197           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    9198           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    9199           0 :         Py_ssize_t blob_length = 0;
    9200           0 :         enum ndr_err_code err;
    9201           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    9202           0 :         PyObject *allow_remaining_obj = NULL;
    9203           0 :         bool allow_remaining = false;
    9204             : 
    9205           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    9206             :                 discard_const_p(char *, kwnames),
    9207             :                 &blob.data, &blob_length,
    9208             :                 &allow_remaining_obj)) {
    9209           0 :                 return NULL;
    9210             :         }
    9211           0 :         blob.length = blob_length;
    9212             : 
    9213           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9214           0 :                 allow_remaining = true;
    9215             :         }
    9216             : 
    9217           0 :         if (allow_remaining) {
    9218           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1);
    9219             :         } else {
    9220           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1);
    9221             :         }
    9222           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9223           0 :                 PyErr_SetNdrError(err);
    9224           0 :                 return NULL;
    9225             :         }
    9226             : 
    9227           0 :         Py_RETURN_NONE;
    9228             : }
    9229             : 
    9230           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9231             : {
    9232           0 :         struct drsuapi_DsGetNCChangesCtr1 *object = pytalloc_get_ptr(py_obj);
    9233           0 :         PyObject *ret;
    9234           0 :         char *retstr;
    9235             : 
    9236           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr1, "drsuapi_DsGetNCChangesCtr1", object);
    9237           0 :         ret = PyUnicode_FromString(retstr);
    9238           0 :         talloc_free(retstr);
    9239             : 
    9240           0 :         return ret;
    9241             : }
    9242             : 
    9243             : static PyMethodDef py_drsuapi_DsGetNCChangesCtr1_methods[] = {
    9244             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    9245             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCtr1_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    9246             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    9247             :         { NULL, NULL, 0, NULL }
    9248             : };
    9249             : 
    9250             : 
    9251             : static PyTypeObject drsuapi_DsGetNCChangesCtr1_Type = {
    9252             :         PyVarObject_HEAD_INIT(NULL, 0)
    9253             :         .tp_name = "drsuapi.DsGetNCChangesCtr1",
    9254             :         .tp_getset = py_drsuapi_DsGetNCChangesCtr1_getsetters,
    9255             :         .tp_methods = py_drsuapi_DsGetNCChangesCtr1_methods,
    9256             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9257             :         .tp_new = py_drsuapi_DsGetNCChangesCtr1_new,
    9258             : };
    9259             : 
    9260             : 
    9261        7920 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_identifier(PyObject *obj, void *closure)
    9262             : {
    9263        7920 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(obj);
    9264           0 :         PyObject *py_identifier;
    9265        7920 :         if (object->identifier == NULL) {
    9266           0 :                 Py_RETURN_NONE;
    9267             :         }
    9268        7920 :         if (object->identifier == NULL) {
    9269           0 :                 py_identifier = Py_None;
    9270           0 :                 Py_INCREF(py_identifier);
    9271             :         } else {
    9272        7920 :                 py_identifier = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->identifier, object->identifier);
    9273             :         }
    9274        7920 :         return py_identifier;
    9275             : }
    9276             : 
    9277           0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_identifier(PyObject *py_obj, PyObject *value, void *closure)
    9278             : {
    9279           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9280           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->identifier));
    9281           0 :         if (value == NULL) {
    9282           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identifier");
    9283           0 :                 return -1;
    9284             :         }
    9285           0 :         if (value == Py_None) {
    9286           0 :                 object->identifier = NULL;
    9287             :         } else {
    9288           0 :                 object->identifier = NULL;
    9289           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
    9290           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9291           0 :                         PyErr_NoMemory();
    9292           0 :                         return -1;
    9293             :                 }
    9294           0 :                 object->identifier = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
    9295             :         }
    9296           0 :         return 0;
    9297             : }
    9298             : 
    9299        7886 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_attid(PyObject *obj, void *closure)
    9300             : {
    9301        7886 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(obj);
    9302           0 :         PyObject *py_attid;
    9303        7886 :         py_attid = PyLong_FromUnsignedLongLong((uint32_t)(object->attid));
    9304        7886 :         return py_attid;
    9305             : }
    9306             : 
    9307           0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_attid(PyObject *py_obj, PyObject *value, void *closure)
    9308             : {
    9309           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9310           0 :         if (value == NULL) {
    9311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attid");
    9312           0 :                 return -1;
    9313             :         }
    9314             :         {
    9315           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attid));
    9316           0 :                 if (PyLong_Check(value)) {
    9317           0 :                         unsigned long long test_var;
    9318           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9319           0 :                         if (PyErr_Occurred() != NULL) {
    9320           0 :                                 return -1;
    9321             :                         }
    9322           0 :                         if (test_var > uint_max) {
    9323           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9324             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9325           0 :                                 return -1;
    9326             :                         }
    9327           0 :                         object->attid = test_var;
    9328             :                 } else {
    9329           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9330             :                           PyLong_Type.tp_name);
    9331           0 :                         return -1;
    9332             :                 }
    9333             :         }
    9334           0 :         return 0;
    9335             : }
    9336             : 
    9337        7913 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_value(PyObject *obj, void *closure)
    9338             : {
    9339        7913 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(obj);
    9340           0 :         PyObject *py_value;
    9341        7913 :         py_value = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, pytalloc_get_mem_ctx(obj), &object->value);
    9342        7913 :         return py_value;
    9343             : }
    9344             : 
    9345           0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_value(PyObject *py_obj, PyObject *value, void *closure)
    9346             : {
    9347           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9348           0 :         if (value == NULL) {
    9349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value");
    9350           0 :                 return -1;
    9351             :         }
    9352           0 :         PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, value, return -1;);
    9353           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9354           0 :                 PyErr_NoMemory();
    9355           0 :                 return -1;
    9356             :         }
    9357           0 :         object->value = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(value);
    9358           0 :         return 0;
    9359             : }
    9360             : 
    9361        7818 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_flags(PyObject *obj, void *closure)
    9362             : {
    9363        7818 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(obj);
    9364           0 :         PyObject *py_flags;
    9365        7818 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
    9366        7818 :         return py_flags;
    9367             : }
    9368             : 
    9369           0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_flags(PyObject *py_obj, PyObject *value, void *closure)
    9370             : {
    9371           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9372           0 :         if (value == NULL) {
    9373           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
    9374           0 :                 return -1;
    9375             :         }
    9376             :         {
    9377           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
    9378           0 :                 if (PyLong_Check(value)) {
    9379           0 :                         unsigned long long test_var;
    9380           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9381           0 :                         if (PyErr_Occurred() != NULL) {
    9382           0 :                                 return -1;
    9383             :                         }
    9384           0 :                         if (test_var > uint_max) {
    9385           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9386             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9387           0 :                                 return -1;
    9388             :                         }
    9389           0 :                         object->flags = test_var;
    9390             :                 } else {
    9391           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9392             :                           PyLong_Type.tp_name);
    9393           0 :                         return -1;
    9394             :                 }
    9395             :         }
    9396           0 :         return 0;
    9397             : }
    9398             : 
    9399           0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_originating_add_time(PyObject *obj, void *closure)
    9400             : {
    9401           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(obj);
    9402           0 :         PyObject *py_originating_add_time;
    9403           0 :         py_originating_add_time = PyLong_FromUnsignedLongLong(object->originating_add_time);
    9404           0 :         return py_originating_add_time;
    9405             : }
    9406             : 
    9407           0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_originating_add_time(PyObject *py_obj, PyObject *value, void *closure)
    9408             : {
    9409           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9410           0 :         if (value == NULL) {
    9411           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_add_time");
    9412           0 :                 return -1;
    9413             :         }
    9414             :         {
    9415           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_add_time));
    9416           0 :                 if (PyLong_Check(value)) {
    9417           0 :                         unsigned long long test_var;
    9418           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9419           0 :                         if (PyErr_Occurred() != NULL) {
    9420           0 :                                 return -1;
    9421             :                         }
    9422           0 :                         if (test_var > uint_max) {
    9423           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9424             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9425           0 :                                 return -1;
    9426             :                         }
    9427           0 :                         object->originating_add_time = test_var;
    9428             :                 } else {
    9429           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9430             :                           PyLong_Type.tp_name);
    9431           0 :                         return -1;
    9432             :                 }
    9433             :         }
    9434           0 :         return 0;
    9435             : }
    9436             : 
    9437           2 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_meta_data(PyObject *obj, void *closure)
    9438             : {
    9439           2 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(obj);
    9440           0 :         PyObject *py_meta_data;
    9441           2 :         py_meta_data = pytalloc_reference_ex(&drsuapi_DsReplicaMetaData_Type, pytalloc_get_mem_ctx(obj), &object->meta_data);
    9442           2 :         return py_meta_data;
    9443             : }
    9444             : 
    9445           0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_meta_data(PyObject *py_obj, PyObject *value, void *closure)
    9446             : {
    9447           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9448           0 :         if (value == NULL) {
    9449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->meta_data");
    9450           0 :                 return -1;
    9451             :         }
    9452           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaMetaData_Type, value, return -1;);
    9453           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9454           0 :                 PyErr_NoMemory();
    9455           0 :                 return -1;
    9456             :         }
    9457           0 :         object->meta_data = *(struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(value);
    9458           0 :         return 0;
    9459             : }
    9460             : 
    9461             : static PyGetSetDef py_drsuapi_DsReplicaLinkedAttribute_getsetters[] = {
    9462             :         {
    9463             :                 .name = discard_const_p(char, "identifier"),
    9464             :                 .get = py_drsuapi_DsReplicaLinkedAttribute_get_identifier,
    9465             :                 .set = py_drsuapi_DsReplicaLinkedAttribute_set_identifier,
    9466             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
    9467             :         },
    9468             :         {
    9469             :                 .name = discard_const_p(char, "attid"),
    9470             :                 .get = py_drsuapi_DsReplicaLinkedAttribute_get_attid,
    9471             :                 .set = py_drsuapi_DsReplicaLinkedAttribute_set_attid,
    9472             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
    9473             :         },
    9474             :         {
    9475             :                 .name = discard_const_p(char, "value"),
    9476             :                 .get = py_drsuapi_DsReplicaLinkedAttribute_get_value,
    9477             :                 .set = py_drsuapi_DsReplicaLinkedAttribute_set_value,
    9478             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeValue")
    9479             :         },
    9480             :         {
    9481             :                 .name = discard_const_p(char, "flags"),
    9482             :                 .get = py_drsuapi_DsReplicaLinkedAttribute_get_flags,
    9483             :                 .set = py_drsuapi_DsReplicaLinkedAttribute_set_flags,
    9484             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsLinkedAttributeFlags")
    9485             :         },
    9486             :         {
    9487             :                 .name = discard_const_p(char, "originating_add_time"),
    9488             :                 .get = py_drsuapi_DsReplicaLinkedAttribute_get_originating_add_time,
    9489             :                 .set = py_drsuapi_DsReplicaLinkedAttribute_set_originating_add_time,
    9490             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
    9491             :         },
    9492             :         {
    9493             :                 .name = discard_const_p(char, "meta_data"),
    9494             :                 .get = py_drsuapi_DsReplicaLinkedAttribute_get_meta_data,
    9495             :                 .set = py_drsuapi_DsReplicaLinkedAttribute_set_meta_data,
    9496             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaMetaData")
    9497             :         },
    9498             :         { .name = NULL }
    9499             : };
    9500             : 
    9501           0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
    9502             : {
    9503           0 :         return pytalloc_new(struct drsuapi_DsReplicaLinkedAttribute, type);
    9504             : }
    9505             : 
    9506           0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
    9507             : {
    9508           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9509           0 :         PyObject *ret = NULL;
    9510           0 :         DATA_BLOB blob;
    9511           0 :         enum ndr_err_code err;
    9512           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
    9513           0 :         if (tmp_ctx == NULL) {
    9514           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
    9515           0 :                 return NULL;
    9516             :         }
    9517           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaLinkedAttribute);
    9518           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9519           0 :                 TALLOC_FREE(tmp_ctx);
    9520           0 :                 PyErr_SetNdrError(err);
    9521           0 :                 return NULL;
    9522             :         }
    9523             : 
    9524           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
    9525           0 :         TALLOC_FREE(tmp_ctx);
    9526           0 :         return ret;
    9527             : }
    9528             : 
    9529           0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
    9530             : {
    9531           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9532           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
    9533           0 :         Py_ssize_t blob_length = 0;
    9534           0 :         enum ndr_err_code err;
    9535           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
    9536           0 :         PyObject *allow_remaining_obj = NULL;
    9537           0 :         bool allow_remaining = false;
    9538             : 
    9539           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
    9540             :                 discard_const_p(char *, kwnames),
    9541             :                 &blob.data, &blob_length,
    9542             :                 &allow_remaining_obj)) {
    9543           0 :                 return NULL;
    9544             :         }
    9545           0 :         blob.length = blob_length;
    9546             : 
    9547           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
    9548           0 :                 allow_remaining = true;
    9549             :         }
    9550             : 
    9551           0 :         if (allow_remaining) {
    9552           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaLinkedAttribute);
    9553             :         } else {
    9554           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaLinkedAttribute);
    9555             :         }
    9556           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
    9557           0 :                 PyErr_SetNdrError(err);
    9558           0 :                 return NULL;
    9559             :         }
    9560             : 
    9561           0 :         Py_RETURN_NONE;
    9562             : }
    9563             : 
    9564           0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
    9565             : {
    9566           0 :         struct drsuapi_DsReplicaLinkedAttribute *object = pytalloc_get_ptr(py_obj);
    9567           0 :         PyObject *ret;
    9568           0 :         char *retstr;
    9569             : 
    9570           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaLinkedAttribute, "drsuapi_DsReplicaLinkedAttribute", object);
    9571           0 :         ret = PyUnicode_FromString(retstr);
    9572           0 :         talloc_free(retstr);
    9573             : 
    9574           0 :         return ret;
    9575             : }
    9576             : 
    9577             : static PyMethodDef py_drsuapi_DsReplicaLinkedAttribute_methods[] = {
    9578             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaLinkedAttribute_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
    9579             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaLinkedAttribute_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
    9580             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaLinkedAttribute_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
    9581             :         { NULL, NULL, 0, NULL }
    9582             : };
    9583             : 
    9584             : 
    9585             : static PyTypeObject drsuapi_DsReplicaLinkedAttribute_Type = {
    9586             :         PyVarObject_HEAD_INIT(NULL, 0)
    9587             :         .tp_name = "drsuapi.DsReplicaLinkedAttribute",
    9588             :         .tp_getset = py_drsuapi_DsReplicaLinkedAttribute_getsetters,
    9589             :         .tp_methods = py_drsuapi_DsReplicaLinkedAttribute_methods,
    9590             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
    9591             :         .tp_new = py_drsuapi_DsReplicaLinkedAttribute_new,
    9592             : };
    9593             : 
    9594             : 
    9595         645 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_guid(PyObject *obj, void *closure)
    9596             : {
    9597         645 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9598           0 :         PyObject *py_source_dsa_guid;
    9599         645 :         py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
    9600         645 :         return py_source_dsa_guid;
    9601             : }
    9602             : 
    9603           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
    9604             : {
    9605           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9606           0 :         if (value == NULL) {
    9607           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
    9608           0 :                 return -1;
    9609             :         }
    9610           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    9611           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9612           0 :                 PyErr_NoMemory();
    9613           0 :                 return -1;
    9614             :         }
    9615           0 :         object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
    9616           0 :         return 0;
    9617             : }
    9618             : 
    9619         645 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_invocation_id(PyObject *obj, void *closure)
    9620             : {
    9621         645 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9622           0 :         PyObject *py_source_dsa_invocation_id;
    9623         645 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
    9624         645 :         return py_source_dsa_invocation_id;
    9625             : }
    9626             : 
    9627           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
    9628             : {
    9629           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9630           0 :         if (value == NULL) {
    9631           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
    9632           0 :                 return -1;
    9633             :         }
    9634           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
    9635           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9636           0 :                 PyErr_NoMemory();
    9637           0 :                 return -1;
    9638             :         }
    9639           0 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
    9640           0 :         return 0;
    9641             : }
    9642             : 
    9643         606 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_naming_context(PyObject *obj, void *closure)
    9644             : {
    9645         606 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9646           0 :         PyObject *py_naming_context;
    9647         606 :         if (object->naming_context == NULL) {
    9648           0 :                 Py_RETURN_NONE;
    9649             :         }
    9650         606 :         if (object->naming_context == NULL) {
    9651           0 :                 py_naming_context = Py_None;
    9652           0 :                 Py_INCREF(py_naming_context);
    9653             :         } else {
    9654         606 :                 py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
    9655             :         }
    9656         606 :         return py_naming_context;
    9657             : }
    9658             : 
    9659           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
    9660             : {
    9661           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9662           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
    9663           0 :         if (value == NULL) {
    9664           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
    9665           0 :                 return -1;
    9666             :         }
    9667           0 :         if (value == Py_None) {
    9668           0 :                 object->naming_context = NULL;
    9669             :         } else {
    9670           0 :                 object->naming_context = NULL;
    9671           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
    9672           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9673           0 :                         PyErr_NoMemory();
    9674           0 :                         return -1;
    9675             :                 }
    9676           0 :                 object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
    9677             :         }
    9678           0 :         return 0;
    9679             : }
    9680             : 
    9681           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_old_highwatermark(PyObject *obj, void *closure)
    9682             : {
    9683           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9684           0 :         PyObject *py_old_highwatermark;
    9685           0 :         py_old_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->old_highwatermark);
    9686           0 :         return py_old_highwatermark;
    9687             : }
    9688             : 
    9689           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_old_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    9690             : {
    9691           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9692           0 :         if (value == NULL) {
    9693           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_highwatermark");
    9694           0 :                 return -1;
    9695             :         }
    9696           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    9697           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9698           0 :                 PyErr_NoMemory();
    9699           0 :                 return -1;
    9700             :         }
    9701           0 :         object->old_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    9702           0 :         return 0;
    9703             : }
    9704             : 
    9705        3077 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_new_highwatermark(PyObject *obj, void *closure)
    9706             : {
    9707        3077 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9708           0 :         PyObject *py_new_highwatermark;
    9709        3077 :         py_new_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->new_highwatermark);
    9710        3077 :         return py_new_highwatermark;
    9711             : }
    9712             : 
    9713           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_new_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
    9714             : {
    9715           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9716           0 :         if (value == NULL) {
    9717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->new_highwatermark");
    9718           0 :                 return -1;
    9719             :         }
    9720           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
    9721           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9722           0 :                 PyErr_NoMemory();
    9723           0 :                 return -1;
    9724             :         }
    9725           0 :         object->new_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
    9726           0 :         return 0;
    9727             : }
    9728             : 
    9729         560 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_uptodateness_vector(PyObject *obj, void *closure)
    9730             : {
    9731         560 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9732           0 :         PyObject *py_uptodateness_vector;
    9733         560 :         if (object->uptodateness_vector == NULL) {
    9734         448 :                 Py_RETURN_NONE;
    9735             :         }
    9736         112 :         if (object->uptodateness_vector == NULL) {
    9737           0 :                 py_uptodateness_vector = Py_None;
    9738           0 :                 Py_INCREF(py_uptodateness_vector);
    9739             :         } else {
    9740         112 :                 py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2CtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
    9741             :         }
    9742         112 :         return py_uptodateness_vector;
    9743             : }
    9744             : 
    9745           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
    9746             : {
    9747           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9748           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
    9749           0 :         if (value == NULL) {
    9750           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
    9751           0 :                 return -1;
    9752             :         }
    9753           0 :         if (value == Py_None) {
    9754           0 :                 object->uptodateness_vector = NULL;
    9755             :         } else {
    9756           0 :                 object->uptodateness_vector = NULL;
    9757           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2CtrEx_Type, value, return -1;);
    9758           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9759           0 :                         PyErr_NoMemory();
    9760           0 :                         return -1;
    9761             :                 }
    9762           0 :                 object->uptodateness_vector = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(value);
    9763             :         }
    9764           0 :         return 0;
    9765             : }
    9766             : 
    9767           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_mapping_ctr(PyObject *obj, void *closure)
    9768             : {
    9769           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9770           0 :         PyObject *py_mapping_ctr;
    9771           0 :         py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
    9772           0 :         return py_mapping_ctr;
    9773             : }
    9774             : 
    9775           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
    9776             : {
    9777           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9778           0 :         if (value == NULL) {
    9779           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mapping_ctr");
    9780           0 :                 return -1;
    9781             :         }
    9782           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
    9783           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9784           0 :                 PyErr_NoMemory();
    9785           0 :                 return -1;
    9786             :         }
    9787           0 :         object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
    9788           0 :         return 0;
    9789             : }
    9790             : 
    9791         651 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_extended_ret(PyObject *obj, void *closure)
    9792             : {
    9793         651 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9794           0 :         PyObject *py_extended_ret;
    9795         651 :         py_extended_ret = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_ret));
    9796         651 :         return py_extended_ret;
    9797             : }
    9798             : 
    9799           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_extended_ret(PyObject *py_obj, PyObject *value, void *closure)
    9800             : {
    9801           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9802           0 :         if (value == NULL) {
    9803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_ret");
    9804           0 :                 return -1;
    9805             :         }
    9806             :         {
    9807           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_ret));
    9808           0 :                 if (PyLong_Check(value)) {
    9809           0 :                         unsigned long long test_var;
    9810           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9811           0 :                         if (PyErr_Occurred() != NULL) {
    9812           0 :                                 return -1;
    9813             :                         }
    9814           0 :                         if (test_var > uint_max) {
    9815           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9816             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9817           0 :                                 return -1;
    9818             :                         }
    9819           0 :                         object->extended_ret = test_var;
    9820             :                 } else {
    9821           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9822             :                           PyLong_Type.tp_name);
    9823           0 :                         return -1;
    9824             :                 }
    9825             :         }
    9826           0 :         return 0;
    9827             : }
    9828             : 
    9829        7381 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_object_count(PyObject *obj, void *closure)
    9830             : {
    9831        7381 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9832           0 :         PyObject *py_object_count;
    9833        7381 :         py_object_count = PyLong_FromUnsignedLongLong((uint32_t)(object->object_count));
    9834        7381 :         return py_object_count;
    9835             : }
    9836             : 
    9837           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_object_count(PyObject *py_obj, PyObject *value, void *closure)
    9838             : {
    9839           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9840           0 :         if (value == NULL) {
    9841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_count");
    9842           0 :                 return -1;
    9843             :         }
    9844             :         {
    9845           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->object_count));
    9846           0 :                 if (PyLong_Check(value)) {
    9847           0 :                         unsigned long long test_var;
    9848           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9849           0 :                         if (PyErr_Occurred() != NULL) {
    9850           0 :                                 return -1;
    9851             :                         }
    9852           0 :                         if (test_var > uint_max) {
    9853           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9854             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9855           0 :                                 return -1;
    9856             :                         }
    9857           0 :                         object->object_count = test_var;
    9858             :                 } else {
    9859           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9860             :                           PyLong_Type.tp_name);
    9861           0 :                         return -1;
    9862             :                 }
    9863             :         }
    9864           0 :         return 0;
    9865             : }
    9866             : 
    9867           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get___ndr_size(PyObject *obj, void *closure)
    9868             : {
    9869           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9870           0 :         PyObject *py___ndr_size;
    9871           0 :         py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size));
    9872           0 :         return py___ndr_size;
    9873             : }
    9874             : 
    9875           0 : static int py_drsuapi_DsGetNCChangesCtr6_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
    9876             : {
    9877           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9878           0 :         if (value == NULL) {
    9879           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
    9880           0 :                 return -1;
    9881             :         }
    9882             :         {
    9883           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
    9884           0 :                 if (PyLong_Check(value)) {
    9885           0 :                         unsigned long long test_var;
    9886           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9887           0 :                         if (PyErr_Occurred() != NULL) {
    9888           0 :                                 return -1;
    9889             :                         }
    9890           0 :                         if (test_var > uint_max) {
    9891           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9892             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9893           0 :                                 return -1;
    9894             :                         }
    9895           0 :                         object->__ndr_size = test_var;
    9896             :                 } else {
    9897           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9898             :                           PyLong_Type.tp_name);
    9899           0 :                         return -1;
    9900             :                 }
    9901             :         }
    9902           0 :         return 0;
    9903             : }
    9904             : 
    9905       10010 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_first_object(PyObject *obj, void *closure)
    9906             : {
    9907       10010 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9908           0 :         PyObject *py_first_object;
    9909       10010 :         if (object->first_object == NULL) {
    9910         253 :                 Py_RETURN_NONE;
    9911             :         }
    9912        9757 :         if (object->first_object == NULL) {
    9913           0 :                 py_first_object = Py_None;
    9914           0 :                 Py_INCREF(py_first_object);
    9915             :         } else {
    9916        9757 :                 py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->first_object, object->first_object);
    9917             :         }
    9918        9757 :         return py_first_object;
    9919             : }
    9920             : 
    9921           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
    9922             : {
    9923           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9924           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->first_object));
    9925           0 :         if (value == NULL) {
    9926           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_object");
    9927           0 :                 return -1;
    9928             :         }
    9929           0 :         if (value == Py_None) {
    9930           0 :                 object->first_object = NULL;
    9931             :         } else {
    9932           0 :                 object->first_object = NULL;
    9933           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
    9934           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
    9935           0 :                         PyErr_NoMemory();
    9936           0 :                         return -1;
    9937             :                 }
    9938           0 :                 object->first_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
    9939             :         }
    9940           0 :         return 0;
    9941             : }
    9942             : 
    9943        3034 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_more_data(PyObject *obj, void *closure)
    9944             : {
    9945        3034 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9946           0 :         PyObject *py_more_data;
    9947        3034 :         py_more_data = PyLong_FromUnsignedLongLong((uint32_t)(object->more_data));
    9948        3034 :         return py_more_data;
    9949             : }
    9950             : 
    9951           1 : static int py_drsuapi_DsGetNCChangesCtr6_set_more_data(PyObject *py_obj, PyObject *value, void *closure)
    9952             : {
    9953           1 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9954           1 :         if (value == NULL) {
    9955           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->more_data");
    9956           0 :                 return -1;
    9957             :         }
    9958             :         {
    9959           1 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->more_data));
    9960           1 :                 if (PyLong_Check(value)) {
    9961           0 :                         unsigned long long test_var;
    9962           1 :                         test_var = PyLong_AsUnsignedLongLong(value);
    9963           1 :                         if (PyErr_Occurred() != NULL) {
    9964           0 :                                 return -1;
    9965             :                         }
    9966           1 :                         if (test_var > uint_max) {
    9967           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
    9968             :                                   PyLong_Type.tp_name, uint_max, test_var);
    9969           0 :                                 return -1;
    9970             :                         }
    9971           1 :                         object->more_data = test_var;
    9972             :                 } else {
    9973           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
    9974             :                           PyLong_Type.tp_name);
    9975           0 :                         return -1;
    9976             :                 }
    9977             :         }
    9978           1 :         return 0;
    9979             : }
    9980             : 
    9981         164 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_nc_object_count(PyObject *obj, void *closure)
    9982             : {
    9983         164 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
    9984           0 :         PyObject *py_nc_object_count;
    9985         164 :         py_nc_object_count = PyLong_FromUnsignedLongLong((uint32_t)(object->nc_object_count));
    9986         164 :         return py_nc_object_count;
    9987             : }
    9988             : 
    9989           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_nc_object_count(PyObject *py_obj, PyObject *value, void *closure)
    9990             : {
    9991           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
    9992           0 :         if (value == NULL) {
    9993           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nc_object_count");
    9994           0 :                 return -1;
    9995             :         }
    9996             :         {
    9997           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nc_object_count));
    9998           0 :                 if (PyLong_Check(value)) {
    9999           0 :                         unsigned long long test_var;
   10000           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10001           0 :                         if (PyErr_Occurred() != NULL) {
   10002           0 :                                 return -1;
   10003             :                         }
   10004           0 :                         if (test_var > uint_max) {
   10005           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10006             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10007           0 :                                 return -1;
   10008             :                         }
   10009           0 :                         object->nc_object_count = test_var;
   10010             :                 } else {
   10011           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10012             :                           PyLong_Type.tp_name);
   10013           0 :                         return -1;
   10014             :                 }
   10015             :         }
   10016           0 :         return 0;
   10017             : }
   10018             : 
   10019         164 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_nc_linked_attributes_count(PyObject *obj, void *closure)
   10020             : {
   10021         164 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
   10022           0 :         PyObject *py_nc_linked_attributes_count;
   10023         164 :         py_nc_linked_attributes_count = PyLong_FromUnsignedLongLong((uint32_t)(object->nc_linked_attributes_count));
   10024         164 :         return py_nc_linked_attributes_count;
   10025             : }
   10026             : 
   10027           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_nc_linked_attributes_count(PyObject *py_obj, PyObject *value, void *closure)
   10028             : {
   10029           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
   10030           0 :         if (value == NULL) {
   10031           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nc_linked_attributes_count");
   10032           0 :                 return -1;
   10033             :         }
   10034             :         {
   10035           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nc_linked_attributes_count));
   10036           0 :                 if (PyLong_Check(value)) {
   10037           0 :                         unsigned long long test_var;
   10038           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10039           0 :                         if (PyErr_Occurred() != NULL) {
   10040           0 :                                 return -1;
   10041             :                         }
   10042           0 :                         if (test_var > uint_max) {
   10043           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10044             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10045           0 :                                 return -1;
   10046             :                         }
   10047           0 :                         object->nc_linked_attributes_count = test_var;
   10048             :                 } else {
   10049           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10050             :                           PyLong_Type.tp_name);
   10051           0 :                         return -1;
   10052             :                 }
   10053             :         }
   10054           0 :         return 0;
   10055             : }
   10056             : 
   10057        2964 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes_count(PyObject *obj, void *closure)
   10058             : {
   10059        2964 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
   10060           0 :         PyObject *py_linked_attributes_count;
   10061        2964 :         py_linked_attributes_count = PyLong_FromUnsignedLongLong((uint32_t)(object->linked_attributes_count));
   10062        2964 :         return py_linked_attributes_count;
   10063             : }
   10064             : 
   10065           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes_count(PyObject *py_obj, PyObject *value, void *closure)
   10066             : {
   10067           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
   10068           0 :         if (value == NULL) {
   10069           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linked_attributes_count");
   10070           0 :                 return -1;
   10071             :         }
   10072             :         {
   10073           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linked_attributes_count));
   10074           0 :                 if (PyLong_Check(value)) {
   10075           0 :                         unsigned long long test_var;
   10076           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10077           0 :                         if (PyErr_Occurred() != NULL) {
   10078           0 :                                 return -1;
   10079             :                         }
   10080           0 :                         if (test_var > uint_max) {
   10081           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10082             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10083           0 :                                 return -1;
   10084             :                         }
   10085           0 :                         object->linked_attributes_count = test_var;
   10086             :                 } else {
   10087           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10088             :                           PyLong_Type.tp_name);
   10089           0 :                         return -1;
   10090             :                 }
   10091             :         }
   10092           0 :         return 0;
   10093             : }
   10094             : 
   10095        7639 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes(PyObject *obj, void *closure)
   10096             : {
   10097        7639 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
   10098           0 :         PyObject *py_linked_attributes;
   10099        7639 :         if (object->linked_attributes == NULL) {
   10100           0 :                 Py_RETURN_NONE;
   10101             :         }
   10102        7639 :         if (object->linked_attributes == NULL) {
   10103           0 :                 py_linked_attributes = Py_None;
   10104           0 :                 Py_INCREF(py_linked_attributes);
   10105             :         } else {
   10106        7639 :                 py_linked_attributes = PyList_New(object->linked_attributes_count);
   10107        7639 :                 if (py_linked_attributes == NULL) {
   10108           0 :                         return NULL;
   10109             :                 }
   10110             :                 {
   10111             :                         int linked_attributes_cntr_1;
   10112     1221769 :                         for (linked_attributes_cntr_1 = 0; linked_attributes_cntr_1 < (object->linked_attributes_count); linked_attributes_cntr_1++) {
   10113           0 :                                 PyObject *py_linked_attributes_1;
   10114     1214130 :                                 py_linked_attributes_1 = pytalloc_reference_ex(&drsuapi_DsReplicaLinkedAttribute_Type, object->linked_attributes, &(object->linked_attributes)[linked_attributes_cntr_1]);
   10115     1214130 :                                 PyList_SetItem(py_linked_attributes, linked_attributes_cntr_1, py_linked_attributes_1);
   10116             :                         }
   10117             :                 }
   10118             :         }
   10119        7639 :         return py_linked_attributes;
   10120             : }
   10121             : 
   10122           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes(PyObject *py_obj, PyObject *value, void *closure)
   10123             : {
   10124           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
   10125           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->linked_attributes));
   10126           0 :         if (value == NULL) {
   10127           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linked_attributes");
   10128           0 :                 return -1;
   10129             :         }
   10130           0 :         if (value == Py_None) {
   10131           0 :                 object->linked_attributes = NULL;
   10132             :         } else {
   10133           0 :                 object->linked_attributes = NULL;
   10134           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   10135             :                 {
   10136           0 :                         int linked_attributes_cntr_1;
   10137           0 :                         object->linked_attributes = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->linked_attributes, PyList_GET_SIZE(value));
   10138           0 :                         if (!object->linked_attributes) { return -1; }
   10139           0 :                         talloc_set_name_const(object->linked_attributes, "ARRAY: object->linked_attributes");
   10140           0 :                         for (linked_attributes_cntr_1 = 0; linked_attributes_cntr_1 < PyList_GET_SIZE(value); linked_attributes_cntr_1++) {
   10141           0 :                                 if (PyList_GET_ITEM(value, linked_attributes_cntr_1) == NULL) {
   10142           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->linked_attributes)[linked_attributes_cntr_1]");
   10143           0 :                                         return -1;
   10144             :                                 }
   10145           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaLinkedAttribute_Type, PyList_GET_ITEM(value, linked_attributes_cntr_1), return -1;);
   10146           0 :                                 if (talloc_reference(object->linked_attributes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, linked_attributes_cntr_1))) == NULL) {
   10147           0 :                                         PyErr_NoMemory();
   10148           0 :                                         return -1;
   10149             :                                 }
   10150           0 :                                 (object->linked_attributes)[linked_attributes_cntr_1] = *(struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(PyList_GET_ITEM(value, linked_attributes_cntr_1));
   10151             :                         }
   10152             :                 }
   10153             :         }
   10154           0 :         return 0;
   10155             : }
   10156             : 
   10157         164 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_drs_error(PyObject *obj, void *closure)
   10158             : {
   10159         164 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(obj);
   10160           0 :         PyObject *py_drs_error;
   10161         164 :         py_drs_error = PyErr_FromWERROR(object->drs_error);
   10162         164 :         return py_drs_error;
   10163             : }
   10164             : 
   10165           0 : static int py_drsuapi_DsGetNCChangesCtr6_set_drs_error(PyObject *py_obj, PyObject *value, void *closure)
   10166             : {
   10167           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
   10168           0 :         if (value == NULL) {
   10169           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->drs_error");
   10170           0 :                 return -1;
   10171             :         }
   10172           0 :         object->drs_error = W_ERROR(PyLong_AsLong(value));
   10173           0 :         return 0;
   10174             : }
   10175             : 
   10176             : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr6_getsetters[] = {
   10177             :         {
   10178             :                 .name = discard_const_p(char, "source_dsa_guid"),
   10179             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_guid,
   10180             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_guid,
   10181             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   10182             :         },
   10183             :         {
   10184             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
   10185             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_invocation_id,
   10186             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_invocation_id,
   10187             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   10188             :         },
   10189             :         {
   10190             :                 .name = discard_const_p(char, "naming_context"),
   10191             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_naming_context,
   10192             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_naming_context,
   10193             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   10194             :         },
   10195             :         {
   10196             :                 .name = discard_const_p(char, "old_highwatermark"),
   10197             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_old_highwatermark,
   10198             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_old_highwatermark,
   10199             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
   10200             :         },
   10201             :         {
   10202             :                 .name = discard_const_p(char, "new_highwatermark"),
   10203             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_new_highwatermark,
   10204             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_new_highwatermark,
   10205             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
   10206             :         },
   10207             :         {
   10208             :                 .name = discard_const_p(char, "uptodateness_vector"),
   10209             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_uptodateness_vector,
   10210             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_uptodateness_vector,
   10211             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor2CtrEx")
   10212             :         },
   10213             :         {
   10214             :                 .name = discard_const_p(char, "mapping_ctr"),
   10215             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_mapping_ctr,
   10216             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_mapping_ctr,
   10217             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping_Ctr")
   10218             :         },
   10219             :         {
   10220             :                 .name = discard_const_p(char, "extended_ret"),
   10221             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_extended_ret,
   10222             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_extended_ret,
   10223             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedError")
   10224             :         },
   10225             :         {
   10226             :                 .name = discard_const_p(char, "object_count"),
   10227             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_object_count,
   10228             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_object_count,
   10229             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10230             :         },
   10231             :         {
   10232             :                 .name = discard_const_p(char, "__ndr_size"),
   10233             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get___ndr_size,
   10234             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set___ndr_size,
   10235             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10236             :         },
   10237             :         {
   10238             :                 .name = discard_const_p(char, "first_object"),
   10239             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_first_object,
   10240             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_first_object,
   10241             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItemEx")
   10242             :         },
   10243             :         {
   10244             :                 .name = discard_const_p(char, "more_data"),
   10245             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_more_data,
   10246             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_more_data,
   10247             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10248             :         },
   10249             :         {
   10250             :                 .name = discard_const_p(char, "nc_object_count"),
   10251             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_nc_object_count,
   10252             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_nc_object_count,
   10253             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10254             :         },
   10255             :         {
   10256             :                 .name = discard_const_p(char, "nc_linked_attributes_count"),
   10257             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_nc_linked_attributes_count,
   10258             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_nc_linked_attributes_count,
   10259             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10260             :         },
   10261             :         {
   10262             :                 .name = discard_const_p(char, "linked_attributes_count"),
   10263             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes_count,
   10264             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes_count,
   10265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10266             :         },
   10267             :         {
   10268             :                 .name = discard_const_p(char, "linked_attributes"),
   10269             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes,
   10270             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes,
   10271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaLinkedAttribute")
   10272             :         },
   10273             :         {
   10274             :                 .name = discard_const_p(char, "drs_error"),
   10275             :                 .get = py_drsuapi_DsGetNCChangesCtr6_get_drs_error,
   10276             :                 .set = py_drsuapi_DsGetNCChangesCtr6_set_drs_error,
   10277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   10278             :         },
   10279             :         { .name = NULL }
   10280             : };
   10281             : 
   10282           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10283             : {
   10284           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesCtr6, type);
   10285             : }
   10286             : 
   10287           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   10288             : {
   10289           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
   10290           0 :         PyObject *ret = NULL;
   10291           0 :         DATA_BLOB blob;
   10292           0 :         enum ndr_err_code err;
   10293           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   10294           0 :         if (tmp_ctx == NULL) {
   10295           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10296           0 :                 return NULL;
   10297             :         }
   10298           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6);
   10299           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10300           0 :                 TALLOC_FREE(tmp_ctx);
   10301           0 :                 PyErr_SetNdrError(err);
   10302           0 :                 return NULL;
   10303             :         }
   10304             : 
   10305           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10306           0 :         TALLOC_FREE(tmp_ctx);
   10307           0 :         return ret;
   10308             : }
   10309             : 
   10310           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10311             : {
   10312           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
   10313           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   10314           0 :         Py_ssize_t blob_length = 0;
   10315           0 :         enum ndr_err_code err;
   10316           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   10317           0 :         PyObject *allow_remaining_obj = NULL;
   10318           0 :         bool allow_remaining = false;
   10319             : 
   10320           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   10321             :                 discard_const_p(char *, kwnames),
   10322             :                 &blob.data, &blob_length,
   10323             :                 &allow_remaining_obj)) {
   10324           0 :                 return NULL;
   10325             :         }
   10326           0 :         blob.length = blob_length;
   10327             : 
   10328           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10329           0 :                 allow_remaining = true;
   10330             :         }
   10331             : 
   10332           0 :         if (allow_remaining) {
   10333           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6);
   10334             :         } else {
   10335           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6);
   10336             :         }
   10337           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10338           0 :                 PyErr_SetNdrError(err);
   10339           0 :                 return NULL;
   10340             :         }
   10341             : 
   10342           0 :         Py_RETURN_NONE;
   10343             : }
   10344             : 
   10345           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10346             : {
   10347           0 :         struct drsuapi_DsGetNCChangesCtr6 *object = pytalloc_get_ptr(py_obj);
   10348           0 :         PyObject *ret;
   10349           0 :         char *retstr;
   10350             : 
   10351           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr6, "drsuapi_DsGetNCChangesCtr6", object);
   10352           0 :         ret = PyUnicode_FromString(retstr);
   10353           0 :         talloc_free(retstr);
   10354             : 
   10355           0 :         return ret;
   10356             : }
   10357             : 
   10358             : static PyMethodDef py_drsuapi_DsGetNCChangesCtr6_methods[] = {
   10359             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   10360             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCtr6_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   10361             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   10362             :         { NULL, NULL, 0, NULL }
   10363             : };
   10364             : 
   10365             : 
   10366             : static PyTypeObject drsuapi_DsGetNCChangesCtr6_Type = {
   10367             :         PyVarObject_HEAD_INIT(NULL, 0)
   10368             :         .tp_name = "drsuapi.DsGetNCChangesCtr6",
   10369             :         .tp_getset = py_drsuapi_DsGetNCChangesCtr6_getsetters,
   10370             :         .tp_methods = py_drsuapi_DsGetNCChangesCtr6_methods,
   10371             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10372             :         .tp_new = py_drsuapi_DsGetNCChangesCtr6_new,
   10373             : };
   10374             : 
   10375             : 
   10376           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_get_ctr1(PyObject *obj, void *closure)
   10377             : {
   10378           0 :         struct drsuapi_DsGetNCChangesCtr1TS *object = pytalloc_get_ptr(obj);
   10379           0 :         PyObject *py_ctr1;
   10380           0 :         py_ctr1 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1_Type, pytalloc_get_mem_ctx(obj), &object->ctr1);
   10381           0 :         return py_ctr1;
   10382             : }
   10383             : 
   10384           0 : static int py_drsuapi_DsGetNCChangesCtr1TS_set_ctr1(PyObject *py_obj, PyObject *value, void *closure)
   10385             : {
   10386           0 :         struct drsuapi_DsGetNCChangesCtr1TS *object = pytalloc_get_ptr(py_obj);
   10387           0 :         if (value == NULL) {
   10388           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr1");
   10389           0 :                 return -1;
   10390             :         }
   10391           0 :         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1_Type, value, return -1;);
   10392           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10393           0 :                 PyErr_NoMemory();
   10394           0 :                 return -1;
   10395             :         }
   10396           0 :         object->ctr1 = *(struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(value);
   10397           0 :         return 0;
   10398             : }
   10399             : 
   10400             : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr1TS_getsetters[] = {
   10401             :         {
   10402             :                 .name = discard_const_p(char, "ctr1"),
   10403             :                 .get = py_drsuapi_DsGetNCChangesCtr1TS_get_ctr1,
   10404             :                 .set = py_drsuapi_DsGetNCChangesCtr1TS_set_ctr1,
   10405             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr1")
   10406             :         },
   10407             :         { .name = NULL }
   10408             : };
   10409             : 
   10410           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10411             : {
   10412           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesCtr1TS, type);
   10413             : }
   10414             : 
   10415           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   10416             : {
   10417           0 :         struct drsuapi_DsGetNCChangesCtr1TS *object = pytalloc_get_ptr(py_obj);
   10418           0 :         PyObject *ret = NULL;
   10419           0 :         DATA_BLOB blob;
   10420           0 :         enum ndr_err_code err;
   10421           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   10422           0 :         if (tmp_ctx == NULL) {
   10423           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10424           0 :                 return NULL;
   10425             :         }
   10426           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1TS);
   10427           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10428           0 :                 TALLOC_FREE(tmp_ctx);
   10429           0 :                 PyErr_SetNdrError(err);
   10430           0 :                 return NULL;
   10431             :         }
   10432             : 
   10433           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10434           0 :         TALLOC_FREE(tmp_ctx);
   10435           0 :         return ret;
   10436             : }
   10437             : 
   10438           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10439             : {
   10440           0 :         struct drsuapi_DsGetNCChangesCtr1TS *object = pytalloc_get_ptr(py_obj);
   10441           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   10442           0 :         Py_ssize_t blob_length = 0;
   10443           0 :         enum ndr_err_code err;
   10444           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   10445           0 :         PyObject *allow_remaining_obj = NULL;
   10446           0 :         bool allow_remaining = false;
   10447             : 
   10448           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   10449             :                 discard_const_p(char *, kwnames),
   10450             :                 &blob.data, &blob_length,
   10451             :                 &allow_remaining_obj)) {
   10452           0 :                 return NULL;
   10453             :         }
   10454           0 :         blob.length = blob_length;
   10455             : 
   10456           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10457           0 :                 allow_remaining = true;
   10458             :         }
   10459             : 
   10460           0 :         if (allow_remaining) {
   10461           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1TS);
   10462             :         } else {
   10463           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1TS);
   10464             :         }
   10465           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10466           0 :                 PyErr_SetNdrError(err);
   10467           0 :                 return NULL;
   10468             :         }
   10469             : 
   10470           0 :         Py_RETURN_NONE;
   10471             : }
   10472             : 
   10473           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10474             : {
   10475           0 :         struct drsuapi_DsGetNCChangesCtr1TS *object = pytalloc_get_ptr(py_obj);
   10476           0 :         PyObject *ret;
   10477           0 :         char *retstr;
   10478             : 
   10479           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr1TS, "drsuapi_DsGetNCChangesCtr1TS", object);
   10480           0 :         ret = PyUnicode_FromString(retstr);
   10481           0 :         talloc_free(retstr);
   10482             : 
   10483           0 :         return ret;
   10484             : }
   10485             : 
   10486             : static PyMethodDef py_drsuapi_DsGetNCChangesCtr1TS_methods[] = {
   10487             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1TS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   10488             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCtr1TS_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   10489             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1TS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   10490             :         { NULL, NULL, 0, NULL }
   10491             : };
   10492             : 
   10493             : 
   10494             : static PyTypeObject drsuapi_DsGetNCChangesCtr1TS_Type = {
   10495             :         PyVarObject_HEAD_INIT(NULL, 0)
   10496             :         .tp_name = "drsuapi.DsGetNCChangesCtr1TS",
   10497             :         .tp_getset = py_drsuapi_DsGetNCChangesCtr1TS_getsetters,
   10498             :         .tp_methods = py_drsuapi_DsGetNCChangesCtr1TS_methods,
   10499             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10500             :         .tp_new = py_drsuapi_DsGetNCChangesCtr1TS_new,
   10501             : };
   10502             : 
   10503             : 
   10504           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_get_ctr6(PyObject *obj, void *closure)
   10505             : {
   10506           0 :         struct drsuapi_DsGetNCChangesCtr6TS *object = pytalloc_get_ptr(obj);
   10507           0 :         PyObject *py_ctr6;
   10508           0 :         py_ctr6 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6_Type, pytalloc_get_mem_ctx(obj), &object->ctr6);
   10509           0 :         return py_ctr6;
   10510             : }
   10511             : 
   10512           0 : static int py_drsuapi_DsGetNCChangesCtr6TS_set_ctr6(PyObject *py_obj, PyObject *value, void *closure)
   10513             : {
   10514           0 :         struct drsuapi_DsGetNCChangesCtr6TS *object = pytalloc_get_ptr(py_obj);
   10515           0 :         if (value == NULL) {
   10516           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr6");
   10517           0 :                 return -1;
   10518             :         }
   10519           0 :         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6_Type, value, return -1;);
   10520           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10521           0 :                 PyErr_NoMemory();
   10522           0 :                 return -1;
   10523             :         }
   10524           0 :         object->ctr6 = *(struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(value);
   10525           0 :         return 0;
   10526             : }
   10527             : 
   10528             : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr6TS_getsetters[] = {
   10529             :         {
   10530             :                 .name = discard_const_p(char, "ctr6"),
   10531             :                 .get = py_drsuapi_DsGetNCChangesCtr6TS_get_ctr6,
   10532             :                 .set = py_drsuapi_DsGetNCChangesCtr6TS_set_ctr6,
   10533             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr6")
   10534             :         },
   10535             :         { .name = NULL }
   10536             : };
   10537             : 
   10538           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10539             : {
   10540           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesCtr6TS, type);
   10541             : }
   10542             : 
   10543           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   10544             : {
   10545           0 :         struct drsuapi_DsGetNCChangesCtr6TS *object = pytalloc_get_ptr(py_obj);
   10546           0 :         PyObject *ret = NULL;
   10547           0 :         DATA_BLOB blob;
   10548           0 :         enum ndr_err_code err;
   10549           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   10550           0 :         if (tmp_ctx == NULL) {
   10551           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   10552           0 :                 return NULL;
   10553             :         }
   10554           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6TS);
   10555           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10556           0 :                 TALLOC_FREE(tmp_ctx);
   10557           0 :                 PyErr_SetNdrError(err);
   10558           0 :                 return NULL;
   10559             :         }
   10560             : 
   10561           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   10562           0 :         TALLOC_FREE(tmp_ctx);
   10563           0 :         return ret;
   10564             : }
   10565             : 
   10566           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   10567             : {
   10568           0 :         struct drsuapi_DsGetNCChangesCtr6TS *object = pytalloc_get_ptr(py_obj);
   10569           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   10570           0 :         Py_ssize_t blob_length = 0;
   10571           0 :         enum ndr_err_code err;
   10572           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   10573           0 :         PyObject *allow_remaining_obj = NULL;
   10574           0 :         bool allow_remaining = false;
   10575             : 
   10576           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   10577             :                 discard_const_p(char *, kwnames),
   10578             :                 &blob.data, &blob_length,
   10579             :                 &allow_remaining_obj)) {
   10580           0 :                 return NULL;
   10581             :         }
   10582           0 :         blob.length = blob_length;
   10583             : 
   10584           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   10585           0 :                 allow_remaining = true;
   10586             :         }
   10587             : 
   10588           0 :         if (allow_remaining) {
   10589           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6TS);
   10590             :         } else {
   10591           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6TS);
   10592             :         }
   10593           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   10594           0 :                 PyErr_SetNdrError(err);
   10595           0 :                 return NULL;
   10596             :         }
   10597             : 
   10598           0 :         Py_RETURN_NONE;
   10599             : }
   10600             : 
   10601           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   10602             : {
   10603           0 :         struct drsuapi_DsGetNCChangesCtr6TS *object = pytalloc_get_ptr(py_obj);
   10604           0 :         PyObject *ret;
   10605           0 :         char *retstr;
   10606             : 
   10607           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr6TS, "drsuapi_DsGetNCChangesCtr6TS", object);
   10608           0 :         ret = PyUnicode_FromString(retstr);
   10609           0 :         talloc_free(retstr);
   10610             : 
   10611           0 :         return ret;
   10612             : }
   10613             : 
   10614             : static PyMethodDef py_drsuapi_DsGetNCChangesCtr6TS_methods[] = {
   10615             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6TS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   10616             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCtr6TS_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   10617             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6TS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   10618             :         { NULL, NULL, 0, NULL }
   10619             : };
   10620             : 
   10621             : 
   10622             : static PyTypeObject drsuapi_DsGetNCChangesCtr6TS_Type = {
   10623             :         PyVarObject_HEAD_INIT(NULL, 0)
   10624             :         .tp_name = "drsuapi.DsGetNCChangesCtr6TS",
   10625             :         .tp_getset = py_drsuapi_DsGetNCChangesCtr6TS_getsetters,
   10626             :         .tp_methods = py_drsuapi_DsGetNCChangesCtr6TS_methods,
   10627             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10628             :         .tp_new = py_drsuapi_DsGetNCChangesCtr6TS_new,
   10629             : };
   10630             : 
   10631             : 
   10632           0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_decompressed_length(PyObject *obj, void *closure)
   10633             : {
   10634           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = pytalloc_get_ptr(obj);
   10635           0 :         PyObject *py_decompressed_length;
   10636           0 :         py_decompressed_length = PyLong_FromUnsignedLongLong((uint32_t)(object->decompressed_length));
   10637           0 :         return py_decompressed_length;
   10638             : }
   10639             : 
   10640           0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
   10641             : {
   10642           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = pytalloc_get_ptr(py_obj);
   10643           0 :         if (value == NULL) {
   10644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->decompressed_length");
   10645           0 :                 return -1;
   10646             :         }
   10647             :         {
   10648           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->decompressed_length));
   10649           0 :                 if (PyLong_Check(value)) {
   10650           0 :                         unsigned long long test_var;
   10651           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10652           0 :                         if (PyErr_Occurred() != NULL) {
   10653           0 :                                 return -1;
   10654             :                         }
   10655           0 :                         if (test_var > uint_max) {
   10656           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10657             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10658           0 :                                 return -1;
   10659             :                         }
   10660           0 :                         object->decompressed_length = test_var;
   10661             :                 } else {
   10662           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10663             :                           PyLong_Type.tp_name);
   10664           0 :                         return -1;
   10665             :                 }
   10666             :         }
   10667           0 :         return 0;
   10668             : }
   10669             : 
   10670           0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_compressed_length(PyObject *obj, void *closure)
   10671             : {
   10672           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = pytalloc_get_ptr(obj);
   10673           0 :         PyObject *py_compressed_length;
   10674           0 :         py_compressed_length = PyLong_FromUnsignedLongLong((uint32_t)(object->compressed_length));
   10675           0 :         return py_compressed_length;
   10676             : }
   10677             : 
   10678           0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
   10679             : {
   10680           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = pytalloc_get_ptr(py_obj);
   10681           0 :         if (value == NULL) {
   10682           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->compressed_length");
   10683           0 :                 return -1;
   10684             :         }
   10685             :         {
   10686           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compressed_length));
   10687           0 :                 if (PyLong_Check(value)) {
   10688           0 :                         unsigned long long test_var;
   10689           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10690           0 :                         if (PyErr_Occurred() != NULL) {
   10691           0 :                                 return -1;
   10692             :                         }
   10693           0 :                         if (test_var > uint_max) {
   10694           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10695             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10696           0 :                                 return -1;
   10697             :                         }
   10698           0 :                         object->compressed_length = test_var;
   10699             :                 } else {
   10700           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10701             :                           PyLong_Type.tp_name);
   10702           0 :                         return -1;
   10703             :                 }
   10704             :         }
   10705           0 :         return 0;
   10706             : }
   10707             : 
   10708           0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_ts(PyObject *obj, void *closure)
   10709             : {
   10710           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = pytalloc_get_ptr(obj);
   10711           0 :         PyObject *py_ts;
   10712           0 :         if (object->ts == NULL) {
   10713           0 :                 Py_RETURN_NONE;
   10714             :         }
   10715           0 :         if (object->ts == NULL) {
   10716           0 :                 py_ts = Py_None;
   10717           0 :                 Py_INCREF(py_ts);
   10718             :         } else {
   10719           0 :                 py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1TS_Type, object->ts, object->ts);
   10720             :         }
   10721           0 :         return py_ts;
   10722             : }
   10723             : 
   10724           0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_ts(PyObject *py_obj, PyObject *value, void *closure)
   10725             : {
   10726           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = pytalloc_get_ptr(py_obj);
   10727           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ts));
   10728           0 :         if (value == NULL) {
   10729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ts");
   10730           0 :                 return -1;
   10731             :         }
   10732           0 :         if (value == Py_None) {
   10733           0 :                 object->ts = NULL;
   10734             :         } else {
   10735           0 :                 object->ts = NULL;
   10736           0 :                 PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1TS_Type, value, return -1;);
   10737           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10738           0 :                         PyErr_NoMemory();
   10739           0 :                         return -1;
   10740             :                 }
   10741           0 :                 object->ts = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(value);
   10742             :         }
   10743           0 :         return 0;
   10744             : }
   10745             : 
   10746             : static PyGetSetDef py_drsuapi_DsGetNCChangesMSZIPCtr1_getsetters[] = {
   10747             :         {
   10748             :                 .name = discard_const_p(char, "decompressed_length"),
   10749             :                 .get = py_drsuapi_DsGetNCChangesMSZIPCtr1_get_decompressed_length,
   10750             :                 .set = py_drsuapi_DsGetNCChangesMSZIPCtr1_set_decompressed_length,
   10751             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10752             :         },
   10753             :         {
   10754             :                 .name = discard_const_p(char, "compressed_length"),
   10755             :                 .get = py_drsuapi_DsGetNCChangesMSZIPCtr1_get_compressed_length,
   10756             :                 .set = py_drsuapi_DsGetNCChangesMSZIPCtr1_set_compressed_length,
   10757             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10758             :         },
   10759             :         {
   10760             :                 .name = discard_const_p(char, "ts"),
   10761             :                 .get = py_drsuapi_DsGetNCChangesMSZIPCtr1_get_ts,
   10762             :                 .set = py_drsuapi_DsGetNCChangesMSZIPCtr1_set_ts,
   10763             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr1TS")
   10764             :         },
   10765             :         { .name = NULL }
   10766             : };
   10767             : 
   10768           0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10769             : {
   10770           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesMSZIPCtr1, type);
   10771             : }
   10772             : 
   10773             : 
   10774             : static PyTypeObject drsuapi_DsGetNCChangesMSZIPCtr1_Type = {
   10775             :         PyVarObject_HEAD_INIT(NULL, 0)
   10776             :         .tp_name = "drsuapi.DsGetNCChangesMSZIPCtr1",
   10777             :         .tp_getset = py_drsuapi_DsGetNCChangesMSZIPCtr1_getsetters,
   10778             :         .tp_methods = NULL,
   10779             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10780             :         .tp_new = py_drsuapi_DsGetNCChangesMSZIPCtr1_new,
   10781             : };
   10782             : 
   10783             : 
   10784           0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_decompressed_length(PyObject *obj, void *closure)
   10785             : {
   10786           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = pytalloc_get_ptr(obj);
   10787           0 :         PyObject *py_decompressed_length;
   10788           0 :         py_decompressed_length = PyLong_FromUnsignedLongLong((uint32_t)(object->decompressed_length));
   10789           0 :         return py_decompressed_length;
   10790             : }
   10791             : 
   10792           0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
   10793             : {
   10794           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = pytalloc_get_ptr(py_obj);
   10795           0 :         if (value == NULL) {
   10796           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->decompressed_length");
   10797           0 :                 return -1;
   10798             :         }
   10799             :         {
   10800           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->decompressed_length));
   10801           0 :                 if (PyLong_Check(value)) {
   10802           0 :                         unsigned long long test_var;
   10803           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10804           0 :                         if (PyErr_Occurred() != NULL) {
   10805           0 :                                 return -1;
   10806             :                         }
   10807           0 :                         if (test_var > uint_max) {
   10808           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10809             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10810           0 :                                 return -1;
   10811             :                         }
   10812           0 :                         object->decompressed_length = test_var;
   10813             :                 } else {
   10814           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10815             :                           PyLong_Type.tp_name);
   10816           0 :                         return -1;
   10817             :                 }
   10818             :         }
   10819           0 :         return 0;
   10820             : }
   10821             : 
   10822           0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_compressed_length(PyObject *obj, void *closure)
   10823             : {
   10824           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = pytalloc_get_ptr(obj);
   10825           0 :         PyObject *py_compressed_length;
   10826           0 :         py_compressed_length = PyLong_FromUnsignedLongLong((uint32_t)(object->compressed_length));
   10827           0 :         return py_compressed_length;
   10828             : }
   10829             : 
   10830           0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
   10831             : {
   10832           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = pytalloc_get_ptr(py_obj);
   10833           0 :         if (value == NULL) {
   10834           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->compressed_length");
   10835           0 :                 return -1;
   10836             :         }
   10837             :         {
   10838           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compressed_length));
   10839           0 :                 if (PyLong_Check(value)) {
   10840           0 :                         unsigned long long test_var;
   10841           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10842           0 :                         if (PyErr_Occurred() != NULL) {
   10843           0 :                                 return -1;
   10844             :                         }
   10845           0 :                         if (test_var > uint_max) {
   10846           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10847             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10848           0 :                                 return -1;
   10849             :                         }
   10850           0 :                         object->compressed_length = test_var;
   10851             :                 } else {
   10852           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10853             :                           PyLong_Type.tp_name);
   10854           0 :                         return -1;
   10855             :                 }
   10856             :         }
   10857           0 :         return 0;
   10858             : }
   10859             : 
   10860           0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_ts(PyObject *obj, void *closure)
   10861             : {
   10862           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = pytalloc_get_ptr(obj);
   10863           0 :         PyObject *py_ts;
   10864           0 :         if (object->ts == NULL) {
   10865           0 :                 Py_RETURN_NONE;
   10866             :         }
   10867           0 :         if (object->ts == NULL) {
   10868           0 :                 py_ts = Py_None;
   10869           0 :                 Py_INCREF(py_ts);
   10870             :         } else {
   10871           0 :                 py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6TS_Type, object->ts, object->ts);
   10872             :         }
   10873           0 :         return py_ts;
   10874             : }
   10875             : 
   10876           0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_ts(PyObject *py_obj, PyObject *value, void *closure)
   10877             : {
   10878           0 :         struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = pytalloc_get_ptr(py_obj);
   10879           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ts));
   10880           0 :         if (value == NULL) {
   10881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ts");
   10882           0 :                 return -1;
   10883             :         }
   10884           0 :         if (value == Py_None) {
   10885           0 :                 object->ts = NULL;
   10886             :         } else {
   10887           0 :                 object->ts = NULL;
   10888           0 :                 PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6TS_Type, value, return -1;);
   10889           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   10890           0 :                         PyErr_NoMemory();
   10891           0 :                         return -1;
   10892             :                 }
   10893           0 :                 object->ts = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(value);
   10894             :         }
   10895           0 :         return 0;
   10896             : }
   10897             : 
   10898             : static PyGetSetDef py_drsuapi_DsGetNCChangesMSZIPCtr6_getsetters[] = {
   10899             :         {
   10900             :                 .name = discard_const_p(char, "decompressed_length"),
   10901             :                 .get = py_drsuapi_DsGetNCChangesMSZIPCtr6_get_decompressed_length,
   10902             :                 .set = py_drsuapi_DsGetNCChangesMSZIPCtr6_set_decompressed_length,
   10903             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10904             :         },
   10905             :         {
   10906             :                 .name = discard_const_p(char, "compressed_length"),
   10907             :                 .get = py_drsuapi_DsGetNCChangesMSZIPCtr6_get_compressed_length,
   10908             :                 .set = py_drsuapi_DsGetNCChangesMSZIPCtr6_set_compressed_length,
   10909             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   10910             :         },
   10911             :         {
   10912             :                 .name = discard_const_p(char, "ts"),
   10913             :                 .get = py_drsuapi_DsGetNCChangesMSZIPCtr6_get_ts,
   10914             :                 .set = py_drsuapi_DsGetNCChangesMSZIPCtr6_set_ts,
   10915             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr6TS")
   10916             :         },
   10917             :         { .name = NULL }
   10918             : };
   10919             : 
   10920           0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   10921             : {
   10922           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesMSZIPCtr6, type);
   10923             : }
   10924             : 
   10925             : 
   10926             : static PyTypeObject drsuapi_DsGetNCChangesMSZIPCtr6_Type = {
   10927             :         PyVarObject_HEAD_INIT(NULL, 0)
   10928             :         .tp_name = "drsuapi.DsGetNCChangesMSZIPCtr6",
   10929             :         .tp_getset = py_drsuapi_DsGetNCChangesMSZIPCtr6_getsetters,
   10930             :         .tp_methods = NULL,
   10931             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   10932             :         .tp_new = py_drsuapi_DsGetNCChangesMSZIPCtr6_new,
   10933             : };
   10934             : 
   10935             : 
   10936           0 : static PyObject *py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_get_decompressed_length(PyObject *obj, void *closure)
   10937             : {
   10938           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *object = pytalloc_get_ptr(obj);
   10939           0 :         PyObject *py_decompressed_length;
   10940           0 :         py_decompressed_length = PyLong_FromUnsignedLongLong((uint32_t)(object->decompressed_length));
   10941           0 :         return py_decompressed_length;
   10942             : }
   10943             : 
   10944           0 : static int py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
   10945             : {
   10946           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *object = pytalloc_get_ptr(py_obj);
   10947           0 :         if (value == NULL) {
   10948           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->decompressed_length");
   10949           0 :                 return -1;
   10950             :         }
   10951             :         {
   10952           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->decompressed_length));
   10953           0 :                 if (PyLong_Check(value)) {
   10954           0 :                         unsigned long long test_var;
   10955           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10956           0 :                         if (PyErr_Occurred() != NULL) {
   10957           0 :                                 return -1;
   10958             :                         }
   10959           0 :                         if (test_var > uint_max) {
   10960           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10961             :                                   PyLong_Type.tp_name, uint_max, test_var);
   10962           0 :                                 return -1;
   10963             :                         }
   10964           0 :                         object->decompressed_length = test_var;
   10965             :                 } else {
   10966           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   10967             :                           PyLong_Type.tp_name);
   10968           0 :                         return -1;
   10969             :                 }
   10970             :         }
   10971           0 :         return 0;
   10972             : }
   10973             : 
   10974           0 : static PyObject *py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_get_compressed_length(PyObject *obj, void *closure)
   10975             : {
   10976           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *object = pytalloc_get_ptr(obj);
   10977           0 :         PyObject *py_compressed_length;
   10978           0 :         py_compressed_length = PyLong_FromUnsignedLongLong((uint32_t)(object->compressed_length));
   10979           0 :         return py_compressed_length;
   10980             : }
   10981             : 
   10982           0 : static int py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
   10983             : {
   10984           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *object = pytalloc_get_ptr(py_obj);
   10985           0 :         if (value == NULL) {
   10986           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->compressed_length");
   10987           0 :                 return -1;
   10988             :         }
   10989             :         {
   10990           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compressed_length));
   10991           0 :                 if (PyLong_Check(value)) {
   10992           0 :                         unsigned long long test_var;
   10993           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   10994           0 :                         if (PyErr_Occurred() != NULL) {
   10995           0 :                                 return -1;
   10996             :                         }
   10997           0 :                         if (test_var > uint_max) {
   10998           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   10999             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11000           0 :                                 return -1;
   11001             :                         }
   11002           0 :                         object->compressed_length = test_var;
   11003             :                 } else {
   11004           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11005             :                           PyLong_Type.tp_name);
   11006           0 :                         return -1;
   11007             :                 }
   11008             :         }
   11009           0 :         return 0;
   11010             : }
   11011             : 
   11012           0 : static PyObject *py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_get_ts(PyObject *obj, void *closure)
   11013             : {
   11014           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *object = pytalloc_get_ptr(obj);
   11015           0 :         PyObject *py_ts;
   11016           0 :         if (object->ts == NULL) {
   11017           0 :                 Py_RETURN_NONE;
   11018             :         }
   11019           0 :         if (object->ts == NULL) {
   11020           0 :                 py_ts = Py_None;
   11021           0 :                 Py_INCREF(py_ts);
   11022             :         } else {
   11023           0 :                 py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1TS_Type, object->ts, object->ts);
   11024             :         }
   11025           0 :         return py_ts;
   11026             : }
   11027             : 
   11028           0 : static int py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_set_ts(PyObject *py_obj, PyObject *value, void *closure)
   11029             : {
   11030           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *object = pytalloc_get_ptr(py_obj);
   11031           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ts));
   11032           0 :         if (value == NULL) {
   11033           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ts");
   11034           0 :                 return -1;
   11035             :         }
   11036           0 :         if (value == Py_None) {
   11037           0 :                 object->ts = NULL;
   11038             :         } else {
   11039           0 :                 object->ts = NULL;
   11040           0 :                 PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1TS_Type, value, return -1;);
   11041           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11042           0 :                         PyErr_NoMemory();
   11043           0 :                         return -1;
   11044             :                 }
   11045           0 :                 object->ts = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(value);
   11046             :         }
   11047           0 :         return 0;
   11048             : }
   11049             : 
   11050             : static PyGetSetDef py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_getsetters[] = {
   11051             :         {
   11052             :                 .name = discard_const_p(char, "decompressed_length"),
   11053             :                 .get = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_get_decompressed_length,
   11054             :                 .set = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_set_decompressed_length,
   11055             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11056             :         },
   11057             :         {
   11058             :                 .name = discard_const_p(char, "compressed_length"),
   11059             :                 .get = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_get_compressed_length,
   11060             :                 .set = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_set_compressed_length,
   11061             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11062             :         },
   11063             :         {
   11064             :                 .name = discard_const_p(char, "ts"),
   11065             :                 .get = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_get_ts,
   11066             :                 .set = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_set_ts,
   11067             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr1TS")
   11068             :         },
   11069             :         { .name = NULL }
   11070             : };
   11071             : 
   11072           0 : static PyObject *py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11073             : {
   11074           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1, type);
   11075             : }
   11076             : 
   11077             : 
   11078             : static PyTypeObject drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type = {
   11079             :         PyVarObject_HEAD_INIT(NULL, 0)
   11080             :         .tp_name = "drsuapi.DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1",
   11081             :         .tp_getset = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_getsetters,
   11082             :         .tp_methods = NULL,
   11083             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11084             :         .tp_new = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_new,
   11085             : };
   11086             : 
   11087             : 
   11088           0 : static PyObject *py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_get_decompressed_length(PyObject *obj, void *closure)
   11089             : {
   11090           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *object = pytalloc_get_ptr(obj);
   11091           0 :         PyObject *py_decompressed_length;
   11092           0 :         py_decompressed_length = PyLong_FromUnsignedLongLong((uint32_t)(object->decompressed_length));
   11093           0 :         return py_decompressed_length;
   11094             : }
   11095             : 
   11096           0 : static int py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
   11097             : {
   11098           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *object = pytalloc_get_ptr(py_obj);
   11099           0 :         if (value == NULL) {
   11100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->decompressed_length");
   11101           0 :                 return -1;
   11102             :         }
   11103             :         {
   11104           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->decompressed_length));
   11105           0 :                 if (PyLong_Check(value)) {
   11106           0 :                         unsigned long long test_var;
   11107           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11108           0 :                         if (PyErr_Occurred() != NULL) {
   11109           0 :                                 return -1;
   11110             :                         }
   11111           0 :                         if (test_var > uint_max) {
   11112           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11113             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11114           0 :                                 return -1;
   11115             :                         }
   11116           0 :                         object->decompressed_length = test_var;
   11117             :                 } else {
   11118           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11119             :                           PyLong_Type.tp_name);
   11120           0 :                         return -1;
   11121             :                 }
   11122             :         }
   11123           0 :         return 0;
   11124             : }
   11125             : 
   11126           0 : static PyObject *py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_get_compressed_length(PyObject *obj, void *closure)
   11127             : {
   11128           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *object = pytalloc_get_ptr(obj);
   11129           0 :         PyObject *py_compressed_length;
   11130           0 :         py_compressed_length = PyLong_FromUnsignedLongLong((uint32_t)(object->compressed_length));
   11131           0 :         return py_compressed_length;
   11132             : }
   11133             : 
   11134           0 : static int py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
   11135             : {
   11136           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *object = pytalloc_get_ptr(py_obj);
   11137           0 :         if (value == NULL) {
   11138           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->compressed_length");
   11139           0 :                 return -1;
   11140             :         }
   11141             :         {
   11142           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compressed_length));
   11143           0 :                 if (PyLong_Check(value)) {
   11144           0 :                         unsigned long long test_var;
   11145           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11146           0 :                         if (PyErr_Occurred() != NULL) {
   11147           0 :                                 return -1;
   11148             :                         }
   11149           0 :                         if (test_var > uint_max) {
   11150           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11151             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11152           0 :                                 return -1;
   11153             :                         }
   11154           0 :                         object->compressed_length = test_var;
   11155             :                 } else {
   11156           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11157             :                           PyLong_Type.tp_name);
   11158           0 :                         return -1;
   11159             :                 }
   11160             :         }
   11161           0 :         return 0;
   11162             : }
   11163             : 
   11164           0 : static PyObject *py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_get_ts(PyObject *obj, void *closure)
   11165             : {
   11166           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *object = pytalloc_get_ptr(obj);
   11167           0 :         PyObject *py_ts;
   11168           0 :         if (object->ts == NULL) {
   11169           0 :                 Py_RETURN_NONE;
   11170             :         }
   11171           0 :         if (object->ts == NULL) {
   11172           0 :                 py_ts = Py_None;
   11173           0 :                 Py_INCREF(py_ts);
   11174             :         } else {
   11175           0 :                 py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6TS_Type, object->ts, object->ts);
   11176             :         }
   11177           0 :         return py_ts;
   11178             : }
   11179             : 
   11180           0 : static int py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_set_ts(PyObject *py_obj, PyObject *value, void *closure)
   11181             : {
   11182           0 :         struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *object = pytalloc_get_ptr(py_obj);
   11183           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ts));
   11184           0 :         if (value == NULL) {
   11185           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ts");
   11186           0 :                 return -1;
   11187             :         }
   11188           0 :         if (value == Py_None) {
   11189           0 :                 object->ts = NULL;
   11190             :         } else {
   11191           0 :                 object->ts = NULL;
   11192           0 :                 PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6TS_Type, value, return -1;);
   11193           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11194           0 :                         PyErr_NoMemory();
   11195           0 :                         return -1;
   11196             :                 }
   11197           0 :                 object->ts = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(value);
   11198             :         }
   11199           0 :         return 0;
   11200             : }
   11201             : 
   11202             : static PyGetSetDef py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_getsetters[] = {
   11203             :         {
   11204             :                 .name = discard_const_p(char, "decompressed_length"),
   11205             :                 .get = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_get_decompressed_length,
   11206             :                 .set = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_set_decompressed_length,
   11207             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11208             :         },
   11209             :         {
   11210             :                 .name = discard_const_p(char, "compressed_length"),
   11211             :                 .get = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_get_compressed_length,
   11212             :                 .set = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_set_compressed_length,
   11213             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11214             :         },
   11215             :         {
   11216             :                 .name = discard_const_p(char, "ts"),
   11217             :                 .get = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_get_ts,
   11218             :                 .set = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_set_ts,
   11219             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr6TS")
   11220             :         },
   11221             :         { .name = NULL }
   11222             : };
   11223             : 
   11224           0 : static PyObject *py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11225             : {
   11226           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6, type);
   11227             : }
   11228             : 
   11229             : 
   11230             : static PyTypeObject drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type = {
   11231             :         PyVarObject_HEAD_INIT(NULL, 0)
   11232             :         .tp_name = "drsuapi.DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6",
   11233             :         .tp_getset = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_getsetters,
   11234             :         .tp_methods = NULL,
   11235             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11236             :         .tp_new = py_drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_new,
   11237             : };
   11238             : 
   11239           0 : static PyObject *py_import_drsuapi_DsGetNCChangesCompressedCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesCompressedCtr *in)
   11240             : {
   11241           0 :         PyObject *ret;
   11242             : 
   11243           0 :         switch (level) {
   11244           0 :                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
   11245           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, mem_ctx, &in->mszip1);
   11246           0 :                         return ret;
   11247             : 
   11248           0 :                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
   11249           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr6_Type, mem_ctx, &in->mszip6);
   11250           0 :                         return ret;
   11251             : 
   11252           0 :                 case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
   11253           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type, mem_ctx, &in->xpress1);
   11254           0 :                         return ret;
   11255             : 
   11256           0 :                 case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
   11257           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type, mem_ctx, &in->xpress6);
   11258           0 :                         return ret;
   11259             : 
   11260             :         }
   11261           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   11262           0 :         return NULL;
   11263             : }
   11264             : 
   11265           0 : static union drsuapi_DsGetNCChangesCompressedCtr *py_export_drsuapi_DsGetNCChangesCompressedCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   11266             : {
   11267           0 :         union drsuapi_DsGetNCChangesCompressedCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesCompressedCtr);
   11268           0 :         switch (level) {
   11269           0 :                 case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
   11270           0 :                         if (in == NULL) {
   11271           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->mszip1");
   11272           0 :                                 talloc_free(ret); return NULL;
   11273             :                         }
   11274           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, in, talloc_free(ret); return NULL;);
   11275           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11276           0 :                                 PyErr_NoMemory();
   11277           0 :                                 talloc_free(ret); return NULL;
   11278             :                         }
   11279           0 :                         ret->mszip1 = *(struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(in);
   11280           0 :                         break;
   11281             : 
   11282           0 :                 case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
   11283           0 :                         if (in == NULL) {
   11284           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->mszip6");
   11285           0 :                                 talloc_free(ret); return NULL;
   11286             :                         }
   11287           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr6_Type, in, talloc_free(ret); return NULL;);
   11288           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11289           0 :                                 PyErr_NoMemory();
   11290           0 :                                 talloc_free(ret); return NULL;
   11291             :                         }
   11292           0 :                         ret->mszip6 = *(struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(in);
   11293           0 :                         break;
   11294             : 
   11295           0 :                 case 1|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
   11296           0 :                         if (in == NULL) {
   11297           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->xpress1");
   11298           0 :                                 talloc_free(ret); return NULL;
   11299             :                         }
   11300           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type, in, talloc_free(ret); return NULL;);
   11301           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11302           0 :                                 PyErr_NoMemory();
   11303           0 :                                 talloc_free(ret); return NULL;
   11304             :                         }
   11305           0 :                         ret->xpress1 = *(struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1 *)pytalloc_get_ptr(in);
   11306           0 :                         break;
   11307             : 
   11308           0 :                 case 6|(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2<<16):
   11309           0 :                         if (in == NULL) {
   11310           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->xpress6");
   11311           0 :                                 talloc_free(ret); return NULL;
   11312             :                         }
   11313           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type, in, talloc_free(ret); return NULL;);
   11314           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11315           0 :                                 PyErr_NoMemory();
   11316           0 :                                 talloc_free(ret); return NULL;
   11317             :                         }
   11318           0 :                         ret->xpress6 = *(struct drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6 *)pytalloc_get_ptr(in);
   11319           0 :                         break;
   11320             : 
   11321           0 :                 default:
   11322           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   11323           0 :                         talloc_free(ret);
   11324           0 :                         ret = NULL;
   11325             :         }
   11326             : 
   11327           0 :         return ret;
   11328             : }
   11329             : 
   11330           0 : static PyObject *py_drsuapi_DsGetNCChangesCompressedCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11331             : {
   11332           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   11333           0 :         PyObject *mem_ctx_obj = NULL;
   11334           0 :         TALLOC_CTX *mem_ctx = NULL;
   11335           0 :         int level = 0;
   11336           0 :         PyObject *in_obj = NULL;
   11337           0 :         union drsuapi_DsGetNCChangesCompressedCtr *in = NULL;
   11338             : 
   11339           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   11340             :                 discard_const_p(char *, kwnames),
   11341             :                 &mem_ctx_obj,
   11342             :                 &level,
   11343             :                 &in_obj)) {
   11344           0 :                 return NULL;
   11345             :         }
   11346           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   11347           0 :         if (mem_ctx == NULL) {
   11348           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   11349           0 :                 return NULL;
   11350             :         }
   11351           0 :         in = (union drsuapi_DsGetNCChangesCompressedCtr *)pytalloc_get_ptr(in_obj);
   11352           0 :         if (in == NULL) {
   11353           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNCChangesCompressedCtr!");
   11354           0 :                 return NULL;
   11355             :         }
   11356             : 
   11357           0 :         return py_import_drsuapi_DsGetNCChangesCompressedCtr(mem_ctx, level, in);
   11358             : }
   11359             : 
   11360           0 : static PyObject *py_drsuapi_DsGetNCChangesCompressedCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11361             : {
   11362           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   11363           0 :         PyObject *mem_ctx_obj = NULL;
   11364           0 :         TALLOC_CTX *mem_ctx = NULL;
   11365           0 :         int level = 0;
   11366           0 :         PyObject *in = NULL;
   11367           0 :         union drsuapi_DsGetNCChangesCompressedCtr *out = NULL;
   11368             : 
   11369           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   11370             :                 discard_const_p(char *, kwnames),
   11371             :                 &mem_ctx_obj,
   11372             :                 &level,
   11373             :                 &in)) {
   11374           0 :                 return NULL;
   11375             :         }
   11376           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   11377           0 :         if (mem_ctx == NULL) {
   11378           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   11379           0 :                 return NULL;
   11380             :         }
   11381             : 
   11382           0 :         out = py_export_drsuapi_DsGetNCChangesCompressedCtr(mem_ctx, level, in);
   11383           0 :         if (out == NULL) {
   11384           0 :                 return NULL;
   11385             :         }
   11386             : 
   11387           0 :         return pytalloc_GenericObject_reference(out);
   11388             : }
   11389             : 
   11390             : static PyMethodDef py_drsuapi_DsGetNCChangesCompressedCtr_methods[] = {
   11391             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCompressedCtr_import),
   11392             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   11393             :                 "T.__import__(mem_ctx, level, in) => ret." },
   11394             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCompressedCtr_export),
   11395             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   11396             :                 "T.__export__(mem_ctx, level, in) => ret." },
   11397             :         { NULL, NULL, 0, NULL }
   11398             : };
   11399             : 
   11400           0 : static PyObject *py_drsuapi_DsGetNCChangesCompressedCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11401             : {
   11402           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   11403           0 :         return NULL;
   11404             : }
   11405             : 
   11406             : 
   11407             : static PyTypeObject drsuapi_DsGetNCChangesCompressedCtr_Type = {
   11408             :         PyVarObject_HEAD_INIT(NULL, 0)
   11409             :         .tp_name = "drsuapi.DsGetNCChangesCompressedCtr",
   11410             :         .tp_getset = NULL,
   11411             :         .tp_methods = py_drsuapi_DsGetNCChangesCompressedCtr_methods,
   11412             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11413             :         .tp_new = py_drsuapi_DsGetNCChangesCompressedCtr_new,
   11414             : };
   11415             : 
   11416             : 
   11417           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr2_get_mszip1(PyObject *obj, void *closure)
   11418             : {
   11419           0 :         struct drsuapi_DsGetNCChangesCtr2 *object = pytalloc_get_ptr(obj);
   11420           0 :         PyObject *py_mszip1;
   11421           0 :         py_mszip1 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, pytalloc_get_mem_ctx(obj), &object->mszip1);
   11422           0 :         return py_mszip1;
   11423             : }
   11424             : 
   11425           0 : static int py_drsuapi_DsGetNCChangesCtr2_set_mszip1(PyObject *py_obj, PyObject *value, void *closure)
   11426             : {
   11427           0 :         struct drsuapi_DsGetNCChangesCtr2 *object = pytalloc_get_ptr(py_obj);
   11428           0 :         if (value == NULL) {
   11429           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mszip1");
   11430           0 :                 return -1;
   11431             :         }
   11432           0 :         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, value, return -1;);
   11433           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11434           0 :                 PyErr_NoMemory();
   11435           0 :                 return -1;
   11436             :         }
   11437           0 :         object->mszip1 = *(struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(value);
   11438           0 :         return 0;
   11439             : }
   11440             : 
   11441             : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr2_getsetters[] = {
   11442             :         {
   11443             :                 .name = discard_const_p(char, "mszip1"),
   11444             :                 .get = py_drsuapi_DsGetNCChangesCtr2_get_mszip1,
   11445             :                 .set = py_drsuapi_DsGetNCChangesCtr2_set_mszip1,
   11446             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesMSZIPCtr1")
   11447             :         },
   11448             :         { .name = NULL }
   11449             : };
   11450             : 
   11451           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11452             : {
   11453           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesCtr2, type);
   11454             : }
   11455             : 
   11456             : 
   11457             : static PyTypeObject drsuapi_DsGetNCChangesCtr2_Type = {
   11458             :         PyVarObject_HEAD_INIT(NULL, 0)
   11459             :         .tp_name = "drsuapi.DsGetNCChangesCtr2",
   11460             :         .tp_getset = py_drsuapi_DsGetNCChangesCtr2_getsetters,
   11461             :         .tp_methods = NULL,
   11462             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11463             :         .tp_new = py_drsuapi_DsGetNCChangesCtr2_new,
   11464             : };
   11465             : 
   11466             : 
   11467           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr7_get_level(PyObject *obj, void *closure)
   11468             : {
   11469           0 :         struct drsuapi_DsGetNCChangesCtr7 *object = pytalloc_get_ptr(obj);
   11470           0 :         PyObject *py_level;
   11471           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
   11472           0 :         return py_level;
   11473             : }
   11474             : 
   11475           0 : static int py_drsuapi_DsGetNCChangesCtr7_set_level(PyObject *py_obj, PyObject *value, void *closure)
   11476             : {
   11477           0 :         struct drsuapi_DsGetNCChangesCtr7 *object = pytalloc_get_ptr(py_obj);
   11478           0 :         if (value == NULL) {
   11479           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
   11480           0 :                 return -1;
   11481             :         }
   11482             :         {
   11483           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
   11484           0 :                 if (PyLong_Check(value)) {
   11485           0 :                         unsigned long long test_var;
   11486           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11487           0 :                         if (PyErr_Occurred() != NULL) {
   11488           0 :                                 return -1;
   11489             :                         }
   11490           0 :                         if (test_var > uint_max) {
   11491           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11492             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11493           0 :                                 return -1;
   11494             :                         }
   11495           0 :                         object->level = test_var;
   11496             :                 } else {
   11497           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11498             :                           PyLong_Type.tp_name);
   11499           0 :                         return -1;
   11500             :                 }
   11501             :         }
   11502           0 :         return 0;
   11503             : }
   11504             : 
   11505           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr7_get_type(PyObject *obj, void *closure)
   11506             : {
   11507           0 :         struct drsuapi_DsGetNCChangesCtr7 *object = pytalloc_get_ptr(obj);
   11508           0 :         PyObject *py_type;
   11509           0 :         py_type = PyLong_FromLong((uint16_t)(object->type));
   11510           0 :         return py_type;
   11511             : }
   11512             : 
   11513           0 : static int py_drsuapi_DsGetNCChangesCtr7_set_type(PyObject *py_obj, PyObject *value, void *closure)
   11514             : {
   11515           0 :         struct drsuapi_DsGetNCChangesCtr7 *object = pytalloc_get_ptr(py_obj);
   11516           0 :         if (value == NULL) {
   11517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
   11518           0 :                 return -1;
   11519             :         }
   11520             :         {
   11521           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
   11522           0 :                 if (PyLong_Check(value)) {
   11523           0 :                         unsigned long long test_var;
   11524           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11525           0 :                         if (PyErr_Occurred() != NULL) {
   11526           0 :                                 return -1;
   11527             :                         }
   11528           0 :                         if (test_var > uint_max) {
   11529           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11530             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11531           0 :                                 return -1;
   11532             :                         }
   11533           0 :                         object->type = test_var;
   11534             :                 } else {
   11535           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11536             :                           PyLong_Type.tp_name);
   11537           0 :                         return -1;
   11538             :                 }
   11539             :         }
   11540           0 :         return 0;
   11541             : }
   11542             : 
   11543           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr7_get_ctr(PyObject *obj, void *closure)
   11544             : {
   11545           0 :         struct drsuapi_DsGetNCChangesCtr7 *object = pytalloc_get_ptr(obj);
   11546           0 :         PyObject *py_ctr;
   11547           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetNCChangesCompressedCtr_Type, pytalloc_get_mem_ctx(obj), object->level | (object->type << 16), &object->ctr, "union drsuapi_DsGetNCChangesCompressedCtr");
   11548           0 :         if (py_ctr == NULL) {
   11549           0 :                 return NULL;
   11550             :         }
   11551           0 :         return py_ctr;
   11552             : }
   11553             : 
   11554           0 : static int py_drsuapi_DsGetNCChangesCtr7_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   11555             : {
   11556           0 :         struct drsuapi_DsGetNCChangesCtr7 *object = pytalloc_get_ptr(py_obj);
   11557           0 :         if (value == NULL) {
   11558           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
   11559           0 :                 return -1;
   11560             :         }
   11561             :         {
   11562           0 :                 union drsuapi_DsGetNCChangesCompressedCtr *ctr_switch_0;
   11563           0 :                 ctr_switch_0 = (union drsuapi_DsGetNCChangesCompressedCtr *)pyrpc_export_union(&drsuapi_DsGetNCChangesCompressedCtr_Type, pytalloc_get_mem_ctx(py_obj), object->level | (object->type << 16), value, "union drsuapi_DsGetNCChangesCompressedCtr");
   11564           0 :                 if (ctr_switch_0 == NULL) {
   11565           0 :                         return -1;
   11566             :                 }
   11567           0 :                 object->ctr = *ctr_switch_0;
   11568             :         }
   11569           0 :         return 0;
   11570             : }
   11571             : 
   11572             : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr7_getsetters[] = {
   11573             :         {
   11574             :                 .name = discard_const_p(char, "level"),
   11575             :                 .get = py_drsuapi_DsGetNCChangesCtr7_get_level,
   11576             :                 .set = py_drsuapi_DsGetNCChangesCtr7_set_level,
   11577             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   11578             :         },
   11579             :         {
   11580             :                 .name = discard_const_p(char, "type"),
   11581             :                 .get = py_drsuapi_DsGetNCChangesCtr7_get_type,
   11582             :                 .set = py_drsuapi_DsGetNCChangesCtr7_set_type,
   11583             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCompressionType")
   11584             :         },
   11585             :         {
   11586             :                 .name = discard_const_p(char, "ctr"),
   11587             :                 .get = py_drsuapi_DsGetNCChangesCtr7_get_ctr,
   11588             :                 .set = py_drsuapi_DsGetNCChangesCtr7_set_ctr,
   11589             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCompressedCtr")
   11590             :         },
   11591             :         { .name = NULL }
   11592             : };
   11593             : 
   11594           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr7_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11595             : {
   11596           0 :         return pytalloc_new(struct drsuapi_DsGetNCChangesCtr7, type);
   11597             : }
   11598             : 
   11599             : 
   11600             : static PyTypeObject drsuapi_DsGetNCChangesCtr7_Type = {
   11601             :         PyVarObject_HEAD_INIT(NULL, 0)
   11602             :         .tp_name = "drsuapi.DsGetNCChangesCtr7",
   11603             :         .tp_getset = py_drsuapi_DsGetNCChangesCtr7_getsetters,
   11604             :         .tp_methods = NULL,
   11605             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11606             :         .tp_new = py_drsuapi_DsGetNCChangesCtr7_new,
   11607             : };
   11608             : 
   11609        5455 : static PyObject *py_import_drsuapi_DsGetNCChangesCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesCtr *in)
   11610             : {
   11611           0 :         PyObject *ret;
   11612             : 
   11613        5455 :         switch (level) {
   11614           0 :                 case 1:
   11615           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1_Type, mem_ctx, &in->ctr1);
   11616           0 :                         return ret;
   11617             : 
   11618           0 :                 case 2:
   11619           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr2_Type, mem_ctx, &in->ctr2);
   11620           0 :                         return ret;
   11621             : 
   11622        5455 :                 case 6:
   11623        5455 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6_Type, mem_ctx, &in->ctr6);
   11624        5455 :                         return ret;
   11625             : 
   11626           0 :                 case 7:
   11627           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr7_Type, mem_ctx, &in->ctr7);
   11628           0 :                         return ret;
   11629             : 
   11630             :         }
   11631           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   11632           0 :         return NULL;
   11633             : }
   11634             : 
   11635           0 : static union drsuapi_DsGetNCChangesCtr *py_export_drsuapi_DsGetNCChangesCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   11636             : {
   11637           0 :         union drsuapi_DsGetNCChangesCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesCtr);
   11638           0 :         switch (level) {
   11639           0 :                 case 1:
   11640           0 :                         if (in == NULL) {
   11641           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   11642           0 :                                 talloc_free(ret); return NULL;
   11643             :                         }
   11644           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1_Type, in, talloc_free(ret); return NULL;);
   11645           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11646           0 :                                 PyErr_NoMemory();
   11647           0 :                                 talloc_free(ret); return NULL;
   11648             :                         }
   11649           0 :                         ret->ctr1 = *(struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(in);
   11650           0 :                         break;
   11651             : 
   11652           0 :                 case 2:
   11653           0 :                         if (in == NULL) {
   11654           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
   11655           0 :                                 talloc_free(ret); return NULL;
   11656             :                         }
   11657           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr2_Type, in, talloc_free(ret); return NULL;);
   11658           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11659           0 :                                 PyErr_NoMemory();
   11660           0 :                                 talloc_free(ret); return NULL;
   11661             :                         }
   11662           0 :                         ret->ctr2 = *(struct drsuapi_DsGetNCChangesCtr2 *)pytalloc_get_ptr(in);
   11663           0 :                         break;
   11664             : 
   11665           0 :                 case 6:
   11666           0 :                         if (in == NULL) {
   11667           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr6");
   11668           0 :                                 talloc_free(ret); return NULL;
   11669             :                         }
   11670           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6_Type, in, talloc_free(ret); return NULL;);
   11671           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11672           0 :                                 PyErr_NoMemory();
   11673           0 :                                 talloc_free(ret); return NULL;
   11674             :                         }
   11675           0 :                         ret->ctr6 = *(struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(in);
   11676           0 :                         break;
   11677             : 
   11678           0 :                 case 7:
   11679           0 :                         if (in == NULL) {
   11680           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr7");
   11681           0 :                                 talloc_free(ret); return NULL;
   11682             :                         }
   11683           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr7_Type, in, talloc_free(ret); return NULL;);
   11684           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   11685           0 :                                 PyErr_NoMemory();
   11686           0 :                                 talloc_free(ret); return NULL;
   11687             :                         }
   11688           0 :                         ret->ctr7 = *(struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(in);
   11689           0 :                         break;
   11690             : 
   11691           0 :                 default:
   11692           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   11693           0 :                         talloc_free(ret);
   11694           0 :                         ret = NULL;
   11695             :         }
   11696             : 
   11697           0 :         return ret;
   11698             : }
   11699             : 
   11700        5455 : static PyObject *py_drsuapi_DsGetNCChangesCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11701             : {
   11702        5455 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   11703        5455 :         PyObject *mem_ctx_obj = NULL;
   11704        5455 :         TALLOC_CTX *mem_ctx = NULL;
   11705        5455 :         int level = 0;
   11706        5455 :         PyObject *in_obj = NULL;
   11707        5455 :         union drsuapi_DsGetNCChangesCtr *in = NULL;
   11708             : 
   11709        5455 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   11710             :                 discard_const_p(char *, kwnames),
   11711             :                 &mem_ctx_obj,
   11712             :                 &level,
   11713             :                 &in_obj)) {
   11714           0 :                 return NULL;
   11715             :         }
   11716        5455 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   11717        5455 :         if (mem_ctx == NULL) {
   11718           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   11719           0 :                 return NULL;
   11720             :         }
   11721        5455 :         in = (union drsuapi_DsGetNCChangesCtr *)pytalloc_get_ptr(in_obj);
   11722        5455 :         if (in == NULL) {
   11723           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNCChangesCtr!");
   11724           0 :                 return NULL;
   11725             :         }
   11726             : 
   11727        5455 :         return py_import_drsuapi_DsGetNCChangesCtr(mem_ctx, level, in);
   11728             : }
   11729             : 
   11730           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11731             : {
   11732           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   11733           0 :         PyObject *mem_ctx_obj = NULL;
   11734           0 :         TALLOC_CTX *mem_ctx = NULL;
   11735           0 :         int level = 0;
   11736           0 :         PyObject *in = NULL;
   11737           0 :         union drsuapi_DsGetNCChangesCtr *out = NULL;
   11738             : 
   11739           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   11740             :                 discard_const_p(char *, kwnames),
   11741             :                 &mem_ctx_obj,
   11742             :                 &level,
   11743             :                 &in)) {
   11744           0 :                 return NULL;
   11745             :         }
   11746           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   11747           0 :         if (mem_ctx == NULL) {
   11748           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   11749           0 :                 return NULL;
   11750             :         }
   11751             : 
   11752           0 :         out = py_export_drsuapi_DsGetNCChangesCtr(mem_ctx, level, in);
   11753           0 :         if (out == NULL) {
   11754           0 :                 return NULL;
   11755             :         }
   11756             : 
   11757           0 :         return pytalloc_GenericObject_reference(out);
   11758             : }
   11759             : 
   11760             : static PyMethodDef py_drsuapi_DsGetNCChangesCtr_methods[] = {
   11761             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCtr_import),
   11762             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   11763             :                 "T.__import__(mem_ctx, level, in) => ret." },
   11764             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCtr_export),
   11765             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   11766             :                 "T.__export__(mem_ctx, level, in) => ret." },
   11767             :         { NULL, NULL, 0, NULL }
   11768             : };
   11769             : 
   11770           0 : static PyObject *py_drsuapi_DsGetNCChangesCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11771             : {
   11772           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   11773           0 :         return NULL;
   11774             : }
   11775             : 
   11776             : 
   11777             : static PyTypeObject drsuapi_DsGetNCChangesCtr_Type = {
   11778             :         PyVarObject_HEAD_INIT(NULL, 0)
   11779             :         .tp_name = "drsuapi.DsGetNCChangesCtr",
   11780             :         .tp_getset = NULL,
   11781             :         .tp_methods = py_drsuapi_DsGetNCChangesCtr_methods,
   11782             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11783             :         .tp_new = py_drsuapi_DsGetNCChangesCtr_new,
   11784             : };
   11785             : 
   11786             : 
   11787         585 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_naming_context(PyObject *obj, void *closure)
   11788             : {
   11789         585 :         struct drsuapi_DsReplicaUpdateRefsRequest1 *object = pytalloc_get_ptr(obj);
   11790           0 :         PyObject *py_naming_context;
   11791         585 :         if (object->naming_context == NULL) {
   11792           0 :                 Py_RETURN_NONE;
   11793             :         }
   11794         585 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
   11795         585 :         return py_naming_context;
   11796             : }
   11797             : 
   11798         195 : static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
   11799             : {
   11800         195 :         struct drsuapi_DsReplicaUpdateRefsRequest1 *object = pytalloc_get_ptr(py_obj);
   11801         195 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
   11802         195 :         if (value == NULL) {
   11803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
   11804           0 :                 return -1;
   11805             :         }
   11806         195 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
   11807         195 :         if (object->naming_context == NULL) {
   11808           0 :                 PyErr_NoMemory();
   11809           0 :                 return -1;
   11810             :         }
   11811         195 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   11812         195 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11813           0 :                 PyErr_NoMemory();
   11814           0 :                 return -1;
   11815             :         }
   11816         195 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   11817         195 :         return 0;
   11818             : }
   11819             : 
   11820           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_dns_name(PyObject *obj, void *closure)
   11821             : {
   11822           0 :         struct drsuapi_DsReplicaUpdateRefsRequest1 *object = pytalloc_get_ptr(obj);
   11823           0 :         PyObject *py_dest_dsa_dns_name;
   11824           0 :         if (object->dest_dsa_dns_name == NULL) {
   11825           0 :                 Py_RETURN_NONE;
   11826             :         }
   11827           0 :         if (object->dest_dsa_dns_name == NULL) {
   11828           0 :                 py_dest_dsa_dns_name = Py_None;
   11829           0 :                 Py_INCREF(py_dest_dsa_dns_name);
   11830             :         } else {
   11831           0 :                 py_dest_dsa_dns_name = PyUnicode_Decode(object->dest_dsa_dns_name, strlen(object->dest_dsa_dns_name), "utf-8", "ignore");
   11832             :         }
   11833           0 :         return py_dest_dsa_dns_name;
   11834             : }
   11835             : 
   11836         195 : static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_dns_name(PyObject *py_obj, PyObject *value, void *closure)
   11837             : {
   11838         195 :         struct drsuapi_DsReplicaUpdateRefsRequest1 *object = pytalloc_get_ptr(py_obj);
   11839         195 :         if (value == NULL) {
   11840           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dest_dsa_dns_name");
   11841           0 :                 return -1;
   11842             :         }
   11843         195 :         object->dest_dsa_dns_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->dest_dsa_dns_name);
   11844         195 :         if (object->dest_dsa_dns_name == NULL) {
   11845           0 :                 PyErr_NoMemory();
   11846           0 :                 return -1;
   11847             :         }
   11848             :         {
   11849           0 :                 const char *test_str;
   11850           0 :                 const char *talloc_str;
   11851         195 :                 PyObject *unicode = NULL;
   11852         195 :                 if (PyUnicode_Check(value)) {
   11853         195 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   11854         195 :                         if (unicode == NULL) {
   11855           0 :                                 return -1;
   11856             :                         }
   11857         195 :                         test_str = PyBytes_AS_STRING(unicode);
   11858           0 :                 } else if (PyBytes_Check(value)) {
   11859           0 :                         test_str = PyBytes_AS_STRING(value);
   11860             :                 } else {
   11861           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   11862           0 :                         return -1;
   11863             :                 }
   11864         195 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   11865         195 :                 if (unicode != NULL) {
   11866         180 :                         Py_DECREF(unicode);
   11867             :                 }
   11868         195 :                 if (talloc_str == NULL) {
   11869           0 :                         PyErr_NoMemory();
   11870           0 :                         return -1;
   11871             :                 }
   11872         195 :                 object->dest_dsa_dns_name = talloc_str;
   11873             :         }
   11874         195 :         return 0;
   11875             : }
   11876             : 
   11877           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_guid(PyObject *obj, void *closure)
   11878             : {
   11879           0 :         struct drsuapi_DsReplicaUpdateRefsRequest1 *object = pytalloc_get_ptr(obj);
   11880           0 :         PyObject *py_dest_dsa_guid;
   11881           0 :         py_dest_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->dest_dsa_guid);
   11882           0 :         return py_dest_dsa_guid;
   11883             : }
   11884             : 
   11885         195 : static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
   11886             : {
   11887         195 :         struct drsuapi_DsReplicaUpdateRefsRequest1 *object = pytalloc_get_ptr(py_obj);
   11888         195 :         if (value == NULL) {
   11889           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dest_dsa_guid");
   11890           0 :                 return -1;
   11891             :         }
   11892         195 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   11893         195 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   11894           0 :                 PyErr_NoMemory();
   11895           0 :                 return -1;
   11896             :         }
   11897         195 :         object->dest_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
   11898         195 :         return 0;
   11899             : }
   11900             : 
   11901         170 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_options(PyObject *obj, void *closure)
   11902             : {
   11903         170 :         struct drsuapi_DsReplicaUpdateRefsRequest1 *object = pytalloc_get_ptr(obj);
   11904           0 :         PyObject *py_options;
   11905         170 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)(object->options));
   11906         170 :         return py_options;
   11907             : }
   11908             : 
   11909         365 : static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
   11910             : {
   11911         365 :         struct drsuapi_DsReplicaUpdateRefsRequest1 *object = pytalloc_get_ptr(py_obj);
   11912         365 :         if (value == NULL) {
   11913           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
   11914           0 :                 return -1;
   11915             :         }
   11916             :         {
   11917         365 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
   11918         365 :                 if (PyLong_Check(value)) {
   11919           0 :                         unsigned long long test_var;
   11920         365 :                         test_var = PyLong_AsUnsignedLongLong(value);
   11921         365 :                         if (PyErr_Occurred() != NULL) {
   11922           0 :                                 return -1;
   11923             :                         }
   11924         365 :                         if (test_var > uint_max) {
   11925           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   11926             :                                   PyLong_Type.tp_name, uint_max, test_var);
   11927           0 :                                 return -1;
   11928             :                         }
   11929         365 :                         object->options = test_var;
   11930             :                 } else {
   11931           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   11932             :                           PyLong_Type.tp_name);
   11933           0 :                         return -1;
   11934             :                 }
   11935             :         }
   11936         365 :         return 0;
   11937             : }
   11938             : 
   11939             : static PyGetSetDef py_drsuapi_DsReplicaUpdateRefsRequest1_getsetters[] = {
   11940             :         {
   11941             :                 .name = discard_const_p(char, "naming_context"),
   11942             :                 .get = py_drsuapi_DsReplicaUpdateRefsRequest1_get_naming_context,
   11943             :                 .set = py_drsuapi_DsReplicaUpdateRefsRequest1_set_naming_context,
   11944             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   11945             :         },
   11946             :         {
   11947             :                 .name = discard_const_p(char, "dest_dsa_dns_name"),
   11948             :                 .get = py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_dns_name,
   11949             :                 .set = py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_dns_name,
   11950             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   11951             :         },
   11952             :         {
   11953             :                 .name = discard_const_p(char, "dest_dsa_guid"),
   11954             :                 .get = py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_guid,
   11955             :                 .set = py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_guid,
   11956             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   11957             :         },
   11958             :         {
   11959             :                 .name = discard_const_p(char, "options"),
   11960             :                 .get = py_drsuapi_DsReplicaUpdateRefsRequest1_get_options,
   11961             :                 .set = py_drsuapi_DsReplicaUpdateRefsRequest1_set_options,
   11962             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
   11963             :         },
   11964             :         { .name = NULL }
   11965             : };
   11966             : 
   11967         195 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   11968             : {
   11969         195 :         return pytalloc_new(struct drsuapi_DsReplicaUpdateRefsRequest1, type);
   11970             : }
   11971             : 
   11972             : 
   11973             : static PyTypeObject drsuapi_DsReplicaUpdateRefsRequest1_Type = {
   11974             :         PyVarObject_HEAD_INIT(NULL, 0)
   11975             :         .tp_name = "drsuapi.DsReplicaUpdateRefsRequest1",
   11976             :         .tp_getset = py_drsuapi_DsReplicaUpdateRefsRequest1_getsetters,
   11977             :         .tp_methods = NULL,
   11978             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   11979             :         .tp_new = py_drsuapi_DsReplicaUpdateRefsRequest1_new,
   11980             : };
   11981             : 
   11982           0 : static PyObject *py_import_drsuapi_DsReplicaUpdateRefsRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaUpdateRefsRequest *in)
   11983             : {
   11984           0 :         PyObject *ret;
   11985             : 
   11986           0 :         switch (level) {
   11987           0 :                 case 1:
   11988           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsReplicaUpdateRefsRequest1_Type, mem_ctx, &in->req1);
   11989           0 :                         return ret;
   11990             : 
   11991             :         }
   11992           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   11993           0 :         return NULL;
   11994             : }
   11995             : 
   11996         195 : static union drsuapi_DsReplicaUpdateRefsRequest *py_export_drsuapi_DsReplicaUpdateRefsRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   11997             : {
   11998         195 :         union drsuapi_DsReplicaUpdateRefsRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaUpdateRefsRequest);
   11999         195 :         switch (level) {
   12000         195 :                 case 1:
   12001         195 :                         if (in == NULL) {
   12002           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   12003           0 :                                 talloc_free(ret); return NULL;
   12004             :                         }
   12005         195 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaUpdateRefsRequest1_Type, in, talloc_free(ret); return NULL;);
   12006         195 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   12007           0 :                                 PyErr_NoMemory();
   12008           0 :                                 talloc_free(ret); return NULL;
   12009             :                         }
   12010         195 :                         ret->req1 = *(struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(in);
   12011         195 :                         break;
   12012             : 
   12013           0 :                 default:
   12014           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   12015           0 :                         talloc_free(ret);
   12016           0 :                         ret = NULL;
   12017             :         }
   12018             : 
   12019         195 :         return ret;
   12020             : }
   12021             : 
   12022           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12023             : {
   12024           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   12025           0 :         PyObject *mem_ctx_obj = NULL;
   12026           0 :         TALLOC_CTX *mem_ctx = NULL;
   12027           0 :         int level = 0;
   12028           0 :         PyObject *in_obj = NULL;
   12029           0 :         union drsuapi_DsReplicaUpdateRefsRequest *in = NULL;
   12030             : 
   12031           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   12032             :                 discard_const_p(char *, kwnames),
   12033             :                 &mem_ctx_obj,
   12034             :                 &level,
   12035             :                 &in_obj)) {
   12036           0 :                 return NULL;
   12037             :         }
   12038           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   12039           0 :         if (mem_ctx == NULL) {
   12040           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   12041           0 :                 return NULL;
   12042             :         }
   12043           0 :         in = (union drsuapi_DsReplicaUpdateRefsRequest *)pytalloc_get_ptr(in_obj);
   12044           0 :         if (in == NULL) {
   12045           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaUpdateRefsRequest!");
   12046           0 :                 return NULL;
   12047             :         }
   12048             : 
   12049           0 :         return py_import_drsuapi_DsReplicaUpdateRefsRequest(mem_ctx, level, in);
   12050             : }
   12051             : 
   12052         195 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12053             : {
   12054         195 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   12055         195 :         PyObject *mem_ctx_obj = NULL;
   12056         195 :         TALLOC_CTX *mem_ctx = NULL;
   12057         195 :         int level = 0;
   12058         195 :         PyObject *in = NULL;
   12059         195 :         union drsuapi_DsReplicaUpdateRefsRequest *out = NULL;
   12060             : 
   12061         195 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   12062             :                 discard_const_p(char *, kwnames),
   12063             :                 &mem_ctx_obj,
   12064             :                 &level,
   12065             :                 &in)) {
   12066           0 :                 return NULL;
   12067             :         }
   12068         195 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   12069         195 :         if (mem_ctx == NULL) {
   12070           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   12071           0 :                 return NULL;
   12072             :         }
   12073             : 
   12074         195 :         out = py_export_drsuapi_DsReplicaUpdateRefsRequest(mem_ctx, level, in);
   12075         195 :         if (out == NULL) {
   12076           0 :                 return NULL;
   12077             :         }
   12078             : 
   12079         195 :         return pytalloc_GenericObject_reference(out);
   12080             : }
   12081             : 
   12082             : static PyMethodDef py_drsuapi_DsReplicaUpdateRefsRequest_methods[] = {
   12083             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefsRequest_import),
   12084             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   12085             :                 "T.__import__(mem_ctx, level, in) => ret." },
   12086             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefsRequest_export),
   12087             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   12088             :                 "T.__export__(mem_ctx, level, in) => ret." },
   12089             :         { NULL, NULL, 0, NULL }
   12090             : };
   12091             : 
   12092           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12093             : {
   12094           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   12095           0 :         return NULL;
   12096             : }
   12097             : 
   12098             : 
   12099             : static PyTypeObject drsuapi_DsReplicaUpdateRefsRequest_Type = {
   12100             :         PyVarObject_HEAD_INIT(NULL, 0)
   12101             :         .tp_name = "drsuapi.DsReplicaUpdateRefsRequest",
   12102             :         .tp_getset = NULL,
   12103             :         .tp_methods = py_drsuapi_DsReplicaUpdateRefsRequest_methods,
   12104             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12105             :         .tp_new = py_drsuapi_DsReplicaUpdateRefsRequest_new,
   12106             : };
   12107             : 
   12108             : 
   12109           0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_get_naming_context(PyObject *obj, void *closure)
   12110             : {
   12111           0 :         struct drsuapi_DsReplicaAddRequest1 *object = pytalloc_get_ptr(obj);
   12112           0 :         PyObject *py_naming_context;
   12113           0 :         if (object->naming_context == NULL) {
   12114           0 :                 Py_RETURN_NONE;
   12115             :         }
   12116           0 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
   12117           0 :         return py_naming_context;
   12118             : }
   12119             : 
   12120           0 : static int py_drsuapi_DsReplicaAddRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
   12121             : {
   12122           0 :         struct drsuapi_DsReplicaAddRequest1 *object = pytalloc_get_ptr(py_obj);
   12123           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
   12124           0 :         if (value == NULL) {
   12125           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
   12126           0 :                 return -1;
   12127             :         }
   12128           0 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
   12129           0 :         if (object->naming_context == NULL) {
   12130           0 :                 PyErr_NoMemory();
   12131           0 :                 return -1;
   12132             :         }
   12133           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   12134           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12135           0 :                 PyErr_NoMemory();
   12136           0 :                 return -1;
   12137             :         }
   12138           0 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   12139           0 :         return 0;
   12140             : }
   12141             : 
   12142           0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_get_source_dsa_address(PyObject *obj, void *closure)
   12143             : {
   12144           0 :         struct drsuapi_DsReplicaAddRequest1 *object = pytalloc_get_ptr(obj);
   12145           0 :         PyObject *py_source_dsa_address;
   12146           0 :         if (object->source_dsa_address == NULL) {
   12147           0 :                 Py_RETURN_NONE;
   12148             :         }
   12149           0 :         if (object->source_dsa_address == NULL) {
   12150           0 :                 py_source_dsa_address = Py_None;
   12151           0 :                 Py_INCREF(py_source_dsa_address);
   12152             :         } else {
   12153           0 :                 if (object->source_dsa_address == NULL) {
   12154           0 :                         py_source_dsa_address = Py_None;
   12155           0 :                         Py_INCREF(py_source_dsa_address);
   12156             :                 } else {
   12157           0 :                         py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
   12158             :                 }
   12159             :         }
   12160           0 :         return py_source_dsa_address;
   12161             : }
   12162             : 
   12163           0 : static int py_drsuapi_DsReplicaAddRequest1_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
   12164             : {
   12165           0 :         struct drsuapi_DsReplicaAddRequest1 *object = pytalloc_get_ptr(py_obj);
   12166           0 :         if (value == NULL) {
   12167           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_address");
   12168           0 :                 return -1;
   12169             :         }
   12170           0 :         if (value == Py_None) {
   12171           0 :                 object->source_dsa_address = NULL;
   12172             :         } else {
   12173           0 :                 object->source_dsa_address = NULL;
   12174             :                 {
   12175           0 :                         const char *test_str;
   12176           0 :                         const char *talloc_str;
   12177           0 :                         PyObject *unicode = NULL;
   12178           0 :                         if (PyUnicode_Check(value)) {
   12179           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12180           0 :                                 if (unicode == NULL) {
   12181           0 :                                         return -1;
   12182             :                                 }
   12183           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12184           0 :                         } else if (PyBytes_Check(value)) {
   12185           0 :                                 test_str = PyBytes_AS_STRING(value);
   12186             :                         } else {
   12187           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12188           0 :                                 return -1;
   12189             :                         }
   12190           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12191           0 :                         if (unicode != NULL) {
   12192           0 :                                 Py_DECREF(unicode);
   12193             :                         }
   12194           0 :                         if (talloc_str == NULL) {
   12195           0 :                                 PyErr_NoMemory();
   12196           0 :                                 return -1;
   12197             :                         }
   12198           0 :                         object->source_dsa_address = talloc_str;
   12199             :                 }
   12200             :         }
   12201           0 :         return 0;
   12202             : }
   12203             : 
   12204           0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_get_schedule(PyObject *obj, void *closure)
   12205             : {
   12206           0 :         struct drsuapi_DsReplicaAddRequest1 *object = pytalloc_get_ptr(obj);
   12207           0 :         PyObject *py_schedule;
   12208           0 :         py_schedule = PyList_New(84);
   12209           0 :         if (py_schedule == NULL) {
   12210           0 :                 return NULL;
   12211             :         }
   12212             :         {
   12213             :                 int schedule_cntr_0;
   12214           0 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < (84); schedule_cntr_0++) {
   12215           0 :                         PyObject *py_schedule_0;
   12216           0 :                         py_schedule_0 = PyLong_FromLong((uint16_t)((object->schedule)[schedule_cntr_0]));
   12217           0 :                         PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
   12218             :                 }
   12219             :         }
   12220           0 :         return py_schedule;
   12221             : }
   12222             : 
   12223           0 : static int py_drsuapi_DsReplicaAddRequest1_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
   12224             : {
   12225           0 :         struct drsuapi_DsReplicaAddRequest1 *object = pytalloc_get_ptr(py_obj);
   12226           0 :         if (value == NULL) {
   12227           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule");
   12228           0 :                 return -1;
   12229             :         }
   12230           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   12231             :         {
   12232           0 :                 int schedule_cntr_0;
   12233           0 :                 if (ARRAY_SIZE(object->schedule) != PyList_GET_SIZE(value)) {
   12234           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->schedule),  PyList_GET_SIZE(value));
   12235           0 :                         return -1;
   12236             :                 }
   12237           0 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
   12238           0 :                         if (PyList_GET_ITEM(value, schedule_cntr_0) == NULL) {
   12239           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->schedule)[schedule_cntr_0]");
   12240           0 :                                 return -1;
   12241             :                         }
   12242             :                         {
   12243           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->schedule)[schedule_cntr_0]));
   12244           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, schedule_cntr_0))) {
   12245           0 :                                         unsigned long long test_var;
   12246           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, schedule_cntr_0));
   12247           0 :                                         if (PyErr_Occurred() != NULL) {
   12248           0 :                                                 return -1;
   12249             :                                         }
   12250           0 :                                         if (test_var > uint_max) {
   12251           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12252             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   12253           0 :                                                 return -1;
   12254             :                                         }
   12255           0 :                                         (object->schedule)[schedule_cntr_0] = test_var;
   12256             :                                 } else {
   12257           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12258             :                                           PyLong_Type.tp_name);
   12259           0 :                                         return -1;
   12260             :                                 }
   12261             :                         }
   12262             :                 }
   12263             :         }
   12264           0 :         return 0;
   12265             : }
   12266             : 
   12267           0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_get_options(PyObject *obj, void *closure)
   12268             : {
   12269           0 :         struct drsuapi_DsReplicaAddRequest1 *object = pytalloc_get_ptr(obj);
   12270           0 :         PyObject *py_options;
   12271           0 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)(object->options));
   12272           0 :         return py_options;
   12273             : }
   12274             : 
   12275           0 : static int py_drsuapi_DsReplicaAddRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
   12276             : {
   12277           0 :         struct drsuapi_DsReplicaAddRequest1 *object = pytalloc_get_ptr(py_obj);
   12278           0 :         if (value == NULL) {
   12279           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
   12280           0 :                 return -1;
   12281             :         }
   12282             :         {
   12283           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
   12284           0 :                 if (PyLong_Check(value)) {
   12285           0 :                         unsigned long long test_var;
   12286           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12287           0 :                         if (PyErr_Occurred() != NULL) {
   12288           0 :                                 return -1;
   12289             :                         }
   12290           0 :                         if (test_var > uint_max) {
   12291           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12292             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12293           0 :                                 return -1;
   12294             :                         }
   12295           0 :                         object->options = test_var;
   12296             :                 } else {
   12297           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12298             :                           PyLong_Type.tp_name);
   12299           0 :                         return -1;
   12300             :                 }
   12301             :         }
   12302           0 :         return 0;
   12303             : }
   12304             : 
   12305             : static PyGetSetDef py_drsuapi_DsReplicaAddRequest1_getsetters[] = {
   12306             :         {
   12307             :                 .name = discard_const_p(char, "naming_context"),
   12308             :                 .get = py_drsuapi_DsReplicaAddRequest1_get_naming_context,
   12309             :                 .set = py_drsuapi_DsReplicaAddRequest1_set_naming_context,
   12310             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   12311             :         },
   12312             :         {
   12313             :                 .name = discard_const_p(char, "source_dsa_address"),
   12314             :                 .get = py_drsuapi_DsReplicaAddRequest1_get_source_dsa_address,
   12315             :                 .set = py_drsuapi_DsReplicaAddRequest1_set_source_dsa_address,
   12316             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12317             :         },
   12318             :         {
   12319             :                 .name = discard_const_p(char, "schedule"),
   12320             :                 .get = py_drsuapi_DsReplicaAddRequest1_get_schedule,
   12321             :                 .set = py_drsuapi_DsReplicaAddRequest1_set_schedule,
   12322             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12323             :         },
   12324             :         {
   12325             :                 .name = discard_const_p(char, "options"),
   12326             :                 .get = py_drsuapi_DsReplicaAddRequest1_get_options,
   12327             :                 .set = py_drsuapi_DsReplicaAddRequest1_set_options,
   12328             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
   12329             :         },
   12330             :         { .name = NULL }
   12331             : };
   12332             : 
   12333           0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12334             : {
   12335           0 :         return pytalloc_new(struct drsuapi_DsReplicaAddRequest1, type);
   12336             : }
   12337             : 
   12338             : 
   12339             : static PyTypeObject drsuapi_DsReplicaAddRequest1_Type = {
   12340             :         PyVarObject_HEAD_INIT(NULL, 0)
   12341             :         .tp_name = "drsuapi.DsReplicaAddRequest1",
   12342             :         .tp_getset = py_drsuapi_DsReplicaAddRequest1_getsetters,
   12343             :         .tp_methods = NULL,
   12344             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12345             :         .tp_new = py_drsuapi_DsReplicaAddRequest1_new,
   12346             : };
   12347             : 
   12348             : 
   12349           0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_naming_context(PyObject *obj, void *closure)
   12350             : {
   12351           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(obj);
   12352           0 :         PyObject *py_naming_context;
   12353           0 :         if (object->naming_context == NULL) {
   12354           0 :                 Py_RETURN_NONE;
   12355             :         }
   12356           0 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
   12357           0 :         return py_naming_context;
   12358             : }
   12359             : 
   12360           0 : static int py_drsuapi_DsReplicaAddRequest2_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
   12361             : {
   12362           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(py_obj);
   12363           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
   12364           0 :         if (value == NULL) {
   12365           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
   12366           0 :                 return -1;
   12367             :         }
   12368           0 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
   12369           0 :         if (object->naming_context == NULL) {
   12370           0 :                 PyErr_NoMemory();
   12371           0 :                 return -1;
   12372             :         }
   12373           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   12374           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12375           0 :                 PyErr_NoMemory();
   12376           0 :                 return -1;
   12377             :         }
   12378           0 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   12379           0 :         return 0;
   12380             : }
   12381             : 
   12382           0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_source_dsa_dn(PyObject *obj, void *closure)
   12383             : {
   12384           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(obj);
   12385           0 :         PyObject *py_source_dsa_dn;
   12386           0 :         if (object->source_dsa_dn == NULL) {
   12387           0 :                 Py_RETURN_NONE;
   12388             :         }
   12389           0 :         if (object->source_dsa_dn == NULL) {
   12390           0 :                 py_source_dsa_dn = Py_None;
   12391           0 :                 Py_INCREF(py_source_dsa_dn);
   12392             :         } else {
   12393           0 :                 py_source_dsa_dn = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->source_dsa_dn, object->source_dsa_dn);
   12394             :         }
   12395           0 :         return py_source_dsa_dn;
   12396             : }
   12397             : 
   12398           0 : static int py_drsuapi_DsReplicaAddRequest2_set_source_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
   12399             : {
   12400           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(py_obj);
   12401           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->source_dsa_dn));
   12402           0 :         if (value == NULL) {
   12403           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_dn");
   12404           0 :                 return -1;
   12405             :         }
   12406           0 :         if (value == Py_None) {
   12407           0 :                 object->source_dsa_dn = NULL;
   12408             :         } else {
   12409           0 :                 object->source_dsa_dn = NULL;
   12410           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   12411           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12412           0 :                         PyErr_NoMemory();
   12413           0 :                         return -1;
   12414             :                 }
   12415           0 :                 object->source_dsa_dn = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   12416             :         }
   12417           0 :         return 0;
   12418             : }
   12419             : 
   12420           0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_transport_dn(PyObject *obj, void *closure)
   12421             : {
   12422           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(obj);
   12423           0 :         PyObject *py_transport_dn;
   12424           0 :         if (object->transport_dn == NULL) {
   12425           0 :                 Py_RETURN_NONE;
   12426             :         }
   12427           0 :         if (object->transport_dn == NULL) {
   12428           0 :                 py_transport_dn = Py_None;
   12429           0 :                 Py_INCREF(py_transport_dn);
   12430             :         } else {
   12431           0 :                 py_transport_dn = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->transport_dn, object->transport_dn);
   12432             :         }
   12433           0 :         return py_transport_dn;
   12434             : }
   12435             : 
   12436           0 : static int py_drsuapi_DsReplicaAddRequest2_set_transport_dn(PyObject *py_obj, PyObject *value, void *closure)
   12437             : {
   12438           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(py_obj);
   12439           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->transport_dn));
   12440           0 :         if (value == NULL) {
   12441           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport_dn");
   12442           0 :                 return -1;
   12443             :         }
   12444           0 :         if (value == Py_None) {
   12445           0 :                 object->transport_dn = NULL;
   12446             :         } else {
   12447           0 :                 object->transport_dn = NULL;
   12448           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   12449           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12450           0 :                         PyErr_NoMemory();
   12451           0 :                         return -1;
   12452             :                 }
   12453           0 :                 object->transport_dn = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   12454             :         }
   12455           0 :         return 0;
   12456             : }
   12457             : 
   12458           0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_source_dsa_address(PyObject *obj, void *closure)
   12459             : {
   12460           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(obj);
   12461           0 :         PyObject *py_source_dsa_address;
   12462           0 :         if (object->source_dsa_address == NULL) {
   12463           0 :                 Py_RETURN_NONE;
   12464             :         }
   12465           0 :         if (object->source_dsa_address == NULL) {
   12466           0 :                 py_source_dsa_address = Py_None;
   12467           0 :                 Py_INCREF(py_source_dsa_address);
   12468             :         } else {
   12469           0 :                 if (object->source_dsa_address == NULL) {
   12470           0 :                         py_source_dsa_address = Py_None;
   12471           0 :                         Py_INCREF(py_source_dsa_address);
   12472             :                 } else {
   12473           0 :                         py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
   12474             :                 }
   12475             :         }
   12476           0 :         return py_source_dsa_address;
   12477             : }
   12478             : 
   12479           0 : static int py_drsuapi_DsReplicaAddRequest2_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
   12480             : {
   12481           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(py_obj);
   12482           0 :         if (value == NULL) {
   12483           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_address");
   12484           0 :                 return -1;
   12485             :         }
   12486           0 :         if (value == Py_None) {
   12487           0 :                 object->source_dsa_address = NULL;
   12488             :         } else {
   12489           0 :                 object->source_dsa_address = NULL;
   12490             :                 {
   12491           0 :                         const char *test_str;
   12492           0 :                         const char *talloc_str;
   12493           0 :                         PyObject *unicode = NULL;
   12494           0 :                         if (PyUnicode_Check(value)) {
   12495           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12496           0 :                                 if (unicode == NULL) {
   12497           0 :                                         return -1;
   12498             :                                 }
   12499           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12500           0 :                         } else if (PyBytes_Check(value)) {
   12501           0 :                                 test_str = PyBytes_AS_STRING(value);
   12502             :                         } else {
   12503           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12504           0 :                                 return -1;
   12505             :                         }
   12506           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12507           0 :                         if (unicode != NULL) {
   12508           0 :                                 Py_DECREF(unicode);
   12509             :                         }
   12510           0 :                         if (talloc_str == NULL) {
   12511           0 :                                 PyErr_NoMemory();
   12512           0 :                                 return -1;
   12513             :                         }
   12514           0 :                         object->source_dsa_address = talloc_str;
   12515             :                 }
   12516             :         }
   12517           0 :         return 0;
   12518             : }
   12519             : 
   12520           0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_schedule(PyObject *obj, void *closure)
   12521             : {
   12522           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(obj);
   12523           0 :         PyObject *py_schedule;
   12524           0 :         py_schedule = PyList_New(84);
   12525           0 :         if (py_schedule == NULL) {
   12526           0 :                 return NULL;
   12527             :         }
   12528             :         {
   12529             :                 int schedule_cntr_0;
   12530           0 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < (84); schedule_cntr_0++) {
   12531           0 :                         PyObject *py_schedule_0;
   12532           0 :                         py_schedule_0 = PyLong_FromLong((uint16_t)((object->schedule)[schedule_cntr_0]));
   12533           0 :                         PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
   12534             :                 }
   12535             :         }
   12536           0 :         return py_schedule;
   12537             : }
   12538             : 
   12539           0 : static int py_drsuapi_DsReplicaAddRequest2_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
   12540             : {
   12541           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(py_obj);
   12542           0 :         if (value == NULL) {
   12543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule");
   12544           0 :                 return -1;
   12545             :         }
   12546           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   12547             :         {
   12548           0 :                 int schedule_cntr_0;
   12549           0 :                 if (ARRAY_SIZE(object->schedule) != PyList_GET_SIZE(value)) {
   12550           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->schedule),  PyList_GET_SIZE(value));
   12551           0 :                         return -1;
   12552             :                 }
   12553           0 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
   12554           0 :                         if (PyList_GET_ITEM(value, schedule_cntr_0) == NULL) {
   12555           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->schedule)[schedule_cntr_0]");
   12556           0 :                                 return -1;
   12557             :                         }
   12558             :                         {
   12559           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->schedule)[schedule_cntr_0]));
   12560           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, schedule_cntr_0))) {
   12561           0 :                                         unsigned long long test_var;
   12562           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, schedule_cntr_0));
   12563           0 :                                         if (PyErr_Occurred() != NULL) {
   12564           0 :                                                 return -1;
   12565             :                                         }
   12566           0 :                                         if (test_var > uint_max) {
   12567           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12568             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   12569           0 :                                                 return -1;
   12570             :                                         }
   12571           0 :                                         (object->schedule)[schedule_cntr_0] = test_var;
   12572             :                                 } else {
   12573           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12574             :                                           PyLong_Type.tp_name);
   12575           0 :                                         return -1;
   12576             :                                 }
   12577             :                         }
   12578             :                 }
   12579             :         }
   12580           0 :         return 0;
   12581             : }
   12582             : 
   12583           0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_options(PyObject *obj, void *closure)
   12584             : {
   12585           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(obj);
   12586           0 :         PyObject *py_options;
   12587           0 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)(object->options));
   12588           0 :         return py_options;
   12589             : }
   12590             : 
   12591           0 : static int py_drsuapi_DsReplicaAddRequest2_set_options(PyObject *py_obj, PyObject *value, void *closure)
   12592             : {
   12593           0 :         struct drsuapi_DsReplicaAddRequest2 *object = pytalloc_get_ptr(py_obj);
   12594           0 :         if (value == NULL) {
   12595           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
   12596           0 :                 return -1;
   12597             :         }
   12598             :         {
   12599           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
   12600           0 :                 if (PyLong_Check(value)) {
   12601           0 :                         unsigned long long test_var;
   12602           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12603           0 :                         if (PyErr_Occurred() != NULL) {
   12604           0 :                                 return -1;
   12605             :                         }
   12606           0 :                         if (test_var > uint_max) {
   12607           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12608             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12609           0 :                                 return -1;
   12610             :                         }
   12611           0 :                         object->options = test_var;
   12612             :                 } else {
   12613           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12614             :                           PyLong_Type.tp_name);
   12615           0 :                         return -1;
   12616             :                 }
   12617             :         }
   12618           0 :         return 0;
   12619             : }
   12620             : 
   12621             : static PyGetSetDef py_drsuapi_DsReplicaAddRequest2_getsetters[] = {
   12622             :         {
   12623             :                 .name = discard_const_p(char, "naming_context"),
   12624             :                 .get = py_drsuapi_DsReplicaAddRequest2_get_naming_context,
   12625             :                 .set = py_drsuapi_DsReplicaAddRequest2_set_naming_context,
   12626             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   12627             :         },
   12628             :         {
   12629             :                 .name = discard_const_p(char, "source_dsa_dn"),
   12630             :                 .get = py_drsuapi_DsReplicaAddRequest2_get_source_dsa_dn,
   12631             :                 .set = py_drsuapi_DsReplicaAddRequest2_set_source_dsa_dn,
   12632             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   12633             :         },
   12634             :         {
   12635             :                 .name = discard_const_p(char, "transport_dn"),
   12636             :                 .get = py_drsuapi_DsReplicaAddRequest2_get_transport_dn,
   12637             :                 .set = py_drsuapi_DsReplicaAddRequest2_set_transport_dn,
   12638             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   12639             :         },
   12640             :         {
   12641             :                 .name = discard_const_p(char, "source_dsa_address"),
   12642             :                 .get = py_drsuapi_DsReplicaAddRequest2_get_source_dsa_address,
   12643             :                 .set = py_drsuapi_DsReplicaAddRequest2_set_source_dsa_address,
   12644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   12645             :         },
   12646             :         {
   12647             :                 .name = discard_const_p(char, "schedule"),
   12648             :                 .get = py_drsuapi_DsReplicaAddRequest2_get_schedule,
   12649             :                 .set = py_drsuapi_DsReplicaAddRequest2_set_schedule,
   12650             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12651             :         },
   12652             :         {
   12653             :                 .name = discard_const_p(char, "options"),
   12654             :                 .get = py_drsuapi_DsReplicaAddRequest2_get_options,
   12655             :                 .set = py_drsuapi_DsReplicaAddRequest2_set_options,
   12656             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
   12657             :         },
   12658             :         { .name = NULL }
   12659             : };
   12660             : 
   12661           0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12662             : {
   12663           0 :         return pytalloc_new(struct drsuapi_DsReplicaAddRequest2, type);
   12664             : }
   12665             : 
   12666             : 
   12667             : static PyTypeObject drsuapi_DsReplicaAddRequest2_Type = {
   12668             :         PyVarObject_HEAD_INIT(NULL, 0)
   12669             :         .tp_name = "drsuapi.DsReplicaAddRequest2",
   12670             :         .tp_getset = py_drsuapi_DsReplicaAddRequest2_getsetters,
   12671             :         .tp_methods = NULL,
   12672             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12673             :         .tp_new = py_drsuapi_DsReplicaAddRequest2_new,
   12674             : };
   12675             : 
   12676           0 : static PyObject *py_import_drsuapi_DsReplicaAddRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaAddRequest *in)
   12677             : {
   12678           0 :         PyObject *ret;
   12679             : 
   12680           0 :         switch (level) {
   12681           0 :                 case 1:
   12682           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsReplicaAddRequest1_Type, mem_ctx, &in->req1);
   12683           0 :                         return ret;
   12684             : 
   12685           0 :                 case 2:
   12686           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsReplicaAddRequest2_Type, mem_ctx, &in->req2);
   12687           0 :                         return ret;
   12688             : 
   12689             :         }
   12690           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   12691           0 :         return NULL;
   12692             : }
   12693             : 
   12694           0 : static union drsuapi_DsReplicaAddRequest *py_export_drsuapi_DsReplicaAddRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   12695             : {
   12696           0 :         union drsuapi_DsReplicaAddRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaAddRequest);
   12697           0 :         switch (level) {
   12698           0 :                 case 1:
   12699           0 :                         if (in == NULL) {
   12700           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   12701           0 :                                 talloc_free(ret); return NULL;
   12702             :                         }
   12703           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaAddRequest1_Type, in, talloc_free(ret); return NULL;);
   12704           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   12705           0 :                                 PyErr_NoMemory();
   12706           0 :                                 talloc_free(ret); return NULL;
   12707             :                         }
   12708           0 :                         ret->req1 = *(struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(in);
   12709           0 :                         break;
   12710             : 
   12711           0 :                 case 2:
   12712           0 :                         if (in == NULL) {
   12713           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req2");
   12714           0 :                                 talloc_free(ret); return NULL;
   12715             :                         }
   12716           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaAddRequest2_Type, in, talloc_free(ret); return NULL;);
   12717           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   12718           0 :                                 PyErr_NoMemory();
   12719           0 :                                 talloc_free(ret); return NULL;
   12720             :                         }
   12721           0 :                         ret->req2 = *(struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(in);
   12722           0 :                         break;
   12723             : 
   12724           0 :                 default:
   12725           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   12726           0 :                         talloc_free(ret);
   12727           0 :                         ret = NULL;
   12728             :         }
   12729             : 
   12730           0 :         return ret;
   12731             : }
   12732             : 
   12733           0 : static PyObject *py_drsuapi_DsReplicaAddRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12734             : {
   12735           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   12736           0 :         PyObject *mem_ctx_obj = NULL;
   12737           0 :         TALLOC_CTX *mem_ctx = NULL;
   12738           0 :         int level = 0;
   12739           0 :         PyObject *in_obj = NULL;
   12740           0 :         union drsuapi_DsReplicaAddRequest *in = NULL;
   12741             : 
   12742           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   12743             :                 discard_const_p(char *, kwnames),
   12744             :                 &mem_ctx_obj,
   12745             :                 &level,
   12746             :                 &in_obj)) {
   12747           0 :                 return NULL;
   12748             :         }
   12749           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   12750           0 :         if (mem_ctx == NULL) {
   12751           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   12752           0 :                 return NULL;
   12753             :         }
   12754           0 :         in = (union drsuapi_DsReplicaAddRequest *)pytalloc_get_ptr(in_obj);
   12755           0 :         if (in == NULL) {
   12756           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaAddRequest!");
   12757           0 :                 return NULL;
   12758             :         }
   12759             : 
   12760           0 :         return py_import_drsuapi_DsReplicaAddRequest(mem_ctx, level, in);
   12761             : }
   12762             : 
   12763           0 : static PyObject *py_drsuapi_DsReplicaAddRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12764             : {
   12765           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   12766           0 :         PyObject *mem_ctx_obj = NULL;
   12767           0 :         TALLOC_CTX *mem_ctx = NULL;
   12768           0 :         int level = 0;
   12769           0 :         PyObject *in = NULL;
   12770           0 :         union drsuapi_DsReplicaAddRequest *out = NULL;
   12771             : 
   12772           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   12773             :                 discard_const_p(char *, kwnames),
   12774             :                 &mem_ctx_obj,
   12775             :                 &level,
   12776             :                 &in)) {
   12777           0 :                 return NULL;
   12778             :         }
   12779           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   12780           0 :         if (mem_ctx == NULL) {
   12781           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   12782           0 :                 return NULL;
   12783             :         }
   12784             : 
   12785           0 :         out = py_export_drsuapi_DsReplicaAddRequest(mem_ctx, level, in);
   12786           0 :         if (out == NULL) {
   12787           0 :                 return NULL;
   12788             :         }
   12789             : 
   12790           0 :         return pytalloc_GenericObject_reference(out);
   12791             : }
   12792             : 
   12793             : static PyMethodDef py_drsuapi_DsReplicaAddRequest_methods[] = {
   12794             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAddRequest_import),
   12795             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   12796             :                 "T.__import__(mem_ctx, level, in) => ret." },
   12797             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAddRequest_export),
   12798             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   12799             :                 "T.__export__(mem_ctx, level, in) => ret." },
   12800             :         { NULL, NULL, 0, NULL }
   12801             : };
   12802             : 
   12803           0 : static PyObject *py_drsuapi_DsReplicaAddRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12804             : {
   12805           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   12806           0 :         return NULL;
   12807             : }
   12808             : 
   12809             : 
   12810             : static PyTypeObject drsuapi_DsReplicaAddRequest_Type = {
   12811             :         PyVarObject_HEAD_INIT(NULL, 0)
   12812             :         .tp_name = "drsuapi.DsReplicaAddRequest",
   12813             :         .tp_getset = NULL,
   12814             :         .tp_methods = py_drsuapi_DsReplicaAddRequest_methods,
   12815             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12816             :         .tp_new = py_drsuapi_DsReplicaAddRequest_new,
   12817             : };
   12818             : 
   12819             : 
   12820           0 : static PyObject *py_drsuapi_DsReplicaDelRequest1_get_naming_context(PyObject *obj, void *closure)
   12821             : {
   12822           0 :         struct drsuapi_DsReplicaDelRequest1 *object = pytalloc_get_ptr(obj);
   12823           0 :         PyObject *py_naming_context;
   12824           0 :         if (object->naming_context == NULL) {
   12825           0 :                 Py_RETURN_NONE;
   12826             :         }
   12827           0 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
   12828           0 :         return py_naming_context;
   12829             : }
   12830             : 
   12831           0 : static int py_drsuapi_DsReplicaDelRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
   12832             : {
   12833           0 :         struct drsuapi_DsReplicaDelRequest1 *object = pytalloc_get_ptr(py_obj);
   12834           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
   12835           0 :         if (value == NULL) {
   12836           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
   12837           0 :                 return -1;
   12838             :         }
   12839           0 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
   12840           0 :         if (object->naming_context == NULL) {
   12841           0 :                 PyErr_NoMemory();
   12842           0 :                 return -1;
   12843             :         }
   12844           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   12845           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   12846           0 :                 PyErr_NoMemory();
   12847           0 :                 return -1;
   12848             :         }
   12849           0 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   12850           0 :         return 0;
   12851             : }
   12852             : 
   12853           0 : static PyObject *py_drsuapi_DsReplicaDelRequest1_get_source_dsa_address(PyObject *obj, void *closure)
   12854             : {
   12855           0 :         struct drsuapi_DsReplicaDelRequest1 *object = pytalloc_get_ptr(obj);
   12856           0 :         PyObject *py_source_dsa_address;
   12857           0 :         if (object->source_dsa_address == NULL) {
   12858           0 :                 Py_RETURN_NONE;
   12859             :         }
   12860           0 :         if (object->source_dsa_address == NULL) {
   12861           0 :                 py_source_dsa_address = Py_None;
   12862           0 :                 Py_INCREF(py_source_dsa_address);
   12863             :         } else {
   12864           0 :                 if (object->source_dsa_address == NULL) {
   12865           0 :                         py_source_dsa_address = Py_None;
   12866           0 :                         Py_INCREF(py_source_dsa_address);
   12867             :                 } else {
   12868           0 :                         py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
   12869             :                 }
   12870             :         }
   12871           0 :         return py_source_dsa_address;
   12872             : }
   12873             : 
   12874           0 : static int py_drsuapi_DsReplicaDelRequest1_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
   12875             : {
   12876           0 :         struct drsuapi_DsReplicaDelRequest1 *object = pytalloc_get_ptr(py_obj);
   12877           0 :         if (value == NULL) {
   12878           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_address");
   12879           0 :                 return -1;
   12880             :         }
   12881           0 :         if (value == Py_None) {
   12882           0 :                 object->source_dsa_address = NULL;
   12883             :         } else {
   12884           0 :                 object->source_dsa_address = NULL;
   12885             :                 {
   12886           0 :                         const char *test_str;
   12887           0 :                         const char *talloc_str;
   12888           0 :                         PyObject *unicode = NULL;
   12889           0 :                         if (PyUnicode_Check(value)) {
   12890           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   12891           0 :                                 if (unicode == NULL) {
   12892           0 :                                         return -1;
   12893             :                                 }
   12894           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   12895           0 :                         } else if (PyBytes_Check(value)) {
   12896           0 :                                 test_str = PyBytes_AS_STRING(value);
   12897             :                         } else {
   12898           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   12899           0 :                                 return -1;
   12900             :                         }
   12901           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   12902           0 :                         if (unicode != NULL) {
   12903           0 :                                 Py_DECREF(unicode);
   12904             :                         }
   12905           0 :                         if (talloc_str == NULL) {
   12906           0 :                                 PyErr_NoMemory();
   12907           0 :                                 return -1;
   12908             :                         }
   12909           0 :                         object->source_dsa_address = talloc_str;
   12910             :                 }
   12911             :         }
   12912           0 :         return 0;
   12913             : }
   12914             : 
   12915           0 : static PyObject *py_drsuapi_DsReplicaDelRequest1_get_options(PyObject *obj, void *closure)
   12916             : {
   12917           0 :         struct drsuapi_DsReplicaDelRequest1 *object = pytalloc_get_ptr(obj);
   12918           0 :         PyObject *py_options;
   12919           0 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)(object->options));
   12920           0 :         return py_options;
   12921             : }
   12922             : 
   12923           0 : static int py_drsuapi_DsReplicaDelRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
   12924             : {
   12925           0 :         struct drsuapi_DsReplicaDelRequest1 *object = pytalloc_get_ptr(py_obj);
   12926           0 :         if (value == NULL) {
   12927           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
   12928           0 :                 return -1;
   12929             :         }
   12930             :         {
   12931           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
   12932           0 :                 if (PyLong_Check(value)) {
   12933           0 :                         unsigned long long test_var;
   12934           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   12935           0 :                         if (PyErr_Occurred() != NULL) {
   12936           0 :                                 return -1;
   12937             :                         }
   12938           0 :                         if (test_var > uint_max) {
   12939           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   12940             :                                   PyLong_Type.tp_name, uint_max, test_var);
   12941           0 :                                 return -1;
   12942             :                         }
   12943           0 :                         object->options = test_var;
   12944             :                 } else {
   12945           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   12946             :                           PyLong_Type.tp_name);
   12947           0 :                         return -1;
   12948             :                 }
   12949             :         }
   12950           0 :         return 0;
   12951             : }
   12952             : 
   12953             : static PyGetSetDef py_drsuapi_DsReplicaDelRequest1_getsetters[] = {
   12954             :         {
   12955             :                 .name = discard_const_p(char, "naming_context"),
   12956             :                 .get = py_drsuapi_DsReplicaDelRequest1_get_naming_context,
   12957             :                 .set = py_drsuapi_DsReplicaDelRequest1_set_naming_context,
   12958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   12959             :         },
   12960             :         {
   12961             :                 .name = discard_const_p(char, "source_dsa_address"),
   12962             :                 .get = py_drsuapi_DsReplicaDelRequest1_get_source_dsa_address,
   12963             :                 .set = py_drsuapi_DsReplicaDelRequest1_set_source_dsa_address,
   12964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   12965             :         },
   12966             :         {
   12967             :                 .name = discard_const_p(char, "options"),
   12968             :                 .get = py_drsuapi_DsReplicaDelRequest1_get_options,
   12969             :                 .set = py_drsuapi_DsReplicaDelRequest1_set_options,
   12970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
   12971             :         },
   12972             :         { .name = NULL }
   12973             : };
   12974             : 
   12975           0 : static PyObject *py_drsuapi_DsReplicaDelRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   12976             : {
   12977           0 :         return pytalloc_new(struct drsuapi_DsReplicaDelRequest1, type);
   12978             : }
   12979             : 
   12980             : 
   12981             : static PyTypeObject drsuapi_DsReplicaDelRequest1_Type = {
   12982             :         PyVarObject_HEAD_INIT(NULL, 0)
   12983             :         .tp_name = "drsuapi.DsReplicaDelRequest1",
   12984             :         .tp_getset = py_drsuapi_DsReplicaDelRequest1_getsetters,
   12985             :         .tp_methods = NULL,
   12986             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   12987             :         .tp_new = py_drsuapi_DsReplicaDelRequest1_new,
   12988             : };
   12989             : 
   12990           0 : static PyObject *py_import_drsuapi_DsReplicaDelRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaDelRequest *in)
   12991             : {
   12992           0 :         PyObject *ret;
   12993             : 
   12994           0 :         switch (level) {
   12995           0 :                 case 1:
   12996           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsReplicaDelRequest1_Type, mem_ctx, &in->req1);
   12997           0 :                         return ret;
   12998             : 
   12999             :         }
   13000           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   13001           0 :         return NULL;
   13002             : }
   13003             : 
   13004           0 : static union drsuapi_DsReplicaDelRequest *py_export_drsuapi_DsReplicaDelRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   13005             : {
   13006           0 :         union drsuapi_DsReplicaDelRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaDelRequest);
   13007           0 :         switch (level) {
   13008           0 :                 case 1:
   13009           0 :                         if (in == NULL) {
   13010           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   13011           0 :                                 talloc_free(ret); return NULL;
   13012             :                         }
   13013           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaDelRequest1_Type, in, talloc_free(ret); return NULL;);
   13014           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   13015           0 :                                 PyErr_NoMemory();
   13016           0 :                                 talloc_free(ret); return NULL;
   13017             :                         }
   13018           0 :                         ret->req1 = *(struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(in);
   13019           0 :                         break;
   13020             : 
   13021           0 :                 default:
   13022           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   13023           0 :                         talloc_free(ret);
   13024           0 :                         ret = NULL;
   13025             :         }
   13026             : 
   13027           0 :         return ret;
   13028             : }
   13029             : 
   13030           0 : static PyObject *py_drsuapi_DsReplicaDelRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13031             : {
   13032           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   13033           0 :         PyObject *mem_ctx_obj = NULL;
   13034           0 :         TALLOC_CTX *mem_ctx = NULL;
   13035           0 :         int level = 0;
   13036           0 :         PyObject *in_obj = NULL;
   13037           0 :         union drsuapi_DsReplicaDelRequest *in = NULL;
   13038             : 
   13039           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   13040             :                 discard_const_p(char *, kwnames),
   13041             :                 &mem_ctx_obj,
   13042             :                 &level,
   13043             :                 &in_obj)) {
   13044           0 :                 return NULL;
   13045             :         }
   13046           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   13047           0 :         if (mem_ctx == NULL) {
   13048           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   13049           0 :                 return NULL;
   13050             :         }
   13051           0 :         in = (union drsuapi_DsReplicaDelRequest *)pytalloc_get_ptr(in_obj);
   13052           0 :         if (in == NULL) {
   13053           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaDelRequest!");
   13054           0 :                 return NULL;
   13055             :         }
   13056             : 
   13057           0 :         return py_import_drsuapi_DsReplicaDelRequest(mem_ctx, level, in);
   13058             : }
   13059             : 
   13060           0 : static PyObject *py_drsuapi_DsReplicaDelRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13061             : {
   13062           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   13063           0 :         PyObject *mem_ctx_obj = NULL;
   13064           0 :         TALLOC_CTX *mem_ctx = NULL;
   13065           0 :         int level = 0;
   13066           0 :         PyObject *in = NULL;
   13067           0 :         union drsuapi_DsReplicaDelRequest *out = NULL;
   13068             : 
   13069           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   13070             :                 discard_const_p(char *, kwnames),
   13071             :                 &mem_ctx_obj,
   13072             :                 &level,
   13073             :                 &in)) {
   13074           0 :                 return NULL;
   13075             :         }
   13076           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   13077           0 :         if (mem_ctx == NULL) {
   13078           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   13079           0 :                 return NULL;
   13080             :         }
   13081             : 
   13082           0 :         out = py_export_drsuapi_DsReplicaDelRequest(mem_ctx, level, in);
   13083           0 :         if (out == NULL) {
   13084           0 :                 return NULL;
   13085             :         }
   13086             : 
   13087           0 :         return pytalloc_GenericObject_reference(out);
   13088             : }
   13089             : 
   13090             : static PyMethodDef py_drsuapi_DsReplicaDelRequest_methods[] = {
   13091             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDelRequest_import),
   13092             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   13093             :                 "T.__import__(mem_ctx, level, in) => ret." },
   13094             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDelRequest_export),
   13095             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   13096             :                 "T.__export__(mem_ctx, level, in) => ret." },
   13097             :         { NULL, NULL, 0, NULL }
   13098             : };
   13099             : 
   13100           0 : static PyObject *py_drsuapi_DsReplicaDelRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13101             : {
   13102           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   13103           0 :         return NULL;
   13104             : }
   13105             : 
   13106             : 
   13107             : static PyTypeObject drsuapi_DsReplicaDelRequest_Type = {
   13108             :         PyVarObject_HEAD_INIT(NULL, 0)
   13109             :         .tp_name = "drsuapi.DsReplicaDelRequest",
   13110             :         .tp_getset = NULL,
   13111             :         .tp_methods = py_drsuapi_DsReplicaDelRequest_methods,
   13112             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13113             :         .tp_new = py_drsuapi_DsReplicaDelRequest_new,
   13114             : };
   13115             : 
   13116             : 
   13117           0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_naming_context(PyObject *obj, void *closure)
   13118             : {
   13119           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(obj);
   13120           0 :         PyObject *py_naming_context;
   13121           0 :         if (object->naming_context == NULL) {
   13122           0 :                 Py_RETURN_NONE;
   13123             :         }
   13124           0 :         py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
   13125           0 :         return py_naming_context;
   13126             : }
   13127             : 
   13128           0 : static int py_drsuapi_DsReplicaModRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
   13129             : {
   13130           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(py_obj);
   13131           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
   13132           0 :         if (value == NULL) {
   13133           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
   13134           0 :                 return -1;
   13135             :         }
   13136           0 :         object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
   13137           0 :         if (object->naming_context == NULL) {
   13138           0 :                 PyErr_NoMemory();
   13139           0 :                 return -1;
   13140             :         }
   13141           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   13142           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13143           0 :                 PyErr_NoMemory();
   13144           0 :                 return -1;
   13145             :         }
   13146           0 :         object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   13147           0 :         return 0;
   13148             : }
   13149             : 
   13150           0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_source_dra(PyObject *obj, void *closure)
   13151             : {
   13152           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(obj);
   13153           0 :         PyObject *py_source_dra;
   13154           0 :         py_source_dra = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dra);
   13155           0 :         return py_source_dra;
   13156             : }
   13157             : 
   13158           0 : static int py_drsuapi_DsReplicaModRequest1_set_source_dra(PyObject *py_obj, PyObject *value, void *closure)
   13159             : {
   13160           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(py_obj);
   13161           0 :         if (value == NULL) {
   13162           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dra");
   13163           0 :                 return -1;
   13164             :         }
   13165           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   13166           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   13167           0 :                 PyErr_NoMemory();
   13168           0 :                 return -1;
   13169             :         }
   13170           0 :         object->source_dra = *(struct GUID *)pytalloc_get_ptr(value);
   13171           0 :         return 0;
   13172             : }
   13173             : 
   13174           0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_source_dra_address(PyObject *obj, void *closure)
   13175             : {
   13176           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(obj);
   13177           0 :         PyObject *py_source_dra_address;
   13178           0 :         if (object->source_dra_address == NULL) {
   13179           0 :                 Py_RETURN_NONE;
   13180             :         }
   13181           0 :         if (object->source_dra_address == NULL) {
   13182           0 :                 py_source_dra_address = Py_None;
   13183           0 :                 Py_INCREF(py_source_dra_address);
   13184             :         } else {
   13185           0 :                 if (object->source_dra_address == NULL) {
   13186           0 :                         py_source_dra_address = Py_None;
   13187           0 :                         Py_INCREF(py_source_dra_address);
   13188             :                 } else {
   13189           0 :                         py_source_dra_address = PyUnicode_Decode(object->source_dra_address, strlen(object->source_dra_address), "utf-8", "ignore");
   13190             :                 }
   13191             :         }
   13192           0 :         return py_source_dra_address;
   13193             : }
   13194             : 
   13195           0 : static int py_drsuapi_DsReplicaModRequest1_set_source_dra_address(PyObject *py_obj, PyObject *value, void *closure)
   13196             : {
   13197           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(py_obj);
   13198           0 :         if (value == NULL) {
   13199           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dra_address");
   13200           0 :                 return -1;
   13201             :         }
   13202           0 :         if (value == Py_None) {
   13203           0 :                 object->source_dra_address = NULL;
   13204             :         } else {
   13205           0 :                 object->source_dra_address = NULL;
   13206             :                 {
   13207           0 :                         const char *test_str;
   13208           0 :                         const char *talloc_str;
   13209           0 :                         PyObject *unicode = NULL;
   13210           0 :                         if (PyUnicode_Check(value)) {
   13211           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   13212           0 :                                 if (unicode == NULL) {
   13213           0 :                                         return -1;
   13214             :                                 }
   13215           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   13216           0 :                         } else if (PyBytes_Check(value)) {
   13217           0 :                                 test_str = PyBytes_AS_STRING(value);
   13218             :                         } else {
   13219           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   13220           0 :                                 return -1;
   13221             :                         }
   13222           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   13223           0 :                         if (unicode != NULL) {
   13224           0 :                                 Py_DECREF(unicode);
   13225             :                         }
   13226           0 :                         if (talloc_str == NULL) {
   13227           0 :                                 PyErr_NoMemory();
   13228           0 :                                 return -1;
   13229             :                         }
   13230           0 :                         object->source_dra_address = talloc_str;
   13231             :                 }
   13232             :         }
   13233           0 :         return 0;
   13234             : }
   13235             : 
   13236           0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_schedule(PyObject *obj, void *closure)
   13237             : {
   13238           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(obj);
   13239           0 :         PyObject *py_schedule;
   13240           0 :         py_schedule = PyList_New(84);
   13241           0 :         if (py_schedule == NULL) {
   13242           0 :                 return NULL;
   13243             :         }
   13244             :         {
   13245             :                 int schedule_cntr_0;
   13246           0 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < (84); schedule_cntr_0++) {
   13247           0 :                         PyObject *py_schedule_0;
   13248           0 :                         py_schedule_0 = PyLong_FromLong((uint16_t)((object->schedule)[schedule_cntr_0]));
   13249           0 :                         PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
   13250             :                 }
   13251             :         }
   13252           0 :         return py_schedule;
   13253             : }
   13254             : 
   13255           0 : static int py_drsuapi_DsReplicaModRequest1_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
   13256             : {
   13257           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(py_obj);
   13258           0 :         if (value == NULL) {
   13259           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule");
   13260           0 :                 return -1;
   13261             :         }
   13262           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13263             :         {
   13264           0 :                 int schedule_cntr_0;
   13265           0 :                 if (ARRAY_SIZE(object->schedule) != PyList_GET_SIZE(value)) {
   13266           0 :                         PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->schedule),  PyList_GET_SIZE(value));
   13267           0 :                         return -1;
   13268             :                 }
   13269           0 :                 for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
   13270           0 :                         if (PyList_GET_ITEM(value, schedule_cntr_0) == NULL) {
   13271           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->schedule)[schedule_cntr_0]");
   13272           0 :                                 return -1;
   13273             :                         }
   13274             :                         {
   13275           0 :                                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->schedule)[schedule_cntr_0]));
   13276           0 :                                 if (PyLong_Check(PyList_GET_ITEM(value, schedule_cntr_0))) {
   13277           0 :                                         unsigned long long test_var;
   13278           0 :                                         test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, schedule_cntr_0));
   13279           0 :                                         if (PyErr_Occurred() != NULL) {
   13280           0 :                                                 return -1;
   13281             :                                         }
   13282           0 :                                         if (test_var > uint_max) {
   13283           0 :                                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13284             :                                                   PyLong_Type.tp_name, uint_max, test_var);
   13285           0 :                                                 return -1;
   13286             :                                         }
   13287           0 :                                         (object->schedule)[schedule_cntr_0] = test_var;
   13288             :                                 } else {
   13289           0 :                                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13290             :                                           PyLong_Type.tp_name);
   13291           0 :                                         return -1;
   13292             :                                 }
   13293             :                         }
   13294             :                 }
   13295             :         }
   13296           0 :         return 0;
   13297             : }
   13298             : 
   13299           0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_replica_flags(PyObject *obj, void *closure)
   13300             : {
   13301           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(obj);
   13302           0 :         PyObject *py_replica_flags;
   13303           0 :         py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->replica_flags));
   13304           0 :         return py_replica_flags;
   13305             : }
   13306             : 
   13307           0 : static int py_drsuapi_DsReplicaModRequest1_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
   13308             : {
   13309           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(py_obj);
   13310           0 :         if (value == NULL) {
   13311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
   13312           0 :                 return -1;
   13313             :         }
   13314             :         {
   13315           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
   13316           0 :                 if (PyLong_Check(value)) {
   13317           0 :                         unsigned long long test_var;
   13318           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13319           0 :                         if (PyErr_Occurred() != NULL) {
   13320           0 :                                 return -1;
   13321             :                         }
   13322           0 :                         if (test_var > uint_max) {
   13323           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13324             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13325           0 :                                 return -1;
   13326             :                         }
   13327           0 :                         object->replica_flags = test_var;
   13328             :                 } else {
   13329           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13330             :                           PyLong_Type.tp_name);
   13331           0 :                         return -1;
   13332             :                 }
   13333             :         }
   13334           0 :         return 0;
   13335             : }
   13336             : 
   13337           0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_modify_fields(PyObject *obj, void *closure)
   13338             : {
   13339           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(obj);
   13340           0 :         PyObject *py_modify_fields;
   13341           0 :         py_modify_fields = PyLong_FromUnsignedLongLong((uint32_t)(object->modify_fields));
   13342           0 :         return py_modify_fields;
   13343             : }
   13344             : 
   13345           0 : static int py_drsuapi_DsReplicaModRequest1_set_modify_fields(PyObject *py_obj, PyObject *value, void *closure)
   13346             : {
   13347           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(py_obj);
   13348           0 :         if (value == NULL) {
   13349           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->modify_fields");
   13350           0 :                 return -1;
   13351             :         }
   13352             :         {
   13353           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->modify_fields));
   13354           0 :                 if (PyLong_Check(value)) {
   13355           0 :                         unsigned long long test_var;
   13356           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13357           0 :                         if (PyErr_Occurred() != NULL) {
   13358           0 :                                 return -1;
   13359             :                         }
   13360           0 :                         if (test_var > uint_max) {
   13361           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13362             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13363           0 :                                 return -1;
   13364             :                         }
   13365           0 :                         object->modify_fields = test_var;
   13366             :                 } else {
   13367           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13368             :                           PyLong_Type.tp_name);
   13369           0 :                         return -1;
   13370             :                 }
   13371             :         }
   13372           0 :         return 0;
   13373             : }
   13374             : 
   13375           0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_options(PyObject *obj, void *closure)
   13376             : {
   13377           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(obj);
   13378           0 :         PyObject *py_options;
   13379           0 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)(object->options));
   13380           0 :         return py_options;
   13381             : }
   13382             : 
   13383           0 : static int py_drsuapi_DsReplicaModRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
   13384             : {
   13385           0 :         struct drsuapi_DsReplicaModRequest1 *object = pytalloc_get_ptr(py_obj);
   13386           0 :         if (value == NULL) {
   13387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
   13388           0 :                 return -1;
   13389             :         }
   13390             :         {
   13391           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
   13392           0 :                 if (PyLong_Check(value)) {
   13393           0 :                         unsigned long long test_var;
   13394           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13395           0 :                         if (PyErr_Occurred() != NULL) {
   13396           0 :                                 return -1;
   13397             :                         }
   13398           0 :                         if (test_var > uint_max) {
   13399           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13400             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13401           0 :                                 return -1;
   13402             :                         }
   13403           0 :                         object->options = test_var;
   13404             :                 } else {
   13405           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13406             :                           PyLong_Type.tp_name);
   13407           0 :                         return -1;
   13408             :                 }
   13409             :         }
   13410           0 :         return 0;
   13411             : }
   13412             : 
   13413             : static PyGetSetDef py_drsuapi_DsReplicaModRequest1_getsetters[] = {
   13414             :         {
   13415             :                 .name = discard_const_p(char, "naming_context"),
   13416             :                 .get = py_drsuapi_DsReplicaModRequest1_get_naming_context,
   13417             :                 .set = py_drsuapi_DsReplicaModRequest1_set_naming_context,
   13418             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   13419             :         },
   13420             :         {
   13421             :                 .name = discard_const_p(char, "source_dra"),
   13422             :                 .get = py_drsuapi_DsReplicaModRequest1_get_source_dra,
   13423             :                 .set = py_drsuapi_DsReplicaModRequest1_set_source_dra,
   13424             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   13425             :         },
   13426             :         {
   13427             :                 .name = discard_const_p(char, "source_dra_address"),
   13428             :                 .get = py_drsuapi_DsReplicaModRequest1_get_source_dra_address,
   13429             :                 .set = py_drsuapi_DsReplicaModRequest1_set_source_dra_address,
   13430             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   13431             :         },
   13432             :         {
   13433             :                 .name = discard_const_p(char, "schedule"),
   13434             :                 .get = py_drsuapi_DsReplicaModRequest1_get_schedule,
   13435             :                 .set = py_drsuapi_DsReplicaModRequest1_set_schedule,
   13436             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   13437             :         },
   13438             :         {
   13439             :                 .name = discard_const_p(char, "replica_flags"),
   13440             :                 .get = py_drsuapi_DsReplicaModRequest1_get_replica_flags,
   13441             :                 .set = py_drsuapi_DsReplicaModRequest1_set_replica_flags,
   13442             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
   13443             :         },
   13444             :         {
   13445             :                 .name = discard_const_p(char, "modify_fields"),
   13446             :                 .get = py_drsuapi_DsReplicaModRequest1_get_modify_fields,
   13447             :                 .set = py_drsuapi_DsReplicaModRequest1_set_modify_fields,
   13448             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13449             :         },
   13450             :         {
   13451             :                 .name = discard_const_p(char, "options"),
   13452             :                 .get = py_drsuapi_DsReplicaModRequest1_get_options,
   13453             :                 .set = py_drsuapi_DsReplicaModRequest1_set_options,
   13454             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
   13455             :         },
   13456             :         { .name = NULL }
   13457             : };
   13458             : 
   13459           0 : static PyObject *py_drsuapi_DsReplicaModRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13460             : {
   13461           0 :         return pytalloc_new(struct drsuapi_DsReplicaModRequest1, type);
   13462             : }
   13463             : 
   13464             : 
   13465             : static PyTypeObject drsuapi_DsReplicaModRequest1_Type = {
   13466             :         PyVarObject_HEAD_INIT(NULL, 0)
   13467             :         .tp_name = "drsuapi.DsReplicaModRequest1",
   13468             :         .tp_getset = py_drsuapi_DsReplicaModRequest1_getsetters,
   13469             :         .tp_methods = NULL,
   13470             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13471             :         .tp_new = py_drsuapi_DsReplicaModRequest1_new,
   13472             : };
   13473             : 
   13474           0 : static PyObject *py_import_drsuapi_DsReplicaModRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaModRequest *in)
   13475             : {
   13476           0 :         PyObject *ret;
   13477             : 
   13478           0 :         switch (level) {
   13479           0 :                 case 1:
   13480           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsReplicaModRequest1_Type, mem_ctx, &in->req1);
   13481           0 :                         return ret;
   13482             : 
   13483             :         }
   13484           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   13485           0 :         return NULL;
   13486             : }
   13487             : 
   13488           0 : static union drsuapi_DsReplicaModRequest *py_export_drsuapi_DsReplicaModRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   13489             : {
   13490           0 :         union drsuapi_DsReplicaModRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaModRequest);
   13491           0 :         switch (level) {
   13492           0 :                 case 1:
   13493           0 :                         if (in == NULL) {
   13494           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   13495           0 :                                 talloc_free(ret); return NULL;
   13496             :                         }
   13497           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaModRequest1_Type, in, talloc_free(ret); return NULL;);
   13498           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   13499           0 :                                 PyErr_NoMemory();
   13500           0 :                                 talloc_free(ret); return NULL;
   13501             :                         }
   13502           0 :                         ret->req1 = *(struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(in);
   13503           0 :                         break;
   13504             : 
   13505           0 :                 default:
   13506           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   13507           0 :                         talloc_free(ret);
   13508           0 :                         ret = NULL;
   13509             :         }
   13510             : 
   13511           0 :         return ret;
   13512             : }
   13513             : 
   13514           0 : static PyObject *py_drsuapi_DsReplicaModRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13515             : {
   13516           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   13517           0 :         PyObject *mem_ctx_obj = NULL;
   13518           0 :         TALLOC_CTX *mem_ctx = NULL;
   13519           0 :         int level = 0;
   13520           0 :         PyObject *in_obj = NULL;
   13521           0 :         union drsuapi_DsReplicaModRequest *in = NULL;
   13522             : 
   13523           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   13524             :                 discard_const_p(char *, kwnames),
   13525             :                 &mem_ctx_obj,
   13526             :                 &level,
   13527             :                 &in_obj)) {
   13528           0 :                 return NULL;
   13529             :         }
   13530           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   13531           0 :         if (mem_ctx == NULL) {
   13532           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   13533           0 :                 return NULL;
   13534             :         }
   13535           0 :         in = (union drsuapi_DsReplicaModRequest *)pytalloc_get_ptr(in_obj);
   13536           0 :         if (in == NULL) {
   13537           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaModRequest!");
   13538           0 :                 return NULL;
   13539             :         }
   13540             : 
   13541           0 :         return py_import_drsuapi_DsReplicaModRequest(mem_ctx, level, in);
   13542             : }
   13543             : 
   13544           0 : static PyObject *py_drsuapi_DsReplicaModRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13545             : {
   13546           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   13547           0 :         PyObject *mem_ctx_obj = NULL;
   13548           0 :         TALLOC_CTX *mem_ctx = NULL;
   13549           0 :         int level = 0;
   13550           0 :         PyObject *in = NULL;
   13551           0 :         union drsuapi_DsReplicaModRequest *out = NULL;
   13552             : 
   13553           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   13554             :                 discard_const_p(char *, kwnames),
   13555             :                 &mem_ctx_obj,
   13556             :                 &level,
   13557             :                 &in)) {
   13558           0 :                 return NULL;
   13559             :         }
   13560           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   13561           0 :         if (mem_ctx == NULL) {
   13562           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   13563           0 :                 return NULL;
   13564             :         }
   13565             : 
   13566           0 :         out = py_export_drsuapi_DsReplicaModRequest(mem_ctx, level, in);
   13567           0 :         if (out == NULL) {
   13568           0 :                 return NULL;
   13569             :         }
   13570             : 
   13571           0 :         return pytalloc_GenericObject_reference(out);
   13572             : }
   13573             : 
   13574             : static PyMethodDef py_drsuapi_DsReplicaModRequest_methods[] = {
   13575             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaModRequest_import),
   13576             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   13577             :                 "T.__import__(mem_ctx, level, in) => ret." },
   13578             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaModRequest_export),
   13579             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   13580             :                 "T.__export__(mem_ctx, level, in) => ret." },
   13581             :         { NULL, NULL, 0, NULL }
   13582             : };
   13583             : 
   13584           0 : static PyObject *py_drsuapi_DsReplicaModRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13585             : {
   13586           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   13587           0 :         return NULL;
   13588             : }
   13589             : 
   13590             : 
   13591             : static PyTypeObject drsuapi_DsReplicaModRequest_Type = {
   13592             :         PyVarObject_HEAD_INIT(NULL, 0)
   13593             :         .tp_name = "drsuapi.DsReplicaModRequest",
   13594             :         .tp_getset = NULL,
   13595             :         .tp_methods = py_drsuapi_DsReplicaModRequest_methods,
   13596             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13597             :         .tp_new = py_drsuapi_DsReplicaModRequest_new,
   13598             : };
   13599             : 
   13600             : 
   13601           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_status(PyObject *obj, void *closure)
   13602             : {
   13603           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(obj);
   13604           0 :         PyObject *py_status;
   13605           0 :         py_status = PyErr_FromNTSTATUS(object->status);
   13606           0 :         return py_status;
   13607             : }
   13608             : 
   13609           0 : static int py_drsuapi_DsGetMembershipsCtr1_set_status(PyObject *py_obj, PyObject *value, void *closure)
   13610             : {
   13611           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(py_obj);
   13612           0 :         if (value == NULL) {
   13613           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
   13614           0 :                 return -1;
   13615             :         }
   13616           0 :         object->status = NT_STATUS(PyLong_AsLong(value));
   13617           0 :         return 0;
   13618             : }
   13619             : 
   13620           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_num_memberships(PyObject *obj, void *closure)
   13621             : {
   13622           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(obj);
   13623           0 :         PyObject *py_num_memberships;
   13624           0 :         py_num_memberships = PyLong_FromUnsignedLongLong((uint32_t)(object->num_memberships));
   13625           0 :         return py_num_memberships;
   13626             : }
   13627             : 
   13628           0 : static int py_drsuapi_DsGetMembershipsCtr1_set_num_memberships(PyObject *py_obj, PyObject *value, void *closure)
   13629             : {
   13630           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(py_obj);
   13631           0 :         if (value == NULL) {
   13632           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_memberships");
   13633           0 :                 return -1;
   13634             :         }
   13635             :         {
   13636           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_memberships));
   13637           0 :                 if (PyLong_Check(value)) {
   13638           0 :                         unsigned long long test_var;
   13639           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13640           0 :                         if (PyErr_Occurred() != NULL) {
   13641           0 :                                 return -1;
   13642             :                         }
   13643           0 :                         if (test_var > uint_max) {
   13644           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13645             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13646           0 :                                 return -1;
   13647             :                         }
   13648           0 :                         object->num_memberships = test_var;
   13649             :                 } else {
   13650           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13651             :                           PyLong_Type.tp_name);
   13652           0 :                         return -1;
   13653             :                 }
   13654             :         }
   13655           0 :         return 0;
   13656             : }
   13657             : 
   13658           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_num_sids(PyObject *obj, void *closure)
   13659             : {
   13660           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(obj);
   13661           0 :         PyObject *py_num_sids;
   13662           0 :         py_num_sids = PyLong_FromUnsignedLongLong((uint32_t)(object->num_sids));
   13663           0 :         return py_num_sids;
   13664             : }
   13665             : 
   13666           0 : static int py_drsuapi_DsGetMembershipsCtr1_set_num_sids(PyObject *py_obj, PyObject *value, void *closure)
   13667             : {
   13668           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(py_obj);
   13669           0 :         if (value == NULL) {
   13670           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_sids");
   13671           0 :                 return -1;
   13672             :         }
   13673             :         {
   13674           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_sids));
   13675           0 :                 if (PyLong_Check(value)) {
   13676           0 :                         unsigned long long test_var;
   13677           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   13678           0 :                         if (PyErr_Occurred() != NULL) {
   13679           0 :                                 return -1;
   13680             :                         }
   13681           0 :                         if (test_var > uint_max) {
   13682           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13683             :                                   PyLong_Type.tp_name, uint_max, test_var);
   13684           0 :                                 return -1;
   13685             :                         }
   13686           0 :                         object->num_sids = test_var;
   13687             :                 } else {
   13688           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   13689             :                           PyLong_Type.tp_name);
   13690           0 :                         return -1;
   13691             :                 }
   13692             :         }
   13693           0 :         return 0;
   13694             : }
   13695             : 
   13696           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_info_array(PyObject *obj, void *closure)
   13697             : {
   13698           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(obj);
   13699           0 :         PyObject *py_info_array;
   13700           0 :         if (object->info_array == NULL) {
   13701           0 :                 Py_RETURN_NONE;
   13702             :         }
   13703           0 :         if (object->info_array == NULL) {
   13704           0 :                 py_info_array = Py_None;
   13705           0 :                 Py_INCREF(py_info_array);
   13706             :         } else {
   13707           0 :                 py_info_array = PyList_New(object->num_memberships);
   13708           0 :                 if (py_info_array == NULL) {
   13709           0 :                         return NULL;
   13710             :                 }
   13711             :                 {
   13712             :                         int info_array_cntr_1;
   13713           0 :                         for (info_array_cntr_1 = 0; info_array_cntr_1 < (object->num_memberships); info_array_cntr_1++) {
   13714           0 :                                 PyObject *py_info_array_1;
   13715           0 :                                 if ((object->info_array)[info_array_cntr_1] == NULL) {
   13716           0 :                                         py_info_array_1 = Py_None;
   13717           0 :                                         Py_INCREF(py_info_array_1);
   13718             :                                 } else {
   13719           0 :                                         py_info_array_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, (object->info_array)[info_array_cntr_1], (object->info_array)[info_array_cntr_1]);
   13720             :                                 }
   13721           0 :                                 PyList_SetItem(py_info_array, info_array_cntr_1, py_info_array_1);
   13722             :                         }
   13723             :                 }
   13724             :         }
   13725           0 :         return py_info_array;
   13726             : }
   13727             : 
   13728           0 : static int py_drsuapi_DsGetMembershipsCtr1_set_info_array(PyObject *py_obj, PyObject *value, void *closure)
   13729             : {
   13730           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(py_obj);
   13731           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info_array));
   13732           0 :         if (value == NULL) {
   13733           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_array");
   13734           0 :                 return -1;
   13735             :         }
   13736           0 :         if (value == Py_None) {
   13737           0 :                 object->info_array = NULL;
   13738             :         } else {
   13739           0 :                 object->info_array = NULL;
   13740           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13741             :                 {
   13742           0 :                         int info_array_cntr_1;
   13743           0 :                         object->info_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info_array, PyList_GET_SIZE(value));
   13744           0 :                         if (!object->info_array) { return -1; }
   13745           0 :                         talloc_set_name_const(object->info_array, "ARRAY: object->info_array");
   13746           0 :                         for (info_array_cntr_1 = 0; info_array_cntr_1 < PyList_GET_SIZE(value); info_array_cntr_1++) {
   13747           0 :                                 if (PyList_GET_ITEM(value, info_array_cntr_1) == NULL) {
   13748           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->info_array)[info_array_cntr_1]");
   13749           0 :                                         return -1;
   13750             :                                 }
   13751           0 :                                 if (PyList_GET_ITEM(value, info_array_cntr_1) == Py_None) {
   13752           0 :                                         (object->info_array)[info_array_cntr_1] = NULL;
   13753             :                                 } else {
   13754           0 :                                         (object->info_array)[info_array_cntr_1] = NULL;
   13755           0 :                                         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, PyList_GET_ITEM(value, info_array_cntr_1), return -1;);
   13756           0 :                                         if (talloc_reference(object->info_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_array_cntr_1))) == NULL) {
   13757           0 :                                                 PyErr_NoMemory();
   13758           0 :                                                 return -1;
   13759             :                                         }
   13760           0 :                                         (object->info_array)[info_array_cntr_1] = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_array_cntr_1));
   13761             :                                 }
   13762             :                         }
   13763             :                 }
   13764             :         }
   13765           0 :         return 0;
   13766             : }
   13767             : 
   13768           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_group_attrs(PyObject *obj, void *closure)
   13769             : {
   13770           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(obj);
   13771           0 :         PyObject *py_group_attrs;
   13772           0 :         if (object->group_attrs == NULL) {
   13773           0 :                 Py_RETURN_NONE;
   13774             :         }
   13775           0 :         if (object->group_attrs == NULL) {
   13776           0 :                 py_group_attrs = Py_None;
   13777           0 :                 Py_INCREF(py_group_attrs);
   13778             :         } else {
   13779           0 :                 py_group_attrs = PyList_New(object->num_memberships);
   13780           0 :                 if (py_group_attrs == NULL) {
   13781           0 :                         return NULL;
   13782             :                 }
   13783             :                 {
   13784             :                         int group_attrs_cntr_1;
   13785           0 :                         for (group_attrs_cntr_1 = 0; group_attrs_cntr_1 < (object->num_memberships); group_attrs_cntr_1++) {
   13786           0 :                                 PyObject *py_group_attrs_1;
   13787           0 :                                 py_group_attrs_1 = PyLong_FromUnsignedLongLong((uint32_t)((object->group_attrs)[group_attrs_cntr_1]));
   13788           0 :                                 PyList_SetItem(py_group_attrs, group_attrs_cntr_1, py_group_attrs_1);
   13789             :                         }
   13790             :                 }
   13791             :         }
   13792           0 :         return py_group_attrs;
   13793             : }
   13794             : 
   13795           0 : static int py_drsuapi_DsGetMembershipsCtr1_set_group_attrs(PyObject *py_obj, PyObject *value, void *closure)
   13796             : {
   13797           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(py_obj);
   13798           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->group_attrs));
   13799           0 :         if (value == NULL) {
   13800           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->group_attrs");
   13801           0 :                 return -1;
   13802             :         }
   13803           0 :         if (value == Py_None) {
   13804           0 :                 object->group_attrs = NULL;
   13805             :         } else {
   13806           0 :                 object->group_attrs = NULL;
   13807           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13808             :                 {
   13809           0 :                         int group_attrs_cntr_1;
   13810           0 :                         object->group_attrs = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->group_attrs, PyList_GET_SIZE(value));
   13811           0 :                         if (!object->group_attrs) { return -1; }
   13812           0 :                         talloc_set_name_const(object->group_attrs, "ARRAY: object->group_attrs");
   13813           0 :                         for (group_attrs_cntr_1 = 0; group_attrs_cntr_1 < PyList_GET_SIZE(value); group_attrs_cntr_1++) {
   13814           0 :                                 if (PyList_GET_ITEM(value, group_attrs_cntr_1) == NULL) {
   13815           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->group_attrs)[group_attrs_cntr_1]");
   13816           0 :                                         return -1;
   13817             :                                 }
   13818             :                                 {
   13819           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->group_attrs)[group_attrs_cntr_1]));
   13820           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, group_attrs_cntr_1))) {
   13821           0 :                                                 unsigned long long test_var;
   13822           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, group_attrs_cntr_1));
   13823           0 :                                                 if (PyErr_Occurred() != NULL) {
   13824           0 :                                                         return -1;
   13825             :                                                 }
   13826           0 :                                                 if (test_var > uint_max) {
   13827           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   13828             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   13829           0 :                                                         return -1;
   13830             :                                                 }
   13831           0 :                                                 (object->group_attrs)[group_attrs_cntr_1] = test_var;
   13832             :                                         } else {
   13833           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   13834             :                                                   PyLong_Type.tp_name);
   13835           0 :                                                 return -1;
   13836             :                                         }
   13837             :                                 }
   13838             :                         }
   13839             :                 }
   13840             :         }
   13841           0 :         return 0;
   13842             : }
   13843             : 
   13844           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_sids(PyObject *obj, void *closure)
   13845             : {
   13846           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(obj);
   13847           0 :         PyObject *py_sids;
   13848           0 :         if (object->sids == NULL) {
   13849           0 :                 Py_RETURN_NONE;
   13850             :         }
   13851           0 :         if (object->sids == NULL) {
   13852           0 :                 py_sids = Py_None;
   13853           0 :                 Py_INCREF(py_sids);
   13854             :         } else {
   13855           0 :                 py_sids = PyList_New(object->num_sids);
   13856           0 :                 if (py_sids == NULL) {
   13857           0 :                         return NULL;
   13858             :                 }
   13859             :                 {
   13860             :                         int sids_cntr_1;
   13861           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < (object->num_sids); sids_cntr_1++) {
   13862           0 :                                 PyObject *py_sids_1;
   13863           0 :                                 if ((object->sids)[sids_cntr_1] == NULL) {
   13864           0 :                                         py_sids_1 = Py_None;
   13865           0 :                                         Py_INCREF(py_sids_1);
   13866             :                                 } else {
   13867           0 :                                         py_sids_1 = pytalloc_reference_ex(dom_sid_Type, (object->sids)[sids_cntr_1], (object->sids)[sids_cntr_1]);
   13868             :                                 }
   13869           0 :                                 PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
   13870             :                         }
   13871             :                 }
   13872             :         }
   13873           0 :         return py_sids;
   13874             : }
   13875             : 
   13876           0 : static int py_drsuapi_DsGetMembershipsCtr1_set_sids(PyObject *py_obj, PyObject *value, void *closure)
   13877             : {
   13878           0 :         struct drsuapi_DsGetMembershipsCtr1 *object = pytalloc_get_ptr(py_obj);
   13879           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
   13880           0 :         if (value == NULL) {
   13881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
   13882           0 :                 return -1;
   13883             :         }
   13884           0 :         if (value == Py_None) {
   13885           0 :                 object->sids = NULL;
   13886             :         } else {
   13887           0 :                 object->sids = NULL;
   13888           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   13889             :                 {
   13890           0 :                         int sids_cntr_1;
   13891           0 :                         object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
   13892           0 :                         if (!object->sids) { return -1; }
   13893           0 :                         talloc_set_name_const(object->sids, "ARRAY: object->sids");
   13894           0 :                         for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
   13895           0 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
   13896           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->sids)[sids_cntr_1]");
   13897           0 :                                         return -1;
   13898             :                                 }
   13899           0 :                                 if (PyList_GET_ITEM(value, sids_cntr_1) == Py_None) {
   13900           0 :                                         (object->sids)[sids_cntr_1] = NULL;
   13901             :                                 } else {
   13902           0 :                                         (object->sids)[sids_cntr_1] = NULL;
   13903           0 :                                         PY_CHECK_TYPE(dom_sid_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
   13904           0 :                                         if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
   13905           0 :                                                 PyErr_NoMemory();
   13906           0 :                                                 return -1;
   13907             :                                         }
   13908           0 :                                         (object->sids)[sids_cntr_1] = (struct dom_sid *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
   13909             :                                 }
   13910             :                         }
   13911             :                 }
   13912             :         }
   13913           0 :         return 0;
   13914             : }
   13915             : 
   13916             : static PyGetSetDef py_drsuapi_DsGetMembershipsCtr1_getsetters[] = {
   13917             :         {
   13918             :                 .name = discard_const_p(char, "status"),
   13919             :                 .get = py_drsuapi_DsGetMembershipsCtr1_get_status,
   13920             :                 .set = py_drsuapi_DsGetMembershipsCtr1_set_status,
   13921             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTSTATUS")
   13922             :         },
   13923             :         {
   13924             :                 .name = discard_const_p(char, "num_memberships"),
   13925             :                 .get = py_drsuapi_DsGetMembershipsCtr1_get_num_memberships,
   13926             :                 .set = py_drsuapi_DsGetMembershipsCtr1_set_num_memberships,
   13927             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13928             :         },
   13929             :         {
   13930             :                 .name = discard_const_p(char, "num_sids"),
   13931             :                 .get = py_drsuapi_DsGetMembershipsCtr1_get_num_sids,
   13932             :                 .set = py_drsuapi_DsGetMembershipsCtr1_set_num_sids,
   13933             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   13934             :         },
   13935             :         {
   13936             :                 .name = discard_const_p(char, "info_array"),
   13937             :                 .get = py_drsuapi_DsGetMembershipsCtr1_get_info_array,
   13938             :                 .set = py_drsuapi_DsGetMembershipsCtr1_set_info_array,
   13939             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   13940             :         },
   13941             :         {
   13942             :                 .name = discard_const_p(char, "group_attrs"),
   13943             :                 .get = py_drsuapi_DsGetMembershipsCtr1_get_group_attrs,
   13944             :                 .set = py_drsuapi_DsGetMembershipsCtr1_set_group_attrs,
   13945             :                 .doc = discard_const_p(char, "PIDL-generated element of base type security_GroupAttrs")
   13946             :         },
   13947             :         {
   13948             :                 .name = discard_const_p(char, "sids"),
   13949             :                 .get = py_drsuapi_DsGetMembershipsCtr1_get_sids,
   13950             :                 .set = py_drsuapi_DsGetMembershipsCtr1_set_sids,
   13951             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
   13952             :         },
   13953             :         { .name = NULL }
   13954             : };
   13955             : 
   13956           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   13957             : {
   13958           0 :         return pytalloc_new(struct drsuapi_DsGetMembershipsCtr1, type);
   13959             : }
   13960             : 
   13961             : 
   13962             : static PyTypeObject drsuapi_DsGetMembershipsCtr1_Type = {
   13963             :         PyVarObject_HEAD_INIT(NULL, 0)
   13964             :         .tp_name = "drsuapi.DsGetMembershipsCtr1",
   13965             :         .tp_getset = py_drsuapi_DsGetMembershipsCtr1_getsetters,
   13966             :         .tp_methods = NULL,
   13967             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   13968             :         .tp_new = py_drsuapi_DsGetMembershipsCtr1_new,
   13969             : };
   13970             : 
   13971           0 : static PyObject *py_import_drsuapi_DsGetMembershipsCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMembershipsCtr *in)
   13972             : {
   13973           0 :         PyObject *ret;
   13974             : 
   13975           0 :         switch (level) {
   13976           0 :                 case 1:
   13977           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsCtr1_Type, mem_ctx, &in->ctr1);
   13978           0 :                         return ret;
   13979             : 
   13980             :         }
   13981           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   13982           0 :         return NULL;
   13983             : }
   13984             : 
   13985           0 : static union drsuapi_DsGetMembershipsCtr *py_export_drsuapi_DsGetMembershipsCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   13986             : {
   13987           0 :         union drsuapi_DsGetMembershipsCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsCtr);
   13988           0 :         switch (level) {
   13989           0 :                 case 1:
   13990           0 :                         if (in == NULL) {
   13991           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   13992           0 :                                 talloc_free(ret); return NULL;
   13993             :                         }
   13994           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, in, talloc_free(ret); return NULL;);
   13995           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   13996           0 :                                 PyErr_NoMemory();
   13997           0 :                                 talloc_free(ret); return NULL;
   13998             :                         }
   13999           0 :                         ret->ctr1 = *(struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(in);
   14000           0 :                         break;
   14001             : 
   14002           0 :                 default:
   14003           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   14004           0 :                         talloc_free(ret);
   14005           0 :                         ret = NULL;
   14006             :         }
   14007             : 
   14008           0 :         return ret;
   14009             : }
   14010             : 
   14011           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14012             : {
   14013           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   14014           0 :         PyObject *mem_ctx_obj = NULL;
   14015           0 :         TALLOC_CTX *mem_ctx = NULL;
   14016           0 :         int level = 0;
   14017           0 :         PyObject *in_obj = NULL;
   14018           0 :         union drsuapi_DsGetMembershipsCtr *in = NULL;
   14019             : 
   14020           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   14021             :                 discard_const_p(char *, kwnames),
   14022             :                 &mem_ctx_obj,
   14023             :                 &level,
   14024             :                 &in_obj)) {
   14025           0 :                 return NULL;
   14026             :         }
   14027           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   14028           0 :         if (mem_ctx == NULL) {
   14029           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   14030           0 :                 return NULL;
   14031             :         }
   14032           0 :         in = (union drsuapi_DsGetMembershipsCtr *)pytalloc_get_ptr(in_obj);
   14033           0 :         if (in == NULL) {
   14034           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetMembershipsCtr!");
   14035           0 :                 return NULL;
   14036             :         }
   14037             : 
   14038           0 :         return py_import_drsuapi_DsGetMembershipsCtr(mem_ctx, level, in);
   14039             : }
   14040             : 
   14041           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14042             : {
   14043           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   14044           0 :         PyObject *mem_ctx_obj = NULL;
   14045           0 :         TALLOC_CTX *mem_ctx = NULL;
   14046           0 :         int level = 0;
   14047           0 :         PyObject *in = NULL;
   14048           0 :         union drsuapi_DsGetMembershipsCtr *out = NULL;
   14049             : 
   14050           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   14051             :                 discard_const_p(char *, kwnames),
   14052             :                 &mem_ctx_obj,
   14053             :                 &level,
   14054             :                 &in)) {
   14055           0 :                 return NULL;
   14056             :         }
   14057           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   14058           0 :         if (mem_ctx == NULL) {
   14059           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   14060           0 :                 return NULL;
   14061             :         }
   14062             : 
   14063           0 :         out = py_export_drsuapi_DsGetMembershipsCtr(mem_ctx, level, in);
   14064           0 :         if (out == NULL) {
   14065           0 :                 return NULL;
   14066             :         }
   14067             : 
   14068           0 :         return pytalloc_GenericObject_reference(out);
   14069             : }
   14070             : 
   14071             : static PyMethodDef py_drsuapi_DsGetMembershipsCtr_methods[] = {
   14072             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMembershipsCtr_import),
   14073             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   14074             :                 "T.__import__(mem_ctx, level, in) => ret." },
   14075             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMembershipsCtr_export),
   14076             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   14077             :                 "T.__export__(mem_ctx, level, in) => ret." },
   14078             :         { NULL, NULL, 0, NULL }
   14079             : };
   14080             : 
   14081           0 : static PyObject *py_drsuapi_DsGetMembershipsCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14082             : {
   14083           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   14084           0 :         return NULL;
   14085             : }
   14086             : 
   14087             : 
   14088             : static PyTypeObject drsuapi_DsGetMembershipsCtr_Type = {
   14089             :         PyVarObject_HEAD_INIT(NULL, 0)
   14090             :         .tp_name = "drsuapi.DsGetMembershipsCtr",
   14091             :         .tp_getset = NULL,
   14092             :         .tp_methods = py_drsuapi_DsGetMembershipsCtr_methods,
   14093             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14094             :         .tp_new = py_drsuapi_DsGetMembershipsCtr_new,
   14095             : };
   14096             : 
   14097             : 
   14098           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_count(PyObject *obj, void *closure)
   14099             : {
   14100           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(obj);
   14101           0 :         PyObject *py_count;
   14102           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   14103           0 :         return py_count;
   14104             : }
   14105             : 
   14106           0 : static int py_drsuapi_DsGetMembershipsRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
   14107             : {
   14108           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(py_obj);
   14109           0 :         if (value == NULL) {
   14110           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   14111           0 :                 return -1;
   14112             :         }
   14113             :         {
   14114           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   14115           0 :                 if (PyLong_Check(value)) {
   14116           0 :                         unsigned long long test_var;
   14117           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14118           0 :                         if (PyErr_Occurred() != NULL) {
   14119           0 :                                 return -1;
   14120             :                         }
   14121           0 :                         if (test_var > uint_max) {
   14122           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14123             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14124           0 :                                 return -1;
   14125             :                         }
   14126           0 :                         object->count = test_var;
   14127             :                 } else {
   14128           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14129             :                           PyLong_Type.tp_name);
   14130           0 :                         return -1;
   14131             :                 }
   14132             :         }
   14133           0 :         return 0;
   14134             : }
   14135             : 
   14136           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_info_array(PyObject *obj, void *closure)
   14137             : {
   14138           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(obj);
   14139           0 :         PyObject *py_info_array;
   14140           0 :         if (object->info_array == NULL) {
   14141           0 :                 Py_RETURN_NONE;
   14142             :         }
   14143           0 :         if (object->info_array == NULL) {
   14144           0 :                 py_info_array = Py_None;
   14145           0 :                 Py_INCREF(py_info_array);
   14146             :         } else {
   14147           0 :                 py_info_array = PyList_New(object->count);
   14148           0 :                 if (py_info_array == NULL) {
   14149           0 :                         return NULL;
   14150             :                 }
   14151             :                 {
   14152             :                         int info_array_cntr_1;
   14153           0 :                         for (info_array_cntr_1 = 0; info_array_cntr_1 < (object->count); info_array_cntr_1++) {
   14154           0 :                                 PyObject *py_info_array_1;
   14155           0 :                                 if ((object->info_array)[info_array_cntr_1] == NULL) {
   14156           0 :                                         py_info_array_1 = Py_None;
   14157           0 :                                         Py_INCREF(py_info_array_1);
   14158             :                                 } else {
   14159           0 :                                         py_info_array_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, (object->info_array)[info_array_cntr_1], (object->info_array)[info_array_cntr_1]);
   14160             :                                 }
   14161           0 :                                 PyList_SetItem(py_info_array, info_array_cntr_1, py_info_array_1);
   14162             :                         }
   14163             :                 }
   14164             :         }
   14165           0 :         return py_info_array;
   14166             : }
   14167             : 
   14168           0 : static int py_drsuapi_DsGetMembershipsRequest1_set_info_array(PyObject *py_obj, PyObject *value, void *closure)
   14169             : {
   14170           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(py_obj);
   14171           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info_array));
   14172           0 :         if (value == NULL) {
   14173           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_array");
   14174           0 :                 return -1;
   14175             :         }
   14176           0 :         if (value == Py_None) {
   14177           0 :                 object->info_array = NULL;
   14178             :         } else {
   14179           0 :                 object->info_array = NULL;
   14180           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   14181             :                 {
   14182           0 :                         int info_array_cntr_1;
   14183           0 :                         object->info_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info_array, PyList_GET_SIZE(value));
   14184           0 :                         if (!object->info_array) { return -1; }
   14185           0 :                         talloc_set_name_const(object->info_array, "ARRAY: object->info_array");
   14186           0 :                         for (info_array_cntr_1 = 0; info_array_cntr_1 < PyList_GET_SIZE(value); info_array_cntr_1++) {
   14187           0 :                                 if (PyList_GET_ITEM(value, info_array_cntr_1) == NULL) {
   14188           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->info_array)[info_array_cntr_1]");
   14189           0 :                                         return -1;
   14190             :                                 }
   14191           0 :                                 if (PyList_GET_ITEM(value, info_array_cntr_1) == Py_None) {
   14192           0 :                                         (object->info_array)[info_array_cntr_1] = NULL;
   14193             :                                 } else {
   14194           0 :                                         (object->info_array)[info_array_cntr_1] = NULL;
   14195           0 :                                         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, PyList_GET_ITEM(value, info_array_cntr_1), return -1;);
   14196           0 :                                         if (talloc_reference(object->info_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_array_cntr_1))) == NULL) {
   14197           0 :                                                 PyErr_NoMemory();
   14198           0 :                                                 return -1;
   14199             :                                         }
   14200           0 :                                         (object->info_array)[info_array_cntr_1] = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_array_cntr_1));
   14201             :                                 }
   14202             :                         }
   14203             :                 }
   14204             :         }
   14205           0 :         return 0;
   14206             : }
   14207             : 
   14208           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_flags(PyObject *obj, void *closure)
   14209             : {
   14210           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(obj);
   14211           0 :         PyObject *py_flags;
   14212           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   14213           0 :         return py_flags;
   14214             : }
   14215             : 
   14216           0 : static int py_drsuapi_DsGetMembershipsRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   14217             : {
   14218           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(py_obj);
   14219           0 :         if (value == NULL) {
   14220           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   14221           0 :                 return -1;
   14222             :         }
   14223             :         {
   14224           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   14225           0 :                 if (PyLong_Check(value)) {
   14226           0 :                         unsigned long long test_var;
   14227           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14228           0 :                         if (PyErr_Occurred() != NULL) {
   14229           0 :                                 return -1;
   14230             :                         }
   14231           0 :                         if (test_var > uint_max) {
   14232           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14233             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14234           0 :                                 return -1;
   14235             :                         }
   14236           0 :                         object->flags = test_var;
   14237             :                 } else {
   14238           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14239             :                           PyLong_Type.tp_name);
   14240           0 :                         return -1;
   14241             :                 }
   14242             :         }
   14243           0 :         return 0;
   14244             : }
   14245             : 
   14246           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_type(PyObject *obj, void *closure)
   14247             : {
   14248           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(obj);
   14249           0 :         PyObject *py_type;
   14250           0 :         py_type = PyLong_FromUnsignedLongLong((uint32_t)(object->type));
   14251           0 :         return py_type;
   14252             : }
   14253             : 
   14254           0 : static int py_drsuapi_DsGetMembershipsRequest1_set_type(PyObject *py_obj, PyObject *value, void *closure)
   14255             : {
   14256           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(py_obj);
   14257           0 :         if (value == NULL) {
   14258           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
   14259           0 :                 return -1;
   14260             :         }
   14261             :         {
   14262           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
   14263           0 :                 if (PyLong_Check(value)) {
   14264           0 :                         unsigned long long test_var;
   14265           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14266           0 :                         if (PyErr_Occurred() != NULL) {
   14267           0 :                                 return -1;
   14268             :                         }
   14269           0 :                         if (test_var > uint_max) {
   14270           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14271             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14272           0 :                                 return -1;
   14273             :                         }
   14274           0 :                         object->type = test_var;
   14275             :                 } else {
   14276           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14277             :                           PyLong_Type.tp_name);
   14278           0 :                         return -1;
   14279             :                 }
   14280             :         }
   14281           0 :         return 0;
   14282             : }
   14283             : 
   14284           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_domain(PyObject *obj, void *closure)
   14285             : {
   14286           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(obj);
   14287           0 :         PyObject *py_domain;
   14288           0 :         if (object->domain == NULL) {
   14289           0 :                 Py_RETURN_NONE;
   14290             :         }
   14291           0 :         if (object->domain == NULL) {
   14292           0 :                 py_domain = Py_None;
   14293           0 :                 Py_INCREF(py_domain);
   14294             :         } else {
   14295           0 :                 py_domain = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->domain, object->domain);
   14296             :         }
   14297           0 :         return py_domain;
   14298             : }
   14299             : 
   14300           0 : static int py_drsuapi_DsGetMembershipsRequest1_set_domain(PyObject *py_obj, PyObject *value, void *closure)
   14301             : {
   14302           0 :         struct drsuapi_DsGetMembershipsRequest1 *object = pytalloc_get_ptr(py_obj);
   14303           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain));
   14304           0 :         if (value == NULL) {
   14305           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
   14306           0 :                 return -1;
   14307             :         }
   14308           0 :         if (value == Py_None) {
   14309           0 :                 object->domain = NULL;
   14310             :         } else {
   14311           0 :                 object->domain = NULL;
   14312           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   14313           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   14314           0 :                         PyErr_NoMemory();
   14315           0 :                         return -1;
   14316             :                 }
   14317           0 :                 object->domain = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   14318             :         }
   14319           0 :         return 0;
   14320             : }
   14321             : 
   14322             : static PyGetSetDef py_drsuapi_DsGetMembershipsRequest1_getsetters[] = {
   14323             :         {
   14324             :                 .name = discard_const_p(char, "count"),
   14325             :                 .get = py_drsuapi_DsGetMembershipsRequest1_get_count,
   14326             :                 .set = py_drsuapi_DsGetMembershipsRequest1_set_count,
   14327             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14328             :         },
   14329             :         {
   14330             :                 .name = discard_const_p(char, "info_array"),
   14331             :                 .get = py_drsuapi_DsGetMembershipsRequest1_get_info_array,
   14332             :                 .set = py_drsuapi_DsGetMembershipsRequest1_set_info_array,
   14333             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   14334             :         },
   14335             :         {
   14336             :                 .name = discard_const_p(char, "flags"),
   14337             :                 .get = py_drsuapi_DsGetMembershipsRequest1_get_flags,
   14338             :                 .set = py_drsuapi_DsGetMembershipsRequest1_set_flags,
   14339             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14340             :         },
   14341             :         {
   14342             :                 .name = discard_const_p(char, "type"),
   14343             :                 .get = py_drsuapi_DsGetMembershipsRequest1_get_type,
   14344             :                 .set = py_drsuapi_DsGetMembershipsRequest1_set_type,
   14345             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsMembershipType")
   14346             :         },
   14347             :         {
   14348             :                 .name = discard_const_p(char, "domain"),
   14349             :                 .get = py_drsuapi_DsGetMembershipsRequest1_get_domain,
   14350             :                 .set = py_drsuapi_DsGetMembershipsRequest1_set_domain,
   14351             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   14352             :         },
   14353             :         { .name = NULL }
   14354             : };
   14355             : 
   14356           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14357             : {
   14358           0 :         return pytalloc_new(struct drsuapi_DsGetMembershipsRequest1, type);
   14359             : }
   14360             : 
   14361             : 
   14362             : static PyTypeObject drsuapi_DsGetMembershipsRequest1_Type = {
   14363             :         PyVarObject_HEAD_INIT(NULL, 0)
   14364             :         .tp_name = "drsuapi.DsGetMembershipsRequest1",
   14365             :         .tp_getset = py_drsuapi_DsGetMembershipsRequest1_getsetters,
   14366             :         .tp_methods = NULL,
   14367             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14368             :         .tp_new = py_drsuapi_DsGetMembershipsRequest1_new,
   14369             : };
   14370             : 
   14371           0 : static PyObject *py_import_drsuapi_DsGetMembershipsRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMembershipsRequest *in)
   14372             : {
   14373           0 :         PyObject *ret;
   14374             : 
   14375           0 :         switch (level) {
   14376           0 :                 case 1:
   14377           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsRequest1_Type, mem_ctx, &in->req1);
   14378           0 :                         return ret;
   14379             : 
   14380             :         }
   14381           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   14382           0 :         return NULL;
   14383             : }
   14384             : 
   14385           0 : static union drsuapi_DsGetMembershipsRequest *py_export_drsuapi_DsGetMembershipsRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   14386             : {
   14387           0 :         union drsuapi_DsGetMembershipsRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsRequest);
   14388           0 :         switch (level) {
   14389           0 :                 case 1:
   14390           0 :                         if (in == NULL) {
   14391           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   14392           0 :                                 talloc_free(ret); return NULL;
   14393             :                         }
   14394           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetMembershipsRequest1_Type, in, talloc_free(ret); return NULL;);
   14395           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   14396           0 :                                 PyErr_NoMemory();
   14397           0 :                                 talloc_free(ret); return NULL;
   14398             :                         }
   14399           0 :                         ret->req1 = *(struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(in);
   14400           0 :                         break;
   14401             : 
   14402           0 :                 default:
   14403           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   14404           0 :                         talloc_free(ret);
   14405           0 :                         ret = NULL;
   14406             :         }
   14407             : 
   14408           0 :         return ret;
   14409             : }
   14410             : 
   14411           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14412             : {
   14413           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   14414           0 :         PyObject *mem_ctx_obj = NULL;
   14415           0 :         TALLOC_CTX *mem_ctx = NULL;
   14416           0 :         int level = 0;
   14417           0 :         PyObject *in_obj = NULL;
   14418           0 :         union drsuapi_DsGetMembershipsRequest *in = NULL;
   14419             : 
   14420           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   14421             :                 discard_const_p(char *, kwnames),
   14422             :                 &mem_ctx_obj,
   14423             :                 &level,
   14424             :                 &in_obj)) {
   14425           0 :                 return NULL;
   14426             :         }
   14427           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   14428           0 :         if (mem_ctx == NULL) {
   14429           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   14430           0 :                 return NULL;
   14431             :         }
   14432           0 :         in = (union drsuapi_DsGetMembershipsRequest *)pytalloc_get_ptr(in_obj);
   14433           0 :         if (in == NULL) {
   14434           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetMembershipsRequest!");
   14435           0 :                 return NULL;
   14436             :         }
   14437             : 
   14438           0 :         return py_import_drsuapi_DsGetMembershipsRequest(mem_ctx, level, in);
   14439             : }
   14440             : 
   14441           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14442             : {
   14443           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   14444           0 :         PyObject *mem_ctx_obj = NULL;
   14445           0 :         TALLOC_CTX *mem_ctx = NULL;
   14446           0 :         int level = 0;
   14447           0 :         PyObject *in = NULL;
   14448           0 :         union drsuapi_DsGetMembershipsRequest *out = NULL;
   14449             : 
   14450           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   14451             :                 discard_const_p(char *, kwnames),
   14452             :                 &mem_ctx_obj,
   14453             :                 &level,
   14454             :                 &in)) {
   14455           0 :                 return NULL;
   14456             :         }
   14457           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   14458           0 :         if (mem_ctx == NULL) {
   14459           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   14460           0 :                 return NULL;
   14461             :         }
   14462             : 
   14463           0 :         out = py_export_drsuapi_DsGetMembershipsRequest(mem_ctx, level, in);
   14464           0 :         if (out == NULL) {
   14465           0 :                 return NULL;
   14466             :         }
   14467             : 
   14468           0 :         return pytalloc_GenericObject_reference(out);
   14469             : }
   14470             : 
   14471             : static PyMethodDef py_drsuapi_DsGetMembershipsRequest_methods[] = {
   14472             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMembershipsRequest_import),
   14473             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   14474             :                 "T.__import__(mem_ctx, level, in) => ret." },
   14475             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMembershipsRequest_export),
   14476             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   14477             :                 "T.__export__(mem_ctx, level, in) => ret." },
   14478             :         { NULL, NULL, 0, NULL }
   14479             : };
   14480             : 
   14481           0 : static PyObject *py_drsuapi_DsGetMembershipsRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14482             : {
   14483           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   14484           0 :         return NULL;
   14485             : }
   14486             : 
   14487             : 
   14488             : static PyTypeObject drsuapi_DsGetMembershipsRequest_Type = {
   14489             :         PyVarObject_HEAD_INIT(NULL, 0)
   14490             :         .tp_name = "drsuapi.DsGetMembershipsRequest",
   14491             :         .tp_getset = NULL,
   14492             :         .tp_methods = py_drsuapi_DsGetMembershipsRequest_methods,
   14493             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14494             :         .tp_new = py_drsuapi_DsGetMembershipsRequest_new,
   14495             : };
   14496             : 
   14497             : 
   14498           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_flags(PyObject *obj, void *closure)
   14499             : {
   14500           0 :         struct drsuapi_DsGetNT4ChangeLogRequest1 *object = pytalloc_get_ptr(obj);
   14501           0 :         PyObject *py_flags;
   14502           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   14503           0 :         return py_flags;
   14504             : }
   14505             : 
   14506           0 : static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   14507             : {
   14508           0 :         struct drsuapi_DsGetNT4ChangeLogRequest1 *object = pytalloc_get_ptr(py_obj);
   14509           0 :         if (value == NULL) {
   14510           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   14511           0 :                 return -1;
   14512             :         }
   14513             :         {
   14514           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   14515           0 :                 if (PyLong_Check(value)) {
   14516           0 :                         unsigned long long test_var;
   14517           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14518           0 :                         if (PyErr_Occurred() != NULL) {
   14519           0 :                                 return -1;
   14520             :                         }
   14521           0 :                         if (test_var > uint_max) {
   14522           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14523             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14524           0 :                                 return -1;
   14525             :                         }
   14526           0 :                         object->flags = test_var;
   14527             :                 } else {
   14528           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14529             :                           PyLong_Type.tp_name);
   14530           0 :                         return -1;
   14531             :                 }
   14532             :         }
   14533           0 :         return 0;
   14534             : }
   14535             : 
   14536           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_preferred_maximum_length(PyObject *obj, void *closure)
   14537             : {
   14538           0 :         struct drsuapi_DsGetNT4ChangeLogRequest1 *object = pytalloc_get_ptr(obj);
   14539           0 :         PyObject *py_preferred_maximum_length;
   14540           0 :         py_preferred_maximum_length = PyLong_FromUnsignedLongLong((uint32_t)(object->preferred_maximum_length));
   14541           0 :         return py_preferred_maximum_length;
   14542             : }
   14543             : 
   14544           0 : static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_preferred_maximum_length(PyObject *py_obj, PyObject *value, void *closure)
   14545             : {
   14546           0 :         struct drsuapi_DsGetNT4ChangeLogRequest1 *object = pytalloc_get_ptr(py_obj);
   14547           0 :         if (value == NULL) {
   14548           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->preferred_maximum_length");
   14549           0 :                 return -1;
   14550             :         }
   14551             :         {
   14552           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->preferred_maximum_length));
   14553           0 :                 if (PyLong_Check(value)) {
   14554           0 :                         unsigned long long test_var;
   14555           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14556           0 :                         if (PyErr_Occurred() != NULL) {
   14557           0 :                                 return -1;
   14558             :                         }
   14559           0 :                         if (test_var > uint_max) {
   14560           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14561             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14562           0 :                                 return -1;
   14563             :                         }
   14564           0 :                         object->preferred_maximum_length = test_var;
   14565             :                 } else {
   14566           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14567             :                           PyLong_Type.tp_name);
   14568           0 :                         return -1;
   14569             :                 }
   14570             :         }
   14571           0 :         return 0;
   14572             : }
   14573             : 
   14574           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_length(PyObject *obj, void *closure)
   14575             : {
   14576           0 :         struct drsuapi_DsGetNT4ChangeLogRequest1 *object = pytalloc_get_ptr(obj);
   14577           0 :         PyObject *py_restart_length;
   14578           0 :         py_restart_length = PyLong_FromUnsignedLongLong((uint32_t)(object->restart_length));
   14579           0 :         return py_restart_length;
   14580             : }
   14581             : 
   14582           0 : static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_length(PyObject *py_obj, PyObject *value, void *closure)
   14583             : {
   14584           0 :         struct drsuapi_DsGetNT4ChangeLogRequest1 *object = pytalloc_get_ptr(py_obj);
   14585           0 :         if (value == NULL) {
   14586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_length");
   14587           0 :                 return -1;
   14588             :         }
   14589             :         {
   14590           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->restart_length));
   14591           0 :                 if (PyLong_Check(value)) {
   14592           0 :                         unsigned long long test_var;
   14593           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14594           0 :                         if (PyErr_Occurred() != NULL) {
   14595           0 :                                 return -1;
   14596             :                         }
   14597           0 :                         if (test_var > uint_max) {
   14598           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14599             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14600           0 :                                 return -1;
   14601             :                         }
   14602           0 :                         object->restart_length = test_var;
   14603             :                 } else {
   14604           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14605             :                           PyLong_Type.tp_name);
   14606           0 :                         return -1;
   14607             :                 }
   14608             :         }
   14609           0 :         return 0;
   14610             : }
   14611             : 
   14612           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_data(PyObject *obj, void *closure)
   14613             : {
   14614           0 :         struct drsuapi_DsGetNT4ChangeLogRequest1 *object = pytalloc_get_ptr(obj);
   14615           0 :         PyObject *py_restart_data;
   14616           0 :         if (object->restart_data == NULL) {
   14617           0 :                 Py_RETURN_NONE;
   14618             :         }
   14619           0 :         if (object->restart_data == NULL) {
   14620           0 :                 py_restart_data = Py_None;
   14621           0 :                 Py_INCREF(py_restart_data);
   14622             :         } else {
   14623           0 :                 py_restart_data = PyList_New(object->restart_length);
   14624           0 :                 if (py_restart_data == NULL) {
   14625           0 :                         return NULL;
   14626             :                 }
   14627             :                 {
   14628             :                         int restart_data_cntr_1;
   14629           0 :                         for (restart_data_cntr_1 = 0; restart_data_cntr_1 < (object->restart_length); restart_data_cntr_1++) {
   14630           0 :                                 PyObject *py_restart_data_1;
   14631           0 :                                 py_restart_data_1 = PyLong_FromLong((uint16_t)((object->restart_data)[restart_data_cntr_1]));
   14632           0 :                                 PyList_SetItem(py_restart_data, restart_data_cntr_1, py_restart_data_1);
   14633             :                         }
   14634             :                 }
   14635             :         }
   14636           0 :         return py_restart_data;
   14637             : }
   14638             : 
   14639           0 : static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_data(PyObject *py_obj, PyObject *value, void *closure)
   14640             : {
   14641           0 :         struct drsuapi_DsGetNT4ChangeLogRequest1 *object = pytalloc_get_ptr(py_obj);
   14642           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->restart_data));
   14643           0 :         if (value == NULL) {
   14644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_data");
   14645           0 :                 return -1;
   14646             :         }
   14647           0 :         if (value == Py_None) {
   14648           0 :                 object->restart_data = NULL;
   14649             :         } else {
   14650           0 :                 object->restart_data = NULL;
   14651           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   14652             :                 {
   14653           0 :                         int restart_data_cntr_1;
   14654           0 :                         object->restart_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->restart_data, PyList_GET_SIZE(value));
   14655           0 :                         if (!object->restart_data) { return -1; }
   14656           0 :                         talloc_set_name_const(object->restart_data, "ARRAY: object->restart_data");
   14657           0 :                         for (restart_data_cntr_1 = 0; restart_data_cntr_1 < PyList_GET_SIZE(value); restart_data_cntr_1++) {
   14658           0 :                                 if (PyList_GET_ITEM(value, restart_data_cntr_1) == NULL) {
   14659           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->restart_data)[restart_data_cntr_1]");
   14660           0 :                                         return -1;
   14661             :                                 }
   14662             :                                 {
   14663           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->restart_data)[restart_data_cntr_1]));
   14664           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, restart_data_cntr_1))) {
   14665           0 :                                                 unsigned long long test_var;
   14666           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, restart_data_cntr_1));
   14667           0 :                                                 if (PyErr_Occurred() != NULL) {
   14668           0 :                                                         return -1;
   14669             :                                                 }
   14670           0 :                                                 if (test_var > uint_max) {
   14671           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14672             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   14673           0 :                                                         return -1;
   14674             :                                                 }
   14675           0 :                                                 (object->restart_data)[restart_data_cntr_1] = test_var;
   14676             :                                         } else {
   14677           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   14678             :                                                   PyLong_Type.tp_name);
   14679           0 :                                                 return -1;
   14680             :                                         }
   14681             :                                 }
   14682             :                         }
   14683             :                 }
   14684             :         }
   14685           0 :         return 0;
   14686             : }
   14687             : 
   14688             : static PyGetSetDef py_drsuapi_DsGetNT4ChangeLogRequest1_getsetters[] = {
   14689             :         {
   14690             :                 .name = discard_const_p(char, "flags"),
   14691             :                 .get = py_drsuapi_DsGetNT4ChangeLogRequest1_get_flags,
   14692             :                 .set = py_drsuapi_DsGetNT4ChangeLogRequest1_set_flags,
   14693             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNT4ChangeLogFlags")
   14694             :         },
   14695             :         {
   14696             :                 .name = discard_const_p(char, "preferred_maximum_length"),
   14697             :                 .get = py_drsuapi_DsGetNT4ChangeLogRequest1_get_preferred_maximum_length,
   14698             :                 .set = py_drsuapi_DsGetNT4ChangeLogRequest1_set_preferred_maximum_length,
   14699             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14700             :         },
   14701             :         {
   14702             :                 .name = discard_const_p(char, "restart_length"),
   14703             :                 .get = py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_length,
   14704             :                 .set = py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_length,
   14705             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   14706             :         },
   14707             :         {
   14708             :                 .name = discard_const_p(char, "restart_data"),
   14709             :                 .get = py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_data,
   14710             :                 .set = py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_data,
   14711             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   14712             :         },
   14713             :         { .name = NULL }
   14714             : };
   14715             : 
   14716           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14717             : {
   14718           0 :         return pytalloc_new(struct drsuapi_DsGetNT4ChangeLogRequest1, type);
   14719             : }
   14720             : 
   14721             : 
   14722             : static PyTypeObject drsuapi_DsGetNT4ChangeLogRequest1_Type = {
   14723             :         PyVarObject_HEAD_INIT(NULL, 0)
   14724             :         .tp_name = "drsuapi.DsGetNT4ChangeLogRequest1",
   14725             :         .tp_getset = py_drsuapi_DsGetNT4ChangeLogRequest1_getsetters,
   14726             :         .tp_methods = NULL,
   14727             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14728             :         .tp_new = py_drsuapi_DsGetNT4ChangeLogRequest1_new,
   14729             : };
   14730             : 
   14731           0 : static PyObject *py_import_drsuapi_DsGetNT4ChangeLogRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNT4ChangeLogRequest *in)
   14732             : {
   14733           0 :         PyObject *ret;
   14734             : 
   14735           0 :         switch (level) {
   14736           0 :                 case 1:
   14737           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNT4ChangeLogRequest1_Type, mem_ctx, &in->req1);
   14738           0 :                         return ret;
   14739             : 
   14740             :         }
   14741           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   14742           0 :         return NULL;
   14743             : }
   14744             : 
   14745           0 : static union drsuapi_DsGetNT4ChangeLogRequest *py_export_drsuapi_DsGetNT4ChangeLogRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   14746             : {
   14747           0 :         union drsuapi_DsGetNT4ChangeLogRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogRequest);
   14748           0 :         switch (level) {
   14749           0 :                 case 1:
   14750           0 :                         if (in == NULL) {
   14751           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   14752           0 :                                 talloc_free(ret); return NULL;
   14753             :                         }
   14754           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNT4ChangeLogRequest1_Type, in, talloc_free(ret); return NULL;);
   14755           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   14756           0 :                                 PyErr_NoMemory();
   14757           0 :                                 talloc_free(ret); return NULL;
   14758             :                         }
   14759           0 :                         ret->req1 = *(struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(in);
   14760           0 :                         break;
   14761             : 
   14762           0 :                 default:
   14763           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   14764           0 :                         talloc_free(ret);
   14765           0 :                         ret = NULL;
   14766             :         }
   14767             : 
   14768           0 :         return ret;
   14769             : }
   14770             : 
   14771           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14772             : {
   14773           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   14774           0 :         PyObject *mem_ctx_obj = NULL;
   14775           0 :         TALLOC_CTX *mem_ctx = NULL;
   14776           0 :         int level = 0;
   14777           0 :         PyObject *in_obj = NULL;
   14778           0 :         union drsuapi_DsGetNT4ChangeLogRequest *in = NULL;
   14779             : 
   14780           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   14781             :                 discard_const_p(char *, kwnames),
   14782             :                 &mem_ctx_obj,
   14783             :                 &level,
   14784             :                 &in_obj)) {
   14785           0 :                 return NULL;
   14786             :         }
   14787           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   14788           0 :         if (mem_ctx == NULL) {
   14789           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   14790           0 :                 return NULL;
   14791             :         }
   14792           0 :         in = (union drsuapi_DsGetNT4ChangeLogRequest *)pytalloc_get_ptr(in_obj);
   14793           0 :         if (in == NULL) {
   14794           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNT4ChangeLogRequest!");
   14795           0 :                 return NULL;
   14796             :         }
   14797             : 
   14798           0 :         return py_import_drsuapi_DsGetNT4ChangeLogRequest(mem_ctx, level, in);
   14799             : }
   14800             : 
   14801           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14802             : {
   14803           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   14804           0 :         PyObject *mem_ctx_obj = NULL;
   14805           0 :         TALLOC_CTX *mem_ctx = NULL;
   14806           0 :         int level = 0;
   14807           0 :         PyObject *in = NULL;
   14808           0 :         union drsuapi_DsGetNT4ChangeLogRequest *out = NULL;
   14809             : 
   14810           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   14811             :                 discard_const_p(char *, kwnames),
   14812             :                 &mem_ctx_obj,
   14813             :                 &level,
   14814             :                 &in)) {
   14815           0 :                 return NULL;
   14816             :         }
   14817           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   14818           0 :         if (mem_ctx == NULL) {
   14819           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   14820           0 :                 return NULL;
   14821             :         }
   14822             : 
   14823           0 :         out = py_export_drsuapi_DsGetNT4ChangeLogRequest(mem_ctx, level, in);
   14824           0 :         if (out == NULL) {
   14825           0 :                 return NULL;
   14826             :         }
   14827             : 
   14828           0 :         return pytalloc_GenericObject_reference(out);
   14829             : }
   14830             : 
   14831             : static PyMethodDef py_drsuapi_DsGetNT4ChangeLogRequest_methods[] = {
   14832             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLogRequest_import),
   14833             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   14834             :                 "T.__import__(mem_ctx, level, in) => ret." },
   14835             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLogRequest_export),
   14836             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   14837             :                 "T.__export__(mem_ctx, level, in) => ret." },
   14838             :         { NULL, NULL, 0, NULL }
   14839             : };
   14840             : 
   14841           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   14842             : {
   14843           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   14844           0 :         return NULL;
   14845             : }
   14846             : 
   14847             : 
   14848             : static PyTypeObject drsuapi_DsGetNT4ChangeLogRequest_Type = {
   14849             :         PyVarObject_HEAD_INIT(NULL, 0)
   14850             :         .tp_name = "drsuapi.DsGetNT4ChangeLogRequest",
   14851             :         .tp_getset = NULL,
   14852             :         .tp_methods = py_drsuapi_DsGetNT4ChangeLogRequest_methods,
   14853             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   14854             :         .tp_new = py_drsuapi_DsGetNT4ChangeLogRequest_new,
   14855             : };
   14856             : 
   14857             : 
   14858           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_length(PyObject *obj, void *closure)
   14859             : {
   14860           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   14861           0 :         PyObject *py_restart_length;
   14862           0 :         py_restart_length = PyLong_FromUnsignedLongLong((uint32_t)(object->restart_length));
   14863           0 :         return py_restart_length;
   14864             : }
   14865             : 
   14866           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_length(PyObject *py_obj, PyObject *value, void *closure)
   14867             : {
   14868           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   14869           0 :         if (value == NULL) {
   14870           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_length");
   14871           0 :                 return -1;
   14872             :         }
   14873             :         {
   14874           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->restart_length));
   14875           0 :                 if (PyLong_Check(value)) {
   14876           0 :                         unsigned long long test_var;
   14877           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14878           0 :                         if (PyErr_Occurred() != NULL) {
   14879           0 :                                 return -1;
   14880             :                         }
   14881           0 :                         if (test_var > uint_max) {
   14882           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14883             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14884           0 :                                 return -1;
   14885             :                         }
   14886           0 :                         object->restart_length = test_var;
   14887             :                 } else {
   14888           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14889             :                           PyLong_Type.tp_name);
   14890           0 :                         return -1;
   14891             :                 }
   14892             :         }
   14893           0 :         return 0;
   14894             : }
   14895             : 
   14896           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_length(PyObject *obj, void *closure)
   14897             : {
   14898           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   14899           0 :         PyObject *py_log_length;
   14900           0 :         py_log_length = PyLong_FromUnsignedLongLong((uint32_t)(object->log_length));
   14901           0 :         return py_log_length;
   14902             : }
   14903             : 
   14904           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_length(PyObject *py_obj, PyObject *value, void *closure)
   14905             : {
   14906           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   14907           0 :         if (value == NULL) {
   14908           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->log_length");
   14909           0 :                 return -1;
   14910             :         }
   14911             :         {
   14912           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->log_length));
   14913           0 :                 if (PyLong_Check(value)) {
   14914           0 :                         unsigned long long test_var;
   14915           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14916           0 :                         if (PyErr_Occurred() != NULL) {
   14917           0 :                                 return -1;
   14918             :                         }
   14919           0 :                         if (test_var > uint_max) {
   14920           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14921             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14922           0 :                                 return -1;
   14923             :                         }
   14924           0 :                         object->log_length = test_var;
   14925             :                 } else {
   14926           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14927             :                           PyLong_Type.tp_name);
   14928           0 :                         return -1;
   14929             :                 }
   14930             :         }
   14931           0 :         return 0;
   14932             : }
   14933             : 
   14934           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_serial_number(PyObject *obj, void *closure)
   14935             : {
   14936           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   14937           0 :         PyObject *py_sam_serial_number;
   14938           0 :         py_sam_serial_number = PyLong_FromUnsignedLongLong(object->sam_serial_number);
   14939           0 :         return py_sam_serial_number;
   14940             : }
   14941             : 
   14942           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_serial_number(PyObject *py_obj, PyObject *value, void *closure)
   14943             : {
   14944           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   14945           0 :         if (value == NULL) {
   14946           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sam_serial_number");
   14947           0 :                 return -1;
   14948             :         }
   14949             :         {
   14950           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sam_serial_number));
   14951           0 :                 if (PyLong_Check(value)) {
   14952           0 :                         unsigned long long test_var;
   14953           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14954           0 :                         if (PyErr_Occurred() != NULL) {
   14955           0 :                                 return -1;
   14956             :                         }
   14957           0 :                         if (test_var > uint_max) {
   14958           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14959             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14960           0 :                                 return -1;
   14961             :                         }
   14962           0 :                         object->sam_serial_number = test_var;
   14963             :                 } else {
   14964           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   14965             :                           PyLong_Type.tp_name);
   14966           0 :                         return -1;
   14967             :                 }
   14968             :         }
   14969           0 :         return 0;
   14970             : }
   14971             : 
   14972           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_creation_time(PyObject *obj, void *closure)
   14973             : {
   14974           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   14975           0 :         PyObject *py_sam_creation_time;
   14976           0 :         py_sam_creation_time = PyLong_FromUnsignedLongLong(object->sam_creation_time);
   14977           0 :         return py_sam_creation_time;
   14978             : }
   14979             : 
   14980           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_creation_time(PyObject *py_obj, PyObject *value, void *closure)
   14981             : {
   14982           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   14983           0 :         if (value == NULL) {
   14984           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sam_creation_time");
   14985           0 :                 return -1;
   14986             :         }
   14987             :         {
   14988           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sam_creation_time));
   14989           0 :                 if (PyLong_Check(value)) {
   14990           0 :                         unsigned long long test_var;
   14991           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   14992           0 :                         if (PyErr_Occurred() != NULL) {
   14993           0 :                                 return -1;
   14994             :                         }
   14995           0 :                         if (test_var > uint_max) {
   14996           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   14997             :                                   PyLong_Type.tp_name, uint_max, test_var);
   14998           0 :                                 return -1;
   14999             :                         }
   15000           0 :                         object->sam_creation_time = test_var;
   15001             :                 } else {
   15002           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15003             :                           PyLong_Type.tp_name);
   15004           0 :                         return -1;
   15005             :                 }
   15006             :         }
   15007           0 :         return 0;
   15008             : }
   15009             : 
   15010           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_serial_number(PyObject *obj, void *closure)
   15011             : {
   15012           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   15013           0 :         PyObject *py_builtin_serial_number;
   15014           0 :         py_builtin_serial_number = PyLong_FromUnsignedLongLong(object->builtin_serial_number);
   15015           0 :         return py_builtin_serial_number;
   15016             : }
   15017             : 
   15018           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_serial_number(PyObject *py_obj, PyObject *value, void *closure)
   15019             : {
   15020           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   15021           0 :         if (value == NULL) {
   15022           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->builtin_serial_number");
   15023           0 :                 return -1;
   15024             :         }
   15025             :         {
   15026           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->builtin_serial_number));
   15027           0 :                 if (PyLong_Check(value)) {
   15028           0 :                         unsigned long long test_var;
   15029           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15030           0 :                         if (PyErr_Occurred() != NULL) {
   15031           0 :                                 return -1;
   15032             :                         }
   15033           0 :                         if (test_var > uint_max) {
   15034           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15035             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15036           0 :                                 return -1;
   15037             :                         }
   15038           0 :                         object->builtin_serial_number = test_var;
   15039             :                 } else {
   15040           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15041             :                           PyLong_Type.tp_name);
   15042           0 :                         return -1;
   15043             :                 }
   15044             :         }
   15045           0 :         return 0;
   15046             : }
   15047             : 
   15048           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_creation_time(PyObject *obj, void *closure)
   15049             : {
   15050           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   15051           0 :         PyObject *py_builtin_creation_time;
   15052           0 :         py_builtin_creation_time = PyLong_FromUnsignedLongLong(object->builtin_creation_time);
   15053           0 :         return py_builtin_creation_time;
   15054             : }
   15055             : 
   15056           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_creation_time(PyObject *py_obj, PyObject *value, void *closure)
   15057             : {
   15058           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   15059           0 :         if (value == NULL) {
   15060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->builtin_creation_time");
   15061           0 :                 return -1;
   15062             :         }
   15063             :         {
   15064           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->builtin_creation_time));
   15065           0 :                 if (PyLong_Check(value)) {
   15066           0 :                         unsigned long long test_var;
   15067           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15068           0 :                         if (PyErr_Occurred() != NULL) {
   15069           0 :                                 return -1;
   15070             :                         }
   15071           0 :                         if (test_var > uint_max) {
   15072           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15073             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15074           0 :                                 return -1;
   15075             :                         }
   15076           0 :                         object->builtin_creation_time = test_var;
   15077             :                 } else {
   15078           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15079             :                           PyLong_Type.tp_name);
   15080           0 :                         return -1;
   15081             :                 }
   15082             :         }
   15083           0 :         return 0;
   15084             : }
   15085             : 
   15086           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_serial_number(PyObject *obj, void *closure)
   15087             : {
   15088           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   15089           0 :         PyObject *py_lsa_serial_number;
   15090           0 :         py_lsa_serial_number = PyLong_FromUnsignedLongLong(object->lsa_serial_number);
   15091           0 :         return py_lsa_serial_number;
   15092             : }
   15093             : 
   15094           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_serial_number(PyObject *py_obj, PyObject *value, void *closure)
   15095             : {
   15096           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   15097           0 :         if (value == NULL) {
   15098           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lsa_serial_number");
   15099           0 :                 return -1;
   15100             :         }
   15101             :         {
   15102           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lsa_serial_number));
   15103           0 :                 if (PyLong_Check(value)) {
   15104           0 :                         unsigned long long test_var;
   15105           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15106           0 :                         if (PyErr_Occurred() != NULL) {
   15107           0 :                                 return -1;
   15108             :                         }
   15109           0 :                         if (test_var > uint_max) {
   15110           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15111             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15112           0 :                                 return -1;
   15113             :                         }
   15114           0 :                         object->lsa_serial_number = test_var;
   15115             :                 } else {
   15116           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15117             :                           PyLong_Type.tp_name);
   15118           0 :                         return -1;
   15119             :                 }
   15120             :         }
   15121           0 :         return 0;
   15122             : }
   15123             : 
   15124           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_creation_time(PyObject *obj, void *closure)
   15125             : {
   15126           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   15127           0 :         PyObject *py_lsa_creation_time;
   15128           0 :         py_lsa_creation_time = PyLong_FromUnsignedLongLong(object->lsa_creation_time);
   15129           0 :         return py_lsa_creation_time;
   15130             : }
   15131             : 
   15132           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_creation_time(PyObject *py_obj, PyObject *value, void *closure)
   15133             : {
   15134           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   15135           0 :         if (value == NULL) {
   15136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lsa_creation_time");
   15137           0 :                 return -1;
   15138             :         }
   15139             :         {
   15140           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lsa_creation_time));
   15141           0 :                 if (PyLong_Check(value)) {
   15142           0 :                         unsigned long long test_var;
   15143           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15144           0 :                         if (PyErr_Occurred() != NULL) {
   15145           0 :                                 return -1;
   15146             :                         }
   15147           0 :                         if (test_var > uint_max) {
   15148           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15149             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15150           0 :                                 return -1;
   15151             :                         }
   15152           0 :                         object->lsa_creation_time = test_var;
   15153             :                 } else {
   15154           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15155             :                           PyLong_Type.tp_name);
   15156           0 :                         return -1;
   15157             :                 }
   15158             :         }
   15159           0 :         return 0;
   15160             : }
   15161             : 
   15162           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_status(PyObject *obj, void *closure)
   15163             : {
   15164           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   15165           0 :         PyObject *py_status;
   15166           0 :         py_status = PyErr_FromNTSTATUS(object->status);
   15167           0 :         return py_status;
   15168             : }
   15169             : 
   15170           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
   15171             : {
   15172           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   15173           0 :         if (value == NULL) {
   15174           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
   15175           0 :                 return -1;
   15176             :         }
   15177           0 :         object->status = NT_STATUS(PyLong_AsLong(value));
   15178           0 :         return 0;
   15179             : }
   15180             : 
   15181           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_data(PyObject *obj, void *closure)
   15182             : {
   15183           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   15184           0 :         PyObject *py_restart_data;
   15185           0 :         if (object->restart_data == NULL) {
   15186           0 :                 Py_RETURN_NONE;
   15187             :         }
   15188           0 :         if (object->restart_data == NULL) {
   15189           0 :                 py_restart_data = Py_None;
   15190           0 :                 Py_INCREF(py_restart_data);
   15191             :         } else {
   15192           0 :                 py_restart_data = PyList_New(object->restart_length);
   15193           0 :                 if (py_restart_data == NULL) {
   15194           0 :                         return NULL;
   15195             :                 }
   15196             :                 {
   15197             :                         int restart_data_cntr_1;
   15198           0 :                         for (restart_data_cntr_1 = 0; restart_data_cntr_1 < (object->restart_length); restart_data_cntr_1++) {
   15199           0 :                                 PyObject *py_restart_data_1;
   15200           0 :                                 py_restart_data_1 = PyLong_FromLong((uint16_t)((object->restart_data)[restart_data_cntr_1]));
   15201           0 :                                 PyList_SetItem(py_restart_data, restart_data_cntr_1, py_restart_data_1);
   15202             :                         }
   15203             :                 }
   15204             :         }
   15205           0 :         return py_restart_data;
   15206             : }
   15207             : 
   15208           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_data(PyObject *py_obj, PyObject *value, void *closure)
   15209             : {
   15210           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   15211           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->restart_data));
   15212           0 :         if (value == NULL) {
   15213           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_data");
   15214           0 :                 return -1;
   15215             :         }
   15216           0 :         if (value == Py_None) {
   15217           0 :                 object->restart_data = NULL;
   15218             :         } else {
   15219           0 :                 object->restart_data = NULL;
   15220           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   15221             :                 {
   15222           0 :                         int restart_data_cntr_1;
   15223           0 :                         object->restart_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->restart_data, PyList_GET_SIZE(value));
   15224           0 :                         if (!object->restart_data) { return -1; }
   15225           0 :                         talloc_set_name_const(object->restart_data, "ARRAY: object->restart_data");
   15226           0 :                         for (restart_data_cntr_1 = 0; restart_data_cntr_1 < PyList_GET_SIZE(value); restart_data_cntr_1++) {
   15227           0 :                                 if (PyList_GET_ITEM(value, restart_data_cntr_1) == NULL) {
   15228           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->restart_data)[restart_data_cntr_1]");
   15229           0 :                                         return -1;
   15230             :                                 }
   15231             :                                 {
   15232           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->restart_data)[restart_data_cntr_1]));
   15233           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, restart_data_cntr_1))) {
   15234           0 :                                                 unsigned long long test_var;
   15235           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, restart_data_cntr_1));
   15236           0 :                                                 if (PyErr_Occurred() != NULL) {
   15237           0 :                                                         return -1;
   15238             :                                                 }
   15239           0 :                                                 if (test_var > uint_max) {
   15240           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15241             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   15242           0 :                                                         return -1;
   15243             :                                                 }
   15244           0 :                                                 (object->restart_data)[restart_data_cntr_1] = test_var;
   15245             :                                         } else {
   15246           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   15247             :                                                   PyLong_Type.tp_name);
   15248           0 :                                                 return -1;
   15249             :                                         }
   15250             :                                 }
   15251             :                         }
   15252             :                 }
   15253             :         }
   15254           0 :         return 0;
   15255             : }
   15256             : 
   15257           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_data(PyObject *obj, void *closure)
   15258             : {
   15259           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(obj);
   15260           0 :         PyObject *py_log_data;
   15261           0 :         if (object->log_data == NULL) {
   15262           0 :                 Py_RETURN_NONE;
   15263             :         }
   15264           0 :         if (object->log_data == NULL) {
   15265           0 :                 py_log_data = Py_None;
   15266           0 :                 Py_INCREF(py_log_data);
   15267             :         } else {
   15268           0 :                 py_log_data = PyList_New(object->log_length);
   15269           0 :                 if (py_log_data == NULL) {
   15270           0 :                         return NULL;
   15271             :                 }
   15272             :                 {
   15273             :                         int log_data_cntr_1;
   15274           0 :                         for (log_data_cntr_1 = 0; log_data_cntr_1 < (object->log_length); log_data_cntr_1++) {
   15275           0 :                                 PyObject *py_log_data_1;
   15276           0 :                                 py_log_data_1 = PyLong_FromLong((uint16_t)((object->log_data)[log_data_cntr_1]));
   15277           0 :                                 PyList_SetItem(py_log_data, log_data_cntr_1, py_log_data_1);
   15278             :                         }
   15279             :                 }
   15280             :         }
   15281           0 :         return py_log_data;
   15282             : }
   15283             : 
   15284           0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_data(PyObject *py_obj, PyObject *value, void *closure)
   15285             : {
   15286           0 :         struct drsuapi_DsGetNT4ChangeLogInfo1 *object = pytalloc_get_ptr(py_obj);
   15287           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->log_data));
   15288           0 :         if (value == NULL) {
   15289           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->log_data");
   15290           0 :                 return -1;
   15291             :         }
   15292           0 :         if (value == Py_None) {
   15293           0 :                 object->log_data = NULL;
   15294             :         } else {
   15295           0 :                 object->log_data = NULL;
   15296           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   15297             :                 {
   15298           0 :                         int log_data_cntr_1;
   15299           0 :                         object->log_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->log_data, PyList_GET_SIZE(value));
   15300           0 :                         if (!object->log_data) { return -1; }
   15301           0 :                         talloc_set_name_const(object->log_data, "ARRAY: object->log_data");
   15302           0 :                         for (log_data_cntr_1 = 0; log_data_cntr_1 < PyList_GET_SIZE(value); log_data_cntr_1++) {
   15303           0 :                                 if (PyList_GET_ITEM(value, log_data_cntr_1) == NULL) {
   15304           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->log_data)[log_data_cntr_1]");
   15305           0 :                                         return -1;
   15306             :                                 }
   15307             :                                 {
   15308           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->log_data)[log_data_cntr_1]));
   15309           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, log_data_cntr_1))) {
   15310           0 :                                                 unsigned long long test_var;
   15311           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, log_data_cntr_1));
   15312           0 :                                                 if (PyErr_Occurred() != NULL) {
   15313           0 :                                                         return -1;
   15314             :                                                 }
   15315           0 :                                                 if (test_var > uint_max) {
   15316           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15317             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   15318           0 :                                                         return -1;
   15319             :                                                 }
   15320           0 :                                                 (object->log_data)[log_data_cntr_1] = test_var;
   15321             :                                         } else {
   15322           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   15323             :                                                   PyLong_Type.tp_name);
   15324           0 :                                                 return -1;
   15325             :                                         }
   15326             :                                 }
   15327             :                         }
   15328             :                 }
   15329             :         }
   15330           0 :         return 0;
   15331             : }
   15332             : 
   15333             : static PyGetSetDef py_drsuapi_DsGetNT4ChangeLogInfo1_getsetters[] = {
   15334             :         {
   15335             :                 .name = discard_const_p(char, "restart_length"),
   15336             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_length,
   15337             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_length,
   15338             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15339             :         },
   15340             :         {
   15341             :                 .name = discard_const_p(char, "log_length"),
   15342             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_length,
   15343             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_length,
   15344             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15345             :         },
   15346             :         {
   15347             :                 .name = discard_const_p(char, "sam_serial_number"),
   15348             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_serial_number,
   15349             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_serial_number,
   15350             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   15351             :         },
   15352             :         {
   15353             :                 .name = discard_const_p(char, "sam_creation_time"),
   15354             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_creation_time,
   15355             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_creation_time,
   15356             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   15357             :         },
   15358             :         {
   15359             :                 .name = discard_const_p(char, "builtin_serial_number"),
   15360             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_serial_number,
   15361             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_serial_number,
   15362             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   15363             :         },
   15364             :         {
   15365             :                 .name = discard_const_p(char, "builtin_creation_time"),
   15366             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_creation_time,
   15367             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_creation_time,
   15368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   15369             :         },
   15370             :         {
   15371             :                 .name = discard_const_p(char, "lsa_serial_number"),
   15372             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_serial_number,
   15373             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_serial_number,
   15374             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   15375             :         },
   15376             :         {
   15377             :                 .name = discard_const_p(char, "lsa_creation_time"),
   15378             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_creation_time,
   15379             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_creation_time,
   15380             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   15381             :         },
   15382             :         {
   15383             :                 .name = discard_const_p(char, "status"),
   15384             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_status,
   15385             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_status,
   15386             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTSTATUS")
   15387             :         },
   15388             :         {
   15389             :                 .name = discard_const_p(char, "restart_data"),
   15390             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_data,
   15391             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_data,
   15392             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   15393             :         },
   15394             :         {
   15395             :                 .name = discard_const_p(char, "log_data"),
   15396             :                 .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_data,
   15397             :                 .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_data,
   15398             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   15399             :         },
   15400             :         { .name = NULL }
   15401             : };
   15402             : 
   15403           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15404             : {
   15405           0 :         return pytalloc_new(struct drsuapi_DsGetNT4ChangeLogInfo1, type);
   15406             : }
   15407             : 
   15408             : 
   15409             : static PyTypeObject drsuapi_DsGetNT4ChangeLogInfo1_Type = {
   15410             :         PyVarObject_HEAD_INIT(NULL, 0)
   15411             :         .tp_name = "drsuapi.DsGetNT4ChangeLogInfo1",
   15412             :         .tp_getset = py_drsuapi_DsGetNT4ChangeLogInfo1_getsetters,
   15413             :         .tp_methods = NULL,
   15414             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15415             :         .tp_new = py_drsuapi_DsGetNT4ChangeLogInfo1_new,
   15416             : };
   15417             : 
   15418           0 : static PyObject *py_import_drsuapi_DsGetNT4ChangeLogInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNT4ChangeLogInfo *in)
   15419             : {
   15420           0 :         PyObject *ret;
   15421             : 
   15422           0 :         switch (level) {
   15423           0 :                 case 1:
   15424           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetNT4ChangeLogInfo1_Type, mem_ctx, &in->info1);
   15425           0 :                         return ret;
   15426             : 
   15427             :         }
   15428           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   15429           0 :         return NULL;
   15430             : }
   15431             : 
   15432           0 : static union drsuapi_DsGetNT4ChangeLogInfo *py_export_drsuapi_DsGetNT4ChangeLogInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   15433             : {
   15434           0 :         union drsuapi_DsGetNT4ChangeLogInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogInfo);
   15435           0 :         switch (level) {
   15436           0 :                 case 1:
   15437           0 :                         if (in == NULL) {
   15438           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
   15439           0 :                                 talloc_free(ret); return NULL;
   15440             :                         }
   15441           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetNT4ChangeLogInfo1_Type, in, talloc_free(ret); return NULL;);
   15442           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   15443           0 :                                 PyErr_NoMemory();
   15444           0 :                                 talloc_free(ret); return NULL;
   15445             :                         }
   15446           0 :                         ret->info1 = *(struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(in);
   15447           0 :                         break;
   15448             : 
   15449           0 :                 default:
   15450           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   15451           0 :                         talloc_free(ret);
   15452           0 :                         ret = NULL;
   15453             :         }
   15454             : 
   15455           0 :         return ret;
   15456             : }
   15457             : 
   15458           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15459             : {
   15460           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   15461           0 :         PyObject *mem_ctx_obj = NULL;
   15462           0 :         TALLOC_CTX *mem_ctx = NULL;
   15463           0 :         int level = 0;
   15464           0 :         PyObject *in_obj = NULL;
   15465           0 :         union drsuapi_DsGetNT4ChangeLogInfo *in = NULL;
   15466             : 
   15467           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   15468             :                 discard_const_p(char *, kwnames),
   15469             :                 &mem_ctx_obj,
   15470             :                 &level,
   15471             :                 &in_obj)) {
   15472           0 :                 return NULL;
   15473             :         }
   15474           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   15475           0 :         if (mem_ctx == NULL) {
   15476           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   15477           0 :                 return NULL;
   15478             :         }
   15479           0 :         in = (union drsuapi_DsGetNT4ChangeLogInfo *)pytalloc_get_ptr(in_obj);
   15480           0 :         if (in == NULL) {
   15481           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNT4ChangeLogInfo!");
   15482           0 :                 return NULL;
   15483             :         }
   15484             : 
   15485           0 :         return py_import_drsuapi_DsGetNT4ChangeLogInfo(mem_ctx, level, in);
   15486             : }
   15487             : 
   15488           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15489             : {
   15490           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   15491           0 :         PyObject *mem_ctx_obj = NULL;
   15492           0 :         TALLOC_CTX *mem_ctx = NULL;
   15493           0 :         int level = 0;
   15494           0 :         PyObject *in = NULL;
   15495           0 :         union drsuapi_DsGetNT4ChangeLogInfo *out = NULL;
   15496             : 
   15497           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   15498             :                 discard_const_p(char *, kwnames),
   15499             :                 &mem_ctx_obj,
   15500             :                 &level,
   15501             :                 &in)) {
   15502           0 :                 return NULL;
   15503             :         }
   15504           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   15505           0 :         if (mem_ctx == NULL) {
   15506           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   15507           0 :                 return NULL;
   15508             :         }
   15509             : 
   15510           0 :         out = py_export_drsuapi_DsGetNT4ChangeLogInfo(mem_ctx, level, in);
   15511           0 :         if (out == NULL) {
   15512           0 :                 return NULL;
   15513             :         }
   15514             : 
   15515           0 :         return pytalloc_GenericObject_reference(out);
   15516             : }
   15517             : 
   15518             : static PyMethodDef py_drsuapi_DsGetNT4ChangeLogInfo_methods[] = {
   15519             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLogInfo_import),
   15520             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   15521             :                 "T.__import__(mem_ctx, level, in) => ret." },
   15522             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLogInfo_export),
   15523             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   15524             :                 "T.__export__(mem_ctx, level, in) => ret." },
   15525             :         { NULL, NULL, 0, NULL }
   15526             : };
   15527             : 
   15528           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15529             : {
   15530           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   15531           0 :         return NULL;
   15532             : }
   15533             : 
   15534             : 
   15535             : static PyTypeObject drsuapi_DsGetNT4ChangeLogInfo_Type = {
   15536             :         PyVarObject_HEAD_INIT(NULL, 0)
   15537             :         .tp_name = "drsuapi.DsGetNT4ChangeLogInfo",
   15538             :         .tp_getset = NULL,
   15539             :         .tp_methods = py_drsuapi_DsGetNT4ChangeLogInfo_methods,
   15540             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15541             :         .tp_new = py_drsuapi_DsGetNT4ChangeLogInfo_new,
   15542             : };
   15543             : 
   15544             : 
   15545           0 : static PyObject *py_drsuapi_DsNameString_get_str(PyObject *obj, void *closure)
   15546             : {
   15547           0 :         struct drsuapi_DsNameString *object = pytalloc_get_ptr(obj);
   15548           0 :         PyObject *py_str;
   15549           0 :         if (object->str == NULL) {
   15550           0 :                 Py_RETURN_NONE;
   15551             :         }
   15552           0 :         if (object->str == NULL) {
   15553           0 :                 py_str = Py_None;
   15554           0 :                 Py_INCREF(py_str);
   15555             :         } else {
   15556           0 :                 if (object->str == NULL) {
   15557           0 :                         py_str = Py_None;
   15558           0 :                         Py_INCREF(py_str);
   15559             :                 } else {
   15560           0 :                         py_str = PyUnicode_Decode(object->str, strlen(object->str), "utf-8", "ignore");
   15561             :                 }
   15562             :         }
   15563           0 :         return py_str;
   15564             : }
   15565             : 
   15566          32 : static int py_drsuapi_DsNameString_set_str(PyObject *py_obj, PyObject *value, void *closure)
   15567             : {
   15568          32 :         struct drsuapi_DsNameString *object = pytalloc_get_ptr(py_obj);
   15569          32 :         if (value == NULL) {
   15570           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->str");
   15571           0 :                 return -1;
   15572             :         }
   15573          32 :         if (value == Py_None) {
   15574           0 :                 object->str = NULL;
   15575             :         } else {
   15576          32 :                 object->str = NULL;
   15577             :                 {
   15578           0 :                         const char *test_str;
   15579           0 :                         const char *talloc_str;
   15580          32 :                         PyObject *unicode = NULL;
   15581          32 :                         if (PyUnicode_Check(value)) {
   15582          32 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   15583          32 :                                 if (unicode == NULL) {
   15584           0 :                                         return -1;
   15585             :                                 }
   15586          32 :                                 test_str = PyBytes_AS_STRING(unicode);
   15587           0 :                         } else if (PyBytes_Check(value)) {
   15588           0 :                                 test_str = PyBytes_AS_STRING(value);
   15589             :                         } else {
   15590           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   15591           0 :                                 return -1;
   15592             :                         }
   15593          32 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   15594          32 :                         if (unicode != NULL) {
   15595          32 :                                 Py_DECREF(unicode);
   15596             :                         }
   15597          32 :                         if (talloc_str == NULL) {
   15598           0 :                                 PyErr_NoMemory();
   15599           0 :                                 return -1;
   15600             :                         }
   15601          32 :                         object->str = talloc_str;
   15602             :                 }
   15603             :         }
   15604          32 :         return 0;
   15605             : }
   15606             : 
   15607             : static PyGetSetDef py_drsuapi_DsNameString_getsetters[] = {
   15608             :         {
   15609             :                 .name = discard_const_p(char, "str"),
   15610             :                 .get = py_drsuapi_DsNameString_get_str,
   15611             :                 .set = py_drsuapi_DsNameString_set_str,
   15612             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   15613             :         },
   15614             :         { .name = NULL }
   15615             : };
   15616             : 
   15617          32 : static PyObject *py_drsuapi_DsNameString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15618             : {
   15619          32 :         return pytalloc_new(struct drsuapi_DsNameString, type);
   15620             : }
   15621             : 
   15622             : 
   15623             : static PyTypeObject drsuapi_DsNameString_Type = {
   15624             :         PyVarObject_HEAD_INIT(NULL, 0)
   15625             :         .tp_name = "drsuapi.DsNameString",
   15626             :         .tp_getset = py_drsuapi_DsNameString_getsetters,
   15627             :         .tp_methods = NULL,
   15628             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15629             :         .tp_new = py_drsuapi_DsNameString_new,
   15630             : };
   15631             : 
   15632             : 
   15633           0 : static PyObject *py_drsuapi_DsNameRequest1_get_codepage(PyObject *obj, void *closure)
   15634             : {
   15635           0 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(obj);
   15636           0 :         PyObject *py_codepage;
   15637           0 :         py_codepage = PyLong_FromUnsignedLongLong((uint32_t)(object->codepage));
   15638           0 :         return py_codepage;
   15639             : }
   15640             : 
   15641          24 : static int py_drsuapi_DsNameRequest1_set_codepage(PyObject *py_obj, PyObject *value, void *closure)
   15642             : {
   15643          24 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(py_obj);
   15644          24 :         if (value == NULL) {
   15645           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->codepage");
   15646           0 :                 return -1;
   15647             :         }
   15648             :         {
   15649          24 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->codepage));
   15650          24 :                 if (PyLong_Check(value)) {
   15651           0 :                         unsigned long long test_var;
   15652          24 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15653          24 :                         if (PyErr_Occurred() != NULL) {
   15654           0 :                                 return -1;
   15655             :                         }
   15656          24 :                         if (test_var > uint_max) {
   15657           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15658             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15659           0 :                                 return -1;
   15660             :                         }
   15661          24 :                         object->codepage = test_var;
   15662             :                 } else {
   15663           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15664             :                           PyLong_Type.tp_name);
   15665           0 :                         return -1;
   15666             :                 }
   15667             :         }
   15668          24 :         return 0;
   15669             : }
   15670             : 
   15671           0 : static PyObject *py_drsuapi_DsNameRequest1_get_language(PyObject *obj, void *closure)
   15672             : {
   15673           0 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(obj);
   15674           0 :         PyObject *py_language;
   15675           0 :         py_language = PyLong_FromUnsignedLongLong((uint32_t)(object->language));
   15676           0 :         return py_language;
   15677             : }
   15678             : 
   15679          24 : static int py_drsuapi_DsNameRequest1_set_language(PyObject *py_obj, PyObject *value, void *closure)
   15680             : {
   15681          24 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(py_obj);
   15682          24 :         if (value == NULL) {
   15683           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->language");
   15684           0 :                 return -1;
   15685             :         }
   15686             :         {
   15687          24 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->language));
   15688          24 :                 if (PyLong_Check(value)) {
   15689           0 :                         unsigned long long test_var;
   15690          24 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15691          24 :                         if (PyErr_Occurred() != NULL) {
   15692           0 :                                 return -1;
   15693             :                         }
   15694          24 :                         if (test_var > uint_max) {
   15695           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15696             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15697           0 :                                 return -1;
   15698             :                         }
   15699          24 :                         object->language = test_var;
   15700             :                 } else {
   15701           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15702             :                           PyLong_Type.tp_name);
   15703           0 :                         return -1;
   15704             :                 }
   15705             :         }
   15706          24 :         return 0;
   15707             : }
   15708             : 
   15709           0 : static PyObject *py_drsuapi_DsNameRequest1_get_format_flags(PyObject *obj, void *closure)
   15710             : {
   15711           0 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(obj);
   15712           0 :         PyObject *py_format_flags;
   15713           0 :         py_format_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->format_flags));
   15714           0 :         return py_format_flags;
   15715             : }
   15716             : 
   15717          25 : static int py_drsuapi_DsNameRequest1_set_format_flags(PyObject *py_obj, PyObject *value, void *closure)
   15718             : {
   15719          25 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(py_obj);
   15720          25 :         if (value == NULL) {
   15721           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->format_flags");
   15722           0 :                 return -1;
   15723             :         }
   15724             :         {
   15725          25 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->format_flags));
   15726          25 :                 if (PyLong_Check(value)) {
   15727           0 :                         unsigned long long test_var;
   15728          25 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15729          25 :                         if (PyErr_Occurred() != NULL) {
   15730           0 :                                 return -1;
   15731             :                         }
   15732          25 :                         if (test_var > uint_max) {
   15733           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15734             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15735           0 :                                 return -1;
   15736             :                         }
   15737          25 :                         object->format_flags = test_var;
   15738             :                 } else {
   15739           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15740             :                           PyLong_Type.tp_name);
   15741           0 :                         return -1;
   15742             :                 }
   15743             :         }
   15744          25 :         return 0;
   15745             : }
   15746             : 
   15747           0 : static PyObject *py_drsuapi_DsNameRequest1_get_format_offered(PyObject *obj, void *closure)
   15748             : {
   15749           0 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(obj);
   15750           0 :         PyObject *py_format_offered;
   15751           0 :         py_format_offered = PyLong_FromUnsignedLongLong((uint32_t)(object->format_offered));
   15752           0 :         return py_format_offered;
   15753             : }
   15754             : 
   15755          24 : static int py_drsuapi_DsNameRequest1_set_format_offered(PyObject *py_obj, PyObject *value, void *closure)
   15756             : {
   15757          24 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(py_obj);
   15758          24 :         if (value == NULL) {
   15759           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->format_offered");
   15760           0 :                 return -1;
   15761             :         }
   15762             :         {
   15763          24 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->format_offered));
   15764          24 :                 if (PyLong_Check(value)) {
   15765           0 :                         unsigned long long test_var;
   15766          24 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15767          24 :                         if (PyErr_Occurred() != NULL) {
   15768           0 :                                 return -1;
   15769             :                         }
   15770          24 :                         if (test_var > uint_max) {
   15771           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15772             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15773           0 :                                 return -1;
   15774             :                         }
   15775          24 :                         object->format_offered = test_var;
   15776             :                 } else {
   15777           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15778             :                           PyLong_Type.tp_name);
   15779           0 :                         return -1;
   15780             :                 }
   15781             :         }
   15782          24 :         return 0;
   15783             : }
   15784             : 
   15785           0 : static PyObject *py_drsuapi_DsNameRequest1_get_format_desired(PyObject *obj, void *closure)
   15786             : {
   15787           0 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(obj);
   15788           0 :         PyObject *py_format_desired;
   15789           0 :         py_format_desired = PyLong_FromUnsignedLongLong((uint32_t)(object->format_desired));
   15790           0 :         return py_format_desired;
   15791             : }
   15792             : 
   15793          24 : static int py_drsuapi_DsNameRequest1_set_format_desired(PyObject *py_obj, PyObject *value, void *closure)
   15794             : {
   15795          24 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(py_obj);
   15796          24 :         if (value == NULL) {
   15797           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->format_desired");
   15798           0 :                 return -1;
   15799             :         }
   15800             :         {
   15801          24 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->format_desired));
   15802          24 :                 if (PyLong_Check(value)) {
   15803           0 :                         unsigned long long test_var;
   15804          24 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15805          24 :                         if (PyErr_Occurred() != NULL) {
   15806           0 :                                 return -1;
   15807             :                         }
   15808          24 :                         if (test_var > uint_max) {
   15809           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15810             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15811           0 :                                 return -1;
   15812             :                         }
   15813          24 :                         object->format_desired = test_var;
   15814             :                 } else {
   15815           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15816             :                           PyLong_Type.tp_name);
   15817           0 :                         return -1;
   15818             :                 }
   15819             :         }
   15820          24 :         return 0;
   15821             : }
   15822             : 
   15823           0 : static PyObject *py_drsuapi_DsNameRequest1_get_count(PyObject *obj, void *closure)
   15824             : {
   15825           0 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(obj);
   15826           0 :         PyObject *py_count;
   15827           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   15828           0 :         return py_count;
   15829             : }
   15830             : 
   15831          24 : static int py_drsuapi_DsNameRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
   15832             : {
   15833          24 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(py_obj);
   15834          24 :         if (value == NULL) {
   15835           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   15836           0 :                 return -1;
   15837             :         }
   15838             :         {
   15839          24 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   15840          24 :                 if (PyLong_Check(value)) {
   15841           0 :                         unsigned long long test_var;
   15842          24 :                         test_var = PyLong_AsUnsignedLongLong(value);
   15843          24 :                         if (PyErr_Occurred() != NULL) {
   15844           0 :                                 return -1;
   15845             :                         }
   15846          24 :                         if (test_var > uint_max) {
   15847           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   15848             :                                   PyLong_Type.tp_name, uint_max, test_var);
   15849           0 :                                 return -1;
   15850             :                         }
   15851          24 :                         object->count = test_var;
   15852             :                 } else {
   15853           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   15854             :                           PyLong_Type.tp_name);
   15855           0 :                         return -1;
   15856             :                 }
   15857             :         }
   15858          24 :         return 0;
   15859             : }
   15860             : 
   15861           0 : static PyObject *py_drsuapi_DsNameRequest1_get_names(PyObject *obj, void *closure)
   15862             : {
   15863           0 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(obj);
   15864           0 :         PyObject *py_names;
   15865           0 :         if (object->names == NULL) {
   15866           0 :                 Py_RETURN_NONE;
   15867             :         }
   15868           0 :         if (object->names == NULL) {
   15869           0 :                 py_names = Py_None;
   15870           0 :                 Py_INCREF(py_names);
   15871             :         } else {
   15872           0 :                 py_names = PyList_New(object->count);
   15873           0 :                 if (py_names == NULL) {
   15874           0 :                         return NULL;
   15875             :                 }
   15876             :                 {
   15877             :                         int names_cntr_1;
   15878           0 :                         for (names_cntr_1 = 0; names_cntr_1 < (object->count); names_cntr_1++) {
   15879           0 :                                 PyObject *py_names_1;
   15880           0 :                                 py_names_1 = pytalloc_reference_ex(&drsuapi_DsNameString_Type, object->names, &(object->names)[names_cntr_1]);
   15881           0 :                                 PyList_SetItem(py_names, names_cntr_1, py_names_1);
   15882             :                         }
   15883             :                 }
   15884             :         }
   15885           0 :         return py_names;
   15886             : }
   15887             : 
   15888          24 : static int py_drsuapi_DsNameRequest1_set_names(PyObject *py_obj, PyObject *value, void *closure)
   15889             : {
   15890          24 :         struct drsuapi_DsNameRequest1 *object = pytalloc_get_ptr(py_obj);
   15891          24 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->names));
   15892          24 :         if (value == NULL) {
   15893           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->names");
   15894           0 :                 return -1;
   15895             :         }
   15896          24 :         if (value == Py_None) {
   15897           0 :                 object->names = NULL;
   15898             :         } else {
   15899          24 :                 object->names = NULL;
   15900          24 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   15901             :                 {
   15902           0 :                         int names_cntr_1;
   15903          24 :                         object->names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->names, PyList_GET_SIZE(value));
   15904          24 :                         if (!object->names) { return -1; }
   15905          24 :                         talloc_set_name_const(object->names, "ARRAY: object->names");
   15906          48 :                         for (names_cntr_1 = 0; names_cntr_1 < PyList_GET_SIZE(value); names_cntr_1++) {
   15907          24 :                                 if (PyList_GET_ITEM(value, names_cntr_1) == NULL) {
   15908           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->names)[names_cntr_1]");
   15909           0 :                                         return -1;
   15910             :                                 }
   15911          24 :                                 PY_CHECK_TYPE(&drsuapi_DsNameString_Type, PyList_GET_ITEM(value, names_cntr_1), return -1;);
   15912          24 :                                 if (talloc_reference(object->names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, names_cntr_1))) == NULL) {
   15913           0 :                                         PyErr_NoMemory();
   15914           0 :                                         return -1;
   15915             :                                 }
   15916          24 :                                 (object->names)[names_cntr_1] = *(struct drsuapi_DsNameString *)pytalloc_get_ptr(PyList_GET_ITEM(value, names_cntr_1));
   15917             :                         }
   15918             :                 }
   15919             :         }
   15920          24 :         return 0;
   15921             : }
   15922             : 
   15923             : static PyGetSetDef py_drsuapi_DsNameRequest1_getsetters[] = {
   15924             :         {
   15925             :                 .name = discard_const_p(char, "codepage"),
   15926             :                 .get = py_drsuapi_DsNameRequest1_get_codepage,
   15927             :                 .set = py_drsuapi_DsNameRequest1_set_codepage,
   15928             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15929             :         },
   15930             :         {
   15931             :                 .name = discard_const_p(char, "language"),
   15932             :                 .get = py_drsuapi_DsNameRequest1_get_language,
   15933             :                 .set = py_drsuapi_DsNameRequest1_set_language,
   15934             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15935             :         },
   15936             :         {
   15937             :                 .name = discard_const_p(char, "format_flags"),
   15938             :                 .get = py_drsuapi_DsNameRequest1_get_format_flags,
   15939             :                 .set = py_drsuapi_DsNameRequest1_set_format_flags,
   15940             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameFlags")
   15941             :         },
   15942             :         {
   15943             :                 .name = discard_const_p(char, "format_offered"),
   15944             :                 .get = py_drsuapi_DsNameRequest1_get_format_offered,
   15945             :                 .set = py_drsuapi_DsNameRequest1_set_format_offered,
   15946             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameFormat")
   15947             :         },
   15948             :         {
   15949             :                 .name = discard_const_p(char, "format_desired"),
   15950             :                 .get = py_drsuapi_DsNameRequest1_get_format_desired,
   15951             :                 .set = py_drsuapi_DsNameRequest1_set_format_desired,
   15952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameFormat")
   15953             :         },
   15954             :         {
   15955             :                 .name = discard_const_p(char, "count"),
   15956             :                 .get = py_drsuapi_DsNameRequest1_get_count,
   15957             :                 .set = py_drsuapi_DsNameRequest1_set_count,
   15958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   15959             :         },
   15960             :         {
   15961             :                 .name = discard_const_p(char, "names"),
   15962             :                 .get = py_drsuapi_DsNameRequest1_get_names,
   15963             :                 .set = py_drsuapi_DsNameRequest1_set_names,
   15964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameString")
   15965             :         },
   15966             :         { .name = NULL }
   15967             : };
   15968             : 
   15969          24 : static PyObject *py_drsuapi_DsNameRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   15970             : {
   15971          24 :         return pytalloc_new(struct drsuapi_DsNameRequest1, type);
   15972             : }
   15973             : 
   15974             : 
   15975             : static PyTypeObject drsuapi_DsNameRequest1_Type = {
   15976             :         PyVarObject_HEAD_INIT(NULL, 0)
   15977             :         .tp_name = "drsuapi.DsNameRequest1",
   15978             :         .tp_getset = py_drsuapi_DsNameRequest1_getsetters,
   15979             :         .tp_methods = NULL,
   15980             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   15981             :         .tp_new = py_drsuapi_DsNameRequest1_new,
   15982             : };
   15983             : 
   15984           0 : static PyObject *py_import_drsuapi_DsNameRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsNameRequest *in)
   15985             : {
   15986           0 :         PyObject *ret;
   15987             : 
   15988           0 :         switch (level) {
   15989           0 :                 case 1:
   15990           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsNameRequest1_Type, mem_ctx, &in->req1);
   15991           0 :                         return ret;
   15992             : 
   15993             :         }
   15994           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   15995           0 :         return NULL;
   15996             : }
   15997             : 
   15998          24 : static union drsuapi_DsNameRequest *py_export_drsuapi_DsNameRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   15999             : {
   16000          24 :         union drsuapi_DsNameRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsNameRequest);
   16001          24 :         switch (level) {
   16002          24 :                 case 1:
   16003          24 :                         if (in == NULL) {
   16004           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   16005           0 :                                 talloc_free(ret); return NULL;
   16006             :                         }
   16007          24 :                         PY_CHECK_TYPE(&drsuapi_DsNameRequest1_Type, in, talloc_free(ret); return NULL;);
   16008          24 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16009           0 :                                 PyErr_NoMemory();
   16010           0 :                                 talloc_free(ret); return NULL;
   16011             :                         }
   16012          24 :                         ret->req1 = *(struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(in);
   16013          24 :                         break;
   16014             : 
   16015           0 :                 default:
   16016           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   16017           0 :                         talloc_free(ret);
   16018           0 :                         ret = NULL;
   16019             :         }
   16020             : 
   16021          24 :         return ret;
   16022             : }
   16023             : 
   16024           0 : static PyObject *py_drsuapi_DsNameRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16025             : {
   16026           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16027           0 :         PyObject *mem_ctx_obj = NULL;
   16028           0 :         TALLOC_CTX *mem_ctx = NULL;
   16029           0 :         int level = 0;
   16030           0 :         PyObject *in_obj = NULL;
   16031           0 :         union drsuapi_DsNameRequest *in = NULL;
   16032             : 
   16033           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   16034             :                 discard_const_p(char *, kwnames),
   16035             :                 &mem_ctx_obj,
   16036             :                 &level,
   16037             :                 &in_obj)) {
   16038           0 :                 return NULL;
   16039             :         }
   16040           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16041           0 :         if (mem_ctx == NULL) {
   16042           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16043           0 :                 return NULL;
   16044             :         }
   16045           0 :         in = (union drsuapi_DsNameRequest *)pytalloc_get_ptr(in_obj);
   16046           0 :         if (in == NULL) {
   16047           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsNameRequest!");
   16048           0 :                 return NULL;
   16049             :         }
   16050             : 
   16051           0 :         return py_import_drsuapi_DsNameRequest(mem_ctx, level, in);
   16052             : }
   16053             : 
   16054          24 : static PyObject *py_drsuapi_DsNameRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16055             : {
   16056          24 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16057          24 :         PyObject *mem_ctx_obj = NULL;
   16058          24 :         TALLOC_CTX *mem_ctx = NULL;
   16059          24 :         int level = 0;
   16060          24 :         PyObject *in = NULL;
   16061          24 :         union drsuapi_DsNameRequest *out = NULL;
   16062             : 
   16063          24 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   16064             :                 discard_const_p(char *, kwnames),
   16065             :                 &mem_ctx_obj,
   16066             :                 &level,
   16067             :                 &in)) {
   16068           0 :                 return NULL;
   16069             :         }
   16070          24 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16071          24 :         if (mem_ctx == NULL) {
   16072           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16073           0 :                 return NULL;
   16074             :         }
   16075             : 
   16076          24 :         out = py_export_drsuapi_DsNameRequest(mem_ctx, level, in);
   16077          24 :         if (out == NULL) {
   16078           0 :                 return NULL;
   16079             :         }
   16080             : 
   16081          24 :         return pytalloc_GenericObject_reference(out);
   16082             : }
   16083             : 
   16084             : static PyMethodDef py_drsuapi_DsNameRequest_methods[] = {
   16085             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsNameRequest_import),
   16086             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16087             :                 "T.__import__(mem_ctx, level, in) => ret." },
   16088             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsNameRequest_export),
   16089             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16090             :                 "T.__export__(mem_ctx, level, in) => ret." },
   16091             :         { NULL, NULL, 0, NULL }
   16092             : };
   16093             : 
   16094           0 : static PyObject *py_drsuapi_DsNameRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16095             : {
   16096           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   16097           0 :         return NULL;
   16098             : }
   16099             : 
   16100             : 
   16101             : static PyTypeObject drsuapi_DsNameRequest_Type = {
   16102             :         PyVarObject_HEAD_INIT(NULL, 0)
   16103             :         .tp_name = "drsuapi.DsNameRequest",
   16104             :         .tp_getset = NULL,
   16105             :         .tp_methods = py_drsuapi_DsNameRequest_methods,
   16106             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16107             :         .tp_new = py_drsuapi_DsNameRequest_new,
   16108             : };
   16109             : 
   16110             : 
   16111          41 : static PyObject *py_drsuapi_DsNameInfo1_get_status(PyObject *obj, void *closure)
   16112             : {
   16113          41 :         struct drsuapi_DsNameInfo1 *object = pytalloc_get_ptr(obj);
   16114           0 :         PyObject *py_status;
   16115          41 :         py_status = PyLong_FromUnsignedLongLong((uint32_t)(object->status));
   16116          41 :         return py_status;
   16117             : }
   16118             : 
   16119           0 : static int py_drsuapi_DsNameInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
   16120             : {
   16121           0 :         struct drsuapi_DsNameInfo1 *object = pytalloc_get_ptr(py_obj);
   16122           0 :         if (value == NULL) {
   16123           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
   16124           0 :                 return -1;
   16125             :         }
   16126             :         {
   16127           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
   16128           0 :                 if (PyLong_Check(value)) {
   16129           0 :                         unsigned long long test_var;
   16130           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16131           0 :                         if (PyErr_Occurred() != NULL) {
   16132           0 :                                 return -1;
   16133             :                         }
   16134           0 :                         if (test_var > uint_max) {
   16135           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16136             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16137           0 :                                 return -1;
   16138             :                         }
   16139           0 :                         object->status = test_var;
   16140             :                 } else {
   16141           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16142             :                           PyLong_Type.tp_name);
   16143           0 :                         return -1;
   16144             :                 }
   16145             :         }
   16146           0 :         return 0;
   16147             : }
   16148             : 
   16149           0 : static PyObject *py_drsuapi_DsNameInfo1_get_dns_domain_name(PyObject *obj, void *closure)
   16150             : {
   16151           0 :         struct drsuapi_DsNameInfo1 *object = pytalloc_get_ptr(obj);
   16152           0 :         PyObject *py_dns_domain_name;
   16153           0 :         if (object->dns_domain_name == NULL) {
   16154           0 :                 Py_RETURN_NONE;
   16155             :         }
   16156           0 :         if (object->dns_domain_name == NULL) {
   16157           0 :                 py_dns_domain_name = Py_None;
   16158           0 :                 Py_INCREF(py_dns_domain_name);
   16159             :         } else {
   16160           0 :                 if (object->dns_domain_name == NULL) {
   16161           0 :                         py_dns_domain_name = Py_None;
   16162           0 :                         Py_INCREF(py_dns_domain_name);
   16163             :                 } else {
   16164           0 :                         py_dns_domain_name = PyUnicode_Decode(object->dns_domain_name, strlen(object->dns_domain_name), "utf-8", "ignore");
   16165             :                 }
   16166             :         }
   16167           0 :         return py_dns_domain_name;
   16168             : }
   16169             : 
   16170           0 : static int py_drsuapi_DsNameInfo1_set_dns_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   16171             : {
   16172           0 :         struct drsuapi_DsNameInfo1 *object = pytalloc_get_ptr(py_obj);
   16173           0 :         if (value == NULL) {
   16174           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domain_name");
   16175           0 :                 return -1;
   16176             :         }
   16177           0 :         if (value == Py_None) {
   16178           0 :                 object->dns_domain_name = NULL;
   16179             :         } else {
   16180           0 :                 object->dns_domain_name = NULL;
   16181             :                 {
   16182           0 :                         const char *test_str;
   16183           0 :                         const char *talloc_str;
   16184           0 :                         PyObject *unicode = NULL;
   16185           0 :                         if (PyUnicode_Check(value)) {
   16186           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16187           0 :                                 if (unicode == NULL) {
   16188           0 :                                         return -1;
   16189             :                                 }
   16190           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   16191           0 :                         } else if (PyBytes_Check(value)) {
   16192           0 :                                 test_str = PyBytes_AS_STRING(value);
   16193             :                         } else {
   16194           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16195           0 :                                 return -1;
   16196             :                         }
   16197           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16198           0 :                         if (unicode != NULL) {
   16199           0 :                                 Py_DECREF(unicode);
   16200             :                         }
   16201           0 :                         if (talloc_str == NULL) {
   16202           0 :                                 PyErr_NoMemory();
   16203           0 :                                 return -1;
   16204             :                         }
   16205           0 :                         object->dns_domain_name = talloc_str;
   16206             :                 }
   16207             :         }
   16208           0 :         return 0;
   16209             : }
   16210             : 
   16211          12 : static PyObject *py_drsuapi_DsNameInfo1_get_result_name(PyObject *obj, void *closure)
   16212             : {
   16213          12 :         struct drsuapi_DsNameInfo1 *object = pytalloc_get_ptr(obj);
   16214           0 :         PyObject *py_result_name;
   16215          12 :         if (object->result_name == NULL) {
   16216           0 :                 Py_RETURN_NONE;
   16217             :         }
   16218          12 :         if (object->result_name == NULL) {
   16219           0 :                 py_result_name = Py_None;
   16220           0 :                 Py_INCREF(py_result_name);
   16221             :         } else {
   16222          12 :                 if (object->result_name == NULL) {
   16223           0 :                         py_result_name = Py_None;
   16224           0 :                         Py_INCREF(py_result_name);
   16225             :                 } else {
   16226          12 :                         py_result_name = PyUnicode_Decode(object->result_name, strlen(object->result_name), "utf-8", "ignore");
   16227             :                 }
   16228             :         }
   16229          12 :         return py_result_name;
   16230             : }
   16231             : 
   16232           0 : static int py_drsuapi_DsNameInfo1_set_result_name(PyObject *py_obj, PyObject *value, void *closure)
   16233             : {
   16234           0 :         struct drsuapi_DsNameInfo1 *object = pytalloc_get_ptr(py_obj);
   16235           0 :         if (value == NULL) {
   16236           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->result_name");
   16237           0 :                 return -1;
   16238             :         }
   16239           0 :         if (value == Py_None) {
   16240           0 :                 object->result_name = NULL;
   16241             :         } else {
   16242           0 :                 object->result_name = NULL;
   16243             :                 {
   16244           0 :                         const char *test_str;
   16245           0 :                         const char *talloc_str;
   16246           0 :                         PyObject *unicode = NULL;
   16247           0 :                         if (PyUnicode_Check(value)) {
   16248           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16249           0 :                                 if (unicode == NULL) {
   16250           0 :                                         return -1;
   16251             :                                 }
   16252           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   16253           0 :                         } else if (PyBytes_Check(value)) {
   16254           0 :                                 test_str = PyBytes_AS_STRING(value);
   16255             :                         } else {
   16256           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16257           0 :                                 return -1;
   16258             :                         }
   16259           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16260           0 :                         if (unicode != NULL) {
   16261           0 :                                 Py_DECREF(unicode);
   16262             :                         }
   16263           0 :                         if (talloc_str == NULL) {
   16264           0 :                                 PyErr_NoMemory();
   16265           0 :                                 return -1;
   16266             :                         }
   16267           0 :                         object->result_name = talloc_str;
   16268             :                 }
   16269             :         }
   16270           0 :         return 0;
   16271             : }
   16272             : 
   16273             : static PyGetSetDef py_drsuapi_DsNameInfo1_getsetters[] = {
   16274             :         {
   16275             :                 .name = discard_const_p(char, "status"),
   16276             :                 .get = py_drsuapi_DsNameInfo1_get_status,
   16277             :                 .set = py_drsuapi_DsNameInfo1_set_status,
   16278             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameStatus")
   16279             :         },
   16280             :         {
   16281             :                 .name = discard_const_p(char, "dns_domain_name"),
   16282             :                 .get = py_drsuapi_DsNameInfo1_get_dns_domain_name,
   16283             :                 .set = py_drsuapi_DsNameInfo1_set_dns_domain_name,
   16284             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   16285             :         },
   16286             :         {
   16287             :                 .name = discard_const_p(char, "result_name"),
   16288             :                 .get = py_drsuapi_DsNameInfo1_get_result_name,
   16289             :                 .set = py_drsuapi_DsNameInfo1_set_result_name,
   16290             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   16291             :         },
   16292             :         { .name = NULL }
   16293             : };
   16294             : 
   16295           0 : static PyObject *py_drsuapi_DsNameInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16296             : {
   16297           0 :         return pytalloc_new(struct drsuapi_DsNameInfo1, type);
   16298             : }
   16299             : 
   16300             : 
   16301             : static PyTypeObject drsuapi_DsNameInfo1_Type = {
   16302             :         PyVarObject_HEAD_INIT(NULL, 0)
   16303             :         .tp_name = "drsuapi.DsNameInfo1",
   16304             :         .tp_getset = py_drsuapi_DsNameInfo1_getsetters,
   16305             :         .tp_methods = NULL,
   16306             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16307             :         .tp_new = py_drsuapi_DsNameInfo1_new,
   16308             : };
   16309             : 
   16310             : 
   16311          23 : static PyObject *py_drsuapi_DsNameCtr1_get_count(PyObject *obj, void *closure)
   16312             : {
   16313          23 :         struct drsuapi_DsNameCtr1 *object = pytalloc_get_ptr(obj);
   16314           0 :         PyObject *py_count;
   16315          23 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   16316          23 :         return py_count;
   16317             : }
   16318             : 
   16319           0 : static int py_drsuapi_DsNameCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
   16320             : {
   16321           0 :         struct drsuapi_DsNameCtr1 *object = pytalloc_get_ptr(py_obj);
   16322           0 :         if (value == NULL) {
   16323           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   16324           0 :                 return -1;
   16325             :         }
   16326             :         {
   16327           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   16328           0 :                 if (PyLong_Check(value)) {
   16329           0 :                         unsigned long long test_var;
   16330           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16331           0 :                         if (PyErr_Occurred() != NULL) {
   16332           0 :                                 return -1;
   16333             :                         }
   16334           0 :                         if (test_var > uint_max) {
   16335           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16336             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16337           0 :                                 return -1;
   16338             :                         }
   16339           0 :                         object->count = test_var;
   16340             :                 } else {
   16341           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16342             :                           PyLong_Type.tp_name);
   16343           0 :                         return -1;
   16344             :                 }
   16345             :         }
   16346           0 :         return 0;
   16347             : }
   16348             : 
   16349          53 : static PyObject *py_drsuapi_DsNameCtr1_get_array(PyObject *obj, void *closure)
   16350             : {
   16351          53 :         struct drsuapi_DsNameCtr1 *object = pytalloc_get_ptr(obj);
   16352           0 :         PyObject *py_array;
   16353          53 :         if (object->array == NULL) {
   16354           0 :                 Py_RETURN_NONE;
   16355             :         }
   16356          53 :         if (object->array == NULL) {
   16357           0 :                 py_array = Py_None;
   16358           0 :                 Py_INCREF(py_array);
   16359             :         } else {
   16360          53 :                 py_array = PyList_New(object->count);
   16361          53 :                 if (py_array == NULL) {
   16362           0 :                         return NULL;
   16363             :                 }
   16364             :                 {
   16365             :                         int array_cntr_1;
   16366         106 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   16367           0 :                                 PyObject *py_array_1;
   16368          53 :                                 py_array_1 = pytalloc_reference_ex(&drsuapi_DsNameInfo1_Type, object->array, &(object->array)[array_cntr_1]);
   16369          53 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   16370             :                         }
   16371             :                 }
   16372             :         }
   16373          53 :         return py_array;
   16374             : }
   16375             : 
   16376           0 : static int py_drsuapi_DsNameCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
   16377             : {
   16378           0 :         struct drsuapi_DsNameCtr1 *object = pytalloc_get_ptr(py_obj);
   16379           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   16380           0 :         if (value == NULL) {
   16381           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   16382           0 :                 return -1;
   16383             :         }
   16384           0 :         if (value == Py_None) {
   16385           0 :                 object->array = NULL;
   16386             :         } else {
   16387           0 :                 object->array = NULL;
   16388           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   16389             :                 {
   16390           0 :                         int array_cntr_1;
   16391           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   16392           0 :                         if (!object->array) { return -1; }
   16393           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   16394           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   16395           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   16396           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_1]");
   16397           0 :                                         return -1;
   16398             :                                 }
   16399           0 :                                 PY_CHECK_TYPE(&drsuapi_DsNameInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   16400           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   16401           0 :                                         PyErr_NoMemory();
   16402           0 :                                         return -1;
   16403             :                                 }
   16404           0 :                                 (object->array)[array_cntr_1] = *(struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   16405             :                         }
   16406             :                 }
   16407             :         }
   16408           0 :         return 0;
   16409             : }
   16410             : 
   16411             : static PyGetSetDef py_drsuapi_DsNameCtr1_getsetters[] = {
   16412             :         {
   16413             :                 .name = discard_const_p(char, "count"),
   16414             :                 .get = py_drsuapi_DsNameCtr1_get_count,
   16415             :                 .set = py_drsuapi_DsNameCtr1_set_count,
   16416             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16417             :         },
   16418             :         {
   16419             :                 .name = discard_const_p(char, "array"),
   16420             :                 .get = py_drsuapi_DsNameCtr1_get_array,
   16421             :                 .set = py_drsuapi_DsNameCtr1_set_array,
   16422             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameInfo1")
   16423             :         },
   16424             :         { .name = NULL }
   16425             : };
   16426             : 
   16427           0 : static PyObject *py_drsuapi_DsNameCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16428             : {
   16429           0 :         return pytalloc_new(struct drsuapi_DsNameCtr1, type);
   16430             : }
   16431             : 
   16432             : 
   16433             : static PyTypeObject drsuapi_DsNameCtr1_Type = {
   16434             :         PyVarObject_HEAD_INIT(NULL, 0)
   16435             :         .tp_name = "drsuapi.DsNameCtr1",
   16436             :         .tp_getset = py_drsuapi_DsNameCtr1_getsetters,
   16437             :         .tp_methods = NULL,
   16438             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16439             :         .tp_new = py_drsuapi_DsNameCtr1_new,
   16440             : };
   16441             : 
   16442          24 : static PyObject *py_import_drsuapi_DsNameCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsNameCtr *in)
   16443             : {
   16444           0 :         PyObject *ret;
   16445             : 
   16446          24 :         switch (level) {
   16447          24 :                 case 1:
   16448          24 :                         if (in->ctr1 == NULL) {
   16449           0 :                                 ret = Py_None;
   16450           0 :                                 Py_INCREF(ret);
   16451             :                         } else {
   16452          24 :                                 ret = pytalloc_reference_ex(&drsuapi_DsNameCtr1_Type, in->ctr1, in->ctr1);
   16453             :                         }
   16454          24 :                         return ret;
   16455             : 
   16456             :         }
   16457           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   16458           0 :         return NULL;
   16459             : }
   16460             : 
   16461           0 : static union drsuapi_DsNameCtr *py_export_drsuapi_DsNameCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   16462             : {
   16463           0 :         union drsuapi_DsNameCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsNameCtr);
   16464           0 :         switch (level) {
   16465           0 :                 case 1:
   16466           0 :                         if (in == NULL) {
   16467           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   16468           0 :                                 talloc_free(ret); return NULL;
   16469             :                         }
   16470           0 :                         if (in == Py_None) {
   16471           0 :                                 ret->ctr1 = NULL;
   16472             :                         } else {
   16473           0 :                                 ret->ctr1 = NULL;
   16474           0 :                                 PY_CHECK_TYPE(&drsuapi_DsNameCtr1_Type, in, talloc_free(ret); return NULL;);
   16475           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16476           0 :                                         PyErr_NoMemory();
   16477           0 :                                         talloc_free(ret); return NULL;
   16478             :                                 }
   16479           0 :                                 ret->ctr1 = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(in);
   16480             :                         }
   16481           0 :                         break;
   16482             : 
   16483           0 :                 default:
   16484           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   16485           0 :                         talloc_free(ret);
   16486           0 :                         ret = NULL;
   16487             :         }
   16488             : 
   16489           0 :         return ret;
   16490             : }
   16491             : 
   16492          24 : static PyObject *py_drsuapi_DsNameCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16493             : {
   16494          24 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16495          24 :         PyObject *mem_ctx_obj = NULL;
   16496          24 :         TALLOC_CTX *mem_ctx = NULL;
   16497          24 :         int level = 0;
   16498          24 :         PyObject *in_obj = NULL;
   16499          24 :         union drsuapi_DsNameCtr *in = NULL;
   16500             : 
   16501          24 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   16502             :                 discard_const_p(char *, kwnames),
   16503             :                 &mem_ctx_obj,
   16504             :                 &level,
   16505             :                 &in_obj)) {
   16506           0 :                 return NULL;
   16507             :         }
   16508          24 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16509          24 :         if (mem_ctx == NULL) {
   16510           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16511           0 :                 return NULL;
   16512             :         }
   16513          24 :         in = (union drsuapi_DsNameCtr *)pytalloc_get_ptr(in_obj);
   16514          24 :         if (in == NULL) {
   16515           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsNameCtr!");
   16516           0 :                 return NULL;
   16517             :         }
   16518             : 
   16519          24 :         return py_import_drsuapi_DsNameCtr(mem_ctx, level, in);
   16520             : }
   16521             : 
   16522           0 : static PyObject *py_drsuapi_DsNameCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16523             : {
   16524           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16525           0 :         PyObject *mem_ctx_obj = NULL;
   16526           0 :         TALLOC_CTX *mem_ctx = NULL;
   16527           0 :         int level = 0;
   16528           0 :         PyObject *in = NULL;
   16529           0 :         union drsuapi_DsNameCtr *out = NULL;
   16530             : 
   16531           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   16532             :                 discard_const_p(char *, kwnames),
   16533             :                 &mem_ctx_obj,
   16534             :                 &level,
   16535             :                 &in)) {
   16536           0 :                 return NULL;
   16537             :         }
   16538           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16539           0 :         if (mem_ctx == NULL) {
   16540           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16541           0 :                 return NULL;
   16542             :         }
   16543             : 
   16544           0 :         out = py_export_drsuapi_DsNameCtr(mem_ctx, level, in);
   16545           0 :         if (out == NULL) {
   16546           0 :                 return NULL;
   16547             :         }
   16548             : 
   16549           0 :         return pytalloc_GenericObject_reference(out);
   16550             : }
   16551             : 
   16552             : static PyMethodDef py_drsuapi_DsNameCtr_methods[] = {
   16553             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsNameCtr_import),
   16554             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16555             :                 "T.__import__(mem_ctx, level, in) => ret." },
   16556             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsNameCtr_export),
   16557             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16558             :                 "T.__export__(mem_ctx, level, in) => ret." },
   16559             :         { NULL, NULL, 0, NULL }
   16560             : };
   16561             : 
   16562           0 : static PyObject *py_drsuapi_DsNameCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16563             : {
   16564           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   16565           0 :         return NULL;
   16566             : }
   16567             : 
   16568             : 
   16569             : static PyTypeObject drsuapi_DsNameCtr_Type = {
   16570             :         PyVarObject_HEAD_INIT(NULL, 0)
   16571             :         .tp_name = "drsuapi.DsNameCtr",
   16572             :         .tp_getset = NULL,
   16573             :         .tp_methods = py_drsuapi_DsNameCtr_methods,
   16574             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16575             :         .tp_new = py_drsuapi_DsNameCtr_new,
   16576             : };
   16577             : 
   16578             : 
   16579           0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_operation(PyObject *obj, void *closure)
   16580             : {
   16581           0 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(obj);
   16582           0 :         PyObject *py_operation;
   16583           0 :         py_operation = PyLong_FromUnsignedLongLong((uint32_t)(object->operation));
   16584           0 :         return py_operation;
   16585             : }
   16586             : 
   16587           4 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_operation(PyObject *py_obj, PyObject *value, void *closure)
   16588             : {
   16589           4 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(py_obj);
   16590           4 :         if (value == NULL) {
   16591           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->operation");
   16592           0 :                 return -1;
   16593             :         }
   16594             :         {
   16595           4 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->operation));
   16596           4 :                 if (PyLong_Check(value)) {
   16597           0 :                         unsigned long long test_var;
   16598           4 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16599           4 :                         if (PyErr_Occurred() != NULL) {
   16600           0 :                                 return -1;
   16601             :                         }
   16602           4 :                         if (test_var > uint_max) {
   16603           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16604             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16605           0 :                                 return -1;
   16606             :                         }
   16607           4 :                         object->operation = test_var;
   16608             :                 } else {
   16609           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16610             :                           PyLong_Type.tp_name);
   16611           0 :                         return -1;
   16612             :                 }
   16613             :         }
   16614           4 :         return 0;
   16615             : }
   16616             : 
   16617           0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_unknown1(PyObject *obj, void *closure)
   16618             : {
   16619           0 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(obj);
   16620           0 :         PyObject *py_unknown1;
   16621           0 :         py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown1));
   16622           0 :         return py_unknown1;
   16623             : }
   16624             : 
   16625           1 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
   16626             : {
   16627           1 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(py_obj);
   16628           1 :         if (value == NULL) {
   16629           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
   16630           0 :                 return -1;
   16631             :         }
   16632             :         {
   16633           1 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
   16634           1 :                 if (PyLong_Check(value)) {
   16635           0 :                         unsigned long long test_var;
   16636           1 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16637           1 :                         if (PyErr_Occurred() != NULL) {
   16638           0 :                                 return -1;
   16639             :                         }
   16640           1 :                         if (test_var > uint_max) {
   16641           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16642             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16643           0 :                                 return -1;
   16644             :                         }
   16645           1 :                         object->unknown1 = test_var;
   16646             :                 } else {
   16647           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16648             :                           PyLong_Type.tp_name);
   16649           0 :                         return -1;
   16650             :                 }
   16651             :         }
   16652           1 :         return 0;
   16653             : }
   16654             : 
   16655           0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_object_dn(PyObject *obj, void *closure)
   16656             : {
   16657           0 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(obj);
   16658           0 :         PyObject *py_object_dn;
   16659           0 :         if (object->object_dn == NULL) {
   16660           0 :                 Py_RETURN_NONE;
   16661             :         }
   16662           0 :         if (object->object_dn == NULL) {
   16663           0 :                 py_object_dn = Py_None;
   16664           0 :                 Py_INCREF(py_object_dn);
   16665             :         } else {
   16666           0 :                 if (object->object_dn == NULL) {
   16667           0 :                         py_object_dn = Py_None;
   16668           0 :                         Py_INCREF(py_object_dn);
   16669             :                 } else {
   16670           0 :                         py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
   16671             :                 }
   16672             :         }
   16673           0 :         return py_object_dn;
   16674             : }
   16675             : 
   16676           4 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
   16677             : {
   16678           4 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(py_obj);
   16679           4 :         if (value == NULL) {
   16680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
   16681           0 :                 return -1;
   16682             :         }
   16683           4 :         if (value == Py_None) {
   16684           0 :                 object->object_dn = NULL;
   16685             :         } else {
   16686           4 :                 object->object_dn = NULL;
   16687             :                 {
   16688           0 :                         const char *test_str;
   16689           0 :                         const char *talloc_str;
   16690           4 :                         PyObject *unicode = NULL;
   16691           4 :                         if (PyUnicode_Check(value)) {
   16692           4 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   16693           4 :                                 if (unicode == NULL) {
   16694           0 :                                         return -1;
   16695             :                                 }
   16696           4 :                                 test_str = PyBytes_AS_STRING(unicode);
   16697           0 :                         } else if (PyBytes_Check(value)) {
   16698           0 :                                 test_str = PyBytes_AS_STRING(value);
   16699             :                         } else {
   16700           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   16701           0 :                                 return -1;
   16702             :                         }
   16703           4 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   16704           4 :                         if (unicode != NULL) {
   16705           4 :                                 Py_DECREF(unicode);
   16706             :                         }
   16707           4 :                         if (talloc_str == NULL) {
   16708           0 :                                 PyErr_NoMemory();
   16709           0 :                                 return -1;
   16710             :                         }
   16711           4 :                         object->object_dn = talloc_str;
   16712             :                 }
   16713             :         }
   16714           4 :         return 0;
   16715             : }
   16716             : 
   16717           7 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_count(PyObject *obj, void *closure)
   16718             : {
   16719           7 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(obj);
   16720           0 :         PyObject *py_count;
   16721           7 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   16722           7 :         return py_count;
   16723             : }
   16724             : 
   16725          11 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
   16726             : {
   16727          11 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(py_obj);
   16728          11 :         if (value == NULL) {
   16729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   16730           0 :                 return -1;
   16731             :         }
   16732             :         {
   16733          11 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   16734          11 :                 if (PyLong_Check(value)) {
   16735           0 :                         unsigned long long test_var;
   16736          11 :                         test_var = PyLong_AsUnsignedLongLong(value);
   16737          11 :                         if (PyErr_Occurred() != NULL) {
   16738           0 :                                 return -1;
   16739             :                         }
   16740          11 :                         if (test_var > uint_max) {
   16741           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   16742             :                                   PyLong_Type.tp_name, uint_max, test_var);
   16743           0 :                                 return -1;
   16744             :                         }
   16745          11 :                         object->count = test_var;
   16746             :                 } else {
   16747           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   16748             :                           PyLong_Type.tp_name);
   16749           0 :                         return -1;
   16750             :                 }
   16751             :         }
   16752          11 :         return 0;
   16753             : }
   16754             : 
   16755           0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_spn_names(PyObject *obj, void *closure)
   16756             : {
   16757           0 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(obj);
   16758           0 :         PyObject *py_spn_names;
   16759           0 :         if (object->spn_names == NULL) {
   16760           0 :                 Py_RETURN_NONE;
   16761             :         }
   16762           0 :         if (object->spn_names == NULL) {
   16763           0 :                 py_spn_names = Py_None;
   16764           0 :                 Py_INCREF(py_spn_names);
   16765             :         } else {
   16766           0 :                 py_spn_names = PyList_New(object->count);
   16767           0 :                 if (py_spn_names == NULL) {
   16768           0 :                         return NULL;
   16769             :                 }
   16770             :                 {
   16771             :                         int spn_names_cntr_1;
   16772           0 :                         for (spn_names_cntr_1 = 0; spn_names_cntr_1 < (object->count); spn_names_cntr_1++) {
   16773           0 :                                 PyObject *py_spn_names_1;
   16774           0 :                                 py_spn_names_1 = pytalloc_reference_ex(&drsuapi_DsNameString_Type, object->spn_names, &(object->spn_names)[spn_names_cntr_1]);
   16775           0 :                                 PyList_SetItem(py_spn_names, spn_names_cntr_1, py_spn_names_1);
   16776             :                         }
   16777             :                 }
   16778             :         }
   16779           0 :         return py_spn_names;
   16780             : }
   16781             : 
   16782           2 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_spn_names(PyObject *py_obj, PyObject *value, void *closure)
   16783             : {
   16784           2 :         struct drsuapi_DsWriteAccountSpnRequest1 *object = pytalloc_get_ptr(py_obj);
   16785           2 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->spn_names));
   16786           2 :         if (value == NULL) {
   16787           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->spn_names");
   16788           0 :                 return -1;
   16789             :         }
   16790           2 :         if (value == Py_None) {
   16791           0 :                 object->spn_names = NULL;
   16792             :         } else {
   16793           2 :                 object->spn_names = NULL;
   16794           2 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   16795             :                 {
   16796           0 :                         int spn_names_cntr_1;
   16797           2 :                         object->spn_names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->spn_names, PyList_GET_SIZE(value));
   16798           2 :                         if (!object->spn_names) { return -1; }
   16799           2 :                         talloc_set_name_const(object->spn_names, "ARRAY: object->spn_names");
   16800          10 :                         for (spn_names_cntr_1 = 0; spn_names_cntr_1 < PyList_GET_SIZE(value); spn_names_cntr_1++) {
   16801           8 :                                 if (PyList_GET_ITEM(value, spn_names_cntr_1) == NULL) {
   16802           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->spn_names)[spn_names_cntr_1]");
   16803           0 :                                         return -1;
   16804             :                                 }
   16805           8 :                                 PY_CHECK_TYPE(&drsuapi_DsNameString_Type, PyList_GET_ITEM(value, spn_names_cntr_1), return -1;);
   16806           8 :                                 if (talloc_reference(object->spn_names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, spn_names_cntr_1))) == NULL) {
   16807           0 :                                         PyErr_NoMemory();
   16808           0 :                                         return -1;
   16809             :                                 }
   16810           8 :                                 (object->spn_names)[spn_names_cntr_1] = *(struct drsuapi_DsNameString *)pytalloc_get_ptr(PyList_GET_ITEM(value, spn_names_cntr_1));
   16811             :                         }
   16812             :                 }
   16813             :         }
   16814           2 :         return 0;
   16815             : }
   16816             : 
   16817             : static PyGetSetDef py_drsuapi_DsWriteAccountSpnRequest1_getsetters[] = {
   16818             :         {
   16819             :                 .name = discard_const_p(char, "operation"),
   16820             :                 .get = py_drsuapi_DsWriteAccountSpnRequest1_get_operation,
   16821             :                 .set = py_drsuapi_DsWriteAccountSpnRequest1_set_operation,
   16822             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsSpnOperation")
   16823             :         },
   16824             :         {
   16825             :                 .name = discard_const_p(char, "unknown1"),
   16826             :                 .get = py_drsuapi_DsWriteAccountSpnRequest1_get_unknown1,
   16827             :                 .set = py_drsuapi_DsWriteAccountSpnRequest1_set_unknown1,
   16828             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16829             :         },
   16830             :         {
   16831             :                 .name = discard_const_p(char, "object_dn"),
   16832             :                 .get = py_drsuapi_DsWriteAccountSpnRequest1_get_object_dn,
   16833             :                 .set = py_drsuapi_DsWriteAccountSpnRequest1_set_object_dn,
   16834             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   16835             :         },
   16836             :         {
   16837             :                 .name = discard_const_p(char, "count"),
   16838             :                 .get = py_drsuapi_DsWriteAccountSpnRequest1_get_count,
   16839             :                 .set = py_drsuapi_DsWriteAccountSpnRequest1_set_count,
   16840             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   16841             :         },
   16842             :         {
   16843             :                 .name = discard_const_p(char, "spn_names"),
   16844             :                 .get = py_drsuapi_DsWriteAccountSpnRequest1_get_spn_names,
   16845             :                 .set = py_drsuapi_DsWriteAccountSpnRequest1_set_spn_names,
   16846             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameString")
   16847             :         },
   16848             :         { .name = NULL }
   16849             : };
   16850             : 
   16851           4 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16852             : {
   16853           4 :         return pytalloc_new(struct drsuapi_DsWriteAccountSpnRequest1, type);
   16854             : }
   16855             : 
   16856             : 
   16857             : static PyTypeObject drsuapi_DsWriteAccountSpnRequest1_Type = {
   16858             :         PyVarObject_HEAD_INIT(NULL, 0)
   16859             :         .tp_name = "drsuapi.DsWriteAccountSpnRequest1",
   16860             :         .tp_getset = py_drsuapi_DsWriteAccountSpnRequest1_getsetters,
   16861             :         .tp_methods = NULL,
   16862             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16863             :         .tp_new = py_drsuapi_DsWriteAccountSpnRequest1_new,
   16864             : };
   16865             : 
   16866           0 : static PyObject *py_import_drsuapi_DsWriteAccountSpnRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsWriteAccountSpnRequest *in)
   16867             : {
   16868           0 :         PyObject *ret;
   16869             : 
   16870           0 :         switch (level) {
   16871           0 :                 case 1:
   16872           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsWriteAccountSpnRequest1_Type, mem_ctx, &in->req1);
   16873           0 :                         return ret;
   16874             : 
   16875             :         }
   16876           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   16877           0 :         return NULL;
   16878             : }
   16879             : 
   16880           2 : static union drsuapi_DsWriteAccountSpnRequest *py_export_drsuapi_DsWriteAccountSpnRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   16881             : {
   16882           2 :         union drsuapi_DsWriteAccountSpnRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnRequest);
   16883           2 :         switch (level) {
   16884           2 :                 case 1:
   16885           2 :                         if (in == NULL) {
   16886           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   16887           0 :                                 talloc_free(ret); return NULL;
   16888             :                         }
   16889           2 :                         PY_CHECK_TYPE(&drsuapi_DsWriteAccountSpnRequest1_Type, in, talloc_free(ret); return NULL;);
   16890           2 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   16891           0 :                                 PyErr_NoMemory();
   16892           0 :                                 talloc_free(ret); return NULL;
   16893             :                         }
   16894           2 :                         ret->req1 = *(struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(in);
   16895           2 :                         break;
   16896             : 
   16897           0 :                 default:
   16898           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   16899           0 :                         talloc_free(ret);
   16900           0 :                         ret = NULL;
   16901             :         }
   16902             : 
   16903           2 :         return ret;
   16904             : }
   16905             : 
   16906           0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16907             : {
   16908           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16909           0 :         PyObject *mem_ctx_obj = NULL;
   16910           0 :         TALLOC_CTX *mem_ctx = NULL;
   16911           0 :         int level = 0;
   16912           0 :         PyObject *in_obj = NULL;
   16913           0 :         union drsuapi_DsWriteAccountSpnRequest *in = NULL;
   16914             : 
   16915           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   16916             :                 discard_const_p(char *, kwnames),
   16917             :                 &mem_ctx_obj,
   16918             :                 &level,
   16919             :                 &in_obj)) {
   16920           0 :                 return NULL;
   16921             :         }
   16922           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16923           0 :         if (mem_ctx == NULL) {
   16924           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16925           0 :                 return NULL;
   16926             :         }
   16927           0 :         in = (union drsuapi_DsWriteAccountSpnRequest *)pytalloc_get_ptr(in_obj);
   16928           0 :         if (in == NULL) {
   16929           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsWriteAccountSpnRequest!");
   16930           0 :                 return NULL;
   16931             :         }
   16932             : 
   16933           0 :         return py_import_drsuapi_DsWriteAccountSpnRequest(mem_ctx, level, in);
   16934             : }
   16935             : 
   16936           2 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16937             : {
   16938           2 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   16939           2 :         PyObject *mem_ctx_obj = NULL;
   16940           2 :         TALLOC_CTX *mem_ctx = NULL;
   16941           2 :         int level = 0;
   16942           2 :         PyObject *in = NULL;
   16943           2 :         union drsuapi_DsWriteAccountSpnRequest *out = NULL;
   16944             : 
   16945           2 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   16946             :                 discard_const_p(char *, kwnames),
   16947             :                 &mem_ctx_obj,
   16948             :                 &level,
   16949             :                 &in)) {
   16950           0 :                 return NULL;
   16951             :         }
   16952           2 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   16953           2 :         if (mem_ctx == NULL) {
   16954           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   16955           0 :                 return NULL;
   16956             :         }
   16957             : 
   16958           2 :         out = py_export_drsuapi_DsWriteAccountSpnRequest(mem_ctx, level, in);
   16959           2 :         if (out == NULL) {
   16960           0 :                 return NULL;
   16961             :         }
   16962             : 
   16963           2 :         return pytalloc_GenericObject_reference(out);
   16964             : }
   16965             : 
   16966             : static PyMethodDef py_drsuapi_DsWriteAccountSpnRequest_methods[] = {
   16967             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpnRequest_import),
   16968             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16969             :                 "T.__import__(mem_ctx, level, in) => ret." },
   16970             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpnRequest_export),
   16971             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   16972             :                 "T.__export__(mem_ctx, level, in) => ret." },
   16973             :         { NULL, NULL, 0, NULL }
   16974             : };
   16975             : 
   16976           0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   16977             : {
   16978           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   16979           0 :         return NULL;
   16980             : }
   16981             : 
   16982             : 
   16983             : static PyTypeObject drsuapi_DsWriteAccountSpnRequest_Type = {
   16984             :         PyVarObject_HEAD_INIT(NULL, 0)
   16985             :         .tp_name = "drsuapi.DsWriteAccountSpnRequest",
   16986             :         .tp_getset = NULL,
   16987             :         .tp_methods = py_drsuapi_DsWriteAccountSpnRequest_methods,
   16988             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   16989             :         .tp_new = py_drsuapi_DsWriteAccountSpnRequest_new,
   16990             : };
   16991             : 
   16992             : 
   16993           1 : static PyObject *py_drsuapi_DsWriteAccountSpnResult1_get_status(PyObject *obj, void *closure)
   16994             : {
   16995           1 :         struct drsuapi_DsWriteAccountSpnResult1 *object = pytalloc_get_ptr(obj);
   16996           0 :         PyObject *py_status;
   16997           1 :         py_status = PyErr_FromWERROR(object->status);
   16998           1 :         return py_status;
   16999             : }
   17000             : 
   17001           0 : static int py_drsuapi_DsWriteAccountSpnResult1_set_status(PyObject *py_obj, PyObject *value, void *closure)
   17002             : {
   17003           0 :         struct drsuapi_DsWriteAccountSpnResult1 *object = pytalloc_get_ptr(py_obj);
   17004           0 :         if (value == NULL) {
   17005           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
   17006           0 :                 return -1;
   17007             :         }
   17008           0 :         object->status = W_ERROR(PyLong_AsLong(value));
   17009           0 :         return 0;
   17010             : }
   17011             : 
   17012             : static PyGetSetDef py_drsuapi_DsWriteAccountSpnResult1_getsetters[] = {
   17013             :         {
   17014             :                 .name = discard_const_p(char, "status"),
   17015             :                 .get = py_drsuapi_DsWriteAccountSpnResult1_get_status,
   17016             :                 .set = py_drsuapi_DsWriteAccountSpnResult1_set_status,
   17017             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   17018             :         },
   17019             :         { .name = NULL }
   17020             : };
   17021             : 
   17022           0 : static PyObject *py_drsuapi_DsWriteAccountSpnResult1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17023             : {
   17024           0 :         return pytalloc_new(struct drsuapi_DsWriteAccountSpnResult1, type);
   17025             : }
   17026             : 
   17027             : 
   17028             : static PyTypeObject drsuapi_DsWriteAccountSpnResult1_Type = {
   17029             :         PyVarObject_HEAD_INIT(NULL, 0)
   17030             :         .tp_name = "drsuapi.DsWriteAccountSpnResult1",
   17031             :         .tp_getset = py_drsuapi_DsWriteAccountSpnResult1_getsetters,
   17032             :         .tp_methods = NULL,
   17033             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17034             :         .tp_new = py_drsuapi_DsWriteAccountSpnResult1_new,
   17035             : };
   17036             : 
   17037           2 : static PyObject *py_import_drsuapi_DsWriteAccountSpnResult(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsWriteAccountSpnResult *in)
   17038             : {
   17039           0 :         PyObject *ret;
   17040             : 
   17041           2 :         switch (level) {
   17042           2 :                 case 1:
   17043           2 :                         ret = pytalloc_reference_ex(&drsuapi_DsWriteAccountSpnResult1_Type, mem_ctx, &in->res1);
   17044           2 :                         return ret;
   17045             : 
   17046             :         }
   17047           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   17048           0 :         return NULL;
   17049             : }
   17050             : 
   17051           0 : static union drsuapi_DsWriteAccountSpnResult *py_export_drsuapi_DsWriteAccountSpnResult(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   17052             : {
   17053           0 :         union drsuapi_DsWriteAccountSpnResult *ret = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnResult);
   17054           0 :         switch (level) {
   17055           0 :                 case 1:
   17056           0 :                         if (in == NULL) {
   17057           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->res1");
   17058           0 :                                 talloc_free(ret); return NULL;
   17059             :                         }
   17060           0 :                         PY_CHECK_TYPE(&drsuapi_DsWriteAccountSpnResult1_Type, in, talloc_free(ret); return NULL;);
   17061           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17062           0 :                                 PyErr_NoMemory();
   17063           0 :                                 talloc_free(ret); return NULL;
   17064             :                         }
   17065           0 :                         ret->res1 = *(struct drsuapi_DsWriteAccountSpnResult1 *)pytalloc_get_ptr(in);
   17066           0 :                         break;
   17067             : 
   17068           0 :                 default:
   17069           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   17070           0 :                         talloc_free(ret);
   17071           0 :                         ret = NULL;
   17072             :         }
   17073             : 
   17074           0 :         return ret;
   17075             : }
   17076             : 
   17077           2 : static PyObject *py_drsuapi_DsWriteAccountSpnResult_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17078             : {
   17079           2 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17080           2 :         PyObject *mem_ctx_obj = NULL;
   17081           2 :         TALLOC_CTX *mem_ctx = NULL;
   17082           2 :         int level = 0;
   17083           2 :         PyObject *in_obj = NULL;
   17084           2 :         union drsuapi_DsWriteAccountSpnResult *in = NULL;
   17085             : 
   17086           2 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   17087             :                 discard_const_p(char *, kwnames),
   17088             :                 &mem_ctx_obj,
   17089             :                 &level,
   17090             :                 &in_obj)) {
   17091           0 :                 return NULL;
   17092             :         }
   17093           2 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17094           2 :         if (mem_ctx == NULL) {
   17095           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17096           0 :                 return NULL;
   17097             :         }
   17098           2 :         in = (union drsuapi_DsWriteAccountSpnResult *)pytalloc_get_ptr(in_obj);
   17099           2 :         if (in == NULL) {
   17100           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsWriteAccountSpnResult!");
   17101           0 :                 return NULL;
   17102             :         }
   17103             : 
   17104           2 :         return py_import_drsuapi_DsWriteAccountSpnResult(mem_ctx, level, in);
   17105             : }
   17106             : 
   17107           0 : static PyObject *py_drsuapi_DsWriteAccountSpnResult_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17108             : {
   17109           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17110           0 :         PyObject *mem_ctx_obj = NULL;
   17111           0 :         TALLOC_CTX *mem_ctx = NULL;
   17112           0 :         int level = 0;
   17113           0 :         PyObject *in = NULL;
   17114           0 :         union drsuapi_DsWriteAccountSpnResult *out = NULL;
   17115             : 
   17116           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   17117             :                 discard_const_p(char *, kwnames),
   17118             :                 &mem_ctx_obj,
   17119             :                 &level,
   17120             :                 &in)) {
   17121           0 :                 return NULL;
   17122             :         }
   17123           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17124           0 :         if (mem_ctx == NULL) {
   17125           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17126           0 :                 return NULL;
   17127             :         }
   17128             : 
   17129           0 :         out = py_export_drsuapi_DsWriteAccountSpnResult(mem_ctx, level, in);
   17130           0 :         if (out == NULL) {
   17131           0 :                 return NULL;
   17132             :         }
   17133             : 
   17134           0 :         return pytalloc_GenericObject_reference(out);
   17135             : }
   17136             : 
   17137             : static PyMethodDef py_drsuapi_DsWriteAccountSpnResult_methods[] = {
   17138             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpnResult_import),
   17139             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17140             :                 "T.__import__(mem_ctx, level, in) => ret." },
   17141             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpnResult_export),
   17142             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17143             :                 "T.__export__(mem_ctx, level, in) => ret." },
   17144             :         { NULL, NULL, 0, NULL }
   17145             : };
   17146             : 
   17147           0 : static PyObject *py_drsuapi_DsWriteAccountSpnResult_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17148             : {
   17149           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   17150           0 :         return NULL;
   17151             : }
   17152             : 
   17153             : 
   17154             : static PyTypeObject drsuapi_DsWriteAccountSpnResult_Type = {
   17155             :         PyVarObject_HEAD_INIT(NULL, 0)
   17156             :         .tp_name = "drsuapi.DsWriteAccountSpnResult",
   17157             :         .tp_getset = NULL,
   17158             :         .tp_methods = py_drsuapi_DsWriteAccountSpnResult_methods,
   17159             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17160             :         .tp_new = py_drsuapi_DsWriteAccountSpnResult_new,
   17161             : };
   17162             : 
   17163             : 
   17164           0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_server_dn(PyObject *obj, void *closure)
   17165             : {
   17166           0 :         struct drsuapi_DsRemoveDSServerRequest1 *object = pytalloc_get_ptr(obj);
   17167           0 :         PyObject *py_server_dn;
   17168           0 :         if (object->server_dn == NULL) {
   17169           0 :                 Py_RETURN_NONE;
   17170             :         }
   17171           0 :         if (object->server_dn == NULL) {
   17172           0 :                 py_server_dn = Py_None;
   17173           0 :                 Py_INCREF(py_server_dn);
   17174             :         } else {
   17175           0 :                 if (object->server_dn == NULL) {
   17176           0 :                         py_server_dn = Py_None;
   17177           0 :                         Py_INCREF(py_server_dn);
   17178             :                 } else {
   17179           0 :                         py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
   17180             :                 }
   17181             :         }
   17182           0 :         return py_server_dn;
   17183             : }
   17184             : 
   17185           3 : static int py_drsuapi_DsRemoveDSServerRequest1_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
   17186             : {
   17187           3 :         struct drsuapi_DsRemoveDSServerRequest1 *object = pytalloc_get_ptr(py_obj);
   17188           3 :         if (value == NULL) {
   17189           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_dn");
   17190           0 :                 return -1;
   17191             :         }
   17192           3 :         if (value == Py_None) {
   17193           0 :                 object->server_dn = NULL;
   17194             :         } else {
   17195           3 :                 object->server_dn = NULL;
   17196             :                 {
   17197           0 :                         const char *test_str;
   17198           0 :                         const char *talloc_str;
   17199           3 :                         PyObject *unicode = NULL;
   17200           3 :                         if (PyUnicode_Check(value)) {
   17201           3 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17202           3 :                                 if (unicode == NULL) {
   17203           0 :                                         return -1;
   17204             :                                 }
   17205           3 :                                 test_str = PyBytes_AS_STRING(unicode);
   17206           0 :                         } else if (PyBytes_Check(value)) {
   17207           0 :                                 test_str = PyBytes_AS_STRING(value);
   17208             :                         } else {
   17209           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17210           0 :                                 return -1;
   17211             :                         }
   17212           3 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17213           3 :                         if (unicode != NULL) {
   17214           3 :                                 Py_DECREF(unicode);
   17215             :                         }
   17216           3 :                         if (talloc_str == NULL) {
   17217           0 :                                 PyErr_NoMemory();
   17218           0 :                                 return -1;
   17219             :                         }
   17220           3 :                         object->server_dn = talloc_str;
   17221             :                 }
   17222             :         }
   17223           3 :         return 0;
   17224             : }
   17225             : 
   17226           0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_domain_dn(PyObject *obj, void *closure)
   17227             : {
   17228           0 :         struct drsuapi_DsRemoveDSServerRequest1 *object = pytalloc_get_ptr(obj);
   17229           0 :         PyObject *py_domain_dn;
   17230           0 :         if (object->domain_dn == NULL) {
   17231           0 :                 Py_RETURN_NONE;
   17232             :         }
   17233           0 :         if (object->domain_dn == NULL) {
   17234           0 :                 py_domain_dn = Py_None;
   17235           0 :                 Py_INCREF(py_domain_dn);
   17236             :         } else {
   17237           0 :                 if (object->domain_dn == NULL) {
   17238           0 :                         py_domain_dn = Py_None;
   17239           0 :                         Py_INCREF(py_domain_dn);
   17240             :                 } else {
   17241           0 :                         py_domain_dn = PyUnicode_Decode(object->domain_dn, strlen(object->domain_dn), "utf-8", "ignore");
   17242             :                 }
   17243             :         }
   17244           0 :         return py_domain_dn;
   17245             : }
   17246             : 
   17247           3 : static int py_drsuapi_DsRemoveDSServerRequest1_set_domain_dn(PyObject *py_obj, PyObject *value, void *closure)
   17248             : {
   17249           3 :         struct drsuapi_DsRemoveDSServerRequest1 *object = pytalloc_get_ptr(py_obj);
   17250           3 :         if (value == NULL) {
   17251           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_dn");
   17252           0 :                 return -1;
   17253             :         }
   17254           3 :         if (value == Py_None) {
   17255           0 :                 object->domain_dn = NULL;
   17256             :         } else {
   17257           3 :                 object->domain_dn = NULL;
   17258             :                 {
   17259           0 :                         const char *test_str;
   17260           0 :                         const char *talloc_str;
   17261           3 :                         PyObject *unicode = NULL;
   17262           3 :                         if (PyUnicode_Check(value)) {
   17263           3 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17264           3 :                                 if (unicode == NULL) {
   17265           0 :                                         return -1;
   17266             :                                 }
   17267           3 :                                 test_str = PyBytes_AS_STRING(unicode);
   17268           0 :                         } else if (PyBytes_Check(value)) {
   17269           0 :                                 test_str = PyBytes_AS_STRING(value);
   17270             :                         } else {
   17271           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17272           0 :                                 return -1;
   17273             :                         }
   17274           3 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17275           3 :                         if (unicode != NULL) {
   17276           3 :                                 Py_DECREF(unicode);
   17277             :                         }
   17278           3 :                         if (talloc_str == NULL) {
   17279           0 :                                 PyErr_NoMemory();
   17280           0 :                                 return -1;
   17281             :                         }
   17282           3 :                         object->domain_dn = talloc_str;
   17283             :                 }
   17284             :         }
   17285           3 :         return 0;
   17286             : }
   17287             : 
   17288           0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_commit(PyObject *obj, void *closure)
   17289             : {
   17290           0 :         struct drsuapi_DsRemoveDSServerRequest1 *object = pytalloc_get_ptr(obj);
   17291           0 :         PyObject *py_commit;
   17292           0 :         py_commit = PyLong_FromUnsignedLongLong((uint32_t)(object->commit));
   17293           0 :         return py_commit;
   17294             : }
   17295             : 
   17296           3 : static int py_drsuapi_DsRemoveDSServerRequest1_set_commit(PyObject *py_obj, PyObject *value, void *closure)
   17297             : {
   17298           3 :         struct drsuapi_DsRemoveDSServerRequest1 *object = pytalloc_get_ptr(py_obj);
   17299           3 :         if (value == NULL) {
   17300           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->commit");
   17301           0 :                 return -1;
   17302             :         }
   17303             :         {
   17304           3 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->commit));
   17305           3 :                 if (PyLong_Check(value)) {
   17306           0 :                         unsigned long long test_var;
   17307           3 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17308           3 :                         if (PyErr_Occurred() != NULL) {
   17309           0 :                                 return -1;
   17310             :                         }
   17311           3 :                         if (test_var > uint_max) {
   17312           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17313             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17314           0 :                                 return -1;
   17315             :                         }
   17316           3 :                         object->commit = test_var;
   17317             :                 } else {
   17318           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17319             :                           PyLong_Type.tp_name);
   17320           0 :                         return -1;
   17321             :                 }
   17322             :         }
   17323           3 :         return 0;
   17324             : }
   17325             : 
   17326             : static PyGetSetDef py_drsuapi_DsRemoveDSServerRequest1_getsetters[] = {
   17327             :         {
   17328             :                 .name = discard_const_p(char, "server_dn"),
   17329             :                 .get = py_drsuapi_DsRemoveDSServerRequest1_get_server_dn,
   17330             :                 .set = py_drsuapi_DsRemoveDSServerRequest1_set_server_dn,
   17331             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17332             :         },
   17333             :         {
   17334             :                 .name = discard_const_p(char, "domain_dn"),
   17335             :                 .get = py_drsuapi_DsRemoveDSServerRequest1_get_domain_dn,
   17336             :                 .set = py_drsuapi_DsRemoveDSServerRequest1_set_domain_dn,
   17337             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17338             :         },
   17339             :         {
   17340             :                 .name = discard_const_p(char, "commit"),
   17341             :                 .get = py_drsuapi_DsRemoveDSServerRequest1_get_commit,
   17342             :                 .set = py_drsuapi_DsRemoveDSServerRequest1_set_commit,
   17343             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17344             :         },
   17345             :         { .name = NULL }
   17346             : };
   17347             : 
   17348           3 : static PyObject *py_drsuapi_DsRemoveDSServerRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17349             : {
   17350           3 :         return pytalloc_new(struct drsuapi_DsRemoveDSServerRequest1, type);
   17351             : }
   17352             : 
   17353             : 
   17354             : static PyTypeObject drsuapi_DsRemoveDSServerRequest1_Type = {
   17355             :         PyVarObject_HEAD_INIT(NULL, 0)
   17356             :         .tp_name = "drsuapi.DsRemoveDSServerRequest1",
   17357             :         .tp_getset = py_drsuapi_DsRemoveDSServerRequest1_getsetters,
   17358             :         .tp_methods = NULL,
   17359             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17360             :         .tp_new = py_drsuapi_DsRemoveDSServerRequest1_new,
   17361             : };
   17362             : 
   17363           0 : static PyObject *py_import_drsuapi_DsRemoveDSServerRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsRemoveDSServerRequest *in)
   17364             : {
   17365           0 :         PyObject *ret;
   17366             : 
   17367           0 :         switch (level) {
   17368           0 :                 case 1:
   17369           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsRemoveDSServerRequest1_Type, mem_ctx, &in->req1);
   17370           0 :                         return ret;
   17371             : 
   17372             :         }
   17373           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   17374           0 :         return NULL;
   17375             : }
   17376             : 
   17377           3 : static union drsuapi_DsRemoveDSServerRequest *py_export_drsuapi_DsRemoveDSServerRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   17378             : {
   17379           3 :         union drsuapi_DsRemoveDSServerRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerRequest);
   17380           3 :         switch (level) {
   17381           3 :                 case 1:
   17382           3 :                         if (in == NULL) {
   17383           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   17384           0 :                                 talloc_free(ret); return NULL;
   17385             :                         }
   17386           3 :                         PY_CHECK_TYPE(&drsuapi_DsRemoveDSServerRequest1_Type, in, talloc_free(ret); return NULL;);
   17387           3 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17388           0 :                                 PyErr_NoMemory();
   17389           0 :                                 talloc_free(ret); return NULL;
   17390             :                         }
   17391           3 :                         ret->req1 = *(struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(in);
   17392           3 :                         break;
   17393             : 
   17394           0 :                 default:
   17395           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   17396           0 :                         talloc_free(ret);
   17397           0 :                         ret = NULL;
   17398             :         }
   17399             : 
   17400           3 :         return ret;
   17401             : }
   17402             : 
   17403           0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17404             : {
   17405           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17406           0 :         PyObject *mem_ctx_obj = NULL;
   17407           0 :         TALLOC_CTX *mem_ctx = NULL;
   17408           0 :         int level = 0;
   17409           0 :         PyObject *in_obj = NULL;
   17410           0 :         union drsuapi_DsRemoveDSServerRequest *in = NULL;
   17411             : 
   17412           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   17413             :                 discard_const_p(char *, kwnames),
   17414             :                 &mem_ctx_obj,
   17415             :                 &level,
   17416             :                 &in_obj)) {
   17417           0 :                 return NULL;
   17418             :         }
   17419           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17420           0 :         if (mem_ctx == NULL) {
   17421           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17422           0 :                 return NULL;
   17423             :         }
   17424           0 :         in = (union drsuapi_DsRemoveDSServerRequest *)pytalloc_get_ptr(in_obj);
   17425           0 :         if (in == NULL) {
   17426           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsRemoveDSServerRequest!");
   17427           0 :                 return NULL;
   17428             :         }
   17429             : 
   17430           0 :         return py_import_drsuapi_DsRemoveDSServerRequest(mem_ctx, level, in);
   17431             : }
   17432             : 
   17433           3 : static PyObject *py_drsuapi_DsRemoveDSServerRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17434             : {
   17435           3 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17436           3 :         PyObject *mem_ctx_obj = NULL;
   17437           3 :         TALLOC_CTX *mem_ctx = NULL;
   17438           3 :         int level = 0;
   17439           3 :         PyObject *in = NULL;
   17440           3 :         union drsuapi_DsRemoveDSServerRequest *out = NULL;
   17441             : 
   17442           3 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   17443             :                 discard_const_p(char *, kwnames),
   17444             :                 &mem_ctx_obj,
   17445             :                 &level,
   17446             :                 &in)) {
   17447           0 :                 return NULL;
   17448             :         }
   17449           3 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17450           3 :         if (mem_ctx == NULL) {
   17451           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17452           0 :                 return NULL;
   17453             :         }
   17454             : 
   17455           3 :         out = py_export_drsuapi_DsRemoveDSServerRequest(mem_ctx, level, in);
   17456           3 :         if (out == NULL) {
   17457           0 :                 return NULL;
   17458             :         }
   17459             : 
   17460           3 :         return pytalloc_GenericObject_reference(out);
   17461             : }
   17462             : 
   17463             : static PyMethodDef py_drsuapi_DsRemoveDSServerRequest_methods[] = {
   17464             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServerRequest_import),
   17465             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17466             :                 "T.__import__(mem_ctx, level, in) => ret." },
   17467             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServerRequest_export),
   17468             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17469             :                 "T.__export__(mem_ctx, level, in) => ret." },
   17470             :         { NULL, NULL, 0, NULL }
   17471             : };
   17472             : 
   17473           0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17474             : {
   17475           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   17476           0 :         return NULL;
   17477             : }
   17478             : 
   17479             : 
   17480             : static PyTypeObject drsuapi_DsRemoveDSServerRequest_Type = {
   17481             :         PyVarObject_HEAD_INIT(NULL, 0)
   17482             :         .tp_name = "drsuapi.DsRemoveDSServerRequest",
   17483             :         .tp_getset = NULL,
   17484             :         .tp_methods = py_drsuapi_DsRemoveDSServerRequest_methods,
   17485             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17486             :         .tp_new = py_drsuapi_DsRemoveDSServerRequest_new,
   17487             : };
   17488             : 
   17489             : 
   17490           0 : static PyObject *py_drsuapi_DsRemoveDSServerResult1_get_last_dc_in_domain(PyObject *obj, void *closure)
   17491             : {
   17492           0 :         struct drsuapi_DsRemoveDSServerResult1 *object = pytalloc_get_ptr(obj);
   17493           0 :         PyObject *py_last_dc_in_domain;
   17494           0 :         py_last_dc_in_domain = PyLong_FromUnsignedLongLong((uint32_t)(object->last_dc_in_domain));
   17495           0 :         return py_last_dc_in_domain;
   17496             : }
   17497             : 
   17498           0 : static int py_drsuapi_DsRemoveDSServerResult1_set_last_dc_in_domain(PyObject *py_obj, PyObject *value, void *closure)
   17499             : {
   17500           0 :         struct drsuapi_DsRemoveDSServerResult1 *object = pytalloc_get_ptr(py_obj);
   17501           0 :         if (value == NULL) {
   17502           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_dc_in_domain");
   17503           0 :                 return -1;
   17504             :         }
   17505             :         {
   17506           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_dc_in_domain));
   17507           0 :                 if (PyLong_Check(value)) {
   17508           0 :                         unsigned long long test_var;
   17509           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17510           0 :                         if (PyErr_Occurred() != NULL) {
   17511           0 :                                 return -1;
   17512             :                         }
   17513           0 :                         if (test_var > uint_max) {
   17514           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17515             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17516           0 :                                 return -1;
   17517             :                         }
   17518           0 :                         object->last_dc_in_domain = test_var;
   17519             :                 } else {
   17520           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17521             :                           PyLong_Type.tp_name);
   17522           0 :                         return -1;
   17523             :                 }
   17524             :         }
   17525           0 :         return 0;
   17526             : }
   17527             : 
   17528             : static PyGetSetDef py_drsuapi_DsRemoveDSServerResult1_getsetters[] = {
   17529             :         {
   17530             :                 .name = discard_const_p(char, "last_dc_in_domain"),
   17531             :                 .get = py_drsuapi_DsRemoveDSServerResult1_get_last_dc_in_domain,
   17532             :                 .set = py_drsuapi_DsRemoveDSServerResult1_set_last_dc_in_domain,
   17533             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   17534             :         },
   17535             :         { .name = NULL }
   17536             : };
   17537             : 
   17538           0 : static PyObject *py_drsuapi_DsRemoveDSServerResult1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17539             : {
   17540           0 :         return pytalloc_new(struct drsuapi_DsRemoveDSServerResult1, type);
   17541             : }
   17542             : 
   17543             : 
   17544             : static PyTypeObject drsuapi_DsRemoveDSServerResult1_Type = {
   17545             :         PyVarObject_HEAD_INIT(NULL, 0)
   17546             :         .tp_name = "drsuapi.DsRemoveDSServerResult1",
   17547             :         .tp_getset = py_drsuapi_DsRemoveDSServerResult1_getsetters,
   17548             :         .tp_methods = NULL,
   17549             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17550             :         .tp_new = py_drsuapi_DsRemoveDSServerResult1_new,
   17551             : };
   17552             : 
   17553           3 : static PyObject *py_import_drsuapi_DsRemoveDSServerResult(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsRemoveDSServerResult *in)
   17554             : {
   17555           0 :         PyObject *ret;
   17556             : 
   17557           3 :         switch (level) {
   17558           3 :                 case 1:
   17559           3 :                         ret = pytalloc_reference_ex(&drsuapi_DsRemoveDSServerResult1_Type, mem_ctx, &in->res1);
   17560           3 :                         return ret;
   17561             : 
   17562             :         }
   17563           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   17564           0 :         return NULL;
   17565             : }
   17566             : 
   17567           0 : static union drsuapi_DsRemoveDSServerResult *py_export_drsuapi_DsRemoveDSServerResult(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   17568             : {
   17569           0 :         union drsuapi_DsRemoveDSServerResult *ret = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerResult);
   17570           0 :         switch (level) {
   17571           0 :                 case 1:
   17572           0 :                         if (in == NULL) {
   17573           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->res1");
   17574           0 :                                 talloc_free(ret); return NULL;
   17575             :                         }
   17576           0 :                         PY_CHECK_TYPE(&drsuapi_DsRemoveDSServerResult1_Type, in, talloc_free(ret); return NULL;);
   17577           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17578           0 :                                 PyErr_NoMemory();
   17579           0 :                                 talloc_free(ret); return NULL;
   17580             :                         }
   17581           0 :                         ret->res1 = *(struct drsuapi_DsRemoveDSServerResult1 *)pytalloc_get_ptr(in);
   17582           0 :                         break;
   17583             : 
   17584           0 :                 default:
   17585           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   17586           0 :                         talloc_free(ret);
   17587           0 :                         ret = NULL;
   17588             :         }
   17589             : 
   17590           0 :         return ret;
   17591             : }
   17592             : 
   17593           3 : static PyObject *py_drsuapi_DsRemoveDSServerResult_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17594             : {
   17595           3 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17596           3 :         PyObject *mem_ctx_obj = NULL;
   17597           3 :         TALLOC_CTX *mem_ctx = NULL;
   17598           3 :         int level = 0;
   17599           3 :         PyObject *in_obj = NULL;
   17600           3 :         union drsuapi_DsRemoveDSServerResult *in = NULL;
   17601             : 
   17602           3 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   17603             :                 discard_const_p(char *, kwnames),
   17604             :                 &mem_ctx_obj,
   17605             :                 &level,
   17606             :                 &in_obj)) {
   17607           0 :                 return NULL;
   17608             :         }
   17609           3 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17610           3 :         if (mem_ctx == NULL) {
   17611           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17612           0 :                 return NULL;
   17613             :         }
   17614           3 :         in = (union drsuapi_DsRemoveDSServerResult *)pytalloc_get_ptr(in_obj);
   17615           3 :         if (in == NULL) {
   17616           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsRemoveDSServerResult!");
   17617           0 :                 return NULL;
   17618             :         }
   17619             : 
   17620           3 :         return py_import_drsuapi_DsRemoveDSServerResult(mem_ctx, level, in);
   17621             : }
   17622             : 
   17623           0 : static PyObject *py_drsuapi_DsRemoveDSServerResult_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17624             : {
   17625           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17626           0 :         PyObject *mem_ctx_obj = NULL;
   17627           0 :         TALLOC_CTX *mem_ctx = NULL;
   17628           0 :         int level = 0;
   17629           0 :         PyObject *in = NULL;
   17630           0 :         union drsuapi_DsRemoveDSServerResult *out = NULL;
   17631             : 
   17632           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   17633             :                 discard_const_p(char *, kwnames),
   17634             :                 &mem_ctx_obj,
   17635             :                 &level,
   17636             :                 &in)) {
   17637           0 :                 return NULL;
   17638             :         }
   17639           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17640           0 :         if (mem_ctx == NULL) {
   17641           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17642           0 :                 return NULL;
   17643             :         }
   17644             : 
   17645           0 :         out = py_export_drsuapi_DsRemoveDSServerResult(mem_ctx, level, in);
   17646           0 :         if (out == NULL) {
   17647           0 :                 return NULL;
   17648             :         }
   17649             : 
   17650           0 :         return pytalloc_GenericObject_reference(out);
   17651             : }
   17652             : 
   17653             : static PyMethodDef py_drsuapi_DsRemoveDSServerResult_methods[] = {
   17654             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServerResult_import),
   17655             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17656             :                 "T.__import__(mem_ctx, level, in) => ret." },
   17657             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServerResult_export),
   17658             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17659             :                 "T.__export__(mem_ctx, level, in) => ret." },
   17660             :         { NULL, NULL, 0, NULL }
   17661             : };
   17662             : 
   17663           0 : static PyObject *py_drsuapi_DsRemoveDSServerResult_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17664             : {
   17665           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   17666           0 :         return NULL;
   17667             : }
   17668             : 
   17669             : 
   17670             : static PyTypeObject drsuapi_DsRemoveDSServerResult_Type = {
   17671             :         PyVarObject_HEAD_INIT(NULL, 0)
   17672             :         .tp_name = "drsuapi.DsRemoveDSServerResult",
   17673             :         .tp_getset = NULL,
   17674             :         .tp_methods = py_drsuapi_DsRemoveDSServerResult_methods,
   17675             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17676             :         .tp_new = py_drsuapi_DsRemoveDSServerResult_new,
   17677             : };
   17678             : 
   17679             : 
   17680           0 : static PyObject *py_drsuapi_DsGetDCInfoRequest1_get_domain_name(PyObject *obj, void *closure)
   17681             : {
   17682           0 :         struct drsuapi_DsGetDCInfoRequest1 *object = pytalloc_get_ptr(obj);
   17683           0 :         PyObject *py_domain_name;
   17684           0 :         if (object->domain_name == NULL) {
   17685           0 :                 Py_RETURN_NONE;
   17686             :         }
   17687           0 :         if (object->domain_name == NULL) {
   17688           0 :                 py_domain_name = Py_None;
   17689           0 :                 Py_INCREF(py_domain_name);
   17690             :         } else {
   17691           0 :                 if (object->domain_name == NULL) {
   17692           0 :                         py_domain_name = Py_None;
   17693           0 :                         Py_INCREF(py_domain_name);
   17694             :                 } else {
   17695           0 :                         py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
   17696             :                 }
   17697             :         }
   17698           0 :         return py_domain_name;
   17699             : }
   17700             : 
   17701           0 : static int py_drsuapi_DsGetDCInfoRequest1_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
   17702             : {
   17703           0 :         struct drsuapi_DsGetDCInfoRequest1 *object = pytalloc_get_ptr(py_obj);
   17704           0 :         if (value == NULL) {
   17705           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
   17706           0 :                 return -1;
   17707             :         }
   17708           0 :         if (value == Py_None) {
   17709           0 :                 object->domain_name = NULL;
   17710             :         } else {
   17711           0 :                 object->domain_name = NULL;
   17712             :                 {
   17713           0 :                         const char *test_str;
   17714           0 :                         const char *talloc_str;
   17715           0 :                         PyObject *unicode = NULL;
   17716           0 :                         if (PyUnicode_Check(value)) {
   17717           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17718           0 :                                 if (unicode == NULL) {
   17719           0 :                                         return -1;
   17720             :                                 }
   17721           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17722           0 :                         } else if (PyBytes_Check(value)) {
   17723           0 :                                 test_str = PyBytes_AS_STRING(value);
   17724             :                         } else {
   17725           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17726           0 :                                 return -1;
   17727             :                         }
   17728           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17729           0 :                         if (unicode != NULL) {
   17730           0 :                                 Py_DECREF(unicode);
   17731             :                         }
   17732           0 :                         if (talloc_str == NULL) {
   17733           0 :                                 PyErr_NoMemory();
   17734           0 :                                 return -1;
   17735             :                         }
   17736           0 :                         object->domain_name = talloc_str;
   17737             :                 }
   17738             :         }
   17739           0 :         return 0;
   17740             : }
   17741             : 
   17742           0 : static PyObject *py_drsuapi_DsGetDCInfoRequest1_get_level(PyObject *obj, void *closure)
   17743             : {
   17744           0 :         struct drsuapi_DsGetDCInfoRequest1 *object = pytalloc_get_ptr(obj);
   17745           0 :         PyObject *py_level;
   17746           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->level));
   17747           0 :         return py_level;
   17748             : }
   17749             : 
   17750           0 : static int py_drsuapi_DsGetDCInfoRequest1_set_level(PyObject *py_obj, PyObject *value, void *closure)
   17751             : {
   17752           0 :         struct drsuapi_DsGetDCInfoRequest1 *object = pytalloc_get_ptr(py_obj);
   17753           0 :         if (value == NULL) {
   17754           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
   17755           0 :                 return -1;
   17756             :         }
   17757             :         {
   17758           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
   17759           0 :                 if (PyLong_Check(value)) {
   17760           0 :                         unsigned long long test_var;
   17761           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   17762           0 :                         if (PyErr_Occurred() != NULL) {
   17763           0 :                                 return -1;
   17764             :                         }
   17765           0 :                         if (test_var > uint_max) {
   17766           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   17767             :                                   PyLong_Type.tp_name, uint_max, test_var);
   17768           0 :                                 return -1;
   17769             :                         }
   17770           0 :                         object->level = test_var;
   17771             :                 } else {
   17772           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   17773             :                           PyLong_Type.tp_name);
   17774           0 :                         return -1;
   17775             :                 }
   17776             :         }
   17777           0 :         return 0;
   17778             : }
   17779             : 
   17780             : static PyGetSetDef py_drsuapi_DsGetDCInfoRequest1_getsetters[] = {
   17781             :         {
   17782             :                 .name = discard_const_p(char, "domain_name"),
   17783             :                 .get = py_drsuapi_DsGetDCInfoRequest1_get_domain_name,
   17784             :                 .set = py_drsuapi_DsGetDCInfoRequest1_set_domain_name,
   17785             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   17786             :         },
   17787             :         {
   17788             :                 .name = discard_const_p(char, "level"),
   17789             :                 .get = py_drsuapi_DsGetDCInfoRequest1_get_level,
   17790             :                 .set = py_drsuapi_DsGetDCInfoRequest1_set_level,
   17791             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfoCtrLevels")
   17792             :         },
   17793             :         { .name = NULL }
   17794             : };
   17795             : 
   17796           0 : static PyObject *py_drsuapi_DsGetDCInfoRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17797             : {
   17798           0 :         return pytalloc_new(struct drsuapi_DsGetDCInfoRequest1, type);
   17799             : }
   17800             : 
   17801             : 
   17802             : static PyTypeObject drsuapi_DsGetDCInfoRequest1_Type = {
   17803             :         PyVarObject_HEAD_INIT(NULL, 0)
   17804             :         .tp_name = "drsuapi.DsGetDCInfoRequest1",
   17805             :         .tp_getset = py_drsuapi_DsGetDCInfoRequest1_getsetters,
   17806             :         .tp_methods = NULL,
   17807             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17808             :         .tp_new = py_drsuapi_DsGetDCInfoRequest1_new,
   17809             : };
   17810             : 
   17811           0 : static PyObject *py_import_drsuapi_DsGetDCInfoRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetDCInfoRequest *in)
   17812             : {
   17813           0 :         PyObject *ret;
   17814             : 
   17815           0 :         switch (level) {
   17816           0 :                 case 1:
   17817           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoRequest1_Type, mem_ctx, &in->req1);
   17818           0 :                         return ret;
   17819             : 
   17820             :         }
   17821           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   17822           0 :         return NULL;
   17823             : }
   17824             : 
   17825           0 : static union drsuapi_DsGetDCInfoRequest *py_export_drsuapi_DsGetDCInfoRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   17826             : {
   17827           0 :         union drsuapi_DsGetDCInfoRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoRequest);
   17828           0 :         switch (level) {
   17829           0 :                 case 1:
   17830           0 :                         if (in == NULL) {
   17831           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   17832           0 :                                 talloc_free(ret); return NULL;
   17833             :                         }
   17834           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetDCInfoRequest1_Type, in, talloc_free(ret); return NULL;);
   17835           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   17836           0 :                                 PyErr_NoMemory();
   17837           0 :                                 talloc_free(ret); return NULL;
   17838             :                         }
   17839           0 :                         ret->req1 = *(struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(in);
   17840           0 :                         break;
   17841             : 
   17842           0 :                 default:
   17843           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   17844           0 :                         talloc_free(ret);
   17845           0 :                         ret = NULL;
   17846             :         }
   17847             : 
   17848           0 :         return ret;
   17849             : }
   17850             : 
   17851           0 : static PyObject *py_drsuapi_DsGetDCInfoRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17852             : {
   17853           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17854           0 :         PyObject *mem_ctx_obj = NULL;
   17855           0 :         TALLOC_CTX *mem_ctx = NULL;
   17856           0 :         int level = 0;
   17857           0 :         PyObject *in_obj = NULL;
   17858           0 :         union drsuapi_DsGetDCInfoRequest *in = NULL;
   17859             : 
   17860           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   17861             :                 discard_const_p(char *, kwnames),
   17862             :                 &mem_ctx_obj,
   17863             :                 &level,
   17864             :                 &in_obj)) {
   17865           0 :                 return NULL;
   17866             :         }
   17867           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17868           0 :         if (mem_ctx == NULL) {
   17869           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17870           0 :                 return NULL;
   17871             :         }
   17872           0 :         in = (union drsuapi_DsGetDCInfoRequest *)pytalloc_get_ptr(in_obj);
   17873           0 :         if (in == NULL) {
   17874           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetDCInfoRequest!");
   17875           0 :                 return NULL;
   17876             :         }
   17877             : 
   17878           0 :         return py_import_drsuapi_DsGetDCInfoRequest(mem_ctx, level, in);
   17879             : }
   17880             : 
   17881           0 : static PyObject *py_drsuapi_DsGetDCInfoRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17882             : {
   17883           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   17884           0 :         PyObject *mem_ctx_obj = NULL;
   17885           0 :         TALLOC_CTX *mem_ctx = NULL;
   17886           0 :         int level = 0;
   17887           0 :         PyObject *in = NULL;
   17888           0 :         union drsuapi_DsGetDCInfoRequest *out = NULL;
   17889             : 
   17890           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   17891             :                 discard_const_p(char *, kwnames),
   17892             :                 &mem_ctx_obj,
   17893             :                 &level,
   17894             :                 &in)) {
   17895           0 :                 return NULL;
   17896             :         }
   17897           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   17898           0 :         if (mem_ctx == NULL) {
   17899           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   17900           0 :                 return NULL;
   17901             :         }
   17902             : 
   17903           0 :         out = py_export_drsuapi_DsGetDCInfoRequest(mem_ctx, level, in);
   17904           0 :         if (out == NULL) {
   17905           0 :                 return NULL;
   17906             :         }
   17907             : 
   17908           0 :         return pytalloc_GenericObject_reference(out);
   17909             : }
   17910             : 
   17911             : static PyMethodDef py_drsuapi_DsGetDCInfoRequest_methods[] = {
   17912             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDCInfoRequest_import),
   17913             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17914             :                 "T.__import__(mem_ctx, level, in) => ret." },
   17915             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDCInfoRequest_export),
   17916             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   17917             :                 "T.__export__(mem_ctx, level, in) => ret." },
   17918             :         { NULL, NULL, 0, NULL }
   17919             : };
   17920             : 
   17921           0 : static PyObject *py_drsuapi_DsGetDCInfoRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   17922             : {
   17923           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   17924           0 :         return NULL;
   17925             : }
   17926             : 
   17927             : 
   17928             : static PyTypeObject drsuapi_DsGetDCInfoRequest_Type = {
   17929             :         PyVarObject_HEAD_INIT(NULL, 0)
   17930             :         .tp_name = "drsuapi.DsGetDCInfoRequest",
   17931             :         .tp_getset = NULL,
   17932             :         .tp_methods = py_drsuapi_DsGetDCInfoRequest_methods,
   17933             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   17934             :         .tp_new = py_drsuapi_DsGetDCInfoRequest_new,
   17935             : };
   17936             : 
   17937             : 
   17938           0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_netbios_name(PyObject *obj, void *closure)
   17939             : {
   17940           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(obj);
   17941           0 :         PyObject *py_netbios_name;
   17942           0 :         if (object->netbios_name == NULL) {
   17943           0 :                 Py_RETURN_NONE;
   17944             :         }
   17945           0 :         if (object->netbios_name == NULL) {
   17946           0 :                 py_netbios_name = Py_None;
   17947           0 :                 Py_INCREF(py_netbios_name);
   17948             :         } else {
   17949           0 :                 if (object->netbios_name == NULL) {
   17950           0 :                         py_netbios_name = Py_None;
   17951           0 :                         Py_INCREF(py_netbios_name);
   17952             :                 } else {
   17953           0 :                         py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
   17954             :                 }
   17955             :         }
   17956           0 :         return py_netbios_name;
   17957             : }
   17958             : 
   17959           0 : static int py_drsuapi_DsGetDCInfo1_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
   17960             : {
   17961           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(py_obj);
   17962           0 :         if (value == NULL) {
   17963           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
   17964           0 :                 return -1;
   17965             :         }
   17966           0 :         if (value == Py_None) {
   17967           0 :                 object->netbios_name = NULL;
   17968             :         } else {
   17969           0 :                 object->netbios_name = NULL;
   17970             :                 {
   17971           0 :                         const char *test_str;
   17972           0 :                         const char *talloc_str;
   17973           0 :                         PyObject *unicode = NULL;
   17974           0 :                         if (PyUnicode_Check(value)) {
   17975           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   17976           0 :                                 if (unicode == NULL) {
   17977           0 :                                         return -1;
   17978             :                                 }
   17979           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   17980           0 :                         } else if (PyBytes_Check(value)) {
   17981           0 :                                 test_str = PyBytes_AS_STRING(value);
   17982             :                         } else {
   17983           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   17984           0 :                                 return -1;
   17985             :                         }
   17986           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   17987           0 :                         if (unicode != NULL) {
   17988           0 :                                 Py_DECREF(unicode);
   17989             :                         }
   17990           0 :                         if (talloc_str == NULL) {
   17991           0 :                                 PyErr_NoMemory();
   17992           0 :                                 return -1;
   17993             :                         }
   17994           0 :                         object->netbios_name = talloc_str;
   17995             :                 }
   17996             :         }
   17997           0 :         return 0;
   17998             : }
   17999             : 
   18000           0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_dns_name(PyObject *obj, void *closure)
   18001             : {
   18002           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(obj);
   18003           0 :         PyObject *py_dns_name;
   18004           0 :         if (object->dns_name == NULL) {
   18005           0 :                 Py_RETURN_NONE;
   18006             :         }
   18007           0 :         if (object->dns_name == NULL) {
   18008           0 :                 py_dns_name = Py_None;
   18009           0 :                 Py_INCREF(py_dns_name);
   18010             :         } else {
   18011           0 :                 if (object->dns_name == NULL) {
   18012           0 :                         py_dns_name = Py_None;
   18013           0 :                         Py_INCREF(py_dns_name);
   18014             :                 } else {
   18015           0 :                         py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
   18016             :                 }
   18017             :         }
   18018           0 :         return py_dns_name;
   18019             : }
   18020             : 
   18021           0 : static int py_drsuapi_DsGetDCInfo1_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
   18022             : {
   18023           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(py_obj);
   18024           0 :         if (value == NULL) {
   18025           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
   18026           0 :                 return -1;
   18027             :         }
   18028           0 :         if (value == Py_None) {
   18029           0 :                 object->dns_name = NULL;
   18030             :         } else {
   18031           0 :                 object->dns_name = NULL;
   18032             :                 {
   18033           0 :                         const char *test_str;
   18034           0 :                         const char *talloc_str;
   18035           0 :                         PyObject *unicode = NULL;
   18036           0 :                         if (PyUnicode_Check(value)) {
   18037           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18038           0 :                                 if (unicode == NULL) {
   18039           0 :                                         return -1;
   18040             :                                 }
   18041           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18042           0 :                         } else if (PyBytes_Check(value)) {
   18043           0 :                                 test_str = PyBytes_AS_STRING(value);
   18044             :                         } else {
   18045           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18046           0 :                                 return -1;
   18047             :                         }
   18048           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18049           0 :                         if (unicode != NULL) {
   18050           0 :                                 Py_DECREF(unicode);
   18051             :                         }
   18052           0 :                         if (talloc_str == NULL) {
   18053           0 :                                 PyErr_NoMemory();
   18054           0 :                                 return -1;
   18055             :                         }
   18056           0 :                         object->dns_name = talloc_str;
   18057             :                 }
   18058             :         }
   18059           0 :         return 0;
   18060             : }
   18061             : 
   18062           0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_site_name(PyObject *obj, void *closure)
   18063             : {
   18064           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(obj);
   18065           0 :         PyObject *py_site_name;
   18066           0 :         if (object->site_name == NULL) {
   18067           0 :                 Py_RETURN_NONE;
   18068             :         }
   18069           0 :         if (object->site_name == NULL) {
   18070           0 :                 py_site_name = Py_None;
   18071           0 :                 Py_INCREF(py_site_name);
   18072             :         } else {
   18073           0 :                 if (object->site_name == NULL) {
   18074           0 :                         py_site_name = Py_None;
   18075           0 :                         Py_INCREF(py_site_name);
   18076             :                 } else {
   18077           0 :                         py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
   18078             :                 }
   18079             :         }
   18080           0 :         return py_site_name;
   18081             : }
   18082             : 
   18083           0 : static int py_drsuapi_DsGetDCInfo1_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   18084             : {
   18085           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(py_obj);
   18086           0 :         if (value == NULL) {
   18087           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_name");
   18088           0 :                 return -1;
   18089             :         }
   18090           0 :         if (value == Py_None) {
   18091           0 :                 object->site_name = NULL;
   18092             :         } else {
   18093           0 :                 object->site_name = NULL;
   18094             :                 {
   18095           0 :                         const char *test_str;
   18096           0 :                         const char *talloc_str;
   18097           0 :                         PyObject *unicode = NULL;
   18098           0 :                         if (PyUnicode_Check(value)) {
   18099           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18100           0 :                                 if (unicode == NULL) {
   18101           0 :                                         return -1;
   18102             :                                 }
   18103           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18104           0 :                         } else if (PyBytes_Check(value)) {
   18105           0 :                                 test_str = PyBytes_AS_STRING(value);
   18106             :                         } else {
   18107           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18108           0 :                                 return -1;
   18109             :                         }
   18110           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18111           0 :                         if (unicode != NULL) {
   18112           0 :                                 Py_DECREF(unicode);
   18113             :                         }
   18114           0 :                         if (talloc_str == NULL) {
   18115           0 :                                 PyErr_NoMemory();
   18116           0 :                                 return -1;
   18117             :                         }
   18118           0 :                         object->site_name = talloc_str;
   18119             :                 }
   18120             :         }
   18121           0 :         return 0;
   18122             : }
   18123             : 
   18124           0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_computer_dn(PyObject *obj, void *closure)
   18125             : {
   18126           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(obj);
   18127           0 :         PyObject *py_computer_dn;
   18128           0 :         if (object->computer_dn == NULL) {
   18129           0 :                 Py_RETURN_NONE;
   18130             :         }
   18131           0 :         if (object->computer_dn == NULL) {
   18132           0 :                 py_computer_dn = Py_None;
   18133           0 :                 Py_INCREF(py_computer_dn);
   18134             :         } else {
   18135           0 :                 if (object->computer_dn == NULL) {
   18136           0 :                         py_computer_dn = Py_None;
   18137           0 :                         Py_INCREF(py_computer_dn);
   18138             :                 } else {
   18139           0 :                         py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
   18140             :                 }
   18141             :         }
   18142           0 :         return py_computer_dn;
   18143             : }
   18144             : 
   18145           0 : static int py_drsuapi_DsGetDCInfo1_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
   18146             : {
   18147           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(py_obj);
   18148           0 :         if (value == NULL) {
   18149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_dn");
   18150           0 :                 return -1;
   18151             :         }
   18152           0 :         if (value == Py_None) {
   18153           0 :                 object->computer_dn = NULL;
   18154             :         } else {
   18155           0 :                 object->computer_dn = NULL;
   18156             :                 {
   18157           0 :                         const char *test_str;
   18158           0 :                         const char *talloc_str;
   18159           0 :                         PyObject *unicode = NULL;
   18160           0 :                         if (PyUnicode_Check(value)) {
   18161           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18162           0 :                                 if (unicode == NULL) {
   18163           0 :                                         return -1;
   18164             :                                 }
   18165           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18166           0 :                         } else if (PyBytes_Check(value)) {
   18167           0 :                                 test_str = PyBytes_AS_STRING(value);
   18168             :                         } else {
   18169           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18170           0 :                                 return -1;
   18171             :                         }
   18172           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18173           0 :                         if (unicode != NULL) {
   18174           0 :                                 Py_DECREF(unicode);
   18175             :                         }
   18176           0 :                         if (talloc_str == NULL) {
   18177           0 :                                 PyErr_NoMemory();
   18178           0 :                                 return -1;
   18179             :                         }
   18180           0 :                         object->computer_dn = talloc_str;
   18181             :                 }
   18182             :         }
   18183           0 :         return 0;
   18184             : }
   18185             : 
   18186           0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_server_dn(PyObject *obj, void *closure)
   18187             : {
   18188           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(obj);
   18189           0 :         PyObject *py_server_dn;
   18190           0 :         if (object->server_dn == NULL) {
   18191           0 :                 Py_RETURN_NONE;
   18192             :         }
   18193           0 :         if (object->server_dn == NULL) {
   18194           0 :                 py_server_dn = Py_None;
   18195           0 :                 Py_INCREF(py_server_dn);
   18196             :         } else {
   18197           0 :                 if (object->server_dn == NULL) {
   18198           0 :                         py_server_dn = Py_None;
   18199           0 :                         Py_INCREF(py_server_dn);
   18200             :                 } else {
   18201           0 :                         py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
   18202             :                 }
   18203             :         }
   18204           0 :         return py_server_dn;
   18205             : }
   18206             : 
   18207           0 : static int py_drsuapi_DsGetDCInfo1_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
   18208             : {
   18209           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(py_obj);
   18210           0 :         if (value == NULL) {
   18211           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_dn");
   18212           0 :                 return -1;
   18213             :         }
   18214           0 :         if (value == Py_None) {
   18215           0 :                 object->server_dn = NULL;
   18216             :         } else {
   18217           0 :                 object->server_dn = NULL;
   18218             :                 {
   18219           0 :                         const char *test_str;
   18220           0 :                         const char *talloc_str;
   18221           0 :                         PyObject *unicode = NULL;
   18222           0 :                         if (PyUnicode_Check(value)) {
   18223           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18224           0 :                                 if (unicode == NULL) {
   18225           0 :                                         return -1;
   18226             :                                 }
   18227           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18228           0 :                         } else if (PyBytes_Check(value)) {
   18229           0 :                                 test_str = PyBytes_AS_STRING(value);
   18230             :                         } else {
   18231           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18232           0 :                                 return -1;
   18233             :                         }
   18234           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18235           0 :                         if (unicode != NULL) {
   18236           0 :                                 Py_DECREF(unicode);
   18237             :                         }
   18238           0 :                         if (talloc_str == NULL) {
   18239           0 :                                 PyErr_NoMemory();
   18240           0 :                                 return -1;
   18241             :                         }
   18242           0 :                         object->server_dn = talloc_str;
   18243             :                 }
   18244             :         }
   18245           0 :         return 0;
   18246             : }
   18247             : 
   18248           0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_is_pdc(PyObject *obj, void *closure)
   18249             : {
   18250           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(obj);
   18251           0 :         PyObject *py_is_pdc;
   18252           0 :         py_is_pdc = PyLong_FromUnsignedLongLong((uint32_t)(object->is_pdc));
   18253           0 :         return py_is_pdc;
   18254             : }
   18255             : 
   18256           0 : static int py_drsuapi_DsGetDCInfo1_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
   18257             : {
   18258           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(py_obj);
   18259           0 :         if (value == NULL) {
   18260           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_pdc");
   18261           0 :                 return -1;
   18262             :         }
   18263             :         {
   18264           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_pdc));
   18265           0 :                 if (PyLong_Check(value)) {
   18266           0 :                         unsigned long long test_var;
   18267           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18268           0 :                         if (PyErr_Occurred() != NULL) {
   18269           0 :                                 return -1;
   18270             :                         }
   18271           0 :                         if (test_var > uint_max) {
   18272           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18273             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18274           0 :                                 return -1;
   18275             :                         }
   18276           0 :                         object->is_pdc = test_var;
   18277             :                 } else {
   18278           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18279             :                           PyLong_Type.tp_name);
   18280           0 :                         return -1;
   18281             :                 }
   18282             :         }
   18283           0 :         return 0;
   18284             : }
   18285             : 
   18286           0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_is_enabled(PyObject *obj, void *closure)
   18287             : {
   18288           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(obj);
   18289           0 :         PyObject *py_is_enabled;
   18290           0 :         py_is_enabled = PyLong_FromUnsignedLongLong((uint32_t)(object->is_enabled));
   18291           0 :         return py_is_enabled;
   18292             : }
   18293             : 
   18294           0 : static int py_drsuapi_DsGetDCInfo1_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
   18295             : {
   18296           0 :         struct drsuapi_DsGetDCInfo1 *object = pytalloc_get_ptr(py_obj);
   18297           0 :         if (value == NULL) {
   18298           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_enabled");
   18299           0 :                 return -1;
   18300             :         }
   18301             :         {
   18302           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_enabled));
   18303           0 :                 if (PyLong_Check(value)) {
   18304           0 :                         unsigned long long test_var;
   18305           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18306           0 :                         if (PyErr_Occurred() != NULL) {
   18307           0 :                                 return -1;
   18308             :                         }
   18309           0 :                         if (test_var > uint_max) {
   18310           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18311             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18312           0 :                                 return -1;
   18313             :                         }
   18314           0 :                         object->is_enabled = test_var;
   18315             :                 } else {
   18316           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18317             :                           PyLong_Type.tp_name);
   18318           0 :                         return -1;
   18319             :                 }
   18320             :         }
   18321           0 :         return 0;
   18322             : }
   18323             : 
   18324             : static PyGetSetDef py_drsuapi_DsGetDCInfo1_getsetters[] = {
   18325             :         {
   18326             :                 .name = discard_const_p(char, "netbios_name"),
   18327             :                 .get = py_drsuapi_DsGetDCInfo1_get_netbios_name,
   18328             :                 .set = py_drsuapi_DsGetDCInfo1_set_netbios_name,
   18329             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   18330             :         },
   18331             :         {
   18332             :                 .name = discard_const_p(char, "dns_name"),
   18333             :                 .get = py_drsuapi_DsGetDCInfo1_get_dns_name,
   18334             :                 .set = py_drsuapi_DsGetDCInfo1_set_dns_name,
   18335             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   18336             :         },
   18337             :         {
   18338             :                 .name = discard_const_p(char, "site_name"),
   18339             :                 .get = py_drsuapi_DsGetDCInfo1_get_site_name,
   18340             :                 .set = py_drsuapi_DsGetDCInfo1_set_site_name,
   18341             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   18342             :         },
   18343             :         {
   18344             :                 .name = discard_const_p(char, "computer_dn"),
   18345             :                 .get = py_drsuapi_DsGetDCInfo1_get_computer_dn,
   18346             :                 .set = py_drsuapi_DsGetDCInfo1_set_computer_dn,
   18347             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   18348             :         },
   18349             :         {
   18350             :                 .name = discard_const_p(char, "server_dn"),
   18351             :                 .get = py_drsuapi_DsGetDCInfo1_get_server_dn,
   18352             :                 .set = py_drsuapi_DsGetDCInfo1_set_server_dn,
   18353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   18354             :         },
   18355             :         {
   18356             :                 .name = discard_const_p(char, "is_pdc"),
   18357             :                 .get = py_drsuapi_DsGetDCInfo1_get_is_pdc,
   18358             :                 .set = py_drsuapi_DsGetDCInfo1_set_is_pdc,
   18359             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18360             :         },
   18361             :         {
   18362             :                 .name = discard_const_p(char, "is_enabled"),
   18363             :                 .get = py_drsuapi_DsGetDCInfo1_get_is_enabled,
   18364             :                 .set = py_drsuapi_DsGetDCInfo1_set_is_enabled,
   18365             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18366             :         },
   18367             :         { .name = NULL }
   18368             : };
   18369             : 
   18370           0 : static PyObject *py_drsuapi_DsGetDCInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18371             : {
   18372           0 :         return pytalloc_new(struct drsuapi_DsGetDCInfo1, type);
   18373             : }
   18374             : 
   18375             : 
   18376             : static PyTypeObject drsuapi_DsGetDCInfo1_Type = {
   18377             :         PyVarObject_HEAD_INIT(NULL, 0)
   18378             :         .tp_name = "drsuapi.DsGetDCInfo1",
   18379             :         .tp_getset = py_drsuapi_DsGetDCInfo1_getsetters,
   18380             :         .tp_methods = NULL,
   18381             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18382             :         .tp_new = py_drsuapi_DsGetDCInfo1_new,
   18383             : };
   18384             : 
   18385             : 
   18386           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr1_get_count(PyObject *obj, void *closure)
   18387             : {
   18388           0 :         struct drsuapi_DsGetDCInfoCtr1 *object = pytalloc_get_ptr(obj);
   18389           0 :         PyObject *py_count;
   18390           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   18391           0 :         return py_count;
   18392             : }
   18393             : 
   18394           0 : static int py_drsuapi_DsGetDCInfoCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
   18395             : {
   18396           0 :         struct drsuapi_DsGetDCInfoCtr1 *object = pytalloc_get_ptr(py_obj);
   18397           0 :         if (value == NULL) {
   18398           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   18399           0 :                 return -1;
   18400             :         }
   18401             :         {
   18402           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   18403           0 :                 if (PyLong_Check(value)) {
   18404           0 :                         unsigned long long test_var;
   18405           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18406           0 :                         if (PyErr_Occurred() != NULL) {
   18407           0 :                                 return -1;
   18408             :                         }
   18409           0 :                         if (test_var > uint_max) {
   18410           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18411             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18412           0 :                                 return -1;
   18413             :                         }
   18414           0 :                         object->count = test_var;
   18415             :                 } else {
   18416           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18417             :                           PyLong_Type.tp_name);
   18418           0 :                         return -1;
   18419             :                 }
   18420             :         }
   18421           0 :         return 0;
   18422             : }
   18423             : 
   18424           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr1_get_array(PyObject *obj, void *closure)
   18425             : {
   18426           0 :         struct drsuapi_DsGetDCInfoCtr1 *object = pytalloc_get_ptr(obj);
   18427           0 :         PyObject *py_array;
   18428           0 :         if (object->array == NULL) {
   18429           0 :                 Py_RETURN_NONE;
   18430             :         }
   18431           0 :         if (object->array == NULL) {
   18432           0 :                 py_array = Py_None;
   18433           0 :                 Py_INCREF(py_array);
   18434             :         } else {
   18435           0 :                 py_array = PyList_New(object->count);
   18436           0 :                 if (py_array == NULL) {
   18437           0 :                         return NULL;
   18438             :                 }
   18439             :                 {
   18440             :                         int array_cntr_1;
   18441           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   18442           0 :                                 PyObject *py_array_1;
   18443           0 :                                 py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo1_Type, object->array, &(object->array)[array_cntr_1]);
   18444           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   18445             :                         }
   18446             :                 }
   18447             :         }
   18448           0 :         return py_array;
   18449             : }
   18450             : 
   18451           0 : static int py_drsuapi_DsGetDCInfoCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
   18452             : {
   18453           0 :         struct drsuapi_DsGetDCInfoCtr1 *object = pytalloc_get_ptr(py_obj);
   18454           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   18455           0 :         if (value == NULL) {
   18456           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   18457           0 :                 return -1;
   18458             :         }
   18459           0 :         if (value == Py_None) {
   18460           0 :                 object->array = NULL;
   18461             :         } else {
   18462           0 :                 object->array = NULL;
   18463           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   18464             :                 {
   18465           0 :                         int array_cntr_1;
   18466           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   18467           0 :                         if (!object->array) { return -1; }
   18468           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   18469           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   18470           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   18471           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_1]");
   18472           0 :                                         return -1;
   18473             :                                 }
   18474           0 :                                 PY_CHECK_TYPE(&drsuapi_DsGetDCInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   18475           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   18476           0 :                                         PyErr_NoMemory();
   18477           0 :                                         return -1;
   18478             :                                 }
   18479           0 :                                 (object->array)[array_cntr_1] = *(struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   18480             :                         }
   18481             :                 }
   18482             :         }
   18483           0 :         return 0;
   18484             : }
   18485             : 
   18486             : static PyGetSetDef py_drsuapi_DsGetDCInfoCtr1_getsetters[] = {
   18487             :         {
   18488             :                 .name = discard_const_p(char, "count"),
   18489             :                 .get = py_drsuapi_DsGetDCInfoCtr1_get_count,
   18490             :                 .set = py_drsuapi_DsGetDCInfoCtr1_set_count,
   18491             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   18492             :         },
   18493             :         {
   18494             :                 .name = discard_const_p(char, "array"),
   18495             :                 .get = py_drsuapi_DsGetDCInfoCtr1_get_array,
   18496             :                 .set = py_drsuapi_DsGetDCInfoCtr1_set_array,
   18497             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfo1")
   18498             :         },
   18499             :         { .name = NULL }
   18500             : };
   18501             : 
   18502           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   18503             : {
   18504           0 :         return pytalloc_new(struct drsuapi_DsGetDCInfoCtr1, type);
   18505             : }
   18506             : 
   18507             : 
   18508             : static PyTypeObject drsuapi_DsGetDCInfoCtr1_Type = {
   18509             :         PyVarObject_HEAD_INIT(NULL, 0)
   18510             :         .tp_name = "drsuapi.DsGetDCInfoCtr1",
   18511             :         .tp_getset = py_drsuapi_DsGetDCInfoCtr1_getsetters,
   18512             :         .tp_methods = NULL,
   18513             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   18514             :         .tp_new = py_drsuapi_DsGetDCInfoCtr1_new,
   18515             : };
   18516             : 
   18517             : 
   18518           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_netbios_name(PyObject *obj, void *closure)
   18519             : {
   18520           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18521           0 :         PyObject *py_netbios_name;
   18522           0 :         if (object->netbios_name == NULL) {
   18523           0 :                 Py_RETURN_NONE;
   18524             :         }
   18525           0 :         if (object->netbios_name == NULL) {
   18526           0 :                 py_netbios_name = Py_None;
   18527           0 :                 Py_INCREF(py_netbios_name);
   18528             :         } else {
   18529           0 :                 if (object->netbios_name == NULL) {
   18530           0 :                         py_netbios_name = Py_None;
   18531           0 :                         Py_INCREF(py_netbios_name);
   18532             :                 } else {
   18533           0 :                         py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
   18534             :                 }
   18535             :         }
   18536           0 :         return py_netbios_name;
   18537             : }
   18538             : 
   18539           0 : static int py_drsuapi_DsGetDCInfo2_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
   18540             : {
   18541           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   18542           0 :         if (value == NULL) {
   18543           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
   18544           0 :                 return -1;
   18545             :         }
   18546           0 :         if (value == Py_None) {
   18547           0 :                 object->netbios_name = NULL;
   18548             :         } else {
   18549           0 :                 object->netbios_name = NULL;
   18550             :                 {
   18551           0 :                         const char *test_str;
   18552           0 :                         const char *talloc_str;
   18553           0 :                         PyObject *unicode = NULL;
   18554           0 :                         if (PyUnicode_Check(value)) {
   18555           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18556           0 :                                 if (unicode == NULL) {
   18557           0 :                                         return -1;
   18558             :                                 }
   18559           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18560           0 :                         } else if (PyBytes_Check(value)) {
   18561           0 :                                 test_str = PyBytes_AS_STRING(value);
   18562             :                         } else {
   18563           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18564           0 :                                 return -1;
   18565             :                         }
   18566           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18567           0 :                         if (unicode != NULL) {
   18568           0 :                                 Py_DECREF(unicode);
   18569             :                         }
   18570           0 :                         if (talloc_str == NULL) {
   18571           0 :                                 PyErr_NoMemory();
   18572           0 :                                 return -1;
   18573             :                         }
   18574           0 :                         object->netbios_name = talloc_str;
   18575             :                 }
   18576             :         }
   18577           0 :         return 0;
   18578             : }
   18579             : 
   18580           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_dns_name(PyObject *obj, void *closure)
   18581             : {
   18582           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18583           0 :         PyObject *py_dns_name;
   18584           0 :         if (object->dns_name == NULL) {
   18585           0 :                 Py_RETURN_NONE;
   18586             :         }
   18587           0 :         if (object->dns_name == NULL) {
   18588           0 :                 py_dns_name = Py_None;
   18589           0 :                 Py_INCREF(py_dns_name);
   18590             :         } else {
   18591           0 :                 if (object->dns_name == NULL) {
   18592           0 :                         py_dns_name = Py_None;
   18593           0 :                         Py_INCREF(py_dns_name);
   18594             :                 } else {
   18595           0 :                         py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
   18596             :                 }
   18597             :         }
   18598           0 :         return py_dns_name;
   18599             : }
   18600             : 
   18601           0 : static int py_drsuapi_DsGetDCInfo2_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
   18602             : {
   18603           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   18604           0 :         if (value == NULL) {
   18605           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
   18606           0 :                 return -1;
   18607             :         }
   18608           0 :         if (value == Py_None) {
   18609           0 :                 object->dns_name = NULL;
   18610             :         } else {
   18611           0 :                 object->dns_name = NULL;
   18612             :                 {
   18613           0 :                         const char *test_str;
   18614           0 :                         const char *talloc_str;
   18615           0 :                         PyObject *unicode = NULL;
   18616           0 :                         if (PyUnicode_Check(value)) {
   18617           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18618           0 :                                 if (unicode == NULL) {
   18619           0 :                                         return -1;
   18620             :                                 }
   18621           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18622           0 :                         } else if (PyBytes_Check(value)) {
   18623           0 :                                 test_str = PyBytes_AS_STRING(value);
   18624             :                         } else {
   18625           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18626           0 :                                 return -1;
   18627             :                         }
   18628           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18629           0 :                         if (unicode != NULL) {
   18630           0 :                                 Py_DECREF(unicode);
   18631             :                         }
   18632           0 :                         if (talloc_str == NULL) {
   18633           0 :                                 PyErr_NoMemory();
   18634           0 :                                 return -1;
   18635             :                         }
   18636           0 :                         object->dns_name = talloc_str;
   18637             :                 }
   18638             :         }
   18639           0 :         return 0;
   18640             : }
   18641             : 
   18642           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_site_name(PyObject *obj, void *closure)
   18643             : {
   18644           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18645           0 :         PyObject *py_site_name;
   18646           0 :         if (object->site_name == NULL) {
   18647           0 :                 Py_RETURN_NONE;
   18648             :         }
   18649           0 :         if (object->site_name == NULL) {
   18650           0 :                 py_site_name = Py_None;
   18651           0 :                 Py_INCREF(py_site_name);
   18652             :         } else {
   18653           0 :                 if (object->site_name == NULL) {
   18654           0 :                         py_site_name = Py_None;
   18655           0 :                         Py_INCREF(py_site_name);
   18656             :                 } else {
   18657           0 :                         py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
   18658             :                 }
   18659             :         }
   18660           0 :         return py_site_name;
   18661             : }
   18662             : 
   18663           0 : static int py_drsuapi_DsGetDCInfo2_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   18664             : {
   18665           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   18666           0 :         if (value == NULL) {
   18667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_name");
   18668           0 :                 return -1;
   18669             :         }
   18670           0 :         if (value == Py_None) {
   18671           0 :                 object->site_name = NULL;
   18672             :         } else {
   18673           0 :                 object->site_name = NULL;
   18674             :                 {
   18675           0 :                         const char *test_str;
   18676           0 :                         const char *talloc_str;
   18677           0 :                         PyObject *unicode = NULL;
   18678           0 :                         if (PyUnicode_Check(value)) {
   18679           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18680           0 :                                 if (unicode == NULL) {
   18681           0 :                                         return -1;
   18682             :                                 }
   18683           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18684           0 :                         } else if (PyBytes_Check(value)) {
   18685           0 :                                 test_str = PyBytes_AS_STRING(value);
   18686             :                         } else {
   18687           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18688           0 :                                 return -1;
   18689             :                         }
   18690           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18691           0 :                         if (unicode != NULL) {
   18692           0 :                                 Py_DECREF(unicode);
   18693             :                         }
   18694           0 :                         if (talloc_str == NULL) {
   18695           0 :                                 PyErr_NoMemory();
   18696           0 :                                 return -1;
   18697             :                         }
   18698           0 :                         object->site_name = talloc_str;
   18699             :                 }
   18700             :         }
   18701           0 :         return 0;
   18702             : }
   18703             : 
   18704           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_site_dn(PyObject *obj, void *closure)
   18705             : {
   18706           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18707           0 :         PyObject *py_site_dn;
   18708           0 :         if (object->site_dn == NULL) {
   18709           0 :                 Py_RETURN_NONE;
   18710             :         }
   18711           0 :         if (object->site_dn == NULL) {
   18712           0 :                 py_site_dn = Py_None;
   18713           0 :                 Py_INCREF(py_site_dn);
   18714             :         } else {
   18715           0 :                 if (object->site_dn == NULL) {
   18716           0 :                         py_site_dn = Py_None;
   18717           0 :                         Py_INCREF(py_site_dn);
   18718             :                 } else {
   18719           0 :                         py_site_dn = PyUnicode_Decode(object->site_dn, strlen(object->site_dn), "utf-8", "ignore");
   18720             :                 }
   18721             :         }
   18722           0 :         return py_site_dn;
   18723             : }
   18724             : 
   18725           0 : static int py_drsuapi_DsGetDCInfo2_set_site_dn(PyObject *py_obj, PyObject *value, void *closure)
   18726             : {
   18727           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   18728           0 :         if (value == NULL) {
   18729           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_dn");
   18730           0 :                 return -1;
   18731             :         }
   18732           0 :         if (value == Py_None) {
   18733           0 :                 object->site_dn = NULL;
   18734             :         } else {
   18735           0 :                 object->site_dn = NULL;
   18736             :                 {
   18737           0 :                         const char *test_str;
   18738           0 :                         const char *talloc_str;
   18739           0 :                         PyObject *unicode = NULL;
   18740           0 :                         if (PyUnicode_Check(value)) {
   18741           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18742           0 :                                 if (unicode == NULL) {
   18743           0 :                                         return -1;
   18744             :                                 }
   18745           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18746           0 :                         } else if (PyBytes_Check(value)) {
   18747           0 :                                 test_str = PyBytes_AS_STRING(value);
   18748             :                         } else {
   18749           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18750           0 :                                 return -1;
   18751             :                         }
   18752           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18753           0 :                         if (unicode != NULL) {
   18754           0 :                                 Py_DECREF(unicode);
   18755             :                         }
   18756           0 :                         if (talloc_str == NULL) {
   18757           0 :                                 PyErr_NoMemory();
   18758           0 :                                 return -1;
   18759             :                         }
   18760           0 :                         object->site_dn = talloc_str;
   18761             :                 }
   18762             :         }
   18763           0 :         return 0;
   18764             : }
   18765             : 
   18766           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_computer_dn(PyObject *obj, void *closure)
   18767             : {
   18768           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18769           0 :         PyObject *py_computer_dn;
   18770           0 :         if (object->computer_dn == NULL) {
   18771           0 :                 Py_RETURN_NONE;
   18772             :         }
   18773           0 :         if (object->computer_dn == NULL) {
   18774           0 :                 py_computer_dn = Py_None;
   18775           0 :                 Py_INCREF(py_computer_dn);
   18776             :         } else {
   18777           0 :                 if (object->computer_dn == NULL) {
   18778           0 :                         py_computer_dn = Py_None;
   18779           0 :                         Py_INCREF(py_computer_dn);
   18780             :                 } else {
   18781           0 :                         py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
   18782             :                 }
   18783             :         }
   18784           0 :         return py_computer_dn;
   18785             : }
   18786             : 
   18787           0 : static int py_drsuapi_DsGetDCInfo2_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
   18788             : {
   18789           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   18790           0 :         if (value == NULL) {
   18791           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_dn");
   18792           0 :                 return -1;
   18793             :         }
   18794           0 :         if (value == Py_None) {
   18795           0 :                 object->computer_dn = NULL;
   18796             :         } else {
   18797           0 :                 object->computer_dn = NULL;
   18798             :                 {
   18799           0 :                         const char *test_str;
   18800           0 :                         const char *talloc_str;
   18801           0 :                         PyObject *unicode = NULL;
   18802           0 :                         if (PyUnicode_Check(value)) {
   18803           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18804           0 :                                 if (unicode == NULL) {
   18805           0 :                                         return -1;
   18806             :                                 }
   18807           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18808           0 :                         } else if (PyBytes_Check(value)) {
   18809           0 :                                 test_str = PyBytes_AS_STRING(value);
   18810             :                         } else {
   18811           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18812           0 :                                 return -1;
   18813             :                         }
   18814           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18815           0 :                         if (unicode != NULL) {
   18816           0 :                                 Py_DECREF(unicode);
   18817             :                         }
   18818           0 :                         if (talloc_str == NULL) {
   18819           0 :                                 PyErr_NoMemory();
   18820           0 :                                 return -1;
   18821             :                         }
   18822           0 :                         object->computer_dn = talloc_str;
   18823             :                 }
   18824             :         }
   18825           0 :         return 0;
   18826             : }
   18827             : 
   18828           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_server_dn(PyObject *obj, void *closure)
   18829             : {
   18830           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18831           0 :         PyObject *py_server_dn;
   18832           0 :         if (object->server_dn == NULL) {
   18833           0 :                 Py_RETURN_NONE;
   18834             :         }
   18835           0 :         if (object->server_dn == NULL) {
   18836           0 :                 py_server_dn = Py_None;
   18837           0 :                 Py_INCREF(py_server_dn);
   18838             :         } else {
   18839           0 :                 if (object->server_dn == NULL) {
   18840           0 :                         py_server_dn = Py_None;
   18841           0 :                         Py_INCREF(py_server_dn);
   18842             :                 } else {
   18843           0 :                         py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
   18844             :                 }
   18845             :         }
   18846           0 :         return py_server_dn;
   18847             : }
   18848             : 
   18849           0 : static int py_drsuapi_DsGetDCInfo2_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
   18850             : {
   18851           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   18852           0 :         if (value == NULL) {
   18853           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_dn");
   18854           0 :                 return -1;
   18855             :         }
   18856           0 :         if (value == Py_None) {
   18857           0 :                 object->server_dn = NULL;
   18858             :         } else {
   18859           0 :                 object->server_dn = NULL;
   18860             :                 {
   18861           0 :                         const char *test_str;
   18862           0 :                         const char *talloc_str;
   18863           0 :                         PyObject *unicode = NULL;
   18864           0 :                         if (PyUnicode_Check(value)) {
   18865           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18866           0 :                                 if (unicode == NULL) {
   18867           0 :                                         return -1;
   18868             :                                 }
   18869           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18870           0 :                         } else if (PyBytes_Check(value)) {
   18871           0 :                                 test_str = PyBytes_AS_STRING(value);
   18872             :                         } else {
   18873           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18874           0 :                                 return -1;
   18875             :                         }
   18876           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18877           0 :                         if (unicode != NULL) {
   18878           0 :                                 Py_DECREF(unicode);
   18879             :                         }
   18880           0 :                         if (talloc_str == NULL) {
   18881           0 :                                 PyErr_NoMemory();
   18882           0 :                                 return -1;
   18883             :                         }
   18884           0 :                         object->server_dn = talloc_str;
   18885             :                 }
   18886             :         }
   18887           0 :         return 0;
   18888             : }
   18889             : 
   18890           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_ntds_dn(PyObject *obj, void *closure)
   18891             : {
   18892           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18893           0 :         PyObject *py_ntds_dn;
   18894           0 :         if (object->ntds_dn == NULL) {
   18895           0 :                 Py_RETURN_NONE;
   18896             :         }
   18897           0 :         if (object->ntds_dn == NULL) {
   18898           0 :                 py_ntds_dn = Py_None;
   18899           0 :                 Py_INCREF(py_ntds_dn);
   18900             :         } else {
   18901           0 :                 if (object->ntds_dn == NULL) {
   18902           0 :                         py_ntds_dn = Py_None;
   18903           0 :                         Py_INCREF(py_ntds_dn);
   18904             :                 } else {
   18905           0 :                         py_ntds_dn = PyUnicode_Decode(object->ntds_dn, strlen(object->ntds_dn), "utf-8", "ignore");
   18906             :                 }
   18907             :         }
   18908           0 :         return py_ntds_dn;
   18909             : }
   18910             : 
   18911           0 : static int py_drsuapi_DsGetDCInfo2_set_ntds_dn(PyObject *py_obj, PyObject *value, void *closure)
   18912             : {
   18913           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   18914           0 :         if (value == NULL) {
   18915           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntds_dn");
   18916           0 :                 return -1;
   18917             :         }
   18918           0 :         if (value == Py_None) {
   18919           0 :                 object->ntds_dn = NULL;
   18920             :         } else {
   18921           0 :                 object->ntds_dn = NULL;
   18922             :                 {
   18923           0 :                         const char *test_str;
   18924           0 :                         const char *talloc_str;
   18925           0 :                         PyObject *unicode = NULL;
   18926           0 :                         if (PyUnicode_Check(value)) {
   18927           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   18928           0 :                                 if (unicode == NULL) {
   18929           0 :                                         return -1;
   18930             :                                 }
   18931           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   18932           0 :                         } else if (PyBytes_Check(value)) {
   18933           0 :                                 test_str = PyBytes_AS_STRING(value);
   18934             :                         } else {
   18935           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   18936           0 :                                 return -1;
   18937             :                         }
   18938           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   18939           0 :                         if (unicode != NULL) {
   18940           0 :                                 Py_DECREF(unicode);
   18941             :                         }
   18942           0 :                         if (talloc_str == NULL) {
   18943           0 :                                 PyErr_NoMemory();
   18944           0 :                                 return -1;
   18945             :                         }
   18946           0 :                         object->ntds_dn = talloc_str;
   18947             :                 }
   18948             :         }
   18949           0 :         return 0;
   18950             : }
   18951             : 
   18952           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_is_pdc(PyObject *obj, void *closure)
   18953             : {
   18954           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18955           0 :         PyObject *py_is_pdc;
   18956           0 :         py_is_pdc = PyLong_FromUnsignedLongLong((uint32_t)(object->is_pdc));
   18957           0 :         return py_is_pdc;
   18958             : }
   18959             : 
   18960           0 : static int py_drsuapi_DsGetDCInfo2_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
   18961             : {
   18962           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   18963           0 :         if (value == NULL) {
   18964           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_pdc");
   18965           0 :                 return -1;
   18966             :         }
   18967             :         {
   18968           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_pdc));
   18969           0 :                 if (PyLong_Check(value)) {
   18970           0 :                         unsigned long long test_var;
   18971           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   18972           0 :                         if (PyErr_Occurred() != NULL) {
   18973           0 :                                 return -1;
   18974             :                         }
   18975           0 :                         if (test_var > uint_max) {
   18976           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   18977             :                                   PyLong_Type.tp_name, uint_max, test_var);
   18978           0 :                                 return -1;
   18979             :                         }
   18980           0 :                         object->is_pdc = test_var;
   18981             :                 } else {
   18982           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   18983             :                           PyLong_Type.tp_name);
   18984           0 :                         return -1;
   18985             :                 }
   18986             :         }
   18987           0 :         return 0;
   18988             : }
   18989             : 
   18990           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_is_enabled(PyObject *obj, void *closure)
   18991             : {
   18992           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   18993           0 :         PyObject *py_is_enabled;
   18994           0 :         py_is_enabled = PyLong_FromUnsignedLongLong((uint32_t)(object->is_enabled));
   18995           0 :         return py_is_enabled;
   18996             : }
   18997             : 
   18998           0 : static int py_drsuapi_DsGetDCInfo2_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
   18999             : {
   19000           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   19001           0 :         if (value == NULL) {
   19002           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_enabled");
   19003           0 :                 return -1;
   19004             :         }
   19005             :         {
   19006           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_enabled));
   19007           0 :                 if (PyLong_Check(value)) {
   19008           0 :                         unsigned long long test_var;
   19009           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19010           0 :                         if (PyErr_Occurred() != NULL) {
   19011           0 :                                 return -1;
   19012             :                         }
   19013           0 :                         if (test_var > uint_max) {
   19014           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19015             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19016           0 :                                 return -1;
   19017             :                         }
   19018           0 :                         object->is_enabled = test_var;
   19019             :                 } else {
   19020           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19021             :                           PyLong_Type.tp_name);
   19022           0 :                         return -1;
   19023             :                 }
   19024             :         }
   19025           0 :         return 0;
   19026             : }
   19027             : 
   19028           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_is_gc(PyObject *obj, void *closure)
   19029             : {
   19030           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   19031           0 :         PyObject *py_is_gc;
   19032           0 :         py_is_gc = PyLong_FromUnsignedLongLong((uint32_t)(object->is_gc));
   19033           0 :         return py_is_gc;
   19034             : }
   19035             : 
   19036           0 : static int py_drsuapi_DsGetDCInfo2_set_is_gc(PyObject *py_obj, PyObject *value, void *closure)
   19037             : {
   19038           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   19039           0 :         if (value == NULL) {
   19040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_gc");
   19041           0 :                 return -1;
   19042             :         }
   19043             :         {
   19044           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_gc));
   19045           0 :                 if (PyLong_Check(value)) {
   19046           0 :                         unsigned long long test_var;
   19047           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19048           0 :                         if (PyErr_Occurred() != NULL) {
   19049           0 :                                 return -1;
   19050             :                         }
   19051           0 :                         if (test_var > uint_max) {
   19052           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19053             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19054           0 :                                 return -1;
   19055             :                         }
   19056           0 :                         object->is_gc = test_var;
   19057             :                 } else {
   19058           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19059             :                           PyLong_Type.tp_name);
   19060           0 :                         return -1;
   19061             :                 }
   19062             :         }
   19063           0 :         return 0;
   19064             : }
   19065             : 
   19066           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_site_guid(PyObject *obj, void *closure)
   19067             : {
   19068           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   19069           0 :         PyObject *py_site_guid;
   19070           0 :         py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
   19071           0 :         return py_site_guid;
   19072             : }
   19073             : 
   19074           0 : static int py_drsuapi_DsGetDCInfo2_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
   19075             : {
   19076           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   19077           0 :         if (value == NULL) {
   19078           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
   19079           0 :                 return -1;
   19080             :         }
   19081           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   19082           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19083           0 :                 PyErr_NoMemory();
   19084           0 :                 return -1;
   19085             :         }
   19086           0 :         object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
   19087           0 :         return 0;
   19088             : }
   19089             : 
   19090           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_computer_guid(PyObject *obj, void *closure)
   19091             : {
   19092           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   19093           0 :         PyObject *py_computer_guid;
   19094           0 :         py_computer_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->computer_guid);
   19095           0 :         return py_computer_guid;
   19096             : }
   19097             : 
   19098           0 : static int py_drsuapi_DsGetDCInfo2_set_computer_guid(PyObject *py_obj, PyObject *value, void *closure)
   19099             : {
   19100           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   19101           0 :         if (value == NULL) {
   19102           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_guid");
   19103           0 :                 return -1;
   19104             :         }
   19105           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   19106           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19107           0 :                 PyErr_NoMemory();
   19108           0 :                 return -1;
   19109             :         }
   19110           0 :         object->computer_guid = *(struct GUID *)pytalloc_get_ptr(value);
   19111           0 :         return 0;
   19112             : }
   19113             : 
   19114           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_server_guid(PyObject *obj, void *closure)
   19115             : {
   19116           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   19117           0 :         PyObject *py_server_guid;
   19118           0 :         py_server_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->server_guid);
   19119           0 :         return py_server_guid;
   19120             : }
   19121             : 
   19122           0 : static int py_drsuapi_DsGetDCInfo2_set_server_guid(PyObject *py_obj, PyObject *value, void *closure)
   19123             : {
   19124           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   19125           0 :         if (value == NULL) {
   19126           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_guid");
   19127           0 :                 return -1;
   19128             :         }
   19129           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   19130           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19131           0 :                 PyErr_NoMemory();
   19132           0 :                 return -1;
   19133             :         }
   19134           0 :         object->server_guid = *(struct GUID *)pytalloc_get_ptr(value);
   19135           0 :         return 0;
   19136             : }
   19137             : 
   19138           0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_ntds_guid(PyObject *obj, void *closure)
   19139             : {
   19140           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(obj);
   19141           0 :         PyObject *py_ntds_guid;
   19142           0 :         py_ntds_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->ntds_guid);
   19143           0 :         return py_ntds_guid;
   19144             : }
   19145             : 
   19146           0 : static int py_drsuapi_DsGetDCInfo2_set_ntds_guid(PyObject *py_obj, PyObject *value, void *closure)
   19147             : {
   19148           0 :         struct drsuapi_DsGetDCInfo2 *object = pytalloc_get_ptr(py_obj);
   19149           0 :         if (value == NULL) {
   19150           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntds_guid");
   19151           0 :                 return -1;
   19152             :         }
   19153           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   19154           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   19155           0 :                 PyErr_NoMemory();
   19156           0 :                 return -1;
   19157             :         }
   19158           0 :         object->ntds_guid = *(struct GUID *)pytalloc_get_ptr(value);
   19159           0 :         return 0;
   19160             : }
   19161             : 
   19162             : static PyGetSetDef py_drsuapi_DsGetDCInfo2_getsetters[] = {
   19163             :         {
   19164             :                 .name = discard_const_p(char, "netbios_name"),
   19165             :                 .get = py_drsuapi_DsGetDCInfo2_get_netbios_name,
   19166             :                 .set = py_drsuapi_DsGetDCInfo2_set_netbios_name,
   19167             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19168             :         },
   19169             :         {
   19170             :                 .name = discard_const_p(char, "dns_name"),
   19171             :                 .get = py_drsuapi_DsGetDCInfo2_get_dns_name,
   19172             :                 .set = py_drsuapi_DsGetDCInfo2_set_dns_name,
   19173             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19174             :         },
   19175             :         {
   19176             :                 .name = discard_const_p(char, "site_name"),
   19177             :                 .get = py_drsuapi_DsGetDCInfo2_get_site_name,
   19178             :                 .set = py_drsuapi_DsGetDCInfo2_set_site_name,
   19179             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19180             :         },
   19181             :         {
   19182             :                 .name = discard_const_p(char, "site_dn"),
   19183             :                 .get = py_drsuapi_DsGetDCInfo2_get_site_dn,
   19184             :                 .set = py_drsuapi_DsGetDCInfo2_set_site_dn,
   19185             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19186             :         },
   19187             :         {
   19188             :                 .name = discard_const_p(char, "computer_dn"),
   19189             :                 .get = py_drsuapi_DsGetDCInfo2_get_computer_dn,
   19190             :                 .set = py_drsuapi_DsGetDCInfo2_set_computer_dn,
   19191             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19192             :         },
   19193             :         {
   19194             :                 .name = discard_const_p(char, "server_dn"),
   19195             :                 .get = py_drsuapi_DsGetDCInfo2_get_server_dn,
   19196             :                 .set = py_drsuapi_DsGetDCInfo2_set_server_dn,
   19197             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19198             :         },
   19199             :         {
   19200             :                 .name = discard_const_p(char, "ntds_dn"),
   19201             :                 .get = py_drsuapi_DsGetDCInfo2_get_ntds_dn,
   19202             :                 .set = py_drsuapi_DsGetDCInfo2_set_ntds_dn,
   19203             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   19204             :         },
   19205             :         {
   19206             :                 .name = discard_const_p(char, "is_pdc"),
   19207             :                 .get = py_drsuapi_DsGetDCInfo2_get_is_pdc,
   19208             :                 .set = py_drsuapi_DsGetDCInfo2_set_is_pdc,
   19209             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19210             :         },
   19211             :         {
   19212             :                 .name = discard_const_p(char, "is_enabled"),
   19213             :                 .get = py_drsuapi_DsGetDCInfo2_get_is_enabled,
   19214             :                 .set = py_drsuapi_DsGetDCInfo2_set_is_enabled,
   19215             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19216             :         },
   19217             :         {
   19218             :                 .name = discard_const_p(char, "is_gc"),
   19219             :                 .get = py_drsuapi_DsGetDCInfo2_get_is_gc,
   19220             :                 .set = py_drsuapi_DsGetDCInfo2_set_is_gc,
   19221             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19222             :         },
   19223             :         {
   19224             :                 .name = discard_const_p(char, "site_guid"),
   19225             :                 .get = py_drsuapi_DsGetDCInfo2_get_site_guid,
   19226             :                 .set = py_drsuapi_DsGetDCInfo2_set_site_guid,
   19227             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   19228             :         },
   19229             :         {
   19230             :                 .name = discard_const_p(char, "computer_guid"),
   19231             :                 .get = py_drsuapi_DsGetDCInfo2_get_computer_guid,
   19232             :                 .set = py_drsuapi_DsGetDCInfo2_set_computer_guid,
   19233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   19234             :         },
   19235             :         {
   19236             :                 .name = discard_const_p(char, "server_guid"),
   19237             :                 .get = py_drsuapi_DsGetDCInfo2_get_server_guid,
   19238             :                 .set = py_drsuapi_DsGetDCInfo2_set_server_guid,
   19239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   19240             :         },
   19241             :         {
   19242             :                 .name = discard_const_p(char, "ntds_guid"),
   19243             :                 .get = py_drsuapi_DsGetDCInfo2_get_ntds_guid,
   19244             :                 .set = py_drsuapi_DsGetDCInfo2_set_ntds_guid,
   19245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   19246             :         },
   19247             :         { .name = NULL }
   19248             : };
   19249             : 
   19250           0 : static PyObject *py_drsuapi_DsGetDCInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19251             : {
   19252           0 :         return pytalloc_new(struct drsuapi_DsGetDCInfo2, type);
   19253             : }
   19254             : 
   19255             : 
   19256             : static PyTypeObject drsuapi_DsGetDCInfo2_Type = {
   19257             :         PyVarObject_HEAD_INIT(NULL, 0)
   19258             :         .tp_name = "drsuapi.DsGetDCInfo2",
   19259             :         .tp_getset = py_drsuapi_DsGetDCInfo2_getsetters,
   19260             :         .tp_methods = NULL,
   19261             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19262             :         .tp_new = py_drsuapi_DsGetDCInfo2_new,
   19263             : };
   19264             : 
   19265             : 
   19266           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr2_get_count(PyObject *obj, void *closure)
   19267             : {
   19268           0 :         struct drsuapi_DsGetDCInfoCtr2 *object = pytalloc_get_ptr(obj);
   19269           0 :         PyObject *py_count;
   19270           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   19271           0 :         return py_count;
   19272             : }
   19273             : 
   19274           0 : static int py_drsuapi_DsGetDCInfoCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
   19275             : {
   19276           0 :         struct drsuapi_DsGetDCInfoCtr2 *object = pytalloc_get_ptr(py_obj);
   19277           0 :         if (value == NULL) {
   19278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   19279           0 :                 return -1;
   19280             :         }
   19281             :         {
   19282           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   19283           0 :                 if (PyLong_Check(value)) {
   19284           0 :                         unsigned long long test_var;
   19285           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19286           0 :                         if (PyErr_Occurred() != NULL) {
   19287           0 :                                 return -1;
   19288             :                         }
   19289           0 :                         if (test_var > uint_max) {
   19290           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19291             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19292           0 :                                 return -1;
   19293             :                         }
   19294           0 :                         object->count = test_var;
   19295             :                 } else {
   19296           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19297             :                           PyLong_Type.tp_name);
   19298           0 :                         return -1;
   19299             :                 }
   19300             :         }
   19301           0 :         return 0;
   19302             : }
   19303             : 
   19304           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr2_get_array(PyObject *obj, void *closure)
   19305             : {
   19306           0 :         struct drsuapi_DsGetDCInfoCtr2 *object = pytalloc_get_ptr(obj);
   19307           0 :         PyObject *py_array;
   19308           0 :         if (object->array == NULL) {
   19309           0 :                 Py_RETURN_NONE;
   19310             :         }
   19311           0 :         if (object->array == NULL) {
   19312           0 :                 py_array = Py_None;
   19313           0 :                 Py_INCREF(py_array);
   19314             :         } else {
   19315           0 :                 py_array = PyList_New(object->count);
   19316           0 :                 if (py_array == NULL) {
   19317           0 :                         return NULL;
   19318             :                 }
   19319             :                 {
   19320             :                         int array_cntr_1;
   19321           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   19322           0 :                                 PyObject *py_array_1;
   19323           0 :                                 py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo2_Type, object->array, &(object->array)[array_cntr_1]);
   19324           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   19325             :                         }
   19326             :                 }
   19327             :         }
   19328           0 :         return py_array;
   19329             : }
   19330             : 
   19331           0 : static int py_drsuapi_DsGetDCInfoCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
   19332             : {
   19333           0 :         struct drsuapi_DsGetDCInfoCtr2 *object = pytalloc_get_ptr(py_obj);
   19334           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   19335           0 :         if (value == NULL) {
   19336           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   19337           0 :                 return -1;
   19338             :         }
   19339           0 :         if (value == Py_None) {
   19340           0 :                 object->array = NULL;
   19341             :         } else {
   19342           0 :                 object->array = NULL;
   19343           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   19344             :                 {
   19345           0 :                         int array_cntr_1;
   19346           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   19347           0 :                         if (!object->array) { return -1; }
   19348           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   19349           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   19350           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   19351           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_1]");
   19352           0 :                                         return -1;
   19353             :                                 }
   19354           0 :                                 PY_CHECK_TYPE(&drsuapi_DsGetDCInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   19355           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   19356           0 :                                         PyErr_NoMemory();
   19357           0 :                                         return -1;
   19358             :                                 }
   19359           0 :                                 (object->array)[array_cntr_1] = *(struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   19360             :                         }
   19361             :                 }
   19362             :         }
   19363           0 :         return 0;
   19364             : }
   19365             : 
   19366             : static PyGetSetDef py_drsuapi_DsGetDCInfoCtr2_getsetters[] = {
   19367             :         {
   19368             :                 .name = discard_const_p(char, "count"),
   19369             :                 .get = py_drsuapi_DsGetDCInfoCtr2_get_count,
   19370             :                 .set = py_drsuapi_DsGetDCInfoCtr2_set_count,
   19371             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   19372             :         },
   19373             :         {
   19374             :                 .name = discard_const_p(char, "array"),
   19375             :                 .get = py_drsuapi_DsGetDCInfoCtr2_get_array,
   19376             :                 .set = py_drsuapi_DsGetDCInfoCtr2_set_array,
   19377             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfo2")
   19378             :         },
   19379             :         { .name = NULL }
   19380             : };
   19381             : 
   19382           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   19383             : {
   19384           0 :         return pytalloc_new(struct drsuapi_DsGetDCInfoCtr2, type);
   19385             : }
   19386             : 
   19387             : 
   19388             : static PyTypeObject drsuapi_DsGetDCInfoCtr2_Type = {
   19389             :         PyVarObject_HEAD_INIT(NULL, 0)
   19390             :         .tp_name = "drsuapi.DsGetDCInfoCtr2",
   19391             :         .tp_getset = py_drsuapi_DsGetDCInfoCtr2_getsetters,
   19392             :         .tp_methods = NULL,
   19393             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   19394             :         .tp_new = py_drsuapi_DsGetDCInfoCtr2_new,
   19395             : };
   19396             : 
   19397             : 
   19398           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_netbios_name(PyObject *obj, void *closure)
   19399             : {
   19400           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19401           0 :         PyObject *py_netbios_name;
   19402           0 :         if (object->netbios_name == NULL) {
   19403           0 :                 Py_RETURN_NONE;
   19404             :         }
   19405           0 :         if (object->netbios_name == NULL) {
   19406           0 :                 py_netbios_name = Py_None;
   19407           0 :                 Py_INCREF(py_netbios_name);
   19408             :         } else {
   19409           0 :                 if (object->netbios_name == NULL) {
   19410           0 :                         py_netbios_name = Py_None;
   19411           0 :                         Py_INCREF(py_netbios_name);
   19412             :                 } else {
   19413           0 :                         py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
   19414             :                 }
   19415             :         }
   19416           0 :         return py_netbios_name;
   19417             : }
   19418             : 
   19419           0 : static int py_drsuapi_DsGetDCInfo3_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
   19420             : {
   19421           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19422           0 :         if (value == NULL) {
   19423           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
   19424           0 :                 return -1;
   19425             :         }
   19426           0 :         if (value == Py_None) {
   19427           0 :                 object->netbios_name = NULL;
   19428             :         } else {
   19429           0 :                 object->netbios_name = NULL;
   19430             :                 {
   19431           0 :                         const char *test_str;
   19432           0 :                         const char *talloc_str;
   19433           0 :                         PyObject *unicode = NULL;
   19434           0 :                         if (PyUnicode_Check(value)) {
   19435           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19436           0 :                                 if (unicode == NULL) {
   19437           0 :                                         return -1;
   19438             :                                 }
   19439           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19440           0 :                         } else if (PyBytes_Check(value)) {
   19441           0 :                                 test_str = PyBytes_AS_STRING(value);
   19442             :                         } else {
   19443           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19444           0 :                                 return -1;
   19445             :                         }
   19446           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19447           0 :                         if (unicode != NULL) {
   19448           0 :                                 Py_DECREF(unicode);
   19449             :                         }
   19450           0 :                         if (talloc_str == NULL) {
   19451           0 :                                 PyErr_NoMemory();
   19452           0 :                                 return -1;
   19453             :                         }
   19454           0 :                         object->netbios_name = talloc_str;
   19455             :                 }
   19456             :         }
   19457           0 :         return 0;
   19458             : }
   19459             : 
   19460           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_dns_name(PyObject *obj, void *closure)
   19461             : {
   19462           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19463           0 :         PyObject *py_dns_name;
   19464           0 :         if (object->dns_name == NULL) {
   19465           0 :                 Py_RETURN_NONE;
   19466             :         }
   19467           0 :         if (object->dns_name == NULL) {
   19468           0 :                 py_dns_name = Py_None;
   19469           0 :                 Py_INCREF(py_dns_name);
   19470             :         } else {
   19471           0 :                 if (object->dns_name == NULL) {
   19472           0 :                         py_dns_name = Py_None;
   19473           0 :                         Py_INCREF(py_dns_name);
   19474             :                 } else {
   19475           0 :                         py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
   19476             :                 }
   19477             :         }
   19478           0 :         return py_dns_name;
   19479             : }
   19480             : 
   19481           0 : static int py_drsuapi_DsGetDCInfo3_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
   19482             : {
   19483           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19484           0 :         if (value == NULL) {
   19485           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
   19486           0 :                 return -1;
   19487             :         }
   19488           0 :         if (value == Py_None) {
   19489           0 :                 object->dns_name = NULL;
   19490             :         } else {
   19491           0 :                 object->dns_name = NULL;
   19492             :                 {
   19493           0 :                         const char *test_str;
   19494           0 :                         const char *talloc_str;
   19495           0 :                         PyObject *unicode = NULL;
   19496           0 :                         if (PyUnicode_Check(value)) {
   19497           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19498           0 :                                 if (unicode == NULL) {
   19499           0 :                                         return -1;
   19500             :                                 }
   19501           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19502           0 :                         } else if (PyBytes_Check(value)) {
   19503           0 :                                 test_str = PyBytes_AS_STRING(value);
   19504             :                         } else {
   19505           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19506           0 :                                 return -1;
   19507             :                         }
   19508           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19509           0 :                         if (unicode != NULL) {
   19510           0 :                                 Py_DECREF(unicode);
   19511             :                         }
   19512           0 :                         if (talloc_str == NULL) {
   19513           0 :                                 PyErr_NoMemory();
   19514           0 :                                 return -1;
   19515             :                         }
   19516           0 :                         object->dns_name = talloc_str;
   19517             :                 }
   19518             :         }
   19519           0 :         return 0;
   19520             : }
   19521             : 
   19522           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_site_name(PyObject *obj, void *closure)
   19523             : {
   19524           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19525           0 :         PyObject *py_site_name;
   19526           0 :         if (object->site_name == NULL) {
   19527           0 :                 Py_RETURN_NONE;
   19528             :         }
   19529           0 :         if (object->site_name == NULL) {
   19530           0 :                 py_site_name = Py_None;
   19531           0 :                 Py_INCREF(py_site_name);
   19532             :         } else {
   19533           0 :                 if (object->site_name == NULL) {
   19534           0 :                         py_site_name = Py_None;
   19535           0 :                         Py_INCREF(py_site_name);
   19536             :                 } else {
   19537           0 :                         py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
   19538             :                 }
   19539             :         }
   19540           0 :         return py_site_name;
   19541             : }
   19542             : 
   19543           0 : static int py_drsuapi_DsGetDCInfo3_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
   19544             : {
   19545           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19546           0 :         if (value == NULL) {
   19547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_name");
   19548           0 :                 return -1;
   19549             :         }
   19550           0 :         if (value == Py_None) {
   19551           0 :                 object->site_name = NULL;
   19552             :         } else {
   19553           0 :                 object->site_name = NULL;
   19554             :                 {
   19555           0 :                         const char *test_str;
   19556           0 :                         const char *talloc_str;
   19557           0 :                         PyObject *unicode = NULL;
   19558           0 :                         if (PyUnicode_Check(value)) {
   19559           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19560           0 :                                 if (unicode == NULL) {
   19561           0 :                                         return -1;
   19562             :                                 }
   19563           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19564           0 :                         } else if (PyBytes_Check(value)) {
   19565           0 :                                 test_str = PyBytes_AS_STRING(value);
   19566             :                         } else {
   19567           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19568           0 :                                 return -1;
   19569             :                         }
   19570           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19571           0 :                         if (unicode != NULL) {
   19572           0 :                                 Py_DECREF(unicode);
   19573             :                         }
   19574           0 :                         if (talloc_str == NULL) {
   19575           0 :                                 PyErr_NoMemory();
   19576           0 :                                 return -1;
   19577             :                         }
   19578           0 :                         object->site_name = talloc_str;
   19579             :                 }
   19580             :         }
   19581           0 :         return 0;
   19582             : }
   19583             : 
   19584           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_site_dn(PyObject *obj, void *closure)
   19585             : {
   19586           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19587           0 :         PyObject *py_site_dn;
   19588           0 :         if (object->site_dn == NULL) {
   19589           0 :                 Py_RETURN_NONE;
   19590             :         }
   19591           0 :         if (object->site_dn == NULL) {
   19592           0 :                 py_site_dn = Py_None;
   19593           0 :                 Py_INCREF(py_site_dn);
   19594             :         } else {
   19595           0 :                 if (object->site_dn == NULL) {
   19596           0 :                         py_site_dn = Py_None;
   19597           0 :                         Py_INCREF(py_site_dn);
   19598             :                 } else {
   19599           0 :                         py_site_dn = PyUnicode_Decode(object->site_dn, strlen(object->site_dn), "utf-8", "ignore");
   19600             :                 }
   19601             :         }
   19602           0 :         return py_site_dn;
   19603             : }
   19604             : 
   19605           0 : static int py_drsuapi_DsGetDCInfo3_set_site_dn(PyObject *py_obj, PyObject *value, void *closure)
   19606             : {
   19607           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19608           0 :         if (value == NULL) {
   19609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_dn");
   19610           0 :                 return -1;
   19611             :         }
   19612           0 :         if (value == Py_None) {
   19613           0 :                 object->site_dn = NULL;
   19614             :         } else {
   19615           0 :                 object->site_dn = NULL;
   19616             :                 {
   19617           0 :                         const char *test_str;
   19618           0 :                         const char *talloc_str;
   19619           0 :                         PyObject *unicode = NULL;
   19620           0 :                         if (PyUnicode_Check(value)) {
   19621           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19622           0 :                                 if (unicode == NULL) {
   19623           0 :                                         return -1;
   19624             :                                 }
   19625           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19626           0 :                         } else if (PyBytes_Check(value)) {
   19627           0 :                                 test_str = PyBytes_AS_STRING(value);
   19628             :                         } else {
   19629           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19630           0 :                                 return -1;
   19631             :                         }
   19632           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19633           0 :                         if (unicode != NULL) {
   19634           0 :                                 Py_DECREF(unicode);
   19635             :                         }
   19636           0 :                         if (talloc_str == NULL) {
   19637           0 :                                 PyErr_NoMemory();
   19638           0 :                                 return -1;
   19639             :                         }
   19640           0 :                         object->site_dn = talloc_str;
   19641             :                 }
   19642             :         }
   19643           0 :         return 0;
   19644             : }
   19645             : 
   19646           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_computer_dn(PyObject *obj, void *closure)
   19647             : {
   19648           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19649           0 :         PyObject *py_computer_dn;
   19650           0 :         if (object->computer_dn == NULL) {
   19651           0 :                 Py_RETURN_NONE;
   19652             :         }
   19653           0 :         if (object->computer_dn == NULL) {
   19654           0 :                 py_computer_dn = Py_None;
   19655           0 :                 Py_INCREF(py_computer_dn);
   19656             :         } else {
   19657           0 :                 if (object->computer_dn == NULL) {
   19658           0 :                         py_computer_dn = Py_None;
   19659           0 :                         Py_INCREF(py_computer_dn);
   19660             :                 } else {
   19661           0 :                         py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
   19662             :                 }
   19663             :         }
   19664           0 :         return py_computer_dn;
   19665             : }
   19666             : 
   19667           0 : static int py_drsuapi_DsGetDCInfo3_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
   19668             : {
   19669           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19670           0 :         if (value == NULL) {
   19671           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_dn");
   19672           0 :                 return -1;
   19673             :         }
   19674           0 :         if (value == Py_None) {
   19675           0 :                 object->computer_dn = NULL;
   19676             :         } else {
   19677           0 :                 object->computer_dn = NULL;
   19678             :                 {
   19679           0 :                         const char *test_str;
   19680           0 :                         const char *talloc_str;
   19681           0 :                         PyObject *unicode = NULL;
   19682           0 :                         if (PyUnicode_Check(value)) {
   19683           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19684           0 :                                 if (unicode == NULL) {
   19685           0 :                                         return -1;
   19686             :                                 }
   19687           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19688           0 :                         } else if (PyBytes_Check(value)) {
   19689           0 :                                 test_str = PyBytes_AS_STRING(value);
   19690             :                         } else {
   19691           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19692           0 :                                 return -1;
   19693             :                         }
   19694           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19695           0 :                         if (unicode != NULL) {
   19696           0 :                                 Py_DECREF(unicode);
   19697             :                         }
   19698           0 :                         if (talloc_str == NULL) {
   19699           0 :                                 PyErr_NoMemory();
   19700           0 :                                 return -1;
   19701             :                         }
   19702           0 :                         object->computer_dn = talloc_str;
   19703             :                 }
   19704             :         }
   19705           0 :         return 0;
   19706             : }
   19707             : 
   19708           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_server_dn(PyObject *obj, void *closure)
   19709             : {
   19710           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19711           0 :         PyObject *py_server_dn;
   19712           0 :         if (object->server_dn == NULL) {
   19713           0 :                 Py_RETURN_NONE;
   19714             :         }
   19715           0 :         if (object->server_dn == NULL) {
   19716           0 :                 py_server_dn = Py_None;
   19717           0 :                 Py_INCREF(py_server_dn);
   19718             :         } else {
   19719           0 :                 if (object->server_dn == NULL) {
   19720           0 :                         py_server_dn = Py_None;
   19721           0 :                         Py_INCREF(py_server_dn);
   19722             :                 } else {
   19723           0 :                         py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
   19724             :                 }
   19725             :         }
   19726           0 :         return py_server_dn;
   19727             : }
   19728             : 
   19729           0 : static int py_drsuapi_DsGetDCInfo3_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
   19730             : {
   19731           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19732           0 :         if (value == NULL) {
   19733           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_dn");
   19734           0 :                 return -1;
   19735             :         }
   19736           0 :         if (value == Py_None) {
   19737           0 :                 object->server_dn = NULL;
   19738             :         } else {
   19739           0 :                 object->server_dn = NULL;
   19740             :                 {
   19741           0 :                         const char *test_str;
   19742           0 :                         const char *talloc_str;
   19743           0 :                         PyObject *unicode = NULL;
   19744           0 :                         if (PyUnicode_Check(value)) {
   19745           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19746           0 :                                 if (unicode == NULL) {
   19747           0 :                                         return -1;
   19748             :                                 }
   19749           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19750           0 :                         } else if (PyBytes_Check(value)) {
   19751           0 :                                 test_str = PyBytes_AS_STRING(value);
   19752             :                         } else {
   19753           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19754           0 :                                 return -1;
   19755             :                         }
   19756           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19757           0 :                         if (unicode != NULL) {
   19758           0 :                                 Py_DECREF(unicode);
   19759             :                         }
   19760           0 :                         if (talloc_str == NULL) {
   19761           0 :                                 PyErr_NoMemory();
   19762           0 :                                 return -1;
   19763             :                         }
   19764           0 :                         object->server_dn = talloc_str;
   19765             :                 }
   19766             :         }
   19767           0 :         return 0;
   19768             : }
   19769             : 
   19770           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_ntds_dn(PyObject *obj, void *closure)
   19771             : {
   19772           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19773           0 :         PyObject *py_ntds_dn;
   19774           0 :         if (object->ntds_dn == NULL) {
   19775           0 :                 Py_RETURN_NONE;
   19776             :         }
   19777           0 :         if (object->ntds_dn == NULL) {
   19778           0 :                 py_ntds_dn = Py_None;
   19779           0 :                 Py_INCREF(py_ntds_dn);
   19780             :         } else {
   19781           0 :                 if (object->ntds_dn == NULL) {
   19782           0 :                         py_ntds_dn = Py_None;
   19783           0 :                         Py_INCREF(py_ntds_dn);
   19784             :                 } else {
   19785           0 :                         py_ntds_dn = PyUnicode_Decode(object->ntds_dn, strlen(object->ntds_dn), "utf-8", "ignore");
   19786             :                 }
   19787             :         }
   19788           0 :         return py_ntds_dn;
   19789             : }
   19790             : 
   19791           0 : static int py_drsuapi_DsGetDCInfo3_set_ntds_dn(PyObject *py_obj, PyObject *value, void *closure)
   19792             : {
   19793           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19794           0 :         if (value == NULL) {
   19795           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntds_dn");
   19796           0 :                 return -1;
   19797             :         }
   19798           0 :         if (value == Py_None) {
   19799           0 :                 object->ntds_dn = NULL;
   19800             :         } else {
   19801           0 :                 object->ntds_dn = NULL;
   19802             :                 {
   19803           0 :                         const char *test_str;
   19804           0 :                         const char *talloc_str;
   19805           0 :                         PyObject *unicode = NULL;
   19806           0 :                         if (PyUnicode_Check(value)) {
   19807           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   19808           0 :                                 if (unicode == NULL) {
   19809           0 :                                         return -1;
   19810             :                                 }
   19811           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   19812           0 :                         } else if (PyBytes_Check(value)) {
   19813           0 :                                 test_str = PyBytes_AS_STRING(value);
   19814             :                         } else {
   19815           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   19816           0 :                                 return -1;
   19817             :                         }
   19818           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   19819           0 :                         if (unicode != NULL) {
   19820           0 :                                 Py_DECREF(unicode);
   19821             :                         }
   19822           0 :                         if (talloc_str == NULL) {
   19823           0 :                                 PyErr_NoMemory();
   19824           0 :                                 return -1;
   19825             :                         }
   19826           0 :                         object->ntds_dn = talloc_str;
   19827             :                 }
   19828             :         }
   19829           0 :         return 0;
   19830             : }
   19831             : 
   19832           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_is_pdc(PyObject *obj, void *closure)
   19833             : {
   19834           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19835           0 :         PyObject *py_is_pdc;
   19836           0 :         py_is_pdc = PyLong_FromUnsignedLongLong((uint32_t)(object->is_pdc));
   19837           0 :         return py_is_pdc;
   19838             : }
   19839             : 
   19840           0 : static int py_drsuapi_DsGetDCInfo3_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
   19841             : {
   19842           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19843           0 :         if (value == NULL) {
   19844           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_pdc");
   19845           0 :                 return -1;
   19846             :         }
   19847             :         {
   19848           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_pdc));
   19849           0 :                 if (PyLong_Check(value)) {
   19850           0 :                         unsigned long long test_var;
   19851           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19852           0 :                         if (PyErr_Occurred() != NULL) {
   19853           0 :                                 return -1;
   19854             :                         }
   19855           0 :                         if (test_var > uint_max) {
   19856           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19857             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19858           0 :                                 return -1;
   19859             :                         }
   19860           0 :                         object->is_pdc = test_var;
   19861             :                 } else {
   19862           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19863             :                           PyLong_Type.tp_name);
   19864           0 :                         return -1;
   19865             :                 }
   19866             :         }
   19867           0 :         return 0;
   19868             : }
   19869             : 
   19870           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_is_enabled(PyObject *obj, void *closure)
   19871             : {
   19872           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19873           0 :         PyObject *py_is_enabled;
   19874           0 :         py_is_enabled = PyLong_FromUnsignedLongLong((uint32_t)(object->is_enabled));
   19875           0 :         return py_is_enabled;
   19876             : }
   19877             : 
   19878           0 : static int py_drsuapi_DsGetDCInfo3_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
   19879             : {
   19880           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19881           0 :         if (value == NULL) {
   19882           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_enabled");
   19883           0 :                 return -1;
   19884             :         }
   19885             :         {
   19886           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_enabled));
   19887           0 :                 if (PyLong_Check(value)) {
   19888           0 :                         unsigned long long test_var;
   19889           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19890           0 :                         if (PyErr_Occurred() != NULL) {
   19891           0 :                                 return -1;
   19892             :                         }
   19893           0 :                         if (test_var > uint_max) {
   19894           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19895             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19896           0 :                                 return -1;
   19897             :                         }
   19898           0 :                         object->is_enabled = test_var;
   19899             :                 } else {
   19900           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19901             :                           PyLong_Type.tp_name);
   19902           0 :                         return -1;
   19903             :                 }
   19904             :         }
   19905           0 :         return 0;
   19906             : }
   19907             : 
   19908           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_is_gc(PyObject *obj, void *closure)
   19909             : {
   19910           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19911           0 :         PyObject *py_is_gc;
   19912           0 :         py_is_gc = PyLong_FromUnsignedLongLong((uint32_t)(object->is_gc));
   19913           0 :         return py_is_gc;
   19914             : }
   19915             : 
   19916           0 : static int py_drsuapi_DsGetDCInfo3_set_is_gc(PyObject *py_obj, PyObject *value, void *closure)
   19917             : {
   19918           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19919           0 :         if (value == NULL) {
   19920           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_gc");
   19921           0 :                 return -1;
   19922             :         }
   19923             :         {
   19924           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_gc));
   19925           0 :                 if (PyLong_Check(value)) {
   19926           0 :                         unsigned long long test_var;
   19927           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19928           0 :                         if (PyErr_Occurred() != NULL) {
   19929           0 :                                 return -1;
   19930             :                         }
   19931           0 :                         if (test_var > uint_max) {
   19932           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19933             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19934           0 :                                 return -1;
   19935             :                         }
   19936           0 :                         object->is_gc = test_var;
   19937             :                 } else {
   19938           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19939             :                           PyLong_Type.tp_name);
   19940           0 :                         return -1;
   19941             :                 }
   19942             :         }
   19943           0 :         return 0;
   19944             : }
   19945             : 
   19946           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_is_rodc(PyObject *obj, void *closure)
   19947             : {
   19948           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19949           0 :         PyObject *py_is_rodc;
   19950           0 :         py_is_rodc = PyLong_FromUnsignedLongLong((uint32_t)(object->is_rodc));
   19951           0 :         return py_is_rodc;
   19952             : }
   19953             : 
   19954           0 : static int py_drsuapi_DsGetDCInfo3_set_is_rodc(PyObject *py_obj, PyObject *value, void *closure)
   19955             : {
   19956           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19957           0 :         if (value == NULL) {
   19958           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_rodc");
   19959           0 :                 return -1;
   19960             :         }
   19961             :         {
   19962           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_rodc));
   19963           0 :                 if (PyLong_Check(value)) {
   19964           0 :                         unsigned long long test_var;
   19965           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   19966           0 :                         if (PyErr_Occurred() != NULL) {
   19967           0 :                                 return -1;
   19968             :                         }
   19969           0 :                         if (test_var > uint_max) {
   19970           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   19971             :                                   PyLong_Type.tp_name, uint_max, test_var);
   19972           0 :                                 return -1;
   19973             :                         }
   19974           0 :                         object->is_rodc = test_var;
   19975             :                 } else {
   19976           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   19977             :                           PyLong_Type.tp_name);
   19978           0 :                         return -1;
   19979             :                 }
   19980             :         }
   19981           0 :         return 0;
   19982             : }
   19983             : 
   19984           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_site_guid(PyObject *obj, void *closure)
   19985             : {
   19986           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   19987           0 :         PyObject *py_site_guid;
   19988           0 :         py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
   19989           0 :         return py_site_guid;
   19990             : }
   19991             : 
   19992           0 : static int py_drsuapi_DsGetDCInfo3_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
   19993             : {
   19994           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   19995           0 :         if (value == NULL) {
   19996           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
   19997           0 :                 return -1;
   19998             :         }
   19999           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   20000           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20001           0 :                 PyErr_NoMemory();
   20002           0 :                 return -1;
   20003             :         }
   20004           0 :         object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
   20005           0 :         return 0;
   20006             : }
   20007             : 
   20008           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_computer_guid(PyObject *obj, void *closure)
   20009             : {
   20010           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   20011           0 :         PyObject *py_computer_guid;
   20012           0 :         py_computer_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->computer_guid);
   20013           0 :         return py_computer_guid;
   20014             : }
   20015             : 
   20016           0 : static int py_drsuapi_DsGetDCInfo3_set_computer_guid(PyObject *py_obj, PyObject *value, void *closure)
   20017             : {
   20018           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   20019           0 :         if (value == NULL) {
   20020           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_guid");
   20021           0 :                 return -1;
   20022             :         }
   20023           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   20024           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20025           0 :                 PyErr_NoMemory();
   20026           0 :                 return -1;
   20027             :         }
   20028           0 :         object->computer_guid = *(struct GUID *)pytalloc_get_ptr(value);
   20029           0 :         return 0;
   20030             : }
   20031             : 
   20032           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_server_guid(PyObject *obj, void *closure)
   20033             : {
   20034           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   20035           0 :         PyObject *py_server_guid;
   20036           0 :         py_server_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->server_guid);
   20037           0 :         return py_server_guid;
   20038             : }
   20039             : 
   20040           0 : static int py_drsuapi_DsGetDCInfo3_set_server_guid(PyObject *py_obj, PyObject *value, void *closure)
   20041             : {
   20042           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   20043           0 :         if (value == NULL) {
   20044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_guid");
   20045           0 :                 return -1;
   20046             :         }
   20047           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   20048           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20049           0 :                 PyErr_NoMemory();
   20050           0 :                 return -1;
   20051             :         }
   20052           0 :         object->server_guid = *(struct GUID *)pytalloc_get_ptr(value);
   20053           0 :         return 0;
   20054             : }
   20055             : 
   20056           0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_ntds_guid(PyObject *obj, void *closure)
   20057             : {
   20058           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(obj);
   20059           0 :         PyObject *py_ntds_guid;
   20060           0 :         py_ntds_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->ntds_guid);
   20061           0 :         return py_ntds_guid;
   20062             : }
   20063             : 
   20064           0 : static int py_drsuapi_DsGetDCInfo3_set_ntds_guid(PyObject *py_obj, PyObject *value, void *closure)
   20065             : {
   20066           0 :         struct drsuapi_DsGetDCInfo3 *object = pytalloc_get_ptr(py_obj);
   20067           0 :         if (value == NULL) {
   20068           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntds_guid");
   20069           0 :                 return -1;
   20070             :         }
   20071           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   20072           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   20073           0 :                 PyErr_NoMemory();
   20074           0 :                 return -1;
   20075             :         }
   20076           0 :         object->ntds_guid = *(struct GUID *)pytalloc_get_ptr(value);
   20077           0 :         return 0;
   20078             : }
   20079             : 
   20080             : static PyGetSetDef py_drsuapi_DsGetDCInfo3_getsetters[] = {
   20081             :         {
   20082             :                 .name = discard_const_p(char, "netbios_name"),
   20083             :                 .get = py_drsuapi_DsGetDCInfo3_get_netbios_name,
   20084             :                 .set = py_drsuapi_DsGetDCInfo3_set_netbios_name,
   20085             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20086             :         },
   20087             :         {
   20088             :                 .name = discard_const_p(char, "dns_name"),
   20089             :                 .get = py_drsuapi_DsGetDCInfo3_get_dns_name,
   20090             :                 .set = py_drsuapi_DsGetDCInfo3_set_dns_name,
   20091             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20092             :         },
   20093             :         {
   20094             :                 .name = discard_const_p(char, "site_name"),
   20095             :                 .get = py_drsuapi_DsGetDCInfo3_get_site_name,
   20096             :                 .set = py_drsuapi_DsGetDCInfo3_set_site_name,
   20097             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20098             :         },
   20099             :         {
   20100             :                 .name = discard_const_p(char, "site_dn"),
   20101             :                 .get = py_drsuapi_DsGetDCInfo3_get_site_dn,
   20102             :                 .set = py_drsuapi_DsGetDCInfo3_set_site_dn,
   20103             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20104             :         },
   20105             :         {
   20106             :                 .name = discard_const_p(char, "computer_dn"),
   20107             :                 .get = py_drsuapi_DsGetDCInfo3_get_computer_dn,
   20108             :                 .set = py_drsuapi_DsGetDCInfo3_set_computer_dn,
   20109             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20110             :         },
   20111             :         {
   20112             :                 .name = discard_const_p(char, "server_dn"),
   20113             :                 .get = py_drsuapi_DsGetDCInfo3_get_server_dn,
   20114             :                 .set = py_drsuapi_DsGetDCInfo3_set_server_dn,
   20115             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20116             :         },
   20117             :         {
   20118             :                 .name = discard_const_p(char, "ntds_dn"),
   20119             :                 .get = py_drsuapi_DsGetDCInfo3_get_ntds_dn,
   20120             :                 .set = py_drsuapi_DsGetDCInfo3_set_ntds_dn,
   20121             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20122             :         },
   20123             :         {
   20124             :                 .name = discard_const_p(char, "is_pdc"),
   20125             :                 .get = py_drsuapi_DsGetDCInfo3_get_is_pdc,
   20126             :                 .set = py_drsuapi_DsGetDCInfo3_set_is_pdc,
   20127             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20128             :         },
   20129             :         {
   20130             :                 .name = discard_const_p(char, "is_enabled"),
   20131             :                 .get = py_drsuapi_DsGetDCInfo3_get_is_enabled,
   20132             :                 .set = py_drsuapi_DsGetDCInfo3_set_is_enabled,
   20133             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20134             :         },
   20135             :         {
   20136             :                 .name = discard_const_p(char, "is_gc"),
   20137             :                 .get = py_drsuapi_DsGetDCInfo3_get_is_gc,
   20138             :                 .set = py_drsuapi_DsGetDCInfo3_set_is_gc,
   20139             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20140             :         },
   20141             :         {
   20142             :                 .name = discard_const_p(char, "is_rodc"),
   20143             :                 .get = py_drsuapi_DsGetDCInfo3_get_is_rodc,
   20144             :                 .set = py_drsuapi_DsGetDCInfo3_set_is_rodc,
   20145             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20146             :         },
   20147             :         {
   20148             :                 .name = discard_const_p(char, "site_guid"),
   20149             :                 .get = py_drsuapi_DsGetDCInfo3_get_site_guid,
   20150             :                 .set = py_drsuapi_DsGetDCInfo3_set_site_guid,
   20151             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   20152             :         },
   20153             :         {
   20154             :                 .name = discard_const_p(char, "computer_guid"),
   20155             :                 .get = py_drsuapi_DsGetDCInfo3_get_computer_guid,
   20156             :                 .set = py_drsuapi_DsGetDCInfo3_set_computer_guid,
   20157             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   20158             :         },
   20159             :         {
   20160             :                 .name = discard_const_p(char, "server_guid"),
   20161             :                 .get = py_drsuapi_DsGetDCInfo3_get_server_guid,
   20162             :                 .set = py_drsuapi_DsGetDCInfo3_set_server_guid,
   20163             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   20164             :         },
   20165             :         {
   20166             :                 .name = discard_const_p(char, "ntds_guid"),
   20167             :                 .get = py_drsuapi_DsGetDCInfo3_get_ntds_guid,
   20168             :                 .set = py_drsuapi_DsGetDCInfo3_set_ntds_guid,
   20169             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   20170             :         },
   20171             :         { .name = NULL }
   20172             : };
   20173             : 
   20174           0 : static PyObject *py_drsuapi_DsGetDCInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20175             : {
   20176           0 :         return pytalloc_new(struct drsuapi_DsGetDCInfo3, type);
   20177             : }
   20178             : 
   20179             : 
   20180             : static PyTypeObject drsuapi_DsGetDCInfo3_Type = {
   20181             :         PyVarObject_HEAD_INIT(NULL, 0)
   20182             :         .tp_name = "drsuapi.DsGetDCInfo3",
   20183             :         .tp_getset = py_drsuapi_DsGetDCInfo3_getsetters,
   20184             :         .tp_methods = NULL,
   20185             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20186             :         .tp_new = py_drsuapi_DsGetDCInfo3_new,
   20187             : };
   20188             : 
   20189             : 
   20190           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr3_get_count(PyObject *obj, void *closure)
   20191             : {
   20192           0 :         struct drsuapi_DsGetDCInfoCtr3 *object = pytalloc_get_ptr(obj);
   20193           0 :         PyObject *py_count;
   20194           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   20195           0 :         return py_count;
   20196             : }
   20197             : 
   20198           0 : static int py_drsuapi_DsGetDCInfoCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
   20199             : {
   20200           0 :         struct drsuapi_DsGetDCInfoCtr3 *object = pytalloc_get_ptr(py_obj);
   20201           0 :         if (value == NULL) {
   20202           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   20203           0 :                 return -1;
   20204             :         }
   20205             :         {
   20206           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   20207           0 :                 if (PyLong_Check(value)) {
   20208           0 :                         unsigned long long test_var;
   20209           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20210           0 :                         if (PyErr_Occurred() != NULL) {
   20211           0 :                                 return -1;
   20212             :                         }
   20213           0 :                         if (test_var > uint_max) {
   20214           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20215             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20216           0 :                                 return -1;
   20217             :                         }
   20218           0 :                         object->count = test_var;
   20219             :                 } else {
   20220           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20221             :                           PyLong_Type.tp_name);
   20222           0 :                         return -1;
   20223             :                 }
   20224             :         }
   20225           0 :         return 0;
   20226             : }
   20227             : 
   20228           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr3_get_array(PyObject *obj, void *closure)
   20229             : {
   20230           0 :         struct drsuapi_DsGetDCInfoCtr3 *object = pytalloc_get_ptr(obj);
   20231           0 :         PyObject *py_array;
   20232           0 :         if (object->array == NULL) {
   20233           0 :                 Py_RETURN_NONE;
   20234             :         }
   20235           0 :         if (object->array == NULL) {
   20236           0 :                 py_array = Py_None;
   20237           0 :                 Py_INCREF(py_array);
   20238             :         } else {
   20239           0 :                 py_array = PyList_New(object->count);
   20240           0 :                 if (py_array == NULL) {
   20241           0 :                         return NULL;
   20242             :                 }
   20243             :                 {
   20244             :                         int array_cntr_1;
   20245           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   20246           0 :                                 PyObject *py_array_1;
   20247           0 :                                 py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo3_Type, object->array, &(object->array)[array_cntr_1]);
   20248           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   20249             :                         }
   20250             :                 }
   20251             :         }
   20252           0 :         return py_array;
   20253             : }
   20254             : 
   20255           0 : static int py_drsuapi_DsGetDCInfoCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
   20256             : {
   20257           0 :         struct drsuapi_DsGetDCInfoCtr3 *object = pytalloc_get_ptr(py_obj);
   20258           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   20259           0 :         if (value == NULL) {
   20260           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   20261           0 :                 return -1;
   20262             :         }
   20263           0 :         if (value == Py_None) {
   20264           0 :                 object->array = NULL;
   20265             :         } else {
   20266           0 :                 object->array = NULL;
   20267           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   20268             :                 {
   20269           0 :                         int array_cntr_1;
   20270           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   20271           0 :                         if (!object->array) { return -1; }
   20272           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   20273           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   20274           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   20275           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_1]");
   20276           0 :                                         return -1;
   20277             :                                 }
   20278           0 :                                 PY_CHECK_TYPE(&drsuapi_DsGetDCInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   20279           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   20280           0 :                                         PyErr_NoMemory();
   20281           0 :                                         return -1;
   20282             :                                 }
   20283           0 :                                 (object->array)[array_cntr_1] = *(struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   20284             :                         }
   20285             :                 }
   20286             :         }
   20287           0 :         return 0;
   20288             : }
   20289             : 
   20290             : static PyGetSetDef py_drsuapi_DsGetDCInfoCtr3_getsetters[] = {
   20291             :         {
   20292             :                 .name = discard_const_p(char, "count"),
   20293             :                 .get = py_drsuapi_DsGetDCInfoCtr3_get_count,
   20294             :                 .set = py_drsuapi_DsGetDCInfoCtr3_set_count,
   20295             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20296             :         },
   20297             :         {
   20298             :                 .name = discard_const_p(char, "array"),
   20299             :                 .get = py_drsuapi_DsGetDCInfoCtr3_get_array,
   20300             :                 .set = py_drsuapi_DsGetDCInfoCtr3_set_array,
   20301             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfo3")
   20302             :         },
   20303             :         { .name = NULL }
   20304             : };
   20305             : 
   20306           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20307             : {
   20308           0 :         return pytalloc_new(struct drsuapi_DsGetDCInfoCtr3, type);
   20309             : }
   20310             : 
   20311             : 
   20312             : static PyTypeObject drsuapi_DsGetDCInfoCtr3_Type = {
   20313             :         PyVarObject_HEAD_INIT(NULL, 0)
   20314             :         .tp_name = "drsuapi.DsGetDCInfoCtr3",
   20315             :         .tp_getset = py_drsuapi_DsGetDCInfoCtr3_getsetters,
   20316             :         .tp_methods = NULL,
   20317             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20318             :         .tp_new = py_drsuapi_DsGetDCInfoCtr3_new,
   20319             : };
   20320             : 
   20321             : 
   20322           0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_client_ip_address(PyObject *obj, void *closure)
   20323             : {
   20324           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(obj);
   20325           0 :         PyObject *py_client_ip_address;
   20326           0 :         py_client_ip_address = PyString_FromStringOrNULL(object->client_ip_address);
   20327           0 :         return py_client_ip_address;
   20328             : }
   20329             : 
   20330           0 : static int py_drsuapi_DsGetDCConnection01_set_client_ip_address(PyObject *py_obj, PyObject *value, void *closure)
   20331             : {
   20332           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(py_obj);
   20333           0 :         if (value == NULL) {
   20334           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_ip_address");
   20335           0 :                 return -1;
   20336             :         }
   20337             :         {
   20338           0 :                 const char *test_str;
   20339           0 :                 const char *talloc_str;
   20340           0 :                 PyObject *unicode = NULL;
   20341           0 :                 if (PyUnicode_Check(value)) {
   20342           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20343           0 :                         if (unicode == NULL) {
   20344           0 :                                 return -1;
   20345             :                         }
   20346           0 :                         test_str = PyBytes_AS_STRING(unicode);
   20347           0 :                 } else if (PyBytes_Check(value)) {
   20348           0 :                         test_str = PyBytes_AS_STRING(value);
   20349             :                 } else {
   20350           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20351           0 :                         return -1;
   20352             :                 }
   20353           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20354           0 :                 if (unicode != NULL) {
   20355           0 :                         Py_DECREF(unicode);
   20356             :                 }
   20357           0 :                 if (talloc_str == NULL) {
   20358           0 :                         PyErr_NoMemory();
   20359           0 :                         return -1;
   20360             :                 }
   20361           0 :                 object->client_ip_address = talloc_str;
   20362             :         }
   20363           0 :         return 0;
   20364             : }
   20365             : 
   20366           0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown2(PyObject *obj, void *closure)
   20367             : {
   20368           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(obj);
   20369           0 :         PyObject *py_unknown2;
   20370           0 :         py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown2));
   20371           0 :         return py_unknown2;
   20372             : }
   20373             : 
   20374           0 : static int py_drsuapi_DsGetDCConnection01_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
   20375             : {
   20376           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(py_obj);
   20377           0 :         if (value == NULL) {
   20378           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
   20379           0 :                 return -1;
   20380             :         }
   20381             :         {
   20382           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
   20383           0 :                 if (PyLong_Check(value)) {
   20384           0 :                         unsigned long long test_var;
   20385           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20386           0 :                         if (PyErr_Occurred() != NULL) {
   20387           0 :                                 return -1;
   20388             :                         }
   20389           0 :                         if (test_var > uint_max) {
   20390           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20391             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20392           0 :                                 return -1;
   20393             :                         }
   20394           0 :                         object->unknown2 = test_var;
   20395             :                 } else {
   20396           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20397             :                           PyLong_Type.tp_name);
   20398           0 :                         return -1;
   20399             :                 }
   20400             :         }
   20401           0 :         return 0;
   20402             : }
   20403             : 
   20404           0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_connection_time(PyObject *obj, void *closure)
   20405             : {
   20406           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(obj);
   20407           0 :         PyObject *py_connection_time;
   20408           0 :         py_connection_time = PyLong_FromUnsignedLongLong((uint32_t)(object->connection_time));
   20409           0 :         return py_connection_time;
   20410             : }
   20411             : 
   20412           0 : static int py_drsuapi_DsGetDCConnection01_set_connection_time(PyObject *py_obj, PyObject *value, void *closure)
   20413             : {
   20414           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(py_obj);
   20415           0 :         if (value == NULL) {
   20416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->connection_time");
   20417           0 :                 return -1;
   20418             :         }
   20419             :         {
   20420           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connection_time));
   20421           0 :                 if (PyLong_Check(value)) {
   20422           0 :                         unsigned long long test_var;
   20423           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20424           0 :                         if (PyErr_Occurred() != NULL) {
   20425           0 :                                 return -1;
   20426             :                         }
   20427           0 :                         if (test_var > uint_max) {
   20428           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20429             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20430           0 :                                 return -1;
   20431             :                         }
   20432           0 :                         object->connection_time = test_var;
   20433             :                 } else {
   20434           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20435             :                           PyLong_Type.tp_name);
   20436           0 :                         return -1;
   20437             :                 }
   20438             :         }
   20439           0 :         return 0;
   20440             : }
   20441             : 
   20442           0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown4(PyObject *obj, void *closure)
   20443             : {
   20444           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(obj);
   20445           0 :         PyObject *py_unknown4;
   20446           0 :         py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown4));
   20447           0 :         return py_unknown4;
   20448             : }
   20449             : 
   20450           0 : static int py_drsuapi_DsGetDCConnection01_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
   20451             : {
   20452           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(py_obj);
   20453           0 :         if (value == NULL) {
   20454           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
   20455           0 :                 return -1;
   20456             :         }
   20457             :         {
   20458           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
   20459           0 :                 if (PyLong_Check(value)) {
   20460           0 :                         unsigned long long test_var;
   20461           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20462           0 :                         if (PyErr_Occurred() != NULL) {
   20463           0 :                                 return -1;
   20464             :                         }
   20465           0 :                         if (test_var > uint_max) {
   20466           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20467             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20468           0 :                                 return -1;
   20469             :                         }
   20470           0 :                         object->unknown4 = test_var;
   20471             :                 } else {
   20472           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20473             :                           PyLong_Type.tp_name);
   20474           0 :                         return -1;
   20475             :                 }
   20476             :         }
   20477           0 :         return 0;
   20478             : }
   20479             : 
   20480           0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown5(PyObject *obj, void *closure)
   20481             : {
   20482           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(obj);
   20483           0 :         PyObject *py_unknown5;
   20484           0 :         py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown5));
   20485           0 :         return py_unknown5;
   20486             : }
   20487             : 
   20488           0 : static int py_drsuapi_DsGetDCConnection01_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
   20489             : {
   20490           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(py_obj);
   20491           0 :         if (value == NULL) {
   20492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
   20493           0 :                 return -1;
   20494             :         }
   20495             :         {
   20496           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
   20497           0 :                 if (PyLong_Check(value)) {
   20498           0 :                         unsigned long long test_var;
   20499           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20500           0 :                         if (PyErr_Occurred() != NULL) {
   20501           0 :                                 return -1;
   20502             :                         }
   20503           0 :                         if (test_var > uint_max) {
   20504           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20505             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20506           0 :                                 return -1;
   20507             :                         }
   20508           0 :                         object->unknown5 = test_var;
   20509             :                 } else {
   20510           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20511             :                           PyLong_Type.tp_name);
   20512           0 :                         return -1;
   20513             :                 }
   20514             :         }
   20515           0 :         return 0;
   20516             : }
   20517             : 
   20518           0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown6(PyObject *obj, void *closure)
   20519             : {
   20520           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(obj);
   20521           0 :         PyObject *py_unknown6;
   20522           0 :         py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)(object->unknown6));
   20523           0 :         return py_unknown6;
   20524             : }
   20525             : 
   20526           0 : static int py_drsuapi_DsGetDCConnection01_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
   20527             : {
   20528           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(py_obj);
   20529           0 :         if (value == NULL) {
   20530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
   20531           0 :                 return -1;
   20532             :         }
   20533             :         {
   20534           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
   20535           0 :                 if (PyLong_Check(value)) {
   20536           0 :                         unsigned long long test_var;
   20537           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20538           0 :                         if (PyErr_Occurred() != NULL) {
   20539           0 :                                 return -1;
   20540             :                         }
   20541           0 :                         if (test_var > uint_max) {
   20542           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20543             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20544           0 :                                 return -1;
   20545             :                         }
   20546           0 :                         object->unknown6 = test_var;
   20547             :                 } else {
   20548           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20549             :                           PyLong_Type.tp_name);
   20550           0 :                         return -1;
   20551             :                 }
   20552             :         }
   20553           0 :         return 0;
   20554             : }
   20555             : 
   20556           0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_client_account(PyObject *obj, void *closure)
   20557             : {
   20558           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(obj);
   20559           0 :         PyObject *py_client_account;
   20560           0 :         if (object->client_account == NULL) {
   20561           0 :                 Py_RETURN_NONE;
   20562             :         }
   20563           0 :         if (object->client_account == NULL) {
   20564           0 :                 py_client_account = Py_None;
   20565           0 :                 Py_INCREF(py_client_account);
   20566             :         } else {
   20567           0 :                 if (object->client_account == NULL) {
   20568           0 :                         py_client_account = Py_None;
   20569           0 :                         Py_INCREF(py_client_account);
   20570             :                 } else {
   20571           0 :                         py_client_account = PyUnicode_Decode(object->client_account, strlen(object->client_account), "utf-8", "ignore");
   20572             :                 }
   20573             :         }
   20574           0 :         return py_client_account;
   20575             : }
   20576             : 
   20577           0 : static int py_drsuapi_DsGetDCConnection01_set_client_account(PyObject *py_obj, PyObject *value, void *closure)
   20578             : {
   20579           0 :         struct drsuapi_DsGetDCConnection01 *object = pytalloc_get_ptr(py_obj);
   20580           0 :         if (value == NULL) {
   20581           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_account");
   20582           0 :                 return -1;
   20583             :         }
   20584           0 :         if (value == Py_None) {
   20585           0 :                 object->client_account = NULL;
   20586             :         } else {
   20587           0 :                 object->client_account = NULL;
   20588             :                 {
   20589           0 :                         const char *test_str;
   20590           0 :                         const char *talloc_str;
   20591           0 :                         PyObject *unicode = NULL;
   20592           0 :                         if (PyUnicode_Check(value)) {
   20593           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   20594           0 :                                 if (unicode == NULL) {
   20595           0 :                                         return -1;
   20596             :                                 }
   20597           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   20598           0 :                         } else if (PyBytes_Check(value)) {
   20599           0 :                                 test_str = PyBytes_AS_STRING(value);
   20600             :                         } else {
   20601           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   20602           0 :                                 return -1;
   20603             :                         }
   20604           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   20605           0 :                         if (unicode != NULL) {
   20606           0 :                                 Py_DECREF(unicode);
   20607             :                         }
   20608           0 :                         if (talloc_str == NULL) {
   20609           0 :                                 PyErr_NoMemory();
   20610           0 :                                 return -1;
   20611             :                         }
   20612           0 :                         object->client_account = talloc_str;
   20613             :                 }
   20614             :         }
   20615           0 :         return 0;
   20616             : }
   20617             : 
   20618             : static PyGetSetDef py_drsuapi_DsGetDCConnection01_getsetters[] = {
   20619             :         {
   20620             :                 .name = discard_const_p(char, "client_ip_address"),
   20621             :                 .get = py_drsuapi_DsGetDCConnection01_get_client_ip_address,
   20622             :                 .set = py_drsuapi_DsGetDCConnection01_set_client_ip_address,
   20623             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ipv4address")
   20624             :         },
   20625             :         {
   20626             :                 .name = discard_const_p(char, "unknown2"),
   20627             :                 .get = py_drsuapi_DsGetDCConnection01_get_unknown2,
   20628             :                 .set = py_drsuapi_DsGetDCConnection01_set_unknown2,
   20629             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20630             :         },
   20631             :         {
   20632             :                 .name = discard_const_p(char, "connection_time"),
   20633             :                 .get = py_drsuapi_DsGetDCConnection01_get_connection_time,
   20634             :                 .set = py_drsuapi_DsGetDCConnection01_set_connection_time,
   20635             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20636             :         },
   20637             :         {
   20638             :                 .name = discard_const_p(char, "unknown4"),
   20639             :                 .get = py_drsuapi_DsGetDCConnection01_get_unknown4,
   20640             :                 .set = py_drsuapi_DsGetDCConnection01_set_unknown4,
   20641             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20642             :         },
   20643             :         {
   20644             :                 .name = discard_const_p(char, "unknown5"),
   20645             :                 .get = py_drsuapi_DsGetDCConnection01_get_unknown5,
   20646             :                 .set = py_drsuapi_DsGetDCConnection01_set_unknown5,
   20647             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20648             :         },
   20649             :         {
   20650             :                 .name = discard_const_p(char, "unknown6"),
   20651             :                 .get = py_drsuapi_DsGetDCConnection01_get_unknown6,
   20652             :                 .set = py_drsuapi_DsGetDCConnection01_set_unknown6,
   20653             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20654             :         },
   20655             :         {
   20656             :                 .name = discard_const_p(char, "client_account"),
   20657             :                 .get = py_drsuapi_DsGetDCConnection01_get_client_account,
   20658             :                 .set = py_drsuapi_DsGetDCConnection01_set_client_account,
   20659             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   20660             :         },
   20661             :         { .name = NULL }
   20662             : };
   20663             : 
   20664           0 : static PyObject *py_drsuapi_DsGetDCConnection01_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20665             : {
   20666           0 :         return pytalloc_new(struct drsuapi_DsGetDCConnection01, type);
   20667             : }
   20668             : 
   20669             : 
   20670             : static PyTypeObject drsuapi_DsGetDCConnection01_Type = {
   20671             :         PyVarObject_HEAD_INIT(NULL, 0)
   20672             :         .tp_name = "drsuapi.DsGetDCConnection01",
   20673             :         .tp_getset = py_drsuapi_DsGetDCConnection01_getsetters,
   20674             :         .tp_methods = NULL,
   20675             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20676             :         .tp_new = py_drsuapi_DsGetDCConnection01_new,
   20677             : };
   20678             : 
   20679             : 
   20680           0 : static PyObject *py_drsuapi_DsGetDCConnectionCtr01_get_count(PyObject *obj, void *closure)
   20681             : {
   20682           0 :         struct drsuapi_DsGetDCConnectionCtr01 *object = pytalloc_get_ptr(obj);
   20683           0 :         PyObject *py_count;
   20684           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   20685           0 :         return py_count;
   20686             : }
   20687             : 
   20688           0 : static int py_drsuapi_DsGetDCConnectionCtr01_set_count(PyObject *py_obj, PyObject *value, void *closure)
   20689             : {
   20690           0 :         struct drsuapi_DsGetDCConnectionCtr01 *object = pytalloc_get_ptr(py_obj);
   20691           0 :         if (value == NULL) {
   20692           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   20693           0 :                 return -1;
   20694             :         }
   20695             :         {
   20696           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   20697           0 :                 if (PyLong_Check(value)) {
   20698           0 :                         unsigned long long test_var;
   20699           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   20700           0 :                         if (PyErr_Occurred() != NULL) {
   20701           0 :                                 return -1;
   20702             :                         }
   20703           0 :                         if (test_var > uint_max) {
   20704           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   20705             :                                   PyLong_Type.tp_name, uint_max, test_var);
   20706           0 :                                 return -1;
   20707             :                         }
   20708           0 :                         object->count = test_var;
   20709             :                 } else {
   20710           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   20711             :                           PyLong_Type.tp_name);
   20712           0 :                         return -1;
   20713             :                 }
   20714             :         }
   20715           0 :         return 0;
   20716             : }
   20717             : 
   20718           0 : static PyObject *py_drsuapi_DsGetDCConnectionCtr01_get_array(PyObject *obj, void *closure)
   20719             : {
   20720           0 :         struct drsuapi_DsGetDCConnectionCtr01 *object = pytalloc_get_ptr(obj);
   20721           0 :         PyObject *py_array;
   20722           0 :         if (object->array == NULL) {
   20723           0 :                 Py_RETURN_NONE;
   20724             :         }
   20725           0 :         if (object->array == NULL) {
   20726           0 :                 py_array = Py_None;
   20727           0 :                 Py_INCREF(py_array);
   20728             :         } else {
   20729           0 :                 py_array = PyList_New(object->count);
   20730           0 :                 if (py_array == NULL) {
   20731           0 :                         return NULL;
   20732             :                 }
   20733             :                 {
   20734             :                         int array_cntr_1;
   20735           0 :                         for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
   20736           0 :                                 PyObject *py_array_1;
   20737           0 :                                 py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCConnection01_Type, object->array, &(object->array)[array_cntr_1]);
   20738           0 :                                 PyList_SetItem(py_array, array_cntr_1, py_array_1);
   20739             :                         }
   20740             :                 }
   20741             :         }
   20742           0 :         return py_array;
   20743             : }
   20744             : 
   20745           0 : static int py_drsuapi_DsGetDCConnectionCtr01_set_array(PyObject *py_obj, PyObject *value, void *closure)
   20746             : {
   20747           0 :         struct drsuapi_DsGetDCConnectionCtr01 *object = pytalloc_get_ptr(py_obj);
   20748           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
   20749           0 :         if (value == NULL) {
   20750           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   20751           0 :                 return -1;
   20752             :         }
   20753           0 :         if (value == Py_None) {
   20754           0 :                 object->array = NULL;
   20755             :         } else {
   20756           0 :                 object->array = NULL;
   20757           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   20758             :                 {
   20759           0 :                         int array_cntr_1;
   20760           0 :                         object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   20761           0 :                         if (!object->array) { return -1; }
   20762           0 :                         talloc_set_name_const(object->array, "ARRAY: object->array");
   20763           0 :                         for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
   20764           0 :                                 if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
   20765           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_1]");
   20766           0 :                                         return -1;
   20767             :                                 }
   20768           0 :                                 PY_CHECK_TYPE(&drsuapi_DsGetDCConnection01_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
   20769           0 :                                 if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
   20770           0 :                                         PyErr_NoMemory();
   20771           0 :                                         return -1;
   20772             :                                 }
   20773           0 :                                 (object->array)[array_cntr_1] = *(struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
   20774             :                         }
   20775             :                 }
   20776             :         }
   20777           0 :         return 0;
   20778             : }
   20779             : 
   20780             : static PyGetSetDef py_drsuapi_DsGetDCConnectionCtr01_getsetters[] = {
   20781             :         {
   20782             :                 .name = discard_const_p(char, "count"),
   20783             :                 .get = py_drsuapi_DsGetDCConnectionCtr01_get_count,
   20784             :                 .set = py_drsuapi_DsGetDCConnectionCtr01_set_count,
   20785             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   20786             :         },
   20787             :         {
   20788             :                 .name = discard_const_p(char, "array"),
   20789             :                 .get = py_drsuapi_DsGetDCConnectionCtr01_get_array,
   20790             :                 .set = py_drsuapi_DsGetDCConnectionCtr01_set_array,
   20791             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCConnection01")
   20792             :         },
   20793             :         { .name = NULL }
   20794             : };
   20795             : 
   20796           0 : static PyObject *py_drsuapi_DsGetDCConnectionCtr01_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20797             : {
   20798           0 :         return pytalloc_new(struct drsuapi_DsGetDCConnectionCtr01, type);
   20799             : }
   20800             : 
   20801             : 
   20802             : static PyTypeObject drsuapi_DsGetDCConnectionCtr01_Type = {
   20803             :         PyVarObject_HEAD_INIT(NULL, 0)
   20804             :         .tp_name = "drsuapi.DsGetDCConnectionCtr01",
   20805             :         .tp_getset = py_drsuapi_DsGetDCConnectionCtr01_getsetters,
   20806             :         .tp_methods = NULL,
   20807             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20808             :         .tp_new = py_drsuapi_DsGetDCConnectionCtr01_new,
   20809             : };
   20810             : 
   20811           0 : static PyObject *py_import_drsuapi_DsGetDCInfoCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetDCInfoCtr *in)
   20812             : {
   20813           0 :         PyObject *ret;
   20814             : 
   20815           0 :         switch (level) {
   20816           0 :                 case DRSUAPI_DC_INFO_CTR_1:
   20817           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr1_Type, mem_ctx, &in->ctr1);
   20818           0 :                         return ret;
   20819             : 
   20820           0 :                 case DRSUAPI_DC_INFO_CTR_2:
   20821           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr2_Type, mem_ctx, &in->ctr2);
   20822           0 :                         return ret;
   20823             : 
   20824           0 :                 case DRSUAPI_DC_INFO_CTR_3:
   20825           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr3_Type, mem_ctx, &in->ctr3);
   20826           0 :                         return ret;
   20827             : 
   20828           0 :                 case DRSUAPI_DC_CONNECTION_CTR_01:
   20829           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetDCConnectionCtr01_Type, mem_ctx, &in->ctr01);
   20830           0 :                         return ret;
   20831             : 
   20832             :         }
   20833           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   20834           0 :         return NULL;
   20835             : }
   20836             : 
   20837           0 : static union drsuapi_DsGetDCInfoCtr *py_export_drsuapi_DsGetDCInfoCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   20838             : {
   20839           0 :         union drsuapi_DsGetDCInfoCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoCtr);
   20840           0 :         switch (level) {
   20841           0 :                 case DRSUAPI_DC_INFO_CTR_1:
   20842           0 :                         if (in == NULL) {
   20843           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   20844           0 :                                 talloc_free(ret); return NULL;
   20845             :                         }
   20846           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr1_Type, in, talloc_free(ret); return NULL;);
   20847           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   20848           0 :                                 PyErr_NoMemory();
   20849           0 :                                 talloc_free(ret); return NULL;
   20850             :                         }
   20851           0 :                         ret->ctr1 = *(struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(in);
   20852           0 :                         break;
   20853             : 
   20854           0 :                 case DRSUAPI_DC_INFO_CTR_2:
   20855           0 :                         if (in == NULL) {
   20856           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
   20857           0 :                                 talloc_free(ret); return NULL;
   20858             :                         }
   20859           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr2_Type, in, talloc_free(ret); return NULL;);
   20860           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   20861           0 :                                 PyErr_NoMemory();
   20862           0 :                                 talloc_free(ret); return NULL;
   20863             :                         }
   20864           0 :                         ret->ctr2 = *(struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(in);
   20865           0 :                         break;
   20866             : 
   20867           0 :                 case DRSUAPI_DC_INFO_CTR_3:
   20868           0 :                         if (in == NULL) {
   20869           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
   20870           0 :                                 talloc_free(ret); return NULL;
   20871             :                         }
   20872           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr3_Type, in, talloc_free(ret); return NULL;);
   20873           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   20874           0 :                                 PyErr_NoMemory();
   20875           0 :                                 talloc_free(ret); return NULL;
   20876             :                         }
   20877           0 :                         ret->ctr3 = *(struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(in);
   20878           0 :                         break;
   20879             : 
   20880           0 :                 case DRSUAPI_DC_CONNECTION_CTR_01:
   20881           0 :                         if (in == NULL) {
   20882           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr01");
   20883           0 :                                 talloc_free(ret); return NULL;
   20884             :                         }
   20885           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetDCConnectionCtr01_Type, in, talloc_free(ret); return NULL;);
   20886           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   20887           0 :                                 PyErr_NoMemory();
   20888           0 :                                 talloc_free(ret); return NULL;
   20889             :                         }
   20890           0 :                         ret->ctr01 = *(struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(in);
   20891           0 :                         break;
   20892             : 
   20893           0 :                 default:
   20894           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   20895           0 :                         talloc_free(ret);
   20896           0 :                         ret = NULL;
   20897             :         }
   20898             : 
   20899           0 :         return ret;
   20900             : }
   20901             : 
   20902           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20903             : {
   20904           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   20905           0 :         PyObject *mem_ctx_obj = NULL;
   20906           0 :         TALLOC_CTX *mem_ctx = NULL;
   20907           0 :         int level = 0;
   20908           0 :         PyObject *in_obj = NULL;
   20909           0 :         union drsuapi_DsGetDCInfoCtr *in = NULL;
   20910             : 
   20911           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   20912             :                 discard_const_p(char *, kwnames),
   20913             :                 &mem_ctx_obj,
   20914             :                 &level,
   20915             :                 &in_obj)) {
   20916           0 :                 return NULL;
   20917             :         }
   20918           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   20919           0 :         if (mem_ctx == NULL) {
   20920           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   20921           0 :                 return NULL;
   20922             :         }
   20923           0 :         in = (union drsuapi_DsGetDCInfoCtr *)pytalloc_get_ptr(in_obj);
   20924           0 :         if (in == NULL) {
   20925           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetDCInfoCtr!");
   20926           0 :                 return NULL;
   20927             :         }
   20928             : 
   20929           0 :         return py_import_drsuapi_DsGetDCInfoCtr(mem_ctx, level, in);
   20930             : }
   20931             : 
   20932           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20933             : {
   20934           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   20935           0 :         PyObject *mem_ctx_obj = NULL;
   20936           0 :         TALLOC_CTX *mem_ctx = NULL;
   20937           0 :         int level = 0;
   20938           0 :         PyObject *in = NULL;
   20939           0 :         union drsuapi_DsGetDCInfoCtr *out = NULL;
   20940             : 
   20941           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   20942             :                 discard_const_p(char *, kwnames),
   20943             :                 &mem_ctx_obj,
   20944             :                 &level,
   20945             :                 &in)) {
   20946           0 :                 return NULL;
   20947             :         }
   20948           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   20949           0 :         if (mem_ctx == NULL) {
   20950           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   20951           0 :                 return NULL;
   20952             :         }
   20953             : 
   20954           0 :         out = py_export_drsuapi_DsGetDCInfoCtr(mem_ctx, level, in);
   20955           0 :         if (out == NULL) {
   20956           0 :                 return NULL;
   20957             :         }
   20958             : 
   20959           0 :         return pytalloc_GenericObject_reference(out);
   20960             : }
   20961             : 
   20962             : static PyMethodDef py_drsuapi_DsGetDCInfoCtr_methods[] = {
   20963             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDCInfoCtr_import),
   20964             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   20965             :                 "T.__import__(mem_ctx, level, in) => ret." },
   20966             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDCInfoCtr_export),
   20967             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   20968             :                 "T.__export__(mem_ctx, level, in) => ret." },
   20969             :         { NULL, NULL, 0, NULL }
   20970             : };
   20971             : 
   20972           0 : static PyObject *py_drsuapi_DsGetDCInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   20973             : {
   20974           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   20975           0 :         return NULL;
   20976             : }
   20977             : 
   20978             : 
   20979             : static PyTypeObject drsuapi_DsGetDCInfoCtr_Type = {
   20980             :         PyVarObject_HEAD_INIT(NULL, 0)
   20981             :         .tp_name = "drsuapi.DsGetDCInfoCtr",
   20982             :         .tp_getset = NULL,
   20983             :         .tp_methods = py_drsuapi_DsGetDCInfoCtr_methods,
   20984             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   20985             :         .tp_new = py_drsuapi_DsGetDCInfoCtr_new,
   20986             : };
   20987             : 
   20988             : 
   20989           0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_get_next_object(PyObject *obj, void *closure)
   20990             : {
   20991           0 :         struct drsuapi_DsReplicaObjectListItem *object = pytalloc_get_ptr(obj);
   20992           0 :         PyObject *py_next_object;
   20993           0 :         if (object->next_object == NULL) {
   20994           0 :                 Py_RETURN_NONE;
   20995             :         }
   20996           0 :         if (object->next_object == NULL) {
   20997           0 :                 py_next_object = Py_None;
   20998           0 :                 Py_INCREF(py_next_object);
   20999             :         } else {
   21000           0 :                 py_next_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, object->next_object, object->next_object);
   21001             :         }
   21002           0 :         return py_next_object;
   21003             : }
   21004             : 
   21005           0 : static int py_drsuapi_DsReplicaObjectListItem_set_next_object(PyObject *py_obj, PyObject *value, void *closure)
   21006             : {
   21007           0 :         struct drsuapi_DsReplicaObjectListItem *object = pytalloc_get_ptr(py_obj);
   21008           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next_object));
   21009           0 :         if (value == NULL) {
   21010           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next_object");
   21011           0 :                 return -1;
   21012             :         }
   21013           0 :         if (value == Py_None) {
   21014           0 :                 object->next_object = NULL;
   21015             :         } else {
   21016           0 :                 object->next_object = NULL;
   21017           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_Type, value, return -1;);
   21018           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21019           0 :                         PyErr_NoMemory();
   21020           0 :                         return -1;
   21021             :                 }
   21022           0 :                 object->next_object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
   21023             :         }
   21024           0 :         return 0;
   21025             : }
   21026             : 
   21027           0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_get_object(PyObject *obj, void *closure)
   21028             : {
   21029           0 :         struct drsuapi_DsReplicaObjectListItem *object = pytalloc_get_ptr(obj);
   21030           0 :         PyObject *py_object;
   21031           0 :         py_object = pytalloc_reference_ex(&drsuapi_DsReplicaObject_Type, pytalloc_get_mem_ctx(obj), &object->object);
   21032           0 :         return py_object;
   21033             : }
   21034             : 
   21035          90 : static int py_drsuapi_DsReplicaObjectListItem_set_object(PyObject *py_obj, PyObject *value, void *closure)
   21036             : {
   21037          90 :         struct drsuapi_DsReplicaObjectListItem *object = pytalloc_get_ptr(py_obj);
   21038          90 :         if (value == NULL) {
   21039           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object");
   21040           0 :                 return -1;
   21041             :         }
   21042          90 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObject_Type, value, return -1;);
   21043          90 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21044           0 :                 PyErr_NoMemory();
   21045           0 :                 return -1;
   21046             :         }
   21047          90 :         object->object = *(struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(value);
   21048          90 :         return 0;
   21049             : }
   21050             : 
   21051             : static PyGetSetDef py_drsuapi_DsReplicaObjectListItem_getsetters[] = {
   21052             :         {
   21053             :                 .name = discard_const_p(char, "next_object"),
   21054             :                 .get = py_drsuapi_DsReplicaObjectListItem_get_next_object,
   21055             :                 .set = py_drsuapi_DsReplicaObjectListItem_set_next_object,
   21056             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItem")
   21057             :         },
   21058             :         {
   21059             :                 .name = discard_const_p(char, "object"),
   21060             :                 .get = py_drsuapi_DsReplicaObjectListItem_get_object,
   21061             :                 .set = py_drsuapi_DsReplicaObjectListItem_set_object,
   21062             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObject")
   21063             :         },
   21064             :         { .name = NULL }
   21065             : };
   21066             : 
   21067          90 : static PyObject *py_drsuapi_DsReplicaObjectListItem_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21068             : {
   21069          90 :         return pytalloc_new(struct drsuapi_DsReplicaObjectListItem, type);
   21070             : }
   21071             : 
   21072           0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_pack(PyObject *py_obj,  PyObject *Py_UNUSED(ignored))
   21073             : {
   21074           0 :         struct drsuapi_DsReplicaObjectListItem *object = pytalloc_get_ptr(py_obj);
   21075           0 :         PyObject *ret = NULL;
   21076           0 :         DATA_BLOB blob;
   21077           0 :         enum ndr_err_code err;
   21078           0 :         TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
   21079           0 :         if (tmp_ctx == NULL) {
   21080           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   21081           0 :                 return NULL;
   21082             :         }
   21083           0 :         err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectListItem);
   21084           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   21085           0 :                 TALLOC_FREE(tmp_ctx);
   21086           0 :                 PyErr_SetNdrError(err);
   21087           0 :                 return NULL;
   21088             :         }
   21089             : 
   21090           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   21091           0 :         TALLOC_FREE(tmp_ctx);
   21092           0 :         return ret;
   21093             : }
   21094             : 
   21095           0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   21096             : {
   21097           0 :         struct drsuapi_DsReplicaObjectListItem *object = pytalloc_get_ptr(py_obj);
   21098           0 :         DATA_BLOB blob = {.data = NULL, .length = 0};
   21099           0 :         Py_ssize_t blob_length = 0;
   21100           0 :         enum ndr_err_code err;
   21101           0 :         const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
   21102           0 :         PyObject *allow_remaining_obj = NULL;
   21103           0 :         bool allow_remaining = false;
   21104             : 
   21105           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
   21106             :                 discard_const_p(char *, kwnames),
   21107             :                 &blob.data, &blob_length,
   21108             :                 &allow_remaining_obj)) {
   21109           0 :                 return NULL;
   21110             :         }
   21111           0 :         blob.length = blob_length;
   21112             : 
   21113           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   21114           0 :                 allow_remaining = true;
   21115             :         }
   21116             : 
   21117           0 :         if (allow_remaining) {
   21118           0 :                 err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItem);
   21119             :         } else {
   21120           0 :                 err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItem);
   21121             :         }
   21122           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   21123           0 :                 PyErr_SetNdrError(err);
   21124           0 :                 return NULL;
   21125             :         }
   21126             : 
   21127           0 :         Py_RETURN_NONE;
   21128             : }
   21129             : 
   21130           0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   21131             : {
   21132           0 :         struct drsuapi_DsReplicaObjectListItem *object = pytalloc_get_ptr(py_obj);
   21133           0 :         PyObject *ret;
   21134           0 :         char *retstr;
   21135             : 
   21136           0 :         retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectListItem, "drsuapi_DsReplicaObjectListItem", object);
   21137           0 :         ret = PyUnicode_FromString(retstr);
   21138           0 :         talloc_free(retstr);
   21139             : 
   21140           0 :         return ret;
   21141             : }
   21142             : 
   21143             : static PyMethodDef py_drsuapi_DsReplicaObjectListItem_methods[] = {
   21144             :         { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectListItem_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
   21145             :         { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaObjectListItem_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
   21146             :         { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectListItem_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
   21147             :         { NULL, NULL, 0, NULL }
   21148             : };
   21149             : 
   21150             : 
   21151             : static PyTypeObject drsuapi_DsReplicaObjectListItem_Type = {
   21152             :         PyVarObject_HEAD_INIT(NULL, 0)
   21153             :         .tp_name = "drsuapi.DsReplicaObjectListItem",
   21154             :         .tp_getset = py_drsuapi_DsReplicaObjectListItem_getsetters,
   21155             :         .tp_methods = py_drsuapi_DsReplicaObjectListItem_methods,
   21156             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21157             :         .tp_new = py_drsuapi_DsReplicaObjectListItem_new,
   21158             : };
   21159             : 
   21160             : 
   21161          90 : static PyObject *py_drsuapi_DsAddEntryRequest2_get_first_object(PyObject *obj, void *closure)
   21162             : {
   21163          90 :         struct drsuapi_DsAddEntryRequest2 *object = pytalloc_get_ptr(obj);
   21164           0 :         PyObject *py_first_object;
   21165          90 :         py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, pytalloc_get_mem_ctx(obj), &object->first_object);
   21166          90 :         return py_first_object;
   21167             : }
   21168             : 
   21169          90 : static int py_drsuapi_DsAddEntryRequest2_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
   21170             : {
   21171          90 :         struct drsuapi_DsAddEntryRequest2 *object = pytalloc_get_ptr(py_obj);
   21172          90 :         if (value == NULL) {
   21173           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_object");
   21174           0 :                 return -1;
   21175             :         }
   21176          90 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_Type, value, return -1;);
   21177          90 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21178           0 :                 PyErr_NoMemory();
   21179           0 :                 return -1;
   21180             :         }
   21181          90 :         object->first_object = *(struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
   21182          90 :         return 0;
   21183             : }
   21184             : 
   21185             : static PyGetSetDef py_drsuapi_DsAddEntryRequest2_getsetters[] = {
   21186             :         {
   21187             :                 .name = discard_const_p(char, "first_object"),
   21188             :                 .get = py_drsuapi_DsAddEntryRequest2_get_first_object,
   21189             :                 .set = py_drsuapi_DsAddEntryRequest2_set_first_object,
   21190             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItem")
   21191             :         },
   21192             :         { .name = NULL }
   21193             : };
   21194             : 
   21195          90 : static PyObject *py_drsuapi_DsAddEntryRequest2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21196             : {
   21197          90 :         return pytalloc_new(struct drsuapi_DsAddEntryRequest2, type);
   21198             : }
   21199             : 
   21200             : 
   21201             : static PyTypeObject drsuapi_DsAddEntryRequest2_Type = {
   21202             :         PyVarObject_HEAD_INIT(NULL, 0)
   21203             :         .tp_name = "drsuapi.DsAddEntryRequest2",
   21204             :         .tp_getset = py_drsuapi_DsAddEntryRequest2_getsetters,
   21205             :         .tp_methods = NULL,
   21206             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21207             :         .tp_new = py_drsuapi_DsAddEntryRequest2_new,
   21208             : };
   21209             : 
   21210             : 
   21211           0 : static PyObject *py_drsuapi_SecBuffer_get_buf_size(PyObject *obj, void *closure)
   21212             : {
   21213           0 :         struct drsuapi_SecBuffer *object = pytalloc_get_ptr(obj);
   21214           0 :         PyObject *py_buf_size;
   21215           0 :         py_buf_size = PyLong_FromUnsignedLongLong((uint32_t)(object->buf_size));
   21216           0 :         return py_buf_size;
   21217             : }
   21218             : 
   21219           0 : static int py_drsuapi_SecBuffer_set_buf_size(PyObject *py_obj, PyObject *value, void *closure)
   21220             : {
   21221           0 :         struct drsuapi_SecBuffer *object = pytalloc_get_ptr(py_obj);
   21222           0 :         if (value == NULL) {
   21223           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buf_size");
   21224           0 :                 return -1;
   21225             :         }
   21226             :         {
   21227           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buf_size));
   21228           0 :                 if (PyLong_Check(value)) {
   21229           0 :                         unsigned long long test_var;
   21230           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21231           0 :                         if (PyErr_Occurred() != NULL) {
   21232           0 :                                 return -1;
   21233             :                         }
   21234           0 :                         if (test_var > uint_max) {
   21235           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21236             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21237           0 :                                 return -1;
   21238             :                         }
   21239           0 :                         object->buf_size = test_var;
   21240             :                 } else {
   21241           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21242             :                           PyLong_Type.tp_name);
   21243           0 :                         return -1;
   21244             :                 }
   21245             :         }
   21246           0 :         return 0;
   21247             : }
   21248             : 
   21249           0 : static PyObject *py_drsuapi_SecBuffer_get_buf_type(PyObject *obj, void *closure)
   21250             : {
   21251           0 :         struct drsuapi_SecBuffer *object = pytalloc_get_ptr(obj);
   21252           0 :         PyObject *py_buf_type;
   21253           0 :         py_buf_type = PyLong_FromUnsignedLongLong((uint32_t)(object->buf_type));
   21254           0 :         return py_buf_type;
   21255             : }
   21256             : 
   21257           0 : static int py_drsuapi_SecBuffer_set_buf_type(PyObject *py_obj, PyObject *value, void *closure)
   21258             : {
   21259           0 :         struct drsuapi_SecBuffer *object = pytalloc_get_ptr(py_obj);
   21260           0 :         if (value == NULL) {
   21261           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buf_type");
   21262           0 :                 return -1;
   21263             :         }
   21264             :         {
   21265           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buf_type));
   21266           0 :                 if (PyLong_Check(value)) {
   21267           0 :                         unsigned long long test_var;
   21268           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21269           0 :                         if (PyErr_Occurred() != NULL) {
   21270           0 :                                 return -1;
   21271             :                         }
   21272           0 :                         if (test_var > uint_max) {
   21273           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21274             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21275           0 :                                 return -1;
   21276             :                         }
   21277           0 :                         object->buf_type = test_var;
   21278             :                 } else {
   21279           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21280             :                           PyLong_Type.tp_name);
   21281           0 :                         return -1;
   21282             :                 }
   21283             :         }
   21284           0 :         return 0;
   21285             : }
   21286             : 
   21287           0 : static PyObject *py_drsuapi_SecBuffer_get_buffer(PyObject *obj, void *closure)
   21288             : {
   21289           0 :         struct drsuapi_SecBuffer *object = pytalloc_get_ptr(obj);
   21290           0 :         PyObject *py_buffer;
   21291           0 :         if (object->buffer == NULL) {
   21292           0 :                 Py_RETURN_NONE;
   21293             :         }
   21294           0 :         if (object->buffer == NULL) {
   21295           0 :                 py_buffer = Py_None;
   21296           0 :                 Py_INCREF(py_buffer);
   21297             :         } else {
   21298           0 :                 py_buffer = PyList_New(object->buf_size);
   21299           0 :                 if (py_buffer == NULL) {
   21300           0 :                         return NULL;
   21301             :                 }
   21302             :                 {
   21303             :                         int buffer_cntr_1;
   21304           0 :                         for (buffer_cntr_1 = 0; buffer_cntr_1 < (object->buf_size); buffer_cntr_1++) {
   21305           0 :                                 PyObject *py_buffer_1;
   21306           0 :                                 py_buffer_1 = PyLong_FromLong((uint16_t)((object->buffer)[buffer_cntr_1]));
   21307           0 :                                 PyList_SetItem(py_buffer, buffer_cntr_1, py_buffer_1);
   21308             :                         }
   21309             :                 }
   21310             :         }
   21311           0 :         return py_buffer;
   21312             : }
   21313             : 
   21314           0 : static int py_drsuapi_SecBuffer_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
   21315             : {
   21316           0 :         struct drsuapi_SecBuffer *object = pytalloc_get_ptr(py_obj);
   21317           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->buffer));
   21318           0 :         if (value == NULL) {
   21319           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffer");
   21320           0 :                 return -1;
   21321             :         }
   21322           0 :         if (value == Py_None) {
   21323           0 :                 object->buffer = NULL;
   21324             :         } else {
   21325           0 :                 object->buffer = NULL;
   21326           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   21327             :                 {
   21328           0 :                         int buffer_cntr_1;
   21329           0 :                         object->buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffer, PyList_GET_SIZE(value));
   21330           0 :                         if (!object->buffer) { return -1; }
   21331           0 :                         talloc_set_name_const(object->buffer, "ARRAY: object->buffer");
   21332           0 :                         for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(value); buffer_cntr_1++) {
   21333           0 :                                 if (PyList_GET_ITEM(value, buffer_cntr_1) == NULL) {
   21334           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->buffer)[buffer_cntr_1]");
   21335           0 :                                         return -1;
   21336             :                                 }
   21337             :                                 {
   21338           0 :                                         const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof((object->buffer)[buffer_cntr_1]));
   21339           0 :                                         if (PyLong_Check(PyList_GET_ITEM(value, buffer_cntr_1))) {
   21340           0 :                                                 unsigned long long test_var;
   21341           0 :                                                 test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, buffer_cntr_1));
   21342           0 :                                                 if (PyErr_Occurred() != NULL) {
   21343           0 :                                                         return -1;
   21344             :                                                 }
   21345           0 :                                                 if (test_var > uint_max) {
   21346           0 :                                                         PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21347             :                                                           PyLong_Type.tp_name, uint_max, test_var);
   21348           0 :                                                         return -1;
   21349             :                                                 }
   21350           0 :                                                 (object->buffer)[buffer_cntr_1] = test_var;
   21351             :                                         } else {
   21352           0 :                                                 PyErr_Format(PyExc_TypeError, "Expected type %s",
   21353             :                                                   PyLong_Type.tp_name);
   21354           0 :                                                 return -1;
   21355             :                                         }
   21356             :                                 }
   21357             :                         }
   21358             :                 }
   21359             :         }
   21360           0 :         return 0;
   21361             : }
   21362             : 
   21363             : static PyGetSetDef py_drsuapi_SecBuffer_getsetters[] = {
   21364             :         {
   21365             :                 .name = discard_const_p(char, "buf_size"),
   21366             :                 .get = py_drsuapi_SecBuffer_get_buf_size,
   21367             :                 .set = py_drsuapi_SecBuffer_set_buf_size,
   21368             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21369             :         },
   21370             :         {
   21371             :                 .name = discard_const_p(char, "buf_type"),
   21372             :                 .get = py_drsuapi_SecBuffer_get_buf_type,
   21373             :                 .set = py_drsuapi_SecBuffer_set_buf_type,
   21374             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SecBufferType")
   21375             :         },
   21376             :         {
   21377             :                 .name = discard_const_p(char, "buffer"),
   21378             :                 .get = py_drsuapi_SecBuffer_get_buffer,
   21379             :                 .set = py_drsuapi_SecBuffer_set_buffer,
   21380             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   21381             :         },
   21382             :         { .name = NULL }
   21383             : };
   21384             : 
   21385           0 : static PyObject *py_drsuapi_SecBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21386             : {
   21387           0 :         return pytalloc_new(struct drsuapi_SecBuffer, type);
   21388             : }
   21389             : 
   21390             : 
   21391             : static PyTypeObject drsuapi_SecBuffer_Type = {
   21392             :         PyVarObject_HEAD_INIT(NULL, 0)
   21393             :         .tp_name = "drsuapi.SecBuffer",
   21394             :         .tp_getset = py_drsuapi_SecBuffer_getsetters,
   21395             :         .tp_methods = NULL,
   21396             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21397             :         .tp_new = py_drsuapi_SecBuffer_new,
   21398             : };
   21399             : 
   21400             : 
   21401           0 : static PyObject *py_drsuapi_SecBufferDesc_get_version(PyObject *obj, void *closure)
   21402             : {
   21403           0 :         struct drsuapi_SecBufferDesc *object = pytalloc_get_ptr(obj);
   21404           0 :         PyObject *py_version;
   21405           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
   21406           0 :         return py_version;
   21407             : }
   21408             : 
   21409           0 : static int py_drsuapi_SecBufferDesc_set_version(PyObject *py_obj, PyObject *value, void *closure)
   21410             : {
   21411           0 :         struct drsuapi_SecBufferDesc *object = pytalloc_get_ptr(py_obj);
   21412           0 :         if (value == NULL) {
   21413           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
   21414           0 :                 return -1;
   21415             :         }
   21416             :         {
   21417           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
   21418           0 :                 if (PyLong_Check(value)) {
   21419           0 :                         unsigned long long test_var;
   21420           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21421           0 :                         if (PyErr_Occurred() != NULL) {
   21422           0 :                                 return -1;
   21423             :                         }
   21424           0 :                         if (test_var > uint_max) {
   21425           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21426             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21427           0 :                                 return -1;
   21428             :                         }
   21429           0 :                         object->version = test_var;
   21430             :                 } else {
   21431           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21432             :                           PyLong_Type.tp_name);
   21433           0 :                         return -1;
   21434             :                 }
   21435             :         }
   21436           0 :         return 0;
   21437             : }
   21438             : 
   21439           0 : static PyObject *py_drsuapi_SecBufferDesc_get_buff_count(PyObject *obj, void *closure)
   21440             : {
   21441           0 :         struct drsuapi_SecBufferDesc *object = pytalloc_get_ptr(obj);
   21442           0 :         PyObject *py_buff_count;
   21443           0 :         py_buff_count = PyLong_FromUnsignedLongLong((uint32_t)(object->buff_count));
   21444           0 :         return py_buff_count;
   21445             : }
   21446             : 
   21447           0 : static int py_drsuapi_SecBufferDesc_set_buff_count(PyObject *py_obj, PyObject *value, void *closure)
   21448             : {
   21449           0 :         struct drsuapi_SecBufferDesc *object = pytalloc_get_ptr(py_obj);
   21450           0 :         if (value == NULL) {
   21451           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buff_count");
   21452           0 :                 return -1;
   21453             :         }
   21454             :         {
   21455           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buff_count));
   21456           0 :                 if (PyLong_Check(value)) {
   21457           0 :                         unsigned long long test_var;
   21458           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21459           0 :                         if (PyErr_Occurred() != NULL) {
   21460           0 :                                 return -1;
   21461             :                         }
   21462           0 :                         if (test_var > uint_max) {
   21463           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21464             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21465           0 :                                 return -1;
   21466             :                         }
   21467           0 :                         object->buff_count = test_var;
   21468             :                 } else {
   21469           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21470             :                           PyLong_Type.tp_name);
   21471           0 :                         return -1;
   21472             :                 }
   21473             :         }
   21474           0 :         return 0;
   21475             : }
   21476             : 
   21477           0 : static PyObject *py_drsuapi_SecBufferDesc_get_buffers(PyObject *obj, void *closure)
   21478             : {
   21479           0 :         struct drsuapi_SecBufferDesc *object = pytalloc_get_ptr(obj);
   21480           0 :         PyObject *py_buffers;
   21481           0 :         if (object->buffers == NULL) {
   21482           0 :                 Py_RETURN_NONE;
   21483             :         }
   21484           0 :         if (object->buffers == NULL) {
   21485           0 :                 py_buffers = Py_None;
   21486           0 :                 Py_INCREF(py_buffers);
   21487             :         } else {
   21488           0 :                 py_buffers = PyList_New(object->buff_count);
   21489           0 :                 if (py_buffers == NULL) {
   21490           0 :                         return NULL;
   21491             :                 }
   21492             :                 {
   21493             :                         int buffers_cntr_1;
   21494           0 :                         for (buffers_cntr_1 = 0; buffers_cntr_1 < (object->buff_count); buffers_cntr_1++) {
   21495           0 :                                 PyObject *py_buffers_1;
   21496           0 :                                 py_buffers_1 = pytalloc_reference_ex(&drsuapi_SecBuffer_Type, object->buffers, &(object->buffers)[buffers_cntr_1]);
   21497           0 :                                 PyList_SetItem(py_buffers, buffers_cntr_1, py_buffers_1);
   21498             :                         }
   21499             :                 }
   21500             :         }
   21501           0 :         return py_buffers;
   21502             : }
   21503             : 
   21504           0 : static int py_drsuapi_SecBufferDesc_set_buffers(PyObject *py_obj, PyObject *value, void *closure)
   21505             : {
   21506           0 :         struct drsuapi_SecBufferDesc *object = pytalloc_get_ptr(py_obj);
   21507           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->buffers));
   21508           0 :         if (value == NULL) {
   21509           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffers");
   21510           0 :                 return -1;
   21511             :         }
   21512           0 :         if (value == Py_None) {
   21513           0 :                 object->buffers = NULL;
   21514             :         } else {
   21515           0 :                 object->buffers = NULL;
   21516           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   21517             :                 {
   21518           0 :                         int buffers_cntr_1;
   21519           0 :                         object->buffers = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffers, PyList_GET_SIZE(value));
   21520           0 :                         if (!object->buffers) { return -1; }
   21521           0 :                         talloc_set_name_const(object->buffers, "ARRAY: object->buffers");
   21522           0 :                         for (buffers_cntr_1 = 0; buffers_cntr_1 < PyList_GET_SIZE(value); buffers_cntr_1++) {
   21523           0 :                                 if (PyList_GET_ITEM(value, buffers_cntr_1) == NULL) {
   21524           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->buffers)[buffers_cntr_1]");
   21525           0 :                                         return -1;
   21526             :                                 }
   21527           0 :                                 PY_CHECK_TYPE(&drsuapi_SecBuffer_Type, PyList_GET_ITEM(value, buffers_cntr_1), return -1;);
   21528           0 :                                 if (talloc_reference(object->buffers, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, buffers_cntr_1))) == NULL) {
   21529           0 :                                         PyErr_NoMemory();
   21530           0 :                                         return -1;
   21531             :                                 }
   21532           0 :                                 (object->buffers)[buffers_cntr_1] = *(struct drsuapi_SecBuffer *)pytalloc_get_ptr(PyList_GET_ITEM(value, buffers_cntr_1));
   21533             :                         }
   21534             :                 }
   21535             :         }
   21536           0 :         return 0;
   21537             : }
   21538             : 
   21539             : static PyGetSetDef py_drsuapi_SecBufferDesc_getsetters[] = {
   21540             :         {
   21541             :                 .name = discard_const_p(char, "version"),
   21542             :                 .get = py_drsuapi_SecBufferDesc_get_version,
   21543             :                 .set = py_drsuapi_SecBufferDesc_set_version,
   21544             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21545             :         },
   21546             :         {
   21547             :                 .name = discard_const_p(char, "buff_count"),
   21548             :                 .get = py_drsuapi_SecBufferDesc_get_buff_count,
   21549             :                 .set = py_drsuapi_SecBufferDesc_set_buff_count,
   21550             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21551             :         },
   21552             :         {
   21553             :                 .name = discard_const_p(char, "buffers"),
   21554             :                 .get = py_drsuapi_SecBufferDesc_get_buffers,
   21555             :                 .set = py_drsuapi_SecBufferDesc_set_buffers,
   21556             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SecBuffer")
   21557             :         },
   21558             :         { .name = NULL }
   21559             : };
   21560             : 
   21561           0 : static PyObject *py_drsuapi_SecBufferDesc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21562             : {
   21563           0 :         return pytalloc_new(struct drsuapi_SecBufferDesc, type);
   21564             : }
   21565             : 
   21566             : 
   21567             : static PyTypeObject drsuapi_SecBufferDesc_Type = {
   21568             :         PyVarObject_HEAD_INIT(NULL, 0)
   21569             :         .tp_name = "drsuapi.SecBufferDesc",
   21570             :         .tp_getset = py_drsuapi_SecBufferDesc_getsetters,
   21571             :         .tp_methods = NULL,
   21572             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21573             :         .tp_new = py_drsuapi_SecBufferDesc_new,
   21574             : };
   21575             : 
   21576             : 
   21577           0 : static PyObject *py_drsuapi_DsAddEntryRequest3_get_first_object(PyObject *obj, void *closure)
   21578             : {
   21579           0 :         struct drsuapi_DsAddEntryRequest3 *object = pytalloc_get_ptr(obj);
   21580           0 :         PyObject *py_first_object;
   21581           0 :         py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, pytalloc_get_mem_ctx(obj), &object->first_object);
   21582           0 :         return py_first_object;
   21583             : }
   21584             : 
   21585           0 : static int py_drsuapi_DsAddEntryRequest3_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
   21586             : {
   21587           0 :         struct drsuapi_DsAddEntryRequest3 *object = pytalloc_get_ptr(py_obj);
   21588           0 :         if (value == NULL) {
   21589           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_object");
   21590           0 :                 return -1;
   21591             :         }
   21592           0 :         PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_Type, value, return -1;);
   21593           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21594           0 :                 PyErr_NoMemory();
   21595           0 :                 return -1;
   21596             :         }
   21597           0 :         object->first_object = *(struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
   21598           0 :         return 0;
   21599             : }
   21600             : 
   21601           0 : static PyObject *py_drsuapi_DsAddEntryRequest3_get_client_creds(PyObject *obj, void *closure)
   21602             : {
   21603           0 :         struct drsuapi_DsAddEntryRequest3 *object = pytalloc_get_ptr(obj);
   21604           0 :         PyObject *py_client_creds;
   21605           0 :         if (object->client_creds == NULL) {
   21606           0 :                 Py_RETURN_NONE;
   21607             :         }
   21608           0 :         if (object->client_creds == NULL) {
   21609           0 :                 py_client_creds = Py_None;
   21610           0 :                 Py_INCREF(py_client_creds);
   21611             :         } else {
   21612           0 :                 py_client_creds = pytalloc_reference_ex(&drsuapi_SecBufferDesc_Type, object->client_creds, object->client_creds);
   21613             :         }
   21614           0 :         return py_client_creds;
   21615             : }
   21616             : 
   21617           0 : static int py_drsuapi_DsAddEntryRequest3_set_client_creds(PyObject *py_obj, PyObject *value, void *closure)
   21618             : {
   21619           0 :         struct drsuapi_DsAddEntryRequest3 *object = pytalloc_get_ptr(py_obj);
   21620           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->client_creds));
   21621           0 :         if (value == NULL) {
   21622           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_creds");
   21623           0 :                 return -1;
   21624             :         }
   21625           0 :         if (value == Py_None) {
   21626           0 :                 object->client_creds = NULL;
   21627             :         } else {
   21628           0 :                 object->client_creds = NULL;
   21629           0 :                 PY_CHECK_TYPE(&drsuapi_SecBufferDesc_Type, value, return -1;);
   21630           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   21631           0 :                         PyErr_NoMemory();
   21632           0 :                         return -1;
   21633             :                 }
   21634           0 :                 object->client_creds = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(value);
   21635             :         }
   21636           0 :         return 0;
   21637             : }
   21638             : 
   21639             : static PyGetSetDef py_drsuapi_DsAddEntryRequest3_getsetters[] = {
   21640             :         {
   21641             :                 .name = discard_const_p(char, "first_object"),
   21642             :                 .get = py_drsuapi_DsAddEntryRequest3_get_first_object,
   21643             :                 .set = py_drsuapi_DsAddEntryRequest3_set_first_object,
   21644             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItem")
   21645             :         },
   21646             :         {
   21647             :                 .name = discard_const_p(char, "client_creds"),
   21648             :                 .get = py_drsuapi_DsAddEntryRequest3_get_client_creds,
   21649             :                 .set = py_drsuapi_DsAddEntryRequest3_set_client_creds,
   21650             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SecBufferDesc")
   21651             :         },
   21652             :         { .name = NULL }
   21653             : };
   21654             : 
   21655           0 : static PyObject *py_drsuapi_DsAddEntryRequest3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21656             : {
   21657           0 :         return pytalloc_new(struct drsuapi_DsAddEntryRequest3, type);
   21658             : }
   21659             : 
   21660             : 
   21661             : static PyTypeObject drsuapi_DsAddEntryRequest3_Type = {
   21662             :         PyVarObject_HEAD_INIT(NULL, 0)
   21663             :         .tp_name = "drsuapi.DsAddEntryRequest3",
   21664             :         .tp_getset = py_drsuapi_DsAddEntryRequest3_getsetters,
   21665             :         .tp_methods = NULL,
   21666             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21667             :         .tp_new = py_drsuapi_DsAddEntryRequest3_new,
   21668             : };
   21669             : 
   21670           0 : static PyObject *py_import_drsuapi_DsAddEntryRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryRequest *in)
   21671             : {
   21672           0 :         PyObject *ret;
   21673             : 
   21674           0 :         switch (level) {
   21675           0 :                 case 2:
   21676           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryRequest2_Type, mem_ctx, &in->req2);
   21677           0 :                         return ret;
   21678             : 
   21679           0 :                 case 3:
   21680           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryRequest3_Type, mem_ctx, &in->req3);
   21681           0 :                         return ret;
   21682             : 
   21683             :         }
   21684           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   21685           0 :         return NULL;
   21686             : }
   21687             : 
   21688          90 : static union drsuapi_DsAddEntryRequest *py_export_drsuapi_DsAddEntryRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   21689             : {
   21690          90 :         union drsuapi_DsAddEntryRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryRequest);
   21691          90 :         switch (level) {
   21692          90 :                 case 2:
   21693          90 :                         if (in == NULL) {
   21694           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req2");
   21695           0 :                                 talloc_free(ret); return NULL;
   21696             :                         }
   21697          90 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryRequest2_Type, in, talloc_free(ret); return NULL;);
   21698          90 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   21699           0 :                                 PyErr_NoMemory();
   21700           0 :                                 talloc_free(ret); return NULL;
   21701             :                         }
   21702          90 :                         ret->req2 = *(struct drsuapi_DsAddEntryRequest2 *)pytalloc_get_ptr(in);
   21703          90 :                         break;
   21704             : 
   21705           0 :                 case 3:
   21706           0 :                         if (in == NULL) {
   21707           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req3");
   21708           0 :                                 talloc_free(ret); return NULL;
   21709             :                         }
   21710           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryRequest3_Type, in, talloc_free(ret); return NULL;);
   21711           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   21712           0 :                                 PyErr_NoMemory();
   21713           0 :                                 talloc_free(ret); return NULL;
   21714             :                         }
   21715           0 :                         ret->req3 = *(struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(in);
   21716           0 :                         break;
   21717             : 
   21718           0 :                 default:
   21719           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   21720           0 :                         talloc_free(ret);
   21721           0 :                         ret = NULL;
   21722             :         }
   21723             : 
   21724          90 :         return ret;
   21725             : }
   21726             : 
   21727           0 : static PyObject *py_drsuapi_DsAddEntryRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21728             : {
   21729           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   21730           0 :         PyObject *mem_ctx_obj = NULL;
   21731           0 :         TALLOC_CTX *mem_ctx = NULL;
   21732           0 :         int level = 0;
   21733           0 :         PyObject *in_obj = NULL;
   21734           0 :         union drsuapi_DsAddEntryRequest *in = NULL;
   21735             : 
   21736           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   21737             :                 discard_const_p(char *, kwnames),
   21738             :                 &mem_ctx_obj,
   21739             :                 &level,
   21740             :                 &in_obj)) {
   21741           0 :                 return NULL;
   21742             :         }
   21743           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   21744           0 :         if (mem_ctx == NULL) {
   21745           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   21746           0 :                 return NULL;
   21747             :         }
   21748           0 :         in = (union drsuapi_DsAddEntryRequest *)pytalloc_get_ptr(in_obj);
   21749           0 :         if (in == NULL) {
   21750           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsAddEntryRequest!");
   21751           0 :                 return NULL;
   21752             :         }
   21753             : 
   21754           0 :         return py_import_drsuapi_DsAddEntryRequest(mem_ctx, level, in);
   21755             : }
   21756             : 
   21757          90 : static PyObject *py_drsuapi_DsAddEntryRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21758             : {
   21759          90 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   21760          90 :         PyObject *mem_ctx_obj = NULL;
   21761          90 :         TALLOC_CTX *mem_ctx = NULL;
   21762          90 :         int level = 0;
   21763          90 :         PyObject *in = NULL;
   21764          90 :         union drsuapi_DsAddEntryRequest *out = NULL;
   21765             : 
   21766          90 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   21767             :                 discard_const_p(char *, kwnames),
   21768             :                 &mem_ctx_obj,
   21769             :                 &level,
   21770             :                 &in)) {
   21771           0 :                 return NULL;
   21772             :         }
   21773          90 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   21774          90 :         if (mem_ctx == NULL) {
   21775           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   21776           0 :                 return NULL;
   21777             :         }
   21778             : 
   21779          90 :         out = py_export_drsuapi_DsAddEntryRequest(mem_ctx, level, in);
   21780          90 :         if (out == NULL) {
   21781           0 :                 return NULL;
   21782             :         }
   21783             : 
   21784          90 :         return pytalloc_GenericObject_reference(out);
   21785             : }
   21786             : 
   21787             : static PyMethodDef py_drsuapi_DsAddEntryRequest_methods[] = {
   21788             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryRequest_import),
   21789             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   21790             :                 "T.__import__(mem_ctx, level, in) => ret." },
   21791             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryRequest_export),
   21792             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   21793             :                 "T.__export__(mem_ctx, level, in) => ret." },
   21794             :         { NULL, NULL, 0, NULL }
   21795             : };
   21796             : 
   21797           0 : static PyObject *py_drsuapi_DsAddEntryRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21798             : {
   21799           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   21800           0 :         return NULL;
   21801             : }
   21802             : 
   21803             : 
   21804             : static PyTypeObject drsuapi_DsAddEntryRequest_Type = {
   21805             :         PyVarObject_HEAD_INIT(NULL, 0)
   21806             :         .tp_name = "drsuapi.DsAddEntryRequest",
   21807             :         .tp_getset = NULL,
   21808             :         .tp_methods = py_drsuapi_DsAddEntryRequest_methods,
   21809             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21810             :         .tp_new = py_drsuapi_DsAddEntryRequest_new,
   21811             : };
   21812             : 
   21813             : 
   21814           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_dsid(PyObject *obj, void *closure)
   21815             : {
   21816           0 :         struct drsuapi_DsAddEntryErrorInfoX *object = pytalloc_get_ptr(obj);
   21817           0 :         PyObject *py_dsid;
   21818           0 :         py_dsid = PyLong_FromUnsignedLongLong((uint32_t)(object->dsid));
   21819           0 :         return py_dsid;
   21820             : }
   21821             : 
   21822           0 : static int py_drsuapi_DsAddEntryErrorInfoX_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
   21823             : {
   21824           0 :         struct drsuapi_DsAddEntryErrorInfoX *object = pytalloc_get_ptr(py_obj);
   21825           0 :         if (value == NULL) {
   21826           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
   21827           0 :                 return -1;
   21828             :         }
   21829             :         {
   21830           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
   21831           0 :                 if (PyLong_Check(value)) {
   21832           0 :                         unsigned long long test_var;
   21833           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21834           0 :                         if (PyErr_Occurred() != NULL) {
   21835           0 :                                 return -1;
   21836             :                         }
   21837           0 :                         if (test_var > uint_max) {
   21838           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21839             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21840           0 :                                 return -1;
   21841             :                         }
   21842           0 :                         object->dsid = test_var;
   21843             :                 } else {
   21844           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21845             :                           PyLong_Type.tp_name);
   21846           0 :                         return -1;
   21847             :                 }
   21848             :         }
   21849           0 :         return 0;
   21850             : }
   21851             : 
   21852           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_extended_err(PyObject *obj, void *closure)
   21853             : {
   21854           0 :         struct drsuapi_DsAddEntryErrorInfoX *object = pytalloc_get_ptr(obj);
   21855           0 :         PyObject *py_extended_err;
   21856           0 :         py_extended_err = PyErr_FromWERROR(object->extended_err);
   21857           0 :         return py_extended_err;
   21858             : }
   21859             : 
   21860           0 : static int py_drsuapi_DsAddEntryErrorInfoX_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
   21861             : {
   21862           0 :         struct drsuapi_DsAddEntryErrorInfoX *object = pytalloc_get_ptr(py_obj);
   21863           0 :         if (value == NULL) {
   21864           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
   21865           0 :                 return -1;
   21866             :         }
   21867           0 :         object->extended_err = W_ERROR(PyLong_AsLong(value));
   21868           0 :         return 0;
   21869             : }
   21870             : 
   21871           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_extended_data(PyObject *obj, void *closure)
   21872             : {
   21873           0 :         struct drsuapi_DsAddEntryErrorInfoX *object = pytalloc_get_ptr(obj);
   21874           0 :         PyObject *py_extended_data;
   21875           0 :         py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_data));
   21876           0 :         return py_extended_data;
   21877             : }
   21878             : 
   21879           0 : static int py_drsuapi_DsAddEntryErrorInfoX_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
   21880             : {
   21881           0 :         struct drsuapi_DsAddEntryErrorInfoX *object = pytalloc_get_ptr(py_obj);
   21882           0 :         if (value == NULL) {
   21883           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
   21884           0 :                 return -1;
   21885             :         }
   21886             :         {
   21887           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
   21888           0 :                 if (PyLong_Check(value)) {
   21889           0 :                         unsigned long long test_var;
   21890           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21891           0 :                         if (PyErr_Occurred() != NULL) {
   21892           0 :                                 return -1;
   21893             :                         }
   21894           0 :                         if (test_var > uint_max) {
   21895           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21896             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21897           0 :                                 return -1;
   21898             :                         }
   21899           0 :                         object->extended_data = test_var;
   21900             :                 } else {
   21901           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21902             :                           PyLong_Type.tp_name);
   21903           0 :                         return -1;
   21904             :                 }
   21905             :         }
   21906           0 :         return 0;
   21907             : }
   21908             : 
   21909           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_problem(PyObject *obj, void *closure)
   21910             : {
   21911           0 :         struct drsuapi_DsAddEntryErrorInfoX *object = pytalloc_get_ptr(obj);
   21912           0 :         PyObject *py_problem;
   21913           0 :         py_problem = PyLong_FromLong((uint16_t)(object->problem));
   21914           0 :         return py_problem;
   21915             : }
   21916             : 
   21917           0 : static int py_drsuapi_DsAddEntryErrorInfoX_set_problem(PyObject *py_obj, PyObject *value, void *closure)
   21918             : {
   21919           0 :         struct drsuapi_DsAddEntryErrorInfoX *object = pytalloc_get_ptr(py_obj);
   21920           0 :         if (value == NULL) {
   21921           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->problem");
   21922           0 :                 return -1;
   21923             :         }
   21924             :         {
   21925           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->problem));
   21926           0 :                 if (PyLong_Check(value)) {
   21927           0 :                         unsigned long long test_var;
   21928           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   21929           0 :                         if (PyErr_Occurred() != NULL) {
   21930           0 :                                 return -1;
   21931             :                         }
   21932           0 :                         if (test_var > uint_max) {
   21933           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   21934             :                                   PyLong_Type.tp_name, uint_max, test_var);
   21935           0 :                                 return -1;
   21936             :                         }
   21937           0 :                         object->problem = test_var;
   21938             :                 } else {
   21939           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   21940             :                           PyLong_Type.tp_name);
   21941           0 :                         return -1;
   21942             :                 }
   21943             :         }
   21944           0 :         return 0;
   21945             : }
   21946             : 
   21947             : static PyGetSetDef py_drsuapi_DsAddEntryErrorInfoX_getsetters[] = {
   21948             :         {
   21949             :                 .name = discard_const_p(char, "dsid"),
   21950             :                 .get = py_drsuapi_DsAddEntryErrorInfoX_get_dsid,
   21951             :                 .set = py_drsuapi_DsAddEntryErrorInfoX_set_dsid,
   21952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21953             :         },
   21954             :         {
   21955             :                 .name = discard_const_p(char, "extended_err"),
   21956             :                 .get = py_drsuapi_DsAddEntryErrorInfoX_get_extended_err,
   21957             :                 .set = py_drsuapi_DsAddEntryErrorInfoX_set_extended_err,
   21958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   21959             :         },
   21960             :         {
   21961             :                 .name = discard_const_p(char, "extended_data"),
   21962             :                 .get = py_drsuapi_DsAddEntryErrorInfoX_get_extended_data,
   21963             :                 .set = py_drsuapi_DsAddEntryErrorInfoX_set_extended_data,
   21964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   21965             :         },
   21966             :         {
   21967             :                 .name = discard_const_p(char, "problem"),
   21968             :                 .get = py_drsuapi_DsAddEntryErrorInfoX_get_problem,
   21969             :                 .set = py_drsuapi_DsAddEntryErrorInfoX_set_problem,
   21970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   21971             :         },
   21972             :         { .name = NULL }
   21973             : };
   21974             : 
   21975           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   21976             : {
   21977           0 :         return pytalloc_new(struct drsuapi_DsAddEntryErrorInfoX, type);
   21978             : }
   21979             : 
   21980             : 
   21981             : static PyTypeObject drsuapi_DsAddEntryErrorInfoX_Type = {
   21982             :         PyVarObject_HEAD_INIT(NULL, 0)
   21983             :         .tp_name = "drsuapi.DsAddEntryErrorInfoX",
   21984             :         .tp_getset = py_drsuapi_DsAddEntryErrorInfoX_getsetters,
   21985             :         .tp_methods = NULL,
   21986             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   21987             :         .tp_new = py_drsuapi_DsAddEntryErrorInfoX_new,
   21988             : };
   21989             : 
   21990             : 
   21991           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_dsid(PyObject *obj, void *closure)
   21992             : {
   21993           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(obj);
   21994           0 :         PyObject *py_dsid;
   21995           0 :         py_dsid = PyLong_FromUnsignedLongLong((uint32_t)(object->dsid));
   21996           0 :         return py_dsid;
   21997             : }
   21998             : 
   21999           0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
   22000             : {
   22001           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(py_obj);
   22002           0 :         if (value == NULL) {
   22003           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
   22004           0 :                 return -1;
   22005             :         }
   22006             :         {
   22007           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
   22008           0 :                 if (PyLong_Check(value)) {
   22009           0 :                         unsigned long long test_var;
   22010           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22011           0 :                         if (PyErr_Occurred() != NULL) {
   22012           0 :                                 return -1;
   22013             :                         }
   22014           0 :                         if (test_var > uint_max) {
   22015           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22016             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22017           0 :                                 return -1;
   22018             :                         }
   22019           0 :                         object->dsid = test_var;
   22020             :                 } else {
   22021           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22022             :                           PyLong_Type.tp_name);
   22023           0 :                         return -1;
   22024             :                 }
   22025             :         }
   22026           0 :         return 0;
   22027             : }
   22028             : 
   22029           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_err(PyObject *obj, void *closure)
   22030             : {
   22031           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(obj);
   22032           0 :         PyObject *py_extended_err;
   22033           0 :         py_extended_err = PyErr_FromWERROR(object->extended_err);
   22034           0 :         return py_extended_err;
   22035             : }
   22036             : 
   22037           0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
   22038             : {
   22039           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(py_obj);
   22040           0 :         if (value == NULL) {
   22041           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
   22042           0 :                 return -1;
   22043             :         }
   22044           0 :         object->extended_err = W_ERROR(PyLong_AsLong(value));
   22045           0 :         return 0;
   22046             : }
   22047             : 
   22048           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_data(PyObject *obj, void *closure)
   22049             : {
   22050           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(obj);
   22051           0 :         PyObject *py_extended_data;
   22052           0 :         py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_data));
   22053           0 :         return py_extended_data;
   22054             : }
   22055             : 
   22056           0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
   22057             : {
   22058           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(py_obj);
   22059           0 :         if (value == NULL) {
   22060           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
   22061           0 :                 return -1;
   22062             :         }
   22063             :         {
   22064           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
   22065           0 :                 if (PyLong_Check(value)) {
   22066           0 :                         unsigned long long test_var;
   22067           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22068           0 :                         if (PyErr_Occurred() != NULL) {
   22069           0 :                                 return -1;
   22070             :                         }
   22071           0 :                         if (test_var > uint_max) {
   22072           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22073             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22074           0 :                                 return -1;
   22075             :                         }
   22076           0 :                         object->extended_data = test_var;
   22077             :                 } else {
   22078           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22079             :                           PyLong_Type.tp_name);
   22080           0 :                         return -1;
   22081             :                 }
   22082             :         }
   22083           0 :         return 0;
   22084             : }
   22085             : 
   22086           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_problem(PyObject *obj, void *closure)
   22087             : {
   22088           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(obj);
   22089           0 :         PyObject *py_problem;
   22090           0 :         py_problem = PyLong_FromLong((uint16_t)(object->problem));
   22091           0 :         return py_problem;
   22092             : }
   22093             : 
   22094           0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_problem(PyObject *py_obj, PyObject *value, void *closure)
   22095             : {
   22096           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(py_obj);
   22097           0 :         if (value == NULL) {
   22098           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->problem");
   22099           0 :                 return -1;
   22100             :         }
   22101             :         {
   22102           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->problem));
   22103           0 :                 if (PyLong_Check(value)) {
   22104           0 :                         unsigned long long test_var;
   22105           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22106           0 :                         if (PyErr_Occurred() != NULL) {
   22107           0 :                                 return -1;
   22108             :                         }
   22109           0 :                         if (test_var > uint_max) {
   22110           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22111             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22112           0 :                                 return -1;
   22113             :                         }
   22114           0 :                         object->problem = test_var;
   22115             :                 } else {
   22116           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22117             :                           PyLong_Type.tp_name);
   22118           0 :                         return -1;
   22119             :                 }
   22120             :         }
   22121           0 :         return 0;
   22122             : }
   22123             : 
   22124           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_attid(PyObject *obj, void *closure)
   22125             : {
   22126           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(obj);
   22127           0 :         PyObject *py_attid;
   22128           0 :         py_attid = PyLong_FromUnsignedLongLong((uint32_t)(object->attid));
   22129           0 :         return py_attid;
   22130             : }
   22131             : 
   22132           0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_attid(PyObject *py_obj, PyObject *value, void *closure)
   22133             : {
   22134           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(py_obj);
   22135           0 :         if (value == NULL) {
   22136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attid");
   22137           0 :                 return -1;
   22138             :         }
   22139             :         {
   22140           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attid));
   22141           0 :                 if (PyLong_Check(value)) {
   22142           0 :                         unsigned long long test_var;
   22143           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22144           0 :                         if (PyErr_Occurred() != NULL) {
   22145           0 :                                 return -1;
   22146             :                         }
   22147           0 :                         if (test_var > uint_max) {
   22148           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22149             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22150           0 :                                 return -1;
   22151             :                         }
   22152           0 :                         object->attid = test_var;
   22153             :                 } else {
   22154           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22155             :                           PyLong_Type.tp_name);
   22156           0 :                         return -1;
   22157             :                 }
   22158             :         }
   22159           0 :         return 0;
   22160             : }
   22161             : 
   22162           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_is_val_returned(PyObject *obj, void *closure)
   22163             : {
   22164           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(obj);
   22165           0 :         PyObject *py_is_val_returned;
   22166           0 :         py_is_val_returned = PyLong_FromUnsignedLongLong((uint32_t)(object->is_val_returned));
   22167           0 :         return py_is_val_returned;
   22168             : }
   22169             : 
   22170           0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_is_val_returned(PyObject *py_obj, PyObject *value, void *closure)
   22171             : {
   22172           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(py_obj);
   22173           0 :         if (value == NULL) {
   22174           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_val_returned");
   22175           0 :                 return -1;
   22176             :         }
   22177             :         {
   22178           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_val_returned));
   22179           0 :                 if (PyLong_Check(value)) {
   22180           0 :                         unsigned long long test_var;
   22181           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22182           0 :                         if (PyErr_Occurred() != NULL) {
   22183           0 :                                 return -1;
   22184             :                         }
   22185           0 :                         if (test_var > uint_max) {
   22186           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22187             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22188           0 :                                 return -1;
   22189             :                         }
   22190           0 :                         object->is_val_returned = test_var;
   22191             :                 } else {
   22192           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22193             :                           PyLong_Type.tp_name);
   22194           0 :                         return -1;
   22195             :                 }
   22196             :         }
   22197           0 :         return 0;
   22198             : }
   22199             : 
   22200           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_attr_val(PyObject *obj, void *closure)
   22201             : {
   22202           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(obj);
   22203           0 :         PyObject *py_attr_val;
   22204           0 :         py_attr_val = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, pytalloc_get_mem_ctx(obj), &object->attr_val);
   22205           0 :         return py_attr_val;
   22206             : }
   22207             : 
   22208           0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_attr_val(PyObject *py_obj, PyObject *value, void *closure)
   22209             : {
   22210           0 :         struct drsuapi_DsAddEntry_AttrErr_V1 *object = pytalloc_get_ptr(py_obj);
   22211           0 :         if (value == NULL) {
   22212           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attr_val");
   22213           0 :                 return -1;
   22214             :         }
   22215           0 :         PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, value, return -1;);
   22216           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22217           0 :                 PyErr_NoMemory();
   22218           0 :                 return -1;
   22219             :         }
   22220           0 :         object->attr_val = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(value);
   22221           0 :         return 0;
   22222             : }
   22223             : 
   22224             : static PyGetSetDef py_drsuapi_DsAddEntry_AttrErr_V1_getsetters[] = {
   22225             :         {
   22226             :                 .name = discard_const_p(char, "dsid"),
   22227             :                 .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_dsid,
   22228             :                 .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_dsid,
   22229             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22230             :         },
   22231             :         {
   22232             :                 .name = discard_const_p(char, "extended_err"),
   22233             :                 .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_err,
   22234             :                 .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_err,
   22235             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   22236             :         },
   22237             :         {
   22238             :                 .name = discard_const_p(char, "extended_data"),
   22239             :                 .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_data,
   22240             :                 .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_data,
   22241             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22242             :         },
   22243             :         {
   22244             :                 .name = discard_const_p(char, "problem"),
   22245             :                 .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_problem,
   22246             :                 .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_problem,
   22247             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22248             :         },
   22249             :         {
   22250             :                 .name = discard_const_p(char, "attid"),
   22251             :                 .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_attid,
   22252             :                 .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_attid,
   22253             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
   22254             :         },
   22255             :         {
   22256             :                 .name = discard_const_p(char, "is_val_returned"),
   22257             :                 .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_is_val_returned,
   22258             :                 .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_is_val_returned,
   22259             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22260             :         },
   22261             :         {
   22262             :                 .name = discard_const_p(char, "attr_val"),
   22263             :                 .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_attr_val,
   22264             :                 .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_attr_val,
   22265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeValue")
   22266             :         },
   22267             :         { .name = NULL }
   22268             : };
   22269             : 
   22270           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22271             : {
   22272           0 :         return pytalloc_new(struct drsuapi_DsAddEntry_AttrErr_V1, type);
   22273             : }
   22274             : 
   22275             : 
   22276             : static PyTypeObject drsuapi_DsAddEntry_AttrErr_V1_Type = {
   22277             :         PyVarObject_HEAD_INIT(NULL, 0)
   22278             :         .tp_name = "drsuapi.DsAddEntry_AttrErr_V1",
   22279             :         .tp_getset = py_drsuapi_DsAddEntry_AttrErr_V1_getsetters,
   22280             :         .tp_methods = NULL,
   22281             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22282             :         .tp_new = py_drsuapi_DsAddEntry_AttrErr_V1_new,
   22283             : };
   22284             : 
   22285             : 
   22286           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_next(PyObject *obj, void *closure)
   22287             : {
   22288           0 :         struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = pytalloc_get_ptr(obj);
   22289           0 :         PyObject *py_next;
   22290           0 :         if (object->next == NULL) {
   22291           0 :                 Py_RETURN_NONE;
   22292             :         }
   22293           0 :         if (object->next == NULL) {
   22294           0 :                 py_next = Py_None;
   22295           0 :                 Py_INCREF(py_next);
   22296             :         } else {
   22297           0 :                 py_next = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, object->next, object->next);
   22298             :         }
   22299           0 :         return py_next;
   22300             : }
   22301             : 
   22302           0 : static int py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
   22303             : {
   22304           0 :         struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   22305           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next));
   22306           0 :         if (value == NULL) {
   22307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next");
   22308           0 :                 return -1;
   22309             :         }
   22310           0 :         if (value == Py_None) {
   22311           0 :                 object->next = NULL;
   22312             :         } else {
   22313           0 :                 object->next = NULL;
   22314           0 :                 PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, value, return -1;);
   22315           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22316           0 :                         PyErr_NoMemory();
   22317           0 :                         return -1;
   22318             :                 }
   22319           0 :                 object->next = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(value);
   22320             :         }
   22321           0 :         return 0;
   22322             : }
   22323             : 
   22324           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_err_data(PyObject *obj, void *closure)
   22325             : {
   22326           0 :         struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = pytalloc_get_ptr(obj);
   22327           0 :         PyObject *py_err_data;
   22328           0 :         py_err_data = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErr_V1_Type, pytalloc_get_mem_ctx(obj), &object->err_data);
   22329           0 :         return py_err_data;
   22330             : }
   22331             : 
   22332           0 : static int py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_err_data(PyObject *py_obj, PyObject *value, void *closure)
   22333             : {
   22334           0 :         struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   22335           0 :         if (value == NULL) {
   22336           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->err_data");
   22337           0 :                 return -1;
   22338             :         }
   22339           0 :         PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErr_V1_Type, value, return -1;);
   22340           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22341           0 :                 PyErr_NoMemory();
   22342           0 :                 return -1;
   22343             :         }
   22344           0 :         object->err_data = *(struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(value);
   22345           0 :         return 0;
   22346             : }
   22347             : 
   22348             : static PyGetSetDef py_drsuapi_DsAddEntry_AttrErrListItem_V1_getsetters[] = {
   22349             :         {
   22350             :                 .name = discard_const_p(char, "next"),
   22351             :                 .get = py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_next,
   22352             :                 .set = py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_next,
   22353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_AttrErrListItem_V1")
   22354             :         },
   22355             :         {
   22356             :                 .name = discard_const_p(char, "err_data"),
   22357             :                 .get = py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_err_data,
   22358             :                 .set = py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_err_data,
   22359             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_AttrErr_V1")
   22360             :         },
   22361             :         { .name = NULL }
   22362             : };
   22363             : 
   22364           0 : static PyObject *py_drsuapi_DsAddEntry_AttrErrListItem_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22365             : {
   22366           0 :         return pytalloc_new(struct drsuapi_DsAddEntry_AttrErrListItem_V1, type);
   22367             : }
   22368             : 
   22369             : 
   22370             : static PyTypeObject drsuapi_DsAddEntry_AttrErrListItem_V1_Type = {
   22371             :         PyVarObject_HEAD_INIT(NULL, 0)
   22372             :         .tp_name = "drsuapi.DsAddEntry_AttrErrListItem_V1",
   22373             :         .tp_getset = py_drsuapi_DsAddEntry_AttrErrListItem_V1_getsetters,
   22374             :         .tp_methods = NULL,
   22375             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22376             :         .tp_new = py_drsuapi_DsAddEntry_AttrErrListItem_V1_new,
   22377             : };
   22378             : 
   22379             : 
   22380           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_id(PyObject *obj, void *closure)
   22381             : {
   22382           0 :         struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = pytalloc_get_ptr(obj);
   22383           0 :         PyObject *py_id;
   22384           0 :         if (object->id == NULL) {
   22385           0 :                 Py_RETURN_NONE;
   22386             :         }
   22387           0 :         if (object->id == NULL) {
   22388           0 :                 py_id = Py_None;
   22389           0 :                 Py_INCREF(py_id);
   22390             :         } else {
   22391           0 :                 py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
   22392             :         }
   22393           0 :         return py_id;
   22394             : }
   22395             : 
   22396           0 : static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_id(PyObject *py_obj, PyObject *value, void *closure)
   22397             : {
   22398           0 :         struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = pytalloc_get_ptr(py_obj);
   22399           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id));
   22400           0 :         if (value == NULL) {
   22401           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id");
   22402           0 :                 return -1;
   22403             :         }
   22404           0 :         if (value == Py_None) {
   22405           0 :                 object->id = NULL;
   22406             :         } else {
   22407           0 :                 object->id = NULL;
   22408           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   22409           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22410           0 :                         PyErr_NoMemory();
   22411           0 :                         return -1;
   22412             :                 }
   22413           0 :                 object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   22414             :         }
   22415           0 :         return 0;
   22416             : }
   22417             : 
   22418           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_count(PyObject *obj, void *closure)
   22419             : {
   22420           0 :         struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = pytalloc_get_ptr(obj);
   22421           0 :         PyObject *py_count;
   22422           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   22423           0 :         return py_count;
   22424             : }
   22425             : 
   22426           0 : static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_count(PyObject *py_obj, PyObject *value, void *closure)
   22427             : {
   22428           0 :         struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = pytalloc_get_ptr(py_obj);
   22429           0 :         if (value == NULL) {
   22430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   22431           0 :                 return -1;
   22432             :         }
   22433             :         {
   22434           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   22435           0 :                 if (PyLong_Check(value)) {
   22436           0 :                         unsigned long long test_var;
   22437           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22438           0 :                         if (PyErr_Occurred() != NULL) {
   22439           0 :                                 return -1;
   22440             :                         }
   22441           0 :                         if (test_var > uint_max) {
   22442           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22443             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22444           0 :                                 return -1;
   22445             :                         }
   22446           0 :                         object->count = test_var;
   22447             :                 } else {
   22448           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22449             :                           PyLong_Type.tp_name);
   22450           0 :                         return -1;
   22451             :                 }
   22452             :         }
   22453           0 :         return 0;
   22454             : }
   22455             : 
   22456           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_first(PyObject *obj, void *closure)
   22457             : {
   22458           0 :         struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = pytalloc_get_ptr(obj);
   22459           0 :         PyObject *py_first;
   22460           0 :         py_first = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, pytalloc_get_mem_ctx(obj), &object->first);
   22461           0 :         return py_first;
   22462             : }
   22463             : 
   22464           0 : static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_first(PyObject *py_obj, PyObject *value, void *closure)
   22465             : {
   22466           0 :         struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = pytalloc_get_ptr(py_obj);
   22467           0 :         if (value == NULL) {
   22468           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first");
   22469           0 :                 return -1;
   22470             :         }
   22471           0 :         PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, value, return -1;);
   22472           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22473           0 :                 PyErr_NoMemory();
   22474           0 :                 return -1;
   22475             :         }
   22476           0 :         object->first = *(struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(value);
   22477           0 :         return 0;
   22478             : }
   22479             : 
   22480             : static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Attr_V1_getsetters[] = {
   22481             :         {
   22482             :                 .name = discard_const_p(char, "id"),
   22483             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_id,
   22484             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_id,
   22485             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   22486             :         },
   22487             :         {
   22488             :                 .name = discard_const_p(char, "count"),
   22489             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_count,
   22490             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_count,
   22491             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22492             :         },
   22493             :         {
   22494             :                 .name = discard_const_p(char, "first"),
   22495             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_first,
   22496             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_first,
   22497             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_AttrErrListItem_V1")
   22498             :         },
   22499             :         { .name = NULL }
   22500             : };
   22501             : 
   22502           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22503             : {
   22504           0 :         return pytalloc_new(struct drsuapi_DsAddEntryErrorInfo_Attr_V1, type);
   22505             : }
   22506             : 
   22507             : 
   22508             : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Attr_V1_Type = {
   22509             :         PyVarObject_HEAD_INIT(NULL, 0)
   22510             :         .tp_name = "drsuapi.DsAddEntryErrorInfo_Attr_V1",
   22511             :         .tp_getset = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_getsetters,
   22512             :         .tp_methods = NULL,
   22513             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22514             :         .tp_new = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_new,
   22515             : };
   22516             : 
   22517             : 
   22518           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_dsid(PyObject *obj, void *closure)
   22519             : {
   22520           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(obj);
   22521           0 :         PyObject *py_dsid;
   22522           0 :         py_dsid = PyLong_FromUnsignedLongLong((uint32_t)(object->dsid));
   22523           0 :         return py_dsid;
   22524             : }
   22525             : 
   22526           0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
   22527             : {
   22528           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(py_obj);
   22529           0 :         if (value == NULL) {
   22530           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
   22531           0 :                 return -1;
   22532             :         }
   22533             :         {
   22534           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
   22535           0 :                 if (PyLong_Check(value)) {
   22536           0 :                         unsigned long long test_var;
   22537           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22538           0 :                         if (PyErr_Occurred() != NULL) {
   22539           0 :                                 return -1;
   22540             :                         }
   22541           0 :                         if (test_var > uint_max) {
   22542           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22543             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22544           0 :                                 return -1;
   22545             :                         }
   22546           0 :                         object->dsid = test_var;
   22547             :                 } else {
   22548           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22549             :                           PyLong_Type.tp_name);
   22550           0 :                         return -1;
   22551             :                 }
   22552             :         }
   22553           0 :         return 0;
   22554             : }
   22555             : 
   22556           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_err(PyObject *obj, void *closure)
   22557             : {
   22558           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(obj);
   22559           0 :         PyObject *py_extended_err;
   22560           0 :         py_extended_err = PyErr_FromWERROR(object->extended_err);
   22561           0 :         return py_extended_err;
   22562             : }
   22563             : 
   22564           0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
   22565             : {
   22566           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(py_obj);
   22567           0 :         if (value == NULL) {
   22568           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
   22569           0 :                 return -1;
   22570             :         }
   22571           0 :         object->extended_err = W_ERROR(PyLong_AsLong(value));
   22572           0 :         return 0;
   22573             : }
   22574             : 
   22575           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_data(PyObject *obj, void *closure)
   22576             : {
   22577           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(obj);
   22578           0 :         PyObject *py_extended_data;
   22579           0 :         py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_data));
   22580           0 :         return py_extended_data;
   22581             : }
   22582             : 
   22583           0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
   22584             : {
   22585           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(py_obj);
   22586           0 :         if (value == NULL) {
   22587           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
   22588           0 :                 return -1;
   22589             :         }
   22590             :         {
   22591           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
   22592           0 :                 if (PyLong_Check(value)) {
   22593           0 :                         unsigned long long test_var;
   22594           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22595           0 :                         if (PyErr_Occurred() != NULL) {
   22596           0 :                                 return -1;
   22597             :                         }
   22598           0 :                         if (test_var > uint_max) {
   22599           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22600             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22601           0 :                                 return -1;
   22602             :                         }
   22603           0 :                         object->extended_data = test_var;
   22604             :                 } else {
   22605           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22606             :                           PyLong_Type.tp_name);
   22607           0 :                         return -1;
   22608             :                 }
   22609             :         }
   22610           0 :         return 0;
   22611             : }
   22612             : 
   22613           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_problem(PyObject *obj, void *closure)
   22614             : {
   22615           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(obj);
   22616           0 :         PyObject *py_problem;
   22617           0 :         py_problem = PyLong_FromLong((uint16_t)(object->problem));
   22618           0 :         return py_problem;
   22619             : }
   22620             : 
   22621           0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_problem(PyObject *py_obj, PyObject *value, void *closure)
   22622             : {
   22623           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(py_obj);
   22624           0 :         if (value == NULL) {
   22625           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->problem");
   22626           0 :                 return -1;
   22627             :         }
   22628             :         {
   22629           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->problem));
   22630           0 :                 if (PyLong_Check(value)) {
   22631           0 :                         unsigned long long test_var;
   22632           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22633           0 :                         if (PyErr_Occurred() != NULL) {
   22634           0 :                                 return -1;
   22635             :                         }
   22636           0 :                         if (test_var > uint_max) {
   22637           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22638             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22639           0 :                                 return -1;
   22640             :                         }
   22641           0 :                         object->problem = test_var;
   22642             :                 } else {
   22643           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22644             :                           PyLong_Type.tp_name);
   22645           0 :                         return -1;
   22646             :                 }
   22647             :         }
   22648           0 :         return 0;
   22649             : }
   22650             : 
   22651           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_id_matched(PyObject *obj, void *closure)
   22652             : {
   22653           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(obj);
   22654           0 :         PyObject *py_id_matched;
   22655           0 :         if (object->id_matched == NULL) {
   22656           0 :                 Py_RETURN_NONE;
   22657             :         }
   22658           0 :         if (object->id_matched == NULL) {
   22659           0 :                 py_id_matched = Py_None;
   22660           0 :                 Py_INCREF(py_id_matched);
   22661             :         } else {
   22662           0 :                 py_id_matched = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id_matched, object->id_matched);
   22663             :         }
   22664           0 :         return py_id_matched;
   22665             : }
   22666             : 
   22667           0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_id_matched(PyObject *py_obj, PyObject *value, void *closure)
   22668             : {
   22669           0 :         struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = pytalloc_get_ptr(py_obj);
   22670           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id_matched));
   22671           0 :         if (value == NULL) {
   22672           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id_matched");
   22673           0 :                 return -1;
   22674             :         }
   22675           0 :         if (value == Py_None) {
   22676           0 :                 object->id_matched = NULL;
   22677             :         } else {
   22678           0 :                 object->id_matched = NULL;
   22679           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   22680           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22681           0 :                         PyErr_NoMemory();
   22682           0 :                         return -1;
   22683             :                 }
   22684           0 :                 object->id_matched = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   22685             :         }
   22686           0 :         return 0;
   22687             : }
   22688             : 
   22689             : static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Name_V1_getsetters[] = {
   22690             :         {
   22691             :                 .name = discard_const_p(char, "dsid"),
   22692             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_dsid,
   22693             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_dsid,
   22694             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22695             :         },
   22696             :         {
   22697             :                 .name = discard_const_p(char, "extended_err"),
   22698             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_err,
   22699             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_err,
   22700             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   22701             :         },
   22702             :         {
   22703             :                 .name = discard_const_p(char, "extended_data"),
   22704             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_data,
   22705             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_data,
   22706             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   22707             :         },
   22708             :         {
   22709             :                 .name = discard_const_p(char, "problem"),
   22710             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_problem,
   22711             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_problem,
   22712             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22713             :         },
   22714             :         {
   22715             :                 .name = discard_const_p(char, "id_matched"),
   22716             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_id_matched,
   22717             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_id_matched,
   22718             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   22719             :         },
   22720             :         { .name = NULL }
   22721             : };
   22722             : 
   22723           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22724             : {
   22725           0 :         return pytalloc_new(struct drsuapi_DsAddEntryErrorInfo_Name_V1, type);
   22726             : }
   22727             : 
   22728             : 
   22729             : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Name_V1_Type = {
   22730             :         PyVarObject_HEAD_INIT(NULL, 0)
   22731             :         .tp_name = "drsuapi.DsAddEntryErrorInfo_Name_V1",
   22732             :         .tp_getset = py_drsuapi_DsAddEntryErrorInfo_Name_V1_getsetters,
   22733             :         .tp_methods = NULL,
   22734             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22735             :         .tp_new = py_drsuapi_DsAddEntryErrorInfo_Name_V1_new,
   22736             : };
   22737             : 
   22738             : 
   22739           0 : static PyObject *py_drsuapi_NameResOp_V1_get_name_res(PyObject *obj, void *closure)
   22740             : {
   22741           0 :         struct drsuapi_NameResOp_V1 *object = pytalloc_get_ptr(obj);
   22742           0 :         PyObject *py_name_res;
   22743           0 :         py_name_res = PyLong_FromLong((uint16_t)(object->name_res));
   22744           0 :         return py_name_res;
   22745             : }
   22746             : 
   22747           0 : static int py_drsuapi_NameResOp_V1_set_name_res(PyObject *py_obj, PyObject *value, void *closure)
   22748             : {
   22749           0 :         struct drsuapi_NameResOp_V1 *object = pytalloc_get_ptr(py_obj);
   22750           0 :         if (value == NULL) {
   22751           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name_res");
   22752           0 :                 return -1;
   22753             :         }
   22754             :         {
   22755           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->name_res));
   22756           0 :                 if (PyLong_Check(value)) {
   22757           0 :                         unsigned long long test_var;
   22758           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22759           0 :                         if (PyErr_Occurred() != NULL) {
   22760           0 :                                 return -1;
   22761             :                         }
   22762           0 :                         if (test_var > uint_max) {
   22763           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22764             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22765           0 :                                 return -1;
   22766             :                         }
   22767           0 :                         object->name_res = test_var;
   22768             :                 } else {
   22769           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22770             :                           PyLong_Type.tp_name);
   22771           0 :                         return -1;
   22772             :                 }
   22773             :         }
   22774           0 :         return 0;
   22775             : }
   22776             : 
   22777           0 : static PyObject *py_drsuapi_NameResOp_V1_get_unused_pad(PyObject *obj, void *closure)
   22778             : {
   22779           0 :         struct drsuapi_NameResOp_V1 *object = pytalloc_get_ptr(obj);
   22780           0 :         PyObject *py_unused_pad;
   22781           0 :         py_unused_pad = PyLong_FromLong((uint16_t)(object->unused_pad));
   22782           0 :         return py_unused_pad;
   22783             : }
   22784             : 
   22785           0 : static int py_drsuapi_NameResOp_V1_set_unused_pad(PyObject *py_obj, PyObject *value, void *closure)
   22786             : {
   22787           0 :         struct drsuapi_NameResOp_V1 *object = pytalloc_get_ptr(py_obj);
   22788           0 :         if (value == NULL) {
   22789           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unused_pad");
   22790           0 :                 return -1;
   22791             :         }
   22792             :         {
   22793           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unused_pad));
   22794           0 :                 if (PyLong_Check(value)) {
   22795           0 :                         unsigned long long test_var;
   22796           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22797           0 :                         if (PyErr_Occurred() != NULL) {
   22798           0 :                                 return -1;
   22799             :                         }
   22800           0 :                         if (test_var > uint_max) {
   22801           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22802             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22803           0 :                                 return -1;
   22804             :                         }
   22805           0 :                         object->unused_pad = test_var;
   22806             :                 } else {
   22807           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22808             :                           PyLong_Type.tp_name);
   22809           0 :                         return -1;
   22810             :                 }
   22811             :         }
   22812           0 :         return 0;
   22813             : }
   22814             : 
   22815           0 : static PyObject *py_drsuapi_NameResOp_V1_get_next_rdn(PyObject *obj, void *closure)
   22816             : {
   22817           0 :         struct drsuapi_NameResOp_V1 *object = pytalloc_get_ptr(obj);
   22818           0 :         PyObject *py_next_rdn;
   22819           0 :         py_next_rdn = PyLong_FromLong((uint16_t)(object->next_rdn));
   22820           0 :         return py_next_rdn;
   22821             : }
   22822             : 
   22823           0 : static int py_drsuapi_NameResOp_V1_set_next_rdn(PyObject *py_obj, PyObject *value, void *closure)
   22824             : {
   22825           0 :         struct drsuapi_NameResOp_V1 *object = pytalloc_get_ptr(py_obj);
   22826           0 :         if (value == NULL) {
   22827           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next_rdn");
   22828           0 :                 return -1;
   22829             :         }
   22830             :         {
   22831           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->next_rdn));
   22832           0 :                 if (PyLong_Check(value)) {
   22833           0 :                         unsigned long long test_var;
   22834           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   22835           0 :                         if (PyErr_Occurred() != NULL) {
   22836           0 :                                 return -1;
   22837             :                         }
   22838           0 :                         if (test_var > uint_max) {
   22839           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   22840             :                                   PyLong_Type.tp_name, uint_max, test_var);
   22841           0 :                                 return -1;
   22842             :                         }
   22843           0 :                         object->next_rdn = test_var;
   22844             :                 } else {
   22845           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   22846             :                           PyLong_Type.tp_name);
   22847           0 :                         return -1;
   22848             :                 }
   22849             :         }
   22850           0 :         return 0;
   22851             : }
   22852             : 
   22853             : static PyGetSetDef py_drsuapi_NameResOp_V1_getsetters[] = {
   22854             :         {
   22855             :                 .name = discard_const_p(char, "name_res"),
   22856             :                 .get = py_drsuapi_NameResOp_V1_get_name_res,
   22857             :                 .set = py_drsuapi_NameResOp_V1_set_name_res,
   22858             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   22859             :         },
   22860             :         {
   22861             :                 .name = discard_const_p(char, "unused_pad"),
   22862             :                 .get = py_drsuapi_NameResOp_V1_get_unused_pad,
   22863             :                 .set = py_drsuapi_NameResOp_V1_set_unused_pad,
   22864             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
   22865             :         },
   22866             :         {
   22867             :                 .name = discard_const_p(char, "next_rdn"),
   22868             :                 .get = py_drsuapi_NameResOp_V1_get_next_rdn,
   22869             :                 .set = py_drsuapi_NameResOp_V1_set_next_rdn,
   22870             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   22871             :         },
   22872             :         { .name = NULL }
   22873             : };
   22874             : 
   22875           0 : static PyObject *py_drsuapi_NameResOp_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22876             : {
   22877           0 :         return pytalloc_new(struct drsuapi_NameResOp_V1, type);
   22878             : }
   22879             : 
   22880             : 
   22881             : static PyTypeObject drsuapi_NameResOp_V1_Type = {
   22882             :         PyVarObject_HEAD_INIT(NULL, 0)
   22883             :         .tp_name = "drsuapi.NameResOp_V1",
   22884             :         .tp_getset = py_drsuapi_NameResOp_V1_getsetters,
   22885             :         .tp_methods = NULL,
   22886             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22887             :         .tp_new = py_drsuapi_NameResOp_V1_new,
   22888             : };
   22889             : 
   22890             : 
   22891           0 : static PyObject *py_drsuapi_DsaAddressListItem_V1_get_next(PyObject *obj, void *closure)
   22892             : {
   22893           0 :         struct drsuapi_DsaAddressListItem_V1 *object = pytalloc_get_ptr(obj);
   22894           0 :         PyObject *py_next;
   22895           0 :         if (object->next == NULL) {
   22896           0 :                 Py_RETURN_NONE;
   22897             :         }
   22898           0 :         if (object->next == NULL) {
   22899           0 :                 py_next = Py_None;
   22900           0 :                 Py_INCREF(py_next);
   22901             :         } else {
   22902           0 :                 py_next = pytalloc_reference_ex(&drsuapi_DsaAddressListItem_V1_Type, object->next, object->next);
   22903             :         }
   22904           0 :         return py_next;
   22905             : }
   22906             : 
   22907           0 : static int py_drsuapi_DsaAddressListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
   22908             : {
   22909           0 :         struct drsuapi_DsaAddressListItem_V1 *object = pytalloc_get_ptr(py_obj);
   22910           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next));
   22911           0 :         if (value == NULL) {
   22912           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next");
   22913           0 :                 return -1;
   22914             :         }
   22915           0 :         if (value == Py_None) {
   22916           0 :                 object->next = NULL;
   22917             :         } else {
   22918           0 :                 object->next = NULL;
   22919           0 :                 PY_CHECK_TYPE(&drsuapi_DsaAddressListItem_V1_Type, value, return -1;);
   22920           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22921           0 :                         PyErr_NoMemory();
   22922           0 :                         return -1;
   22923             :                 }
   22924           0 :                 object->next = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(value);
   22925             :         }
   22926           0 :         return 0;
   22927             : }
   22928             : 
   22929           0 : static PyObject *py_drsuapi_DsaAddressListItem_V1_get_address(PyObject *obj, void *closure)
   22930             : {
   22931           0 :         struct drsuapi_DsaAddressListItem_V1 *object = pytalloc_get_ptr(obj);
   22932           0 :         PyObject *py_address;
   22933           0 :         if (object->address == NULL) {
   22934           0 :                 Py_RETURN_NONE;
   22935             :         }
   22936           0 :         if (object->address == NULL) {
   22937           0 :                 py_address = Py_None;
   22938           0 :                 Py_INCREF(py_address);
   22939             :         } else {
   22940           0 :                 py_address = pytalloc_reference_ex(lsa_String_Type, object->address, object->address);
   22941             :         }
   22942           0 :         return py_address;
   22943             : }
   22944             : 
   22945           0 : static int py_drsuapi_DsaAddressListItem_V1_set_address(PyObject *py_obj, PyObject *value, void *closure)
   22946             : {
   22947           0 :         struct drsuapi_DsaAddressListItem_V1 *object = pytalloc_get_ptr(py_obj);
   22948           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->address));
   22949           0 :         if (value == NULL) {
   22950           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->address");
   22951           0 :                 return -1;
   22952             :         }
   22953           0 :         if (value == Py_None) {
   22954           0 :                 object->address = NULL;
   22955             :         } else {
   22956           0 :                 object->address = NULL;
   22957           0 :                 PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
   22958           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   22959           0 :                         PyErr_NoMemory();
   22960           0 :                         return -1;
   22961             :                 }
   22962           0 :                 object->address = (struct lsa_String *)pytalloc_get_ptr(value);
   22963             :         }
   22964           0 :         return 0;
   22965             : }
   22966             : 
   22967             : static PyGetSetDef py_drsuapi_DsaAddressListItem_V1_getsetters[] = {
   22968             :         {
   22969             :                 .name = discard_const_p(char, "next"),
   22970             :                 .get = py_drsuapi_DsaAddressListItem_V1_get_next,
   22971             :                 .set = py_drsuapi_DsaAddressListItem_V1_set_next,
   22972             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsaAddressListItem_V1")
   22973             :         },
   22974             :         {
   22975             :                 .name = discard_const_p(char, "address"),
   22976             :                 .get = py_drsuapi_DsaAddressListItem_V1_get_address,
   22977             :                 .set = py_drsuapi_DsaAddressListItem_V1_set_address,
   22978             :                 .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
   22979             :         },
   22980             :         { .name = NULL }
   22981             : };
   22982             : 
   22983           0 : static PyObject *py_drsuapi_DsaAddressListItem_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   22984             : {
   22985           0 :         return pytalloc_new(struct drsuapi_DsaAddressListItem_V1, type);
   22986             : }
   22987             : 
   22988             : 
   22989             : static PyTypeObject drsuapi_DsaAddressListItem_V1_Type = {
   22990             :         PyVarObject_HEAD_INIT(NULL, 0)
   22991             :         .tp_name = "drsuapi.DsaAddressListItem_V1",
   22992             :         .tp_getset = py_drsuapi_DsaAddressListItem_V1_getsetters,
   22993             :         .tp_methods = NULL,
   22994             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   22995             :         .tp_new = py_drsuapi_DsaAddressListItem_V1_new,
   22996             : };
   22997             : 
   22998             : 
   22999           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_id_target(PyObject *obj, void *closure)
   23000             : {
   23001           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23002           0 :         PyObject *py_id_target;
   23003           0 :         if (object->id_target == NULL) {
   23004           0 :                 Py_RETURN_NONE;
   23005             :         }
   23006           0 :         if (object->id_target == NULL) {
   23007           0 :                 py_id_target = Py_None;
   23008           0 :                 Py_INCREF(py_id_target);
   23009             :         } else {
   23010           0 :                 py_id_target = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id_target, object->id_target);
   23011             :         }
   23012           0 :         return py_id_target;
   23013             : }
   23014             : 
   23015           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_id_target(PyObject *py_obj, PyObject *value, void *closure)
   23016             : {
   23017           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23018           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id_target));
   23019           0 :         if (value == NULL) {
   23020           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id_target");
   23021           0 :                 return -1;
   23022             :         }
   23023           0 :         if (value == Py_None) {
   23024           0 :                 object->id_target = NULL;
   23025             :         } else {
   23026           0 :                 object->id_target = NULL;
   23027           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   23028           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23029           0 :                         PyErr_NoMemory();
   23030           0 :                         return -1;
   23031             :                 }
   23032           0 :                 object->id_target = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   23033             :         }
   23034           0 :         return 0;
   23035             : }
   23036             : 
   23037           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_op_state(PyObject *obj, void *closure)
   23038             : {
   23039           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23040           0 :         PyObject *py_op_state;
   23041           0 :         py_op_state = pytalloc_reference_ex(&drsuapi_NameResOp_V1_Type, pytalloc_get_mem_ctx(obj), &object->op_state);
   23042           0 :         return py_op_state;
   23043             : }
   23044             : 
   23045           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_op_state(PyObject *py_obj, PyObject *value, void *closure)
   23046             : {
   23047           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23048           0 :         if (value == NULL) {
   23049           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->op_state");
   23050           0 :                 return -1;
   23051             :         }
   23052           0 :         PY_CHECK_TYPE(&drsuapi_NameResOp_V1_Type, value, return -1;);
   23053           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23054           0 :                 PyErr_NoMemory();
   23055           0 :                 return -1;
   23056             :         }
   23057           0 :         object->op_state = *(struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(value);
   23058           0 :         return 0;
   23059             : }
   23060             : 
   23061           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_alias(PyObject *obj, void *closure)
   23062             : {
   23063           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23064           0 :         PyObject *py_rdn_alias;
   23065           0 :         py_rdn_alias = PyLong_FromLong((uint16_t)(object->rdn_alias));
   23066           0 :         return py_rdn_alias;
   23067             : }
   23068             : 
   23069           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_alias(PyObject *py_obj, PyObject *value, void *closure)
   23070             : {
   23071           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23072           0 :         if (value == NULL) {
   23073           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rdn_alias");
   23074           0 :                 return -1;
   23075             :         }
   23076             :         {
   23077           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rdn_alias));
   23078           0 :                 if (PyLong_Check(value)) {
   23079           0 :                         unsigned long long test_var;
   23080           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23081           0 :                         if (PyErr_Occurred() != NULL) {
   23082           0 :                                 return -1;
   23083             :                         }
   23084           0 :                         if (test_var > uint_max) {
   23085           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23086             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23087           0 :                                 return -1;
   23088             :                         }
   23089           0 :                         object->rdn_alias = test_var;
   23090             :                 } else {
   23091           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23092             :                           PyLong_Type.tp_name);
   23093           0 :                         return -1;
   23094             :                 }
   23095             :         }
   23096           0 :         return 0;
   23097             : }
   23098             : 
   23099           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_internal(PyObject *obj, void *closure)
   23100             : {
   23101           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23102           0 :         PyObject *py_rdn_internal;
   23103           0 :         py_rdn_internal = PyLong_FromLong((uint16_t)(object->rdn_internal));
   23104           0 :         return py_rdn_internal;
   23105             : }
   23106             : 
   23107           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_internal(PyObject *py_obj, PyObject *value, void *closure)
   23108             : {
   23109           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23110           0 :         if (value == NULL) {
   23111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rdn_internal");
   23112           0 :                 return -1;
   23113             :         }
   23114             :         {
   23115           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rdn_internal));
   23116           0 :                 if (PyLong_Check(value)) {
   23117           0 :                         unsigned long long test_var;
   23118           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23119           0 :                         if (PyErr_Occurred() != NULL) {
   23120           0 :                                 return -1;
   23121             :                         }
   23122           0 :                         if (test_var > uint_max) {
   23123           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23124             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23125           0 :                                 return -1;
   23126             :                         }
   23127           0 :                         object->rdn_internal = test_var;
   23128             :                 } else {
   23129           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23130             :                           PyLong_Type.tp_name);
   23131           0 :                         return -1;
   23132             :                 }
   23133             :         }
   23134           0 :         return 0;
   23135             : }
   23136             : 
   23137           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_ref_type(PyObject *obj, void *closure)
   23138             : {
   23139           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23140           0 :         PyObject *py_ref_type;
   23141           0 :         py_ref_type = PyLong_FromLong((uint16_t)(object->ref_type));
   23142           0 :         return py_ref_type;
   23143             : }
   23144             : 
   23145           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_ref_type(PyObject *py_obj, PyObject *value, void *closure)
   23146             : {
   23147           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23148           0 :         if (value == NULL) {
   23149           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ref_type");
   23150           0 :                 return -1;
   23151             :         }
   23152             :         {
   23153           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ref_type));
   23154           0 :                 if (PyLong_Check(value)) {
   23155           0 :                         unsigned long long test_var;
   23156           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23157           0 :                         if (PyErr_Occurred() != NULL) {
   23158           0 :                                 return -1;
   23159             :                         }
   23160           0 :                         if (test_var > uint_max) {
   23161           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23162             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23163           0 :                                 return -1;
   23164             :                         }
   23165           0 :                         object->ref_type = test_var;
   23166             :                 } else {
   23167           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23168             :                           PyLong_Type.tp_name);
   23169           0 :                         return -1;
   23170             :                 }
   23171             :         }
   23172           0 :         return 0;
   23173             : }
   23174             : 
   23175           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list_count(PyObject *obj, void *closure)
   23176             : {
   23177           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23178           0 :         PyObject *py_addr_list_count;
   23179           0 :         py_addr_list_count = PyLong_FromLong((uint16_t)(object->addr_list_count));
   23180           0 :         return py_addr_list_count;
   23181             : }
   23182             : 
   23183           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list_count(PyObject *py_obj, PyObject *value, void *closure)
   23184             : {
   23185           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23186           0 :         if (value == NULL) {
   23187           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_list_count");
   23188           0 :                 return -1;
   23189             :         }
   23190             :         {
   23191           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_list_count));
   23192           0 :                 if (PyLong_Check(value)) {
   23193           0 :                         unsigned long long test_var;
   23194           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23195           0 :                         if (PyErr_Occurred() != NULL) {
   23196           0 :                                 return -1;
   23197             :                         }
   23198           0 :                         if (test_var > uint_max) {
   23199           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23200             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23201           0 :                                 return -1;
   23202             :                         }
   23203           0 :                         object->addr_list_count = test_var;
   23204             :                 } else {
   23205           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23206             :                           PyLong_Type.tp_name);
   23207           0 :                         return -1;
   23208             :                 }
   23209             :         }
   23210           0 :         return 0;
   23211             : }
   23212             : 
   23213           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list(PyObject *obj, void *closure)
   23214             : {
   23215           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23216           0 :         PyObject *py_addr_list;
   23217           0 :         if (object->addr_list == NULL) {
   23218           0 :                 Py_RETURN_NONE;
   23219             :         }
   23220           0 :         if (object->addr_list == NULL) {
   23221           0 :                 py_addr_list = Py_None;
   23222           0 :                 Py_INCREF(py_addr_list);
   23223             :         } else {
   23224           0 :                 py_addr_list = pytalloc_reference_ex(&drsuapi_DsaAddressListItem_V1_Type, object->addr_list, object->addr_list);
   23225             :         }
   23226           0 :         return py_addr_list;
   23227             : }
   23228             : 
   23229           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list(PyObject *py_obj, PyObject *value, void *closure)
   23230             : {
   23231           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23232           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr_list));
   23233           0 :         if (value == NULL) {
   23234           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_list");
   23235           0 :                 return -1;
   23236             :         }
   23237           0 :         if (value == Py_None) {
   23238           0 :                 object->addr_list = NULL;
   23239             :         } else {
   23240           0 :                 object->addr_list = NULL;
   23241           0 :                 PY_CHECK_TYPE(&drsuapi_DsaAddressListItem_V1_Type, value, return -1;);
   23242           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23243           0 :                         PyErr_NoMemory();
   23244           0 :                         return -1;
   23245             :                 }
   23246           0 :                 object->addr_list = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(value);
   23247             :         }
   23248           0 :         return 0;
   23249             : }
   23250             : 
   23251           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_next(PyObject *obj, void *closure)
   23252             : {
   23253           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23254           0 :         PyObject *py_next;
   23255           0 :         if (object->next == NULL) {
   23256           0 :                 Py_RETURN_NONE;
   23257             :         }
   23258           0 :         if (object->next == NULL) {
   23259           0 :                 py_next = Py_None;
   23260           0 :                 Py_INCREF(py_next);
   23261             :         } else {
   23262           0 :                 py_next = pytalloc_reference_ex(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, object->next, object->next);
   23263             :         }
   23264           0 :         return py_next;
   23265             : }
   23266             : 
   23267           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
   23268             : {
   23269           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23270           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next));
   23271           0 :         if (value == NULL) {
   23272           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next");
   23273           0 :                 return -1;
   23274             :         }
   23275           0 :         if (value == Py_None) {
   23276           0 :                 object->next = NULL;
   23277             :         } else {
   23278           0 :                 object->next = NULL;
   23279           0 :                 PY_CHECK_TYPE(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, value, return -1;);
   23280           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23281           0 :                         PyErr_NoMemory();
   23282           0 :                         return -1;
   23283             :                 }
   23284           0 :                 object->next = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(value);
   23285             :         }
   23286           0 :         return 0;
   23287             : }
   23288             : 
   23289           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_is_choice_set(PyObject *obj, void *closure)
   23290             : {
   23291           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23292           0 :         PyObject *py_is_choice_set;
   23293           0 :         py_is_choice_set = PyLong_FromUnsignedLongLong((uint32_t)(object->is_choice_set));
   23294           0 :         return py_is_choice_set;
   23295             : }
   23296             : 
   23297           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_is_choice_set(PyObject *py_obj, PyObject *value, void *closure)
   23298             : {
   23299           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23300           0 :         if (value == NULL) {
   23301           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_choice_set");
   23302           0 :                 return -1;
   23303             :         }
   23304             :         {
   23305           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_choice_set));
   23306           0 :                 if (PyLong_Check(value)) {
   23307           0 :                         unsigned long long test_var;
   23308           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23309           0 :                         if (PyErr_Occurred() != NULL) {
   23310           0 :                                 return -1;
   23311             :                         }
   23312           0 :                         if (test_var > uint_max) {
   23313           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23314             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23315           0 :                                 return -1;
   23316             :                         }
   23317           0 :                         object->is_choice_set = test_var;
   23318             :                 } else {
   23319           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23320             :                           PyLong_Type.tp_name);
   23321           0 :                         return -1;
   23322             :                 }
   23323             :         }
   23324           0 :         return 0;
   23325             : }
   23326             : 
   23327           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_choice(PyObject *obj, void *closure)
   23328             : {
   23329           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(obj);
   23330           0 :         PyObject *py_choice;
   23331           0 :         py_choice = PyLong_FromLong((uint16_t)(object->choice));
   23332           0 :         return py_choice;
   23333             : }
   23334             : 
   23335           0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_choice(PyObject *py_obj, PyObject *value, void *closure)
   23336             : {
   23337           0 :         struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = pytalloc_get_ptr(py_obj);
   23338           0 :         if (value == NULL) {
   23339           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->choice");
   23340           0 :                 return -1;
   23341             :         }
   23342             :         {
   23343           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->choice));
   23344           0 :                 if (PyLong_Check(value)) {
   23345           0 :                         unsigned long long test_var;
   23346           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23347           0 :                         if (PyErr_Occurred() != NULL) {
   23348           0 :                                 return -1;
   23349             :                         }
   23350           0 :                         if (test_var > uint_max) {
   23351           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23352             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23353           0 :                                 return -1;
   23354             :                         }
   23355           0 :                         object->choice = test_var;
   23356             :                 } else {
   23357           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23358             :                           PyLong_Type.tp_name);
   23359           0 :                         return -1;
   23360             :                 }
   23361             :         }
   23362           0 :         return 0;
   23363             : }
   23364             : 
   23365             : static PyGetSetDef py_drsuapi_DsAddEntry_RefErrListItem_V1_getsetters[] = {
   23366             :         {
   23367             :                 .name = discard_const_p(char, "id_target"),
   23368             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_id_target,
   23369             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_id_target,
   23370             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   23371             :         },
   23372             :         {
   23373             :                 .name = discard_const_p(char, "op_state"),
   23374             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_op_state,
   23375             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_op_state,
   23376             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_NameResOp_V1")
   23377             :         },
   23378             :         {
   23379             :                 .name = discard_const_p(char, "rdn_alias"),
   23380             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_alias,
   23381             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_alias,
   23382             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   23383             :         },
   23384             :         {
   23385             :                 .name = discard_const_p(char, "rdn_internal"),
   23386             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_internal,
   23387             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_internal,
   23388             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   23389             :         },
   23390             :         {
   23391             :                 .name = discard_const_p(char, "ref_type"),
   23392             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_ref_type,
   23393             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_ref_type,
   23394             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_RefType")
   23395             :         },
   23396             :         {
   23397             :                 .name = discard_const_p(char, "addr_list_count"),
   23398             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list_count,
   23399             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list_count,
   23400             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   23401             :         },
   23402             :         {
   23403             :                 .name = discard_const_p(char, "addr_list"),
   23404             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list,
   23405             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list,
   23406             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsaAddressListItem_V1")
   23407             :         },
   23408             :         {
   23409             :                 .name = discard_const_p(char, "next"),
   23410             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_next,
   23411             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_next,
   23412             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_RefErrListItem_V1")
   23413             :         },
   23414             :         {
   23415             :                 .name = discard_const_p(char, "is_choice_set"),
   23416             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_is_choice_set,
   23417             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_is_choice_set,
   23418             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23419             :         },
   23420             :         {
   23421             :                 .name = discard_const_p(char, "choice"),
   23422             :                 .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_choice,
   23423             :                 .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_choice,
   23424             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_ChoiceType")
   23425             :         },
   23426             :         { .name = NULL }
   23427             : };
   23428             : 
   23429           0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23430             : {
   23431           0 :         return pytalloc_new(struct drsuapi_DsAddEntry_RefErrListItem_V1, type);
   23432             : }
   23433             : 
   23434             : 
   23435             : static PyTypeObject drsuapi_DsAddEntry_RefErrListItem_V1_Type = {
   23436             :         PyVarObject_HEAD_INIT(NULL, 0)
   23437             :         .tp_name = "drsuapi.DsAddEntry_RefErrListItem_V1",
   23438             :         .tp_getset = py_drsuapi_DsAddEntry_RefErrListItem_V1_getsetters,
   23439             :         .tp_methods = NULL,
   23440             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23441             :         .tp_new = py_drsuapi_DsAddEntry_RefErrListItem_V1_new,
   23442             : };
   23443             : 
   23444             : 
   23445           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_dsid(PyObject *obj, void *closure)
   23446             : {
   23447           0 :         struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = pytalloc_get_ptr(obj);
   23448           0 :         PyObject *py_dsid;
   23449           0 :         py_dsid = PyLong_FromUnsignedLongLong((uint32_t)(object->dsid));
   23450           0 :         return py_dsid;
   23451             : }
   23452             : 
   23453           0 : static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
   23454             : {
   23455           0 :         struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = pytalloc_get_ptr(py_obj);
   23456           0 :         if (value == NULL) {
   23457           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
   23458           0 :                 return -1;
   23459             :         }
   23460             :         {
   23461           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
   23462           0 :                 if (PyLong_Check(value)) {
   23463           0 :                         unsigned long long test_var;
   23464           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23465           0 :                         if (PyErr_Occurred() != NULL) {
   23466           0 :                                 return -1;
   23467             :                         }
   23468           0 :                         if (test_var > uint_max) {
   23469           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23470             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23471           0 :                                 return -1;
   23472             :                         }
   23473           0 :                         object->dsid = test_var;
   23474             :                 } else {
   23475           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23476             :                           PyLong_Type.tp_name);
   23477           0 :                         return -1;
   23478             :                 }
   23479             :         }
   23480           0 :         return 0;
   23481             : }
   23482             : 
   23483           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_err(PyObject *obj, void *closure)
   23484             : {
   23485           0 :         struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = pytalloc_get_ptr(obj);
   23486           0 :         PyObject *py_extended_err;
   23487           0 :         py_extended_err = PyErr_FromWERROR(object->extended_err);
   23488           0 :         return py_extended_err;
   23489             : }
   23490             : 
   23491           0 : static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
   23492             : {
   23493           0 :         struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = pytalloc_get_ptr(py_obj);
   23494           0 :         if (value == NULL) {
   23495           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
   23496           0 :                 return -1;
   23497             :         }
   23498           0 :         object->extended_err = W_ERROR(PyLong_AsLong(value));
   23499           0 :         return 0;
   23500             : }
   23501             : 
   23502           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_data(PyObject *obj, void *closure)
   23503             : {
   23504           0 :         struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = pytalloc_get_ptr(obj);
   23505           0 :         PyObject *py_extended_data;
   23506           0 :         py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_data));
   23507           0 :         return py_extended_data;
   23508             : }
   23509             : 
   23510           0 : static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
   23511             : {
   23512           0 :         struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = pytalloc_get_ptr(py_obj);
   23513           0 :         if (value == NULL) {
   23514           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
   23515           0 :                 return -1;
   23516             :         }
   23517             :         {
   23518           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
   23519           0 :                 if (PyLong_Check(value)) {
   23520           0 :                         unsigned long long test_var;
   23521           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23522           0 :                         if (PyErr_Occurred() != NULL) {
   23523           0 :                                 return -1;
   23524             :                         }
   23525           0 :                         if (test_var > uint_max) {
   23526           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23527             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23528           0 :                                 return -1;
   23529             :                         }
   23530           0 :                         object->extended_data = test_var;
   23531             :                 } else {
   23532           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23533             :                           PyLong_Type.tp_name);
   23534           0 :                         return -1;
   23535             :                 }
   23536             :         }
   23537           0 :         return 0;
   23538             : }
   23539             : 
   23540           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_refer(PyObject *obj, void *closure)
   23541             : {
   23542           0 :         struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = pytalloc_get_ptr(obj);
   23543           0 :         PyObject *py_refer;
   23544           0 :         py_refer = pytalloc_reference_ex(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, pytalloc_get_mem_ctx(obj), &object->refer);
   23545           0 :         return py_refer;
   23546             : }
   23547             : 
   23548           0 : static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_refer(PyObject *py_obj, PyObject *value, void *closure)
   23549             : {
   23550           0 :         struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = pytalloc_get_ptr(py_obj);
   23551           0 :         if (value == NULL) {
   23552           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->refer");
   23553           0 :                 return -1;
   23554             :         }
   23555           0 :         PY_CHECK_TYPE(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, value, return -1;);
   23556           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   23557           0 :                 PyErr_NoMemory();
   23558           0 :                 return -1;
   23559             :         }
   23560           0 :         object->refer = *(struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(value);
   23561           0 :         return 0;
   23562             : }
   23563             : 
   23564             : static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Referr_V1_getsetters[] = {
   23565             :         {
   23566             :                 .name = discard_const_p(char, "dsid"),
   23567             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_dsid,
   23568             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_dsid,
   23569             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23570             :         },
   23571             :         {
   23572             :                 .name = discard_const_p(char, "extended_err"),
   23573             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_err,
   23574             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_err,
   23575             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   23576             :         },
   23577             :         {
   23578             :                 .name = discard_const_p(char, "extended_data"),
   23579             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_data,
   23580             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_data,
   23581             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   23582             :         },
   23583             :         {
   23584             :                 .name = discard_const_p(char, "refer"),
   23585             :                 .get = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_refer,
   23586             :                 .set = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_refer,
   23587             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_RefErrListItem_V1")
   23588             :         },
   23589             :         { .name = NULL }
   23590             : };
   23591             : 
   23592           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23593             : {
   23594           0 :         return pytalloc_new(struct drsuapi_DsAddEntryErrorInfo_Referr_V1, type);
   23595             : }
   23596             : 
   23597             : 
   23598             : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Referr_V1_Type = {
   23599             :         PyVarObject_HEAD_INIT(NULL, 0)
   23600             :         .tp_name = "drsuapi.DsAddEntryErrorInfo_Referr_V1",
   23601             :         .tp_getset = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_getsetters,
   23602             :         .tp_methods = NULL,
   23603             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23604             :         .tp_new = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_new,
   23605             : };
   23606             : 
   23607           0 : static PyObject *py_import_drsuapi_DsAddEntryErrorInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryErrorInfo *in)
   23608             : {
   23609           0 :         PyObject *ret;
   23610             : 
   23611           0 :         switch (level) {
   23612           0 :                 case 1:
   23613           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type, mem_ctx, &in->attr_err);
   23614           0 :                         return ret;
   23615             : 
   23616           0 :                 case 2:
   23617           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type, mem_ctx, &in->name_err);
   23618           0 :                         return ret;
   23619             : 
   23620           0 :                 case 3:
   23621           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type, mem_ctx, &in->referral_err);
   23622           0 :                         return ret;
   23623             : 
   23624           0 :                 case 4:
   23625           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->security_err);
   23626           0 :                         return ret;
   23627             : 
   23628           0 :                 case 5:
   23629           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->service_err);
   23630           0 :                         return ret;
   23631             : 
   23632           0 :                 case 6:
   23633           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->update_err);
   23634           0 :                         return ret;
   23635             : 
   23636           0 :                 case 7:
   23637           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->system_err);
   23638           0 :                         return ret;
   23639             : 
   23640             :         }
   23641           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   23642           0 :         return NULL;
   23643             : }
   23644             : 
   23645           0 : static union drsuapi_DsAddEntryErrorInfo *py_export_drsuapi_DsAddEntryErrorInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   23646             : {
   23647           0 :         union drsuapi_DsAddEntryErrorInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryErrorInfo);
   23648           0 :         switch (level) {
   23649           0 :                 case 1:
   23650           0 :                         if (in == NULL) {
   23651           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->attr_err");
   23652           0 :                                 talloc_free(ret); return NULL;
   23653             :                         }
   23654           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type, in, talloc_free(ret); return NULL;);
   23655           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23656           0 :                                 PyErr_NoMemory();
   23657           0 :                                 talloc_free(ret); return NULL;
   23658             :                         }
   23659           0 :                         ret->attr_err = *(struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(in);
   23660           0 :                         break;
   23661             : 
   23662           0 :                 case 2:
   23663           0 :                         if (in == NULL) {
   23664           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name_err");
   23665           0 :                                 talloc_free(ret); return NULL;
   23666             :                         }
   23667           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type, in, talloc_free(ret); return NULL;);
   23668           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23669           0 :                                 PyErr_NoMemory();
   23670           0 :                                 talloc_free(ret); return NULL;
   23671             :                         }
   23672           0 :                         ret->name_err = *(struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(in);
   23673           0 :                         break;
   23674             : 
   23675           0 :                 case 3:
   23676           0 :                         if (in == NULL) {
   23677           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->referral_err");
   23678           0 :                                 talloc_free(ret); return NULL;
   23679             :                         }
   23680           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type, in, talloc_free(ret); return NULL;);
   23681           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23682           0 :                                 PyErr_NoMemory();
   23683           0 :                                 talloc_free(ret); return NULL;
   23684             :                         }
   23685           0 :                         ret->referral_err = *(struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(in);
   23686           0 :                         break;
   23687             : 
   23688           0 :                 case 4:
   23689           0 :                         if (in == NULL) {
   23690           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->security_err");
   23691           0 :                                 talloc_free(ret); return NULL;
   23692             :                         }
   23693           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
   23694           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23695           0 :                                 PyErr_NoMemory();
   23696           0 :                                 talloc_free(ret); return NULL;
   23697             :                         }
   23698           0 :                         ret->security_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
   23699           0 :                         break;
   23700             : 
   23701           0 :                 case 5:
   23702           0 :                         if (in == NULL) {
   23703           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->service_err");
   23704           0 :                                 talloc_free(ret); return NULL;
   23705             :                         }
   23706           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
   23707           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23708           0 :                                 PyErr_NoMemory();
   23709           0 :                                 talloc_free(ret); return NULL;
   23710             :                         }
   23711           0 :                         ret->service_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
   23712           0 :                         break;
   23713             : 
   23714           0 :                 case 6:
   23715           0 :                         if (in == NULL) {
   23716           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->update_err");
   23717           0 :                                 talloc_free(ret); return NULL;
   23718             :                         }
   23719           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
   23720           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23721           0 :                                 PyErr_NoMemory();
   23722           0 :                                 talloc_free(ret); return NULL;
   23723             :                         }
   23724           0 :                         ret->update_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
   23725           0 :                         break;
   23726             : 
   23727           0 :                 case 7:
   23728           0 :                         if (in == NULL) {
   23729           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->system_err");
   23730           0 :                                 talloc_free(ret); return NULL;
   23731             :                         }
   23732           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
   23733           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23734           0 :                                 PyErr_NoMemory();
   23735           0 :                                 talloc_free(ret); return NULL;
   23736             :                         }
   23737           0 :                         ret->system_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
   23738           0 :                         break;
   23739             : 
   23740           0 :                 default:
   23741           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   23742           0 :                         talloc_free(ret);
   23743           0 :                         ret = NULL;
   23744             :         }
   23745             : 
   23746           0 :         return ret;
   23747             : }
   23748             : 
   23749           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23750             : {
   23751           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23752           0 :         PyObject *mem_ctx_obj = NULL;
   23753           0 :         TALLOC_CTX *mem_ctx = NULL;
   23754           0 :         int level = 0;
   23755           0 :         PyObject *in_obj = NULL;
   23756           0 :         union drsuapi_DsAddEntryErrorInfo *in = NULL;
   23757             : 
   23758           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   23759             :                 discard_const_p(char *, kwnames),
   23760             :                 &mem_ctx_obj,
   23761             :                 &level,
   23762             :                 &in_obj)) {
   23763           0 :                 return NULL;
   23764             :         }
   23765           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23766           0 :         if (mem_ctx == NULL) {
   23767           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23768           0 :                 return NULL;
   23769             :         }
   23770           0 :         in = (union drsuapi_DsAddEntryErrorInfo *)pytalloc_get_ptr(in_obj);
   23771           0 :         if (in == NULL) {
   23772           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsAddEntryErrorInfo!");
   23773           0 :                 return NULL;
   23774             :         }
   23775             : 
   23776           0 :         return py_import_drsuapi_DsAddEntryErrorInfo(mem_ctx, level, in);
   23777             : }
   23778             : 
   23779           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23780             : {
   23781           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   23782           0 :         PyObject *mem_ctx_obj = NULL;
   23783           0 :         TALLOC_CTX *mem_ctx = NULL;
   23784           0 :         int level = 0;
   23785           0 :         PyObject *in = NULL;
   23786           0 :         union drsuapi_DsAddEntryErrorInfo *out = NULL;
   23787             : 
   23788           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   23789             :                 discard_const_p(char *, kwnames),
   23790             :                 &mem_ctx_obj,
   23791             :                 &level,
   23792             :                 &in)) {
   23793           0 :                 return NULL;
   23794             :         }
   23795           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   23796           0 :         if (mem_ctx == NULL) {
   23797           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   23798           0 :                 return NULL;
   23799             :         }
   23800             : 
   23801           0 :         out = py_export_drsuapi_DsAddEntryErrorInfo(mem_ctx, level, in);
   23802           0 :         if (out == NULL) {
   23803           0 :                 return NULL;
   23804             :         }
   23805             : 
   23806           0 :         return pytalloc_GenericObject_reference(out);
   23807             : }
   23808             : 
   23809             : static PyMethodDef py_drsuapi_DsAddEntryErrorInfo_methods[] = {
   23810             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryErrorInfo_import),
   23811             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23812             :                 "T.__import__(mem_ctx, level, in) => ret." },
   23813             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryErrorInfo_export),
   23814             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   23815             :                 "T.__export__(mem_ctx, level, in) => ret." },
   23816             :         { NULL, NULL, 0, NULL }
   23817             : };
   23818             : 
   23819           0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23820             : {
   23821           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   23822           0 :         return NULL;
   23823             : }
   23824             : 
   23825             : 
   23826             : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Type = {
   23827             :         PyVarObject_HEAD_INIT(NULL, 0)
   23828             :         .tp_name = "drsuapi.DsAddEntryErrorInfo",
   23829             :         .tp_getset = NULL,
   23830             :         .tp_methods = py_drsuapi_DsAddEntryErrorInfo_methods,
   23831             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23832             :         .tp_new = py_drsuapi_DsAddEntryErrorInfo_new,
   23833             : };
   23834             : 
   23835             : 
   23836          90 : static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_get_status(PyObject *obj, void *closure)
   23837             : {
   23838          90 :         struct drsuapi_DsAddEntry_ErrData_V1 *object = pytalloc_get_ptr(obj);
   23839           0 :         PyObject *py_status;
   23840          90 :         py_status = PyErr_FromWERROR(object->status);
   23841          90 :         return py_status;
   23842             : }
   23843             : 
   23844           0 : static int py_drsuapi_DsAddEntry_ErrData_V1_set_status(PyObject *py_obj, PyObject *value, void *closure)
   23845             : {
   23846           0 :         struct drsuapi_DsAddEntry_ErrData_V1 *object = pytalloc_get_ptr(py_obj);
   23847           0 :         if (value == NULL) {
   23848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
   23849           0 :                 return -1;
   23850             :         }
   23851           0 :         object->status = W_ERROR(PyLong_AsLong(value));
   23852           0 :         return 0;
   23853             : }
   23854             : 
   23855          90 : static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_get_dir_err(PyObject *obj, void *closure)
   23856             : {
   23857          90 :         struct drsuapi_DsAddEntry_ErrData_V1 *object = pytalloc_get_ptr(obj);
   23858           0 :         PyObject *py_dir_err;
   23859          90 :         py_dir_err = PyLong_FromUnsignedLongLong((uint32_t)(object->dir_err));
   23860          90 :         return py_dir_err;
   23861             : }
   23862             : 
   23863           0 : static int py_drsuapi_DsAddEntry_ErrData_V1_set_dir_err(PyObject *py_obj, PyObject *value, void *closure)
   23864             : {
   23865           0 :         struct drsuapi_DsAddEntry_ErrData_V1 *object = pytalloc_get_ptr(py_obj);
   23866           0 :         if (value == NULL) {
   23867           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dir_err");
   23868           0 :                 return -1;
   23869             :         }
   23870             :         {
   23871           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dir_err));
   23872           0 :                 if (PyLong_Check(value)) {
   23873           0 :                         unsigned long long test_var;
   23874           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   23875           0 :                         if (PyErr_Occurred() != NULL) {
   23876           0 :                                 return -1;
   23877             :                         }
   23878           0 :                         if (test_var > uint_max) {
   23879           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   23880             :                                   PyLong_Type.tp_name, uint_max, test_var);
   23881           0 :                                 return -1;
   23882             :                         }
   23883           0 :                         object->dir_err = test_var;
   23884             :                 } else {
   23885           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   23886             :                           PyLong_Type.tp_name);
   23887           0 :                         return -1;
   23888             :                 }
   23889             :         }
   23890           0 :         return 0;
   23891             : }
   23892             : 
   23893           0 : static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_get_info(PyObject *obj, void *closure)
   23894             : {
   23895           0 :         struct drsuapi_DsAddEntry_ErrData_V1 *object = pytalloc_get_ptr(obj);
   23896           0 :         PyObject *py_info;
   23897           0 :         if (object->info == NULL) {
   23898           0 :                 Py_RETURN_NONE;
   23899             :         }
   23900           0 :         if (object->info == NULL) {
   23901           0 :                 py_info = Py_None;
   23902           0 :                 Py_INCREF(py_info);
   23903             :         } else {
   23904           0 :                 py_info = pyrpc_import_union(&drsuapi_DsAddEntryErrorInfo_Type, object->info, object->dir_err, object->info, "union drsuapi_DsAddEntryErrorInfo");
   23905           0 :                 if (py_info == NULL) {
   23906           0 :                         return NULL;
   23907             :                 }
   23908             :         }
   23909           0 :         return py_info;
   23910             : }
   23911             : 
   23912           0 : static int py_drsuapi_DsAddEntry_ErrData_V1_set_info(PyObject *py_obj, PyObject *value, void *closure)
   23913             : {
   23914           0 :         struct drsuapi_DsAddEntry_ErrData_V1 *object = pytalloc_get_ptr(py_obj);
   23915           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
   23916           0 :         if (value == NULL) {
   23917           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
   23918           0 :                 return -1;
   23919             :         }
   23920           0 :         if (value == Py_None) {
   23921           0 :                 object->info = NULL;
   23922             :         } else {
   23923           0 :                 object->info = NULL;
   23924             :                 {
   23925           0 :                         union drsuapi_DsAddEntryErrorInfo *info_switch_1;
   23926           0 :                         info_switch_1 = (union drsuapi_DsAddEntryErrorInfo *)pyrpc_export_union(&drsuapi_DsAddEntryErrorInfo_Type, pytalloc_get_mem_ctx(py_obj), object->dir_err, value, "union drsuapi_DsAddEntryErrorInfo");
   23927           0 :                         if (info_switch_1 == NULL) {
   23928           0 :                                 return -1;
   23929             :                         }
   23930           0 :                         object->info = info_switch_1;
   23931             :                 }
   23932             :         }
   23933           0 :         return 0;
   23934             : }
   23935             : 
   23936             : static PyGetSetDef py_drsuapi_DsAddEntry_ErrData_V1_getsetters[] = {
   23937             :         {
   23938             :                 .name = discard_const_p(char, "status"),
   23939             :                 .get = py_drsuapi_DsAddEntry_ErrData_V1_get_status,
   23940             :                 .set = py_drsuapi_DsAddEntry_ErrData_V1_set_status,
   23941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   23942             :         },
   23943             :         {
   23944             :                 .name = discard_const_p(char, "dir_err"),
   23945             :                 .get = py_drsuapi_DsAddEntry_ErrData_V1_get_dir_err,
   23946             :                 .set = py_drsuapi_DsAddEntry_ErrData_V1_set_dir_err,
   23947             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_DirErr")
   23948             :         },
   23949             :         {
   23950             :                 .name = discard_const_p(char, "info"),
   23951             :                 .get = py_drsuapi_DsAddEntry_ErrData_V1_get_info,
   23952             :                 .set = py_drsuapi_DsAddEntry_ErrData_V1_set_info,
   23953             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntryErrorInfo")
   23954             :         },
   23955             :         { .name = NULL }
   23956             : };
   23957             : 
   23958           0 : static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   23959             : {
   23960           0 :         return pytalloc_new(struct drsuapi_DsAddEntry_ErrData_V1, type);
   23961             : }
   23962             : 
   23963             : 
   23964             : static PyTypeObject drsuapi_DsAddEntry_ErrData_V1_Type = {
   23965             :         PyVarObject_HEAD_INIT(NULL, 0)
   23966             :         .tp_name = "drsuapi.DsAddEntry_ErrData_V1",
   23967             :         .tp_getset = py_drsuapi_DsAddEntry_ErrData_V1_getsetters,
   23968             :         .tp_methods = NULL,
   23969             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   23970             :         .tp_new = py_drsuapi_DsAddEntry_ErrData_V1_new,
   23971             : };
   23972             : 
   23973         180 : static PyObject *py_import_drsuapi_DsAddEntry_ErrData(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntry_ErrData *in)
   23974             : {
   23975           0 :         PyObject *ret;
   23976             : 
   23977         180 :         switch (level) {
   23978         180 :                 case 1:
   23979         180 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntry_ErrData_V1_Type, mem_ctx, &in->v1);
   23980         180 :                         return ret;
   23981             : 
   23982             :         }
   23983           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   23984           0 :         return NULL;
   23985             : }
   23986             : 
   23987           0 : static union drsuapi_DsAddEntry_ErrData *py_export_drsuapi_DsAddEntry_ErrData(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   23988             : {
   23989           0 :         union drsuapi_DsAddEntry_ErrData *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntry_ErrData);
   23990           0 :         switch (level) {
   23991           0 :                 case 1:
   23992           0 :                         if (in == NULL) {
   23993           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->v1");
   23994           0 :                                 talloc_free(ret); return NULL;
   23995             :                         }
   23996           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntry_ErrData_V1_Type, in, talloc_free(ret); return NULL;);
   23997           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   23998           0 :                                 PyErr_NoMemory();
   23999           0 :                                 talloc_free(ret); return NULL;
   24000             :                         }
   24001           0 :                         ret->v1 = *(struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(in);
   24002           0 :                         break;
   24003             : 
   24004           0 :                 default:
   24005           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   24006           0 :                         talloc_free(ret);
   24007           0 :                         ret = NULL;
   24008             :         }
   24009             : 
   24010           0 :         return ret;
   24011             : }
   24012             : 
   24013         180 : static PyObject *py_drsuapi_DsAddEntry_ErrData_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24014             : {
   24015         180 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   24016         180 :         PyObject *mem_ctx_obj = NULL;
   24017         180 :         TALLOC_CTX *mem_ctx = NULL;
   24018         180 :         int level = 0;
   24019         180 :         PyObject *in_obj = NULL;
   24020         180 :         union drsuapi_DsAddEntry_ErrData *in = NULL;
   24021             : 
   24022         180 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   24023             :                 discard_const_p(char *, kwnames),
   24024             :                 &mem_ctx_obj,
   24025             :                 &level,
   24026             :                 &in_obj)) {
   24027           0 :                 return NULL;
   24028             :         }
   24029         180 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   24030         180 :         if (mem_ctx == NULL) {
   24031           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   24032           0 :                 return NULL;
   24033             :         }
   24034         180 :         in = (union drsuapi_DsAddEntry_ErrData *)pytalloc_get_ptr(in_obj);
   24035         180 :         if (in == NULL) {
   24036           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsAddEntry_ErrData!");
   24037           0 :                 return NULL;
   24038             :         }
   24039             : 
   24040         180 :         return py_import_drsuapi_DsAddEntry_ErrData(mem_ctx, level, in);
   24041             : }
   24042             : 
   24043           0 : static PyObject *py_drsuapi_DsAddEntry_ErrData_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24044             : {
   24045           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   24046           0 :         PyObject *mem_ctx_obj = NULL;
   24047           0 :         TALLOC_CTX *mem_ctx = NULL;
   24048           0 :         int level = 0;
   24049           0 :         PyObject *in = NULL;
   24050           0 :         union drsuapi_DsAddEntry_ErrData *out = NULL;
   24051             : 
   24052           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   24053             :                 discard_const_p(char *, kwnames),
   24054             :                 &mem_ctx_obj,
   24055             :                 &level,
   24056             :                 &in)) {
   24057           0 :                 return NULL;
   24058             :         }
   24059           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   24060           0 :         if (mem_ctx == NULL) {
   24061           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   24062           0 :                 return NULL;
   24063             :         }
   24064             : 
   24065           0 :         out = py_export_drsuapi_DsAddEntry_ErrData(mem_ctx, level, in);
   24066           0 :         if (out == NULL) {
   24067           0 :                 return NULL;
   24068             :         }
   24069             : 
   24070           0 :         return pytalloc_GenericObject_reference(out);
   24071             : }
   24072             : 
   24073             : static PyMethodDef py_drsuapi_DsAddEntry_ErrData_methods[] = {
   24074             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ErrData_import),
   24075             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   24076             :                 "T.__import__(mem_ctx, level, in) => ret." },
   24077             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ErrData_export),
   24078             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   24079             :                 "T.__export__(mem_ctx, level, in) => ret." },
   24080             :         { NULL, NULL, 0, NULL }
   24081             : };
   24082             : 
   24083           0 : static PyObject *py_drsuapi_DsAddEntry_ErrData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24084             : {
   24085           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   24086           0 :         return NULL;
   24087             : }
   24088             : 
   24089             : 
   24090             : static PyTypeObject drsuapi_DsAddEntry_ErrData_Type = {
   24091             :         PyVarObject_HEAD_INIT(NULL, 0)
   24092             :         .tp_name = "drsuapi.DsAddEntry_ErrData",
   24093             :         .tp_getset = NULL,
   24094             :         .tp_methods = py_drsuapi_DsAddEntry_ErrData_methods,
   24095             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24096             :         .tp_new = py_drsuapi_DsAddEntry_ErrData_new,
   24097             : };
   24098             : 
   24099             : 
   24100           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier2_get_guid(PyObject *obj, void *closure)
   24101             : {
   24102           0 :         struct drsuapi_DsReplicaObjectIdentifier2 *object = pytalloc_get_ptr(obj);
   24103           0 :         PyObject *py_guid;
   24104           0 :         py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
   24105           0 :         return py_guid;
   24106             : }
   24107             : 
   24108           0 : static int py_drsuapi_DsReplicaObjectIdentifier2_set_guid(PyObject *py_obj, PyObject *value, void *closure)
   24109             : {
   24110           0 :         struct drsuapi_DsReplicaObjectIdentifier2 *object = pytalloc_get_ptr(py_obj);
   24111           0 :         if (value == NULL) {
   24112           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
   24113           0 :                 return -1;
   24114             :         }
   24115           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   24116           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24117           0 :                 PyErr_NoMemory();
   24118           0 :                 return -1;
   24119             :         }
   24120           0 :         object->guid = *(struct GUID *)pytalloc_get_ptr(value);
   24121           0 :         return 0;
   24122             : }
   24123             : 
   24124           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier2_get_sid(PyObject *obj, void *closure)
   24125             : {
   24126           0 :         struct drsuapi_DsReplicaObjectIdentifier2 *object = pytalloc_get_ptr(obj);
   24127           0 :         PyObject *py_sid;
   24128           0 :         py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
   24129           0 :         return py_sid;
   24130             : }
   24131             : 
   24132           0 : static int py_drsuapi_DsReplicaObjectIdentifier2_set_sid(PyObject *py_obj, PyObject *value, void *closure)
   24133             : {
   24134           0 :         struct drsuapi_DsReplicaObjectIdentifier2 *object = pytalloc_get_ptr(py_obj);
   24135           0 :         if (value == NULL) {
   24136           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
   24137           0 :                 return -1;
   24138             :         }
   24139           0 :         PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
   24140           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24141           0 :                 PyErr_NoMemory();
   24142           0 :                 return -1;
   24143             :         }
   24144           0 :         object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
   24145           0 :         return 0;
   24146             : }
   24147             : 
   24148             : static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier2_getsetters[] = {
   24149             :         {
   24150             :                 .name = discard_const_p(char, "guid"),
   24151             :                 .get = py_drsuapi_DsReplicaObjectIdentifier2_get_guid,
   24152             :                 .set = py_drsuapi_DsReplicaObjectIdentifier2_set_guid,
   24153             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   24154             :         },
   24155             :         {
   24156             :                 .name = discard_const_p(char, "sid"),
   24157             :                 .get = py_drsuapi_DsReplicaObjectIdentifier2_get_sid,
   24158             :                 .set = py_drsuapi_DsReplicaObjectIdentifier2_set_sid,
   24159             :                 .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
   24160             :         },
   24161             :         { .name = NULL }
   24162             : };
   24163             : 
   24164           0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24165             : {
   24166           0 :         return pytalloc_new(struct drsuapi_DsReplicaObjectIdentifier2, type);
   24167             : }
   24168             : 
   24169             : 
   24170             : static PyTypeObject drsuapi_DsReplicaObjectIdentifier2_Type = {
   24171             :         PyVarObject_HEAD_INIT(NULL, 0)
   24172             :         .tp_name = "drsuapi.DsReplicaObjectIdentifier2",
   24173             :         .tp_getset = py_drsuapi_DsReplicaObjectIdentifier2_getsetters,
   24174             :         .tp_methods = NULL,
   24175             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24176             :         .tp_new = py_drsuapi_DsReplicaObjectIdentifier2_new,
   24177             : };
   24178             : 
   24179             : 
   24180           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_id(PyObject *obj, void *closure)
   24181             : {
   24182           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(obj);
   24183           0 :         PyObject *py_id;
   24184           0 :         if (object->id == NULL) {
   24185           0 :                 Py_RETURN_NONE;
   24186             :         }
   24187           0 :         if (object->id == NULL) {
   24188           0 :                 py_id = Py_None;
   24189           0 :                 Py_INCREF(py_id);
   24190             :         } else {
   24191           0 :                 py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
   24192             :         }
   24193           0 :         return py_id;
   24194             : }
   24195             : 
   24196           0 : static int py_drsuapi_DsAddEntryCtr2_set_id(PyObject *py_obj, PyObject *value, void *closure)
   24197             : {
   24198           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(py_obj);
   24199           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id));
   24200           0 :         if (value == NULL) {
   24201           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id");
   24202           0 :                 return -1;
   24203             :         }
   24204           0 :         if (value == Py_None) {
   24205           0 :                 object->id = NULL;
   24206             :         } else {
   24207           0 :                 object->id = NULL;
   24208           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   24209           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24210           0 :                         PyErr_NoMemory();
   24211           0 :                         return -1;
   24212             :                 }
   24213           0 :                 object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   24214             :         }
   24215           0 :         return 0;
   24216             : }
   24217             : 
   24218           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_dir_err(PyObject *obj, void *closure)
   24219             : {
   24220           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(obj);
   24221           0 :         PyObject *py_dir_err;
   24222           0 :         py_dir_err = PyLong_FromUnsignedLongLong((uint32_t)(object->dir_err));
   24223           0 :         return py_dir_err;
   24224             : }
   24225             : 
   24226           0 : static int py_drsuapi_DsAddEntryCtr2_set_dir_err(PyObject *py_obj, PyObject *value, void *closure)
   24227             : {
   24228           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(py_obj);
   24229           0 :         if (value == NULL) {
   24230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dir_err");
   24231           0 :                 return -1;
   24232             :         }
   24233             :         {
   24234           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dir_err));
   24235           0 :                 if (PyLong_Check(value)) {
   24236           0 :                         unsigned long long test_var;
   24237           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24238           0 :                         if (PyErr_Occurred() != NULL) {
   24239           0 :                                 return -1;
   24240             :                         }
   24241           0 :                         if (test_var > uint_max) {
   24242           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24243             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24244           0 :                                 return -1;
   24245             :                         }
   24246           0 :                         object->dir_err = test_var;
   24247             :                 } else {
   24248           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24249             :                           PyLong_Type.tp_name);
   24250           0 :                         return -1;
   24251             :                 }
   24252             :         }
   24253           0 :         return 0;
   24254             : }
   24255             : 
   24256           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_dsid(PyObject *obj, void *closure)
   24257             : {
   24258           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(obj);
   24259           0 :         PyObject *py_dsid;
   24260           0 :         py_dsid = PyLong_FromUnsignedLongLong((uint32_t)(object->dsid));
   24261           0 :         return py_dsid;
   24262             : }
   24263             : 
   24264           0 : static int py_drsuapi_DsAddEntryCtr2_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
   24265             : {
   24266           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(py_obj);
   24267           0 :         if (value == NULL) {
   24268           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
   24269           0 :                 return -1;
   24270             :         }
   24271             :         {
   24272           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
   24273           0 :                 if (PyLong_Check(value)) {
   24274           0 :                         unsigned long long test_var;
   24275           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24276           0 :                         if (PyErr_Occurred() != NULL) {
   24277           0 :                                 return -1;
   24278             :                         }
   24279           0 :                         if (test_var > uint_max) {
   24280           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24281             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24282           0 :                                 return -1;
   24283             :                         }
   24284           0 :                         object->dsid = test_var;
   24285             :                 } else {
   24286           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24287             :                           PyLong_Type.tp_name);
   24288           0 :                         return -1;
   24289             :                 }
   24290             :         }
   24291           0 :         return 0;
   24292             : }
   24293             : 
   24294           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_extended_err(PyObject *obj, void *closure)
   24295             : {
   24296           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(obj);
   24297           0 :         PyObject *py_extended_err;
   24298           0 :         py_extended_err = PyErr_FromWERROR(object->extended_err);
   24299           0 :         return py_extended_err;
   24300             : }
   24301             : 
   24302           0 : static int py_drsuapi_DsAddEntryCtr2_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
   24303             : {
   24304           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(py_obj);
   24305           0 :         if (value == NULL) {
   24306           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
   24307           0 :                 return -1;
   24308             :         }
   24309           0 :         object->extended_err = W_ERROR(PyLong_AsLong(value));
   24310           0 :         return 0;
   24311             : }
   24312             : 
   24313           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_extended_data(PyObject *obj, void *closure)
   24314             : {
   24315           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(obj);
   24316           0 :         PyObject *py_extended_data;
   24317           0 :         py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)(object->extended_data));
   24318           0 :         return py_extended_data;
   24319             : }
   24320             : 
   24321           0 : static int py_drsuapi_DsAddEntryCtr2_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
   24322             : {
   24323           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(py_obj);
   24324           0 :         if (value == NULL) {
   24325           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
   24326           0 :                 return -1;
   24327             :         }
   24328             :         {
   24329           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
   24330           0 :                 if (PyLong_Check(value)) {
   24331           0 :                         unsigned long long test_var;
   24332           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24333           0 :                         if (PyErr_Occurred() != NULL) {
   24334           0 :                                 return -1;
   24335             :                         }
   24336           0 :                         if (test_var > uint_max) {
   24337           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24338             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24339           0 :                                 return -1;
   24340             :                         }
   24341           0 :                         object->extended_data = test_var;
   24342             :                 } else {
   24343           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24344             :                           PyLong_Type.tp_name);
   24345           0 :                         return -1;
   24346             :                 }
   24347             :         }
   24348           0 :         return 0;
   24349             : }
   24350             : 
   24351           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_problem(PyObject *obj, void *closure)
   24352             : {
   24353           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(obj);
   24354           0 :         PyObject *py_problem;
   24355           0 :         py_problem = PyLong_FromLong((uint16_t)(object->problem));
   24356           0 :         return py_problem;
   24357             : }
   24358             : 
   24359           0 : static int py_drsuapi_DsAddEntryCtr2_set_problem(PyObject *py_obj, PyObject *value, void *closure)
   24360             : {
   24361           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(py_obj);
   24362           0 :         if (value == NULL) {
   24363           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->problem");
   24364           0 :                 return -1;
   24365             :         }
   24366             :         {
   24367           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->problem));
   24368           0 :                 if (PyLong_Check(value)) {
   24369           0 :                         unsigned long long test_var;
   24370           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24371           0 :                         if (PyErr_Occurred() != NULL) {
   24372           0 :                                 return -1;
   24373             :                         }
   24374           0 :                         if (test_var > uint_max) {
   24375           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24376             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24377           0 :                                 return -1;
   24378             :                         }
   24379           0 :                         object->problem = test_var;
   24380             :                 } else {
   24381           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24382             :                           PyLong_Type.tp_name);
   24383           0 :                         return -1;
   24384             :                 }
   24385             :         }
   24386           0 :         return 0;
   24387             : }
   24388             : 
   24389           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_count(PyObject *obj, void *closure)
   24390             : {
   24391           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(obj);
   24392           0 :         PyObject *py_count;
   24393           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   24394           0 :         return py_count;
   24395             : }
   24396             : 
   24397           0 : static int py_drsuapi_DsAddEntryCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24398             : {
   24399           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(py_obj);
   24400           0 :         if (value == NULL) {
   24401           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   24402           0 :                 return -1;
   24403             :         }
   24404             :         {
   24405           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24406           0 :                 if (PyLong_Check(value)) {
   24407           0 :                         unsigned long long test_var;
   24408           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24409           0 :                         if (PyErr_Occurred() != NULL) {
   24410           0 :                                 return -1;
   24411             :                         }
   24412           0 :                         if (test_var > uint_max) {
   24413           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24414             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24415           0 :                                 return -1;
   24416             :                         }
   24417           0 :                         object->count = test_var;
   24418             :                 } else {
   24419           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24420             :                           PyLong_Type.tp_name);
   24421           0 :                         return -1;
   24422             :                 }
   24423             :         }
   24424           0 :         return 0;
   24425             : }
   24426             : 
   24427           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_objects(PyObject *obj, void *closure)
   24428             : {
   24429           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(obj);
   24430           0 :         PyObject *py_objects;
   24431           0 :         if (object->objects == NULL) {
   24432           0 :                 Py_RETURN_NONE;
   24433             :         }
   24434           0 :         if (object->objects == NULL) {
   24435           0 :                 py_objects = Py_None;
   24436           0 :                 Py_INCREF(py_objects);
   24437             :         } else {
   24438           0 :                 py_objects = PyList_New(object->count);
   24439           0 :                 if (py_objects == NULL) {
   24440           0 :                         return NULL;
   24441             :                 }
   24442             :                 {
   24443             :                         int objects_cntr_1;
   24444           0 :                         for (objects_cntr_1 = 0; objects_cntr_1 < (object->count); objects_cntr_1++) {
   24445           0 :                                 PyObject *py_objects_1;
   24446           0 :                                 py_objects_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier2_Type, object->objects, &(object->objects)[objects_cntr_1]);
   24447           0 :                                 PyList_SetItem(py_objects, objects_cntr_1, py_objects_1);
   24448             :                         }
   24449             :                 }
   24450             :         }
   24451           0 :         return py_objects;
   24452             : }
   24453             : 
   24454           0 : static int py_drsuapi_DsAddEntryCtr2_set_objects(PyObject *py_obj, PyObject *value, void *closure)
   24455             : {
   24456           0 :         struct drsuapi_DsAddEntryCtr2 *object = pytalloc_get_ptr(py_obj);
   24457           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->objects));
   24458           0 :         if (value == NULL) {
   24459           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->objects");
   24460           0 :                 return -1;
   24461             :         }
   24462           0 :         if (value == Py_None) {
   24463           0 :                 object->objects = NULL;
   24464             :         } else {
   24465           0 :                 object->objects = NULL;
   24466           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24467             :                 {
   24468           0 :                         int objects_cntr_1;
   24469           0 :                         object->objects = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->objects, PyList_GET_SIZE(value));
   24470           0 :                         if (!object->objects) { return -1; }
   24471           0 :                         talloc_set_name_const(object->objects, "ARRAY: object->objects");
   24472           0 :                         for (objects_cntr_1 = 0; objects_cntr_1 < PyList_GET_SIZE(value); objects_cntr_1++) {
   24473           0 :                                 if (PyList_GET_ITEM(value, objects_cntr_1) == NULL) {
   24474           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->objects)[objects_cntr_1]");
   24475           0 :                                         return -1;
   24476             :                                 }
   24477           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier2_Type, PyList_GET_ITEM(value, objects_cntr_1), return -1;);
   24478           0 :                                 if (talloc_reference(object->objects, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, objects_cntr_1))) == NULL) {
   24479           0 :                                         PyErr_NoMemory();
   24480           0 :                                         return -1;
   24481             :                                 }
   24482           0 :                                 (object->objects)[objects_cntr_1] = *(struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, objects_cntr_1));
   24483             :                         }
   24484             :                 }
   24485             :         }
   24486           0 :         return 0;
   24487             : }
   24488             : 
   24489             : static PyGetSetDef py_drsuapi_DsAddEntryCtr2_getsetters[] = {
   24490             :         {
   24491             :                 .name = discard_const_p(char, "id"),
   24492             :                 .get = py_drsuapi_DsAddEntryCtr2_get_id,
   24493             :                 .set = py_drsuapi_DsAddEntryCtr2_set_id,
   24494             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   24495             :         },
   24496             :         {
   24497             :                 .name = discard_const_p(char, "dir_err"),
   24498             :                 .get = py_drsuapi_DsAddEntryCtr2_get_dir_err,
   24499             :                 .set = py_drsuapi_DsAddEntryCtr2_set_dir_err,
   24500             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_DirErr")
   24501             :         },
   24502             :         {
   24503             :                 .name = discard_const_p(char, "dsid"),
   24504             :                 .get = py_drsuapi_DsAddEntryCtr2_get_dsid,
   24505             :                 .set = py_drsuapi_DsAddEntryCtr2_set_dsid,
   24506             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24507             :         },
   24508             :         {
   24509             :                 .name = discard_const_p(char, "extended_err"),
   24510             :                 .get = py_drsuapi_DsAddEntryCtr2_get_extended_err,
   24511             :                 .set = py_drsuapi_DsAddEntryCtr2_set_extended_err,
   24512             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   24513             :         },
   24514             :         {
   24515             :                 .name = discard_const_p(char, "extended_data"),
   24516             :                 .get = py_drsuapi_DsAddEntryCtr2_get_extended_data,
   24517             :                 .set = py_drsuapi_DsAddEntryCtr2_set_extended_data,
   24518             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24519             :         },
   24520             :         {
   24521             :                 .name = discard_const_p(char, "problem"),
   24522             :                 .get = py_drsuapi_DsAddEntryCtr2_get_problem,
   24523             :                 .set = py_drsuapi_DsAddEntryCtr2_set_problem,
   24524             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   24525             :         },
   24526             :         {
   24527             :                 .name = discard_const_p(char, "count"),
   24528             :                 .get = py_drsuapi_DsAddEntryCtr2_get_count,
   24529             :                 .set = py_drsuapi_DsAddEntryCtr2_set_count,
   24530             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24531             :         },
   24532             :         {
   24533             :                 .name = discard_const_p(char, "objects"),
   24534             :                 .get = py_drsuapi_DsAddEntryCtr2_get_objects,
   24535             :                 .set = py_drsuapi_DsAddEntryCtr2_set_objects,
   24536             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier2")
   24537             :         },
   24538             :         { .name = NULL }
   24539             : };
   24540             : 
   24541           0 : static PyObject *py_drsuapi_DsAddEntryCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24542             : {
   24543           0 :         return pytalloc_new(struct drsuapi_DsAddEntryCtr2, type);
   24544             : }
   24545             : 
   24546             : 
   24547             : static PyTypeObject drsuapi_DsAddEntryCtr2_Type = {
   24548             :         PyVarObject_HEAD_INIT(NULL, 0)
   24549             :         .tp_name = "drsuapi.DsAddEntryCtr2",
   24550             :         .tp_getset = py_drsuapi_DsAddEntryCtr2_getsetters,
   24551             :         .tp_methods = NULL,
   24552             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24553             :         .tp_new = py_drsuapi_DsAddEntryCtr2_new,
   24554             : };
   24555             : 
   24556             : 
   24557           0 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_id(PyObject *obj, void *closure)
   24558             : {
   24559           0 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(obj);
   24560           0 :         PyObject *py_id;
   24561           0 :         if (object->id == NULL) {
   24562           0 :                 Py_RETURN_NONE;
   24563             :         }
   24564           0 :         if (object->id == NULL) {
   24565           0 :                 py_id = Py_None;
   24566           0 :                 Py_INCREF(py_id);
   24567             :         } else {
   24568           0 :                 py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
   24569             :         }
   24570           0 :         return py_id;
   24571             : }
   24572             : 
   24573           0 : static int py_drsuapi_DsAddEntryCtr3_set_id(PyObject *py_obj, PyObject *value, void *closure)
   24574             : {
   24575           0 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(py_obj);
   24576           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id));
   24577           0 :         if (value == NULL) {
   24578           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id");
   24579           0 :                 return -1;
   24580             :         }
   24581           0 :         if (value == Py_None) {
   24582           0 :                 object->id = NULL;
   24583             :         } else {
   24584           0 :                 object->id = NULL;
   24585           0 :                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
   24586           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   24587           0 :                         PyErr_NoMemory();
   24588           0 :                         return -1;
   24589             :                 }
   24590           0 :                 object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
   24591             :         }
   24592           0 :         return 0;
   24593             : }
   24594             : 
   24595          90 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_err_ver(PyObject *obj, void *closure)
   24596             : {
   24597          90 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(obj);
   24598           0 :         PyObject *py_err_ver;
   24599          90 :         py_err_ver = PyLong_FromUnsignedLongLong((uint32_t)(object->err_ver));
   24600          90 :         return py_err_ver;
   24601             : }
   24602             : 
   24603           0 : static int py_drsuapi_DsAddEntryCtr3_set_err_ver(PyObject *py_obj, PyObject *value, void *closure)
   24604             : {
   24605           0 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(py_obj);
   24606           0 :         if (value == NULL) {
   24607           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->err_ver");
   24608           0 :                 return -1;
   24609             :         }
   24610             :         {
   24611           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->err_ver));
   24612           0 :                 if (PyLong_Check(value)) {
   24613           0 :                         unsigned long long test_var;
   24614           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24615           0 :                         if (PyErr_Occurred() != NULL) {
   24616           0 :                                 return -1;
   24617             :                         }
   24618           0 :                         if (test_var > uint_max) {
   24619           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24620             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24621           0 :                                 return -1;
   24622             :                         }
   24623           0 :                         object->err_ver = test_var;
   24624             :                 } else {
   24625           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24626             :                           PyLong_Type.tp_name);
   24627           0 :                         return -1;
   24628             :                 }
   24629             :         }
   24630           0 :         return 0;
   24631             : }
   24632             : 
   24633         180 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_err_data(PyObject *obj, void *closure)
   24634             : {
   24635         180 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(obj);
   24636           0 :         PyObject *py_err_data;
   24637         180 :         if (object->err_data == NULL) {
   24638           0 :                 Py_RETURN_NONE;
   24639             :         }
   24640         180 :         if (object->err_data == NULL) {
   24641           0 :                 py_err_data = Py_None;
   24642           0 :                 Py_INCREF(py_err_data);
   24643             :         } else {
   24644         180 :                 py_err_data = pyrpc_import_union(&drsuapi_DsAddEntry_ErrData_Type, object->err_data, object->err_ver, object->err_data, "union drsuapi_DsAddEntry_ErrData");
   24645         180 :                 if (py_err_data == NULL) {
   24646           0 :                         return NULL;
   24647             :                 }
   24648             :         }
   24649         180 :         return py_err_data;
   24650             : }
   24651             : 
   24652           0 : static int py_drsuapi_DsAddEntryCtr3_set_err_data(PyObject *py_obj, PyObject *value, void *closure)
   24653             : {
   24654           0 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(py_obj);
   24655           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->err_data));
   24656           0 :         if (value == NULL) {
   24657           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->err_data");
   24658           0 :                 return -1;
   24659             :         }
   24660           0 :         if (value == Py_None) {
   24661           0 :                 object->err_data = NULL;
   24662             :         } else {
   24663           0 :                 object->err_data = NULL;
   24664             :                 {
   24665           0 :                         union drsuapi_DsAddEntry_ErrData *err_data_switch_1;
   24666           0 :                         err_data_switch_1 = (union drsuapi_DsAddEntry_ErrData *)pyrpc_export_union(&drsuapi_DsAddEntry_ErrData_Type, pytalloc_get_mem_ctx(py_obj), object->err_ver, value, "union drsuapi_DsAddEntry_ErrData");
   24667           0 :                         if (err_data_switch_1 == NULL) {
   24668           0 :                                 return -1;
   24669             :                         }
   24670           0 :                         object->err_data = err_data_switch_1;
   24671             :                 }
   24672             :         }
   24673           0 :         return 0;
   24674             : }
   24675             : 
   24676           0 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_count(PyObject *obj, void *closure)
   24677             : {
   24678           0 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(obj);
   24679           0 :         PyObject *py_count;
   24680           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   24681           0 :         return py_count;
   24682             : }
   24683             : 
   24684           0 : static int py_drsuapi_DsAddEntryCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
   24685             : {
   24686           0 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(py_obj);
   24687           0 :         if (value == NULL) {
   24688           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   24689           0 :                 return -1;
   24690             :         }
   24691             :         {
   24692           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   24693           0 :                 if (PyLong_Check(value)) {
   24694           0 :                         unsigned long long test_var;
   24695           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24696           0 :                         if (PyErr_Occurred() != NULL) {
   24697           0 :                                 return -1;
   24698             :                         }
   24699           0 :                         if (test_var > uint_max) {
   24700           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24701             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24702           0 :                                 return -1;
   24703             :                         }
   24704           0 :                         object->count = test_var;
   24705             :                 } else {
   24706           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   24707             :                           PyLong_Type.tp_name);
   24708           0 :                         return -1;
   24709             :                 }
   24710             :         }
   24711           0 :         return 0;
   24712             : }
   24713             : 
   24714          90 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_objects(PyObject *obj, void *closure)
   24715             : {
   24716          90 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(obj);
   24717           0 :         PyObject *py_objects;
   24718          90 :         if (object->objects == NULL) {
   24719           0 :                 Py_RETURN_NONE;
   24720             :         }
   24721          90 :         if (object->objects == NULL) {
   24722           0 :                 py_objects = Py_None;
   24723           0 :                 Py_INCREF(py_objects);
   24724             :         } else {
   24725          90 :                 py_objects = PyList_New(object->count);
   24726          90 :                 if (py_objects == NULL) {
   24727           0 :                         return NULL;
   24728             :                 }
   24729             :                 {
   24730             :                         int objects_cntr_1;
   24731         180 :                         for (objects_cntr_1 = 0; objects_cntr_1 < (object->count); objects_cntr_1++) {
   24732           0 :                                 PyObject *py_objects_1;
   24733          90 :                                 py_objects_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier2_Type, object->objects, &(object->objects)[objects_cntr_1]);
   24734          90 :                                 PyList_SetItem(py_objects, objects_cntr_1, py_objects_1);
   24735             :                         }
   24736             :                 }
   24737             :         }
   24738          90 :         return py_objects;
   24739             : }
   24740             : 
   24741           0 : static int py_drsuapi_DsAddEntryCtr3_set_objects(PyObject *py_obj, PyObject *value, void *closure)
   24742             : {
   24743           0 :         struct drsuapi_DsAddEntryCtr3 *object = pytalloc_get_ptr(py_obj);
   24744           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->objects));
   24745           0 :         if (value == NULL) {
   24746           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->objects");
   24747           0 :                 return -1;
   24748             :         }
   24749           0 :         if (value == Py_None) {
   24750           0 :                 object->objects = NULL;
   24751             :         } else {
   24752           0 :                 object->objects = NULL;
   24753           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   24754             :                 {
   24755           0 :                         int objects_cntr_1;
   24756           0 :                         object->objects = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->objects, PyList_GET_SIZE(value));
   24757           0 :                         if (!object->objects) { return -1; }
   24758           0 :                         talloc_set_name_const(object->objects, "ARRAY: object->objects");
   24759           0 :                         for (objects_cntr_1 = 0; objects_cntr_1 < PyList_GET_SIZE(value); objects_cntr_1++) {
   24760           0 :                                 if (PyList_GET_ITEM(value, objects_cntr_1) == NULL) {
   24761           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->objects)[objects_cntr_1]");
   24762           0 :                                         return -1;
   24763             :                                 }
   24764           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier2_Type, PyList_GET_ITEM(value, objects_cntr_1), return -1;);
   24765           0 :                                 if (talloc_reference(object->objects, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, objects_cntr_1))) == NULL) {
   24766           0 :                                         PyErr_NoMemory();
   24767           0 :                                         return -1;
   24768             :                                 }
   24769           0 :                                 (object->objects)[objects_cntr_1] = *(struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, objects_cntr_1));
   24770             :                         }
   24771             :                 }
   24772             :         }
   24773           0 :         return 0;
   24774             : }
   24775             : 
   24776             : static PyGetSetDef py_drsuapi_DsAddEntryCtr3_getsetters[] = {
   24777             :         {
   24778             :                 .name = discard_const_p(char, "id"),
   24779             :                 .get = py_drsuapi_DsAddEntryCtr3_get_id,
   24780             :                 .set = py_drsuapi_DsAddEntryCtr3_set_id,
   24781             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
   24782             :         },
   24783             :         {
   24784             :                 .name = discard_const_p(char, "err_ver"),
   24785             :                 .get = py_drsuapi_DsAddEntryCtr3_get_err_ver,
   24786             :                 .set = py_drsuapi_DsAddEntryCtr3_set_err_ver,
   24787             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24788             :         },
   24789             :         {
   24790             :                 .name = discard_const_p(char, "err_data"),
   24791             :                 .get = py_drsuapi_DsAddEntryCtr3_get_err_data,
   24792             :                 .set = py_drsuapi_DsAddEntryCtr3_set_err_data,
   24793             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_ErrData")
   24794             :         },
   24795             :         {
   24796             :                 .name = discard_const_p(char, "count"),
   24797             :                 .get = py_drsuapi_DsAddEntryCtr3_get_count,
   24798             :                 .set = py_drsuapi_DsAddEntryCtr3_set_count,
   24799             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   24800             :         },
   24801             :         {
   24802             :                 .name = discard_const_p(char, "objects"),
   24803             :                 .get = py_drsuapi_DsAddEntryCtr3_get_objects,
   24804             :                 .set = py_drsuapi_DsAddEntryCtr3_set_objects,
   24805             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier2")
   24806             :         },
   24807             :         { .name = NULL }
   24808             : };
   24809             : 
   24810           0 : static PyObject *py_drsuapi_DsAddEntryCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24811             : {
   24812           0 :         return pytalloc_new(struct drsuapi_DsAddEntryCtr3, type);
   24813             : }
   24814             : 
   24815             : 
   24816             : static PyTypeObject drsuapi_DsAddEntryCtr3_Type = {
   24817             :         PyVarObject_HEAD_INIT(NULL, 0)
   24818             :         .tp_name = "drsuapi.DsAddEntryCtr3",
   24819             :         .tp_getset = py_drsuapi_DsAddEntryCtr3_getsetters,
   24820             :         .tp_methods = NULL,
   24821             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24822             :         .tp_new = py_drsuapi_DsAddEntryCtr3_new,
   24823             : };
   24824             : 
   24825          90 : static PyObject *py_import_drsuapi_DsAddEntryCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryCtr *in)
   24826             : {
   24827           0 :         PyObject *ret;
   24828             : 
   24829          90 :         switch (level) {
   24830           0 :                 case 2:
   24831           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryCtr2_Type, mem_ctx, &in->ctr2);
   24832           0 :                         return ret;
   24833             : 
   24834          90 :                 case 3:
   24835          90 :                         ret = pytalloc_reference_ex(&drsuapi_DsAddEntryCtr3_Type, mem_ctx, &in->ctr3);
   24836          90 :                         return ret;
   24837             : 
   24838             :         }
   24839           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   24840           0 :         return NULL;
   24841             : }
   24842             : 
   24843           0 : static union drsuapi_DsAddEntryCtr *py_export_drsuapi_DsAddEntryCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   24844             : {
   24845           0 :         union drsuapi_DsAddEntryCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryCtr);
   24846           0 :         switch (level) {
   24847           0 :                 case 2:
   24848           0 :                         if (in == NULL) {
   24849           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
   24850           0 :                                 talloc_free(ret); return NULL;
   24851             :                         }
   24852           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryCtr2_Type, in, talloc_free(ret); return NULL;);
   24853           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24854           0 :                                 PyErr_NoMemory();
   24855           0 :                                 talloc_free(ret); return NULL;
   24856             :                         }
   24857           0 :                         ret->ctr2 = *(struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(in);
   24858           0 :                         break;
   24859             : 
   24860           0 :                 case 3:
   24861           0 :                         if (in == NULL) {
   24862           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
   24863           0 :                                 talloc_free(ret); return NULL;
   24864             :                         }
   24865           0 :                         PY_CHECK_TYPE(&drsuapi_DsAddEntryCtr3_Type, in, talloc_free(ret); return NULL;);
   24866           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   24867           0 :                                 PyErr_NoMemory();
   24868           0 :                                 talloc_free(ret); return NULL;
   24869             :                         }
   24870           0 :                         ret->ctr3 = *(struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(in);
   24871           0 :                         break;
   24872             : 
   24873           0 :                 default:
   24874           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   24875           0 :                         talloc_free(ret);
   24876           0 :                         ret = NULL;
   24877             :         }
   24878             : 
   24879           0 :         return ret;
   24880             : }
   24881             : 
   24882          90 : static PyObject *py_drsuapi_DsAddEntryCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24883             : {
   24884          90 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   24885          90 :         PyObject *mem_ctx_obj = NULL;
   24886          90 :         TALLOC_CTX *mem_ctx = NULL;
   24887          90 :         int level = 0;
   24888          90 :         PyObject *in_obj = NULL;
   24889          90 :         union drsuapi_DsAddEntryCtr *in = NULL;
   24890             : 
   24891          90 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   24892             :                 discard_const_p(char *, kwnames),
   24893             :                 &mem_ctx_obj,
   24894             :                 &level,
   24895             :                 &in_obj)) {
   24896           0 :                 return NULL;
   24897             :         }
   24898          90 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   24899          90 :         if (mem_ctx == NULL) {
   24900           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   24901           0 :                 return NULL;
   24902             :         }
   24903          90 :         in = (union drsuapi_DsAddEntryCtr *)pytalloc_get_ptr(in_obj);
   24904          90 :         if (in == NULL) {
   24905           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsAddEntryCtr!");
   24906           0 :                 return NULL;
   24907             :         }
   24908             : 
   24909          90 :         return py_import_drsuapi_DsAddEntryCtr(mem_ctx, level, in);
   24910             : }
   24911             : 
   24912           0 : static PyObject *py_drsuapi_DsAddEntryCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24913             : {
   24914           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   24915           0 :         PyObject *mem_ctx_obj = NULL;
   24916           0 :         TALLOC_CTX *mem_ctx = NULL;
   24917           0 :         int level = 0;
   24918           0 :         PyObject *in = NULL;
   24919           0 :         union drsuapi_DsAddEntryCtr *out = NULL;
   24920             : 
   24921           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   24922             :                 discard_const_p(char *, kwnames),
   24923             :                 &mem_ctx_obj,
   24924             :                 &level,
   24925             :                 &in)) {
   24926           0 :                 return NULL;
   24927             :         }
   24928           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   24929           0 :         if (mem_ctx == NULL) {
   24930           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   24931           0 :                 return NULL;
   24932             :         }
   24933             : 
   24934           0 :         out = py_export_drsuapi_DsAddEntryCtr(mem_ctx, level, in);
   24935           0 :         if (out == NULL) {
   24936           0 :                 return NULL;
   24937             :         }
   24938             : 
   24939           0 :         return pytalloc_GenericObject_reference(out);
   24940             : }
   24941             : 
   24942             : static PyMethodDef py_drsuapi_DsAddEntryCtr_methods[] = {
   24943             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryCtr_import),
   24944             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   24945             :                 "T.__import__(mem_ctx, level, in) => ret." },
   24946             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryCtr_export),
   24947             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   24948             :                 "T.__export__(mem_ctx, level, in) => ret." },
   24949             :         { NULL, NULL, 0, NULL }
   24950             : };
   24951             : 
   24952           0 : static PyObject *py_drsuapi_DsAddEntryCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   24953             : {
   24954           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   24955           0 :         return NULL;
   24956             : }
   24957             : 
   24958             : 
   24959             : static PyTypeObject drsuapi_DsAddEntryCtr_Type = {
   24960             :         PyVarObject_HEAD_INIT(NULL, 0)
   24961             :         .tp_name = "drsuapi.DsAddEntryCtr",
   24962             :         .tp_getset = NULL,
   24963             :         .tp_methods = py_drsuapi_DsAddEntryCtr_methods,
   24964             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   24965             :         .tp_new = py_drsuapi_DsAddEntryCtr_new,
   24966             : };
   24967             : 
   24968             : 
   24969           0 : static PyObject *py_drsuapi_DsExecuteKCC1_get_taskID(PyObject *obj, void *closure)
   24970             : {
   24971           0 :         struct drsuapi_DsExecuteKCC1 *object = pytalloc_get_ptr(obj);
   24972           0 :         PyObject *py_taskID;
   24973           0 :         py_taskID = PyLong_FromUnsignedLongLong((uint32_t)(object->taskID));
   24974           0 :         return py_taskID;
   24975             : }
   24976             : 
   24977           0 : static int py_drsuapi_DsExecuteKCC1_set_taskID(PyObject *py_obj, PyObject *value, void *closure)
   24978             : {
   24979           0 :         struct drsuapi_DsExecuteKCC1 *object = pytalloc_get_ptr(py_obj);
   24980           0 :         if (value == NULL) {
   24981           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->taskID");
   24982           0 :                 return -1;
   24983             :         }
   24984             :         {
   24985           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->taskID));
   24986           0 :                 if (PyLong_Check(value)) {
   24987           0 :                         unsigned long long test_var;
   24988           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   24989           0 :                         if (PyErr_Occurred() != NULL) {
   24990           0 :                                 return -1;
   24991             :                         }
   24992           0 :                         if (test_var > uint_max) {
   24993           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   24994             :                                   PyLong_Type.tp_name, uint_max, test_var);
   24995           0 :                                 return -1;
   24996             :                         }
   24997           0 :                         object->taskID = test_var;
   24998             :                 } else {
   24999           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25000             :                           PyLong_Type.tp_name);
   25001           0 :                         return -1;
   25002             :                 }
   25003             :         }
   25004           0 :         return 0;
   25005             : }
   25006             : 
   25007           0 : static PyObject *py_drsuapi_DsExecuteKCC1_get_flags(PyObject *obj, void *closure)
   25008             : {
   25009           0 :         struct drsuapi_DsExecuteKCC1 *object = pytalloc_get_ptr(obj);
   25010           0 :         PyObject *py_flags;
   25011           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   25012           0 :         return py_flags;
   25013             : }
   25014             : 
   25015           0 : static int py_drsuapi_DsExecuteKCC1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   25016             : {
   25017           0 :         struct drsuapi_DsExecuteKCC1 *object = pytalloc_get_ptr(py_obj);
   25018           0 :         if (value == NULL) {
   25019           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   25020           0 :                 return -1;
   25021             :         }
   25022             :         {
   25023           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   25024           0 :                 if (PyLong_Check(value)) {
   25025           0 :                         unsigned long long test_var;
   25026           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25027           0 :                         if (PyErr_Occurred() != NULL) {
   25028           0 :                                 return -1;
   25029             :                         }
   25030           0 :                         if (test_var > uint_max) {
   25031           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25032             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25033           0 :                                 return -1;
   25034             :                         }
   25035           0 :                         object->flags = test_var;
   25036             :                 } else {
   25037           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25038             :                           PyLong_Type.tp_name);
   25039           0 :                         return -1;
   25040             :                 }
   25041             :         }
   25042           0 :         return 0;
   25043             : }
   25044             : 
   25045             : static PyGetSetDef py_drsuapi_DsExecuteKCC1_getsetters[] = {
   25046             :         {
   25047             :                 .name = discard_const_p(char, "taskID"),
   25048             :                 .get = py_drsuapi_DsExecuteKCC1_get_taskID,
   25049             :                 .set = py_drsuapi_DsExecuteKCC1_set_taskID,
   25050             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25051             :         },
   25052             :         {
   25053             :                 .name = discard_const_p(char, "flags"),
   25054             :                 .get = py_drsuapi_DsExecuteKCC1_get_flags,
   25055             :                 .set = py_drsuapi_DsExecuteKCC1_set_flags,
   25056             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExecuteKCCFlags")
   25057             :         },
   25058             :         { .name = NULL }
   25059             : };
   25060             : 
   25061           2 : static PyObject *py_drsuapi_DsExecuteKCC1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25062             : {
   25063           2 :         return pytalloc_new(struct drsuapi_DsExecuteKCC1, type);
   25064             : }
   25065             : 
   25066             : 
   25067             : static PyTypeObject drsuapi_DsExecuteKCC1_Type = {
   25068             :         PyVarObject_HEAD_INIT(NULL, 0)
   25069             :         .tp_name = "drsuapi.DsExecuteKCC1",
   25070             :         .tp_getset = py_drsuapi_DsExecuteKCC1_getsetters,
   25071             :         .tp_methods = NULL,
   25072             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25073             :         .tp_new = py_drsuapi_DsExecuteKCC1_new,
   25074             : };
   25075             : 
   25076           0 : static PyObject *py_import_drsuapi_DsExecuteKCCRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsExecuteKCCRequest *in)
   25077             : {
   25078           0 :         PyObject *ret;
   25079             : 
   25080           0 :         switch (level) {
   25081           0 :                 case 1:
   25082           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsExecuteKCC1_Type, mem_ctx, &in->ctr1);
   25083           0 :                         return ret;
   25084             : 
   25085             :         }
   25086           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   25087           0 :         return NULL;
   25088             : }
   25089             : 
   25090           2 : static union drsuapi_DsExecuteKCCRequest *py_export_drsuapi_DsExecuteKCCRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   25091             : {
   25092           2 :         union drsuapi_DsExecuteKCCRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsExecuteKCCRequest);
   25093           2 :         switch (level) {
   25094           2 :                 case 1:
   25095           2 :                         if (in == NULL) {
   25096           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   25097           0 :                                 talloc_free(ret); return NULL;
   25098             :                         }
   25099           2 :                         PY_CHECK_TYPE(&drsuapi_DsExecuteKCC1_Type, in, talloc_free(ret); return NULL;);
   25100           2 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25101           0 :                                 PyErr_NoMemory();
   25102           0 :                                 talloc_free(ret); return NULL;
   25103             :                         }
   25104           2 :                         ret->ctr1 = *(struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(in);
   25105           2 :                         break;
   25106             : 
   25107           0 :                 default:
   25108           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   25109           0 :                         talloc_free(ret);
   25110           0 :                         ret = NULL;
   25111             :         }
   25112             : 
   25113           2 :         return ret;
   25114             : }
   25115             : 
   25116           0 : static PyObject *py_drsuapi_DsExecuteKCCRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25117             : {
   25118           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   25119           0 :         PyObject *mem_ctx_obj = NULL;
   25120           0 :         TALLOC_CTX *mem_ctx = NULL;
   25121           0 :         int level = 0;
   25122           0 :         PyObject *in_obj = NULL;
   25123           0 :         union drsuapi_DsExecuteKCCRequest *in = NULL;
   25124             : 
   25125           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   25126             :                 discard_const_p(char *, kwnames),
   25127             :                 &mem_ctx_obj,
   25128             :                 &level,
   25129             :                 &in_obj)) {
   25130           0 :                 return NULL;
   25131             :         }
   25132           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   25133           0 :         if (mem_ctx == NULL) {
   25134           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   25135           0 :                 return NULL;
   25136             :         }
   25137           0 :         in = (union drsuapi_DsExecuteKCCRequest *)pytalloc_get_ptr(in_obj);
   25138           0 :         if (in == NULL) {
   25139           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsExecuteKCCRequest!");
   25140           0 :                 return NULL;
   25141             :         }
   25142             : 
   25143           0 :         return py_import_drsuapi_DsExecuteKCCRequest(mem_ctx, level, in);
   25144             : }
   25145             : 
   25146           2 : static PyObject *py_drsuapi_DsExecuteKCCRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25147             : {
   25148           2 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   25149           2 :         PyObject *mem_ctx_obj = NULL;
   25150           2 :         TALLOC_CTX *mem_ctx = NULL;
   25151           2 :         int level = 0;
   25152           2 :         PyObject *in = NULL;
   25153           2 :         union drsuapi_DsExecuteKCCRequest *out = NULL;
   25154             : 
   25155           2 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   25156             :                 discard_const_p(char *, kwnames),
   25157             :                 &mem_ctx_obj,
   25158             :                 &level,
   25159             :                 &in)) {
   25160           0 :                 return NULL;
   25161             :         }
   25162           2 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   25163           2 :         if (mem_ctx == NULL) {
   25164           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   25165           0 :                 return NULL;
   25166             :         }
   25167             : 
   25168           2 :         out = py_export_drsuapi_DsExecuteKCCRequest(mem_ctx, level, in);
   25169           2 :         if (out == NULL) {
   25170           0 :                 return NULL;
   25171             :         }
   25172             : 
   25173           2 :         return pytalloc_GenericObject_reference(out);
   25174             : }
   25175             : 
   25176             : static PyMethodDef py_drsuapi_DsExecuteKCCRequest_methods[] = {
   25177             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCCRequest_import),
   25178             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   25179             :                 "T.__import__(mem_ctx, level, in) => ret." },
   25180             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCCRequest_export),
   25181             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   25182             :                 "T.__export__(mem_ctx, level, in) => ret." },
   25183             :         { NULL, NULL, 0, NULL }
   25184             : };
   25185             : 
   25186           0 : static PyObject *py_drsuapi_DsExecuteKCCRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25187             : {
   25188           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   25189           0 :         return NULL;
   25190             : }
   25191             : 
   25192             : 
   25193             : static PyTypeObject drsuapi_DsExecuteKCCRequest_Type = {
   25194             :         PyVarObject_HEAD_INIT(NULL, 0)
   25195             :         .tp_name = "drsuapi.DsExecuteKCCRequest",
   25196             :         .tp_getset = NULL,
   25197             :         .tp_methods = py_drsuapi_DsExecuteKCCRequest_methods,
   25198             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25199             :         .tp_new = py_drsuapi_DsExecuteKCCRequest_new,
   25200             : };
   25201             : 
   25202             : 
   25203           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_get_info_type(PyObject *obj, void *closure)
   25204             : {
   25205           0 :         struct drsuapi_DsReplicaGetInfoRequest1 *object = pytalloc_get_ptr(obj);
   25206           0 :         PyObject *py_info_type;
   25207           0 :         py_info_type = PyLong_FromUnsignedLongLong((uint32_t)(object->info_type));
   25208           0 :         return py_info_type;
   25209             : }
   25210             : 
   25211          10 : static int py_drsuapi_DsReplicaGetInfoRequest1_set_info_type(PyObject *py_obj, PyObject *value, void *closure)
   25212             : {
   25213          10 :         struct drsuapi_DsReplicaGetInfoRequest1 *object = pytalloc_get_ptr(py_obj);
   25214          10 :         if (value == NULL) {
   25215           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_type");
   25216           0 :                 return -1;
   25217             :         }
   25218             :         {
   25219          10 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->info_type));
   25220          10 :                 if (PyLong_Check(value)) {
   25221           0 :                         unsigned long long test_var;
   25222          10 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25223          10 :                         if (PyErr_Occurred() != NULL) {
   25224           0 :                                 return -1;
   25225             :                         }
   25226          10 :                         if (test_var > uint_max) {
   25227           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25228             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25229           0 :                                 return -1;
   25230             :                         }
   25231          10 :                         object->info_type = test_var;
   25232             :                 } else {
   25233           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25234             :                           PyLong_Type.tp_name);
   25235           0 :                         return -1;
   25236             :                 }
   25237             :         }
   25238          10 :         return 0;
   25239             : }
   25240             : 
   25241           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_get_object_dn(PyObject *obj, void *closure)
   25242             : {
   25243           0 :         struct drsuapi_DsReplicaGetInfoRequest1 *object = pytalloc_get_ptr(obj);
   25244           0 :         PyObject *py_object_dn;
   25245           0 :         if (object->object_dn == NULL) {
   25246           0 :                 Py_RETURN_NONE;
   25247             :         }
   25248           0 :         if (object->object_dn == NULL) {
   25249           0 :                 py_object_dn = Py_None;
   25250           0 :                 Py_INCREF(py_object_dn);
   25251             :         } else {
   25252           0 :                 if (object->object_dn == NULL) {
   25253           0 :                         py_object_dn = Py_None;
   25254           0 :                         Py_INCREF(py_object_dn);
   25255             :                 } else {
   25256           0 :                         py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
   25257             :                 }
   25258             :         }
   25259           0 :         return py_object_dn;
   25260             : }
   25261             : 
   25262           0 : static int py_drsuapi_DsReplicaGetInfoRequest1_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
   25263             : {
   25264           0 :         struct drsuapi_DsReplicaGetInfoRequest1 *object = pytalloc_get_ptr(py_obj);
   25265           0 :         if (value == NULL) {
   25266           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
   25267           0 :                 return -1;
   25268             :         }
   25269           0 :         if (value == Py_None) {
   25270           0 :                 object->object_dn = NULL;
   25271             :         } else {
   25272           0 :                 object->object_dn = NULL;
   25273             :                 {
   25274           0 :                         const char *test_str;
   25275           0 :                         const char *talloc_str;
   25276           0 :                         PyObject *unicode = NULL;
   25277           0 :                         if (PyUnicode_Check(value)) {
   25278           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25279           0 :                                 if (unicode == NULL) {
   25280           0 :                                         return -1;
   25281             :                                 }
   25282           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25283           0 :                         } else if (PyBytes_Check(value)) {
   25284           0 :                                 test_str = PyBytes_AS_STRING(value);
   25285             :                         } else {
   25286           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25287           0 :                                 return -1;
   25288             :                         }
   25289           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25290           0 :                         if (unicode != NULL) {
   25291           0 :                                 Py_DECREF(unicode);
   25292             :                         }
   25293           0 :                         if (talloc_str == NULL) {
   25294           0 :                                 PyErr_NoMemory();
   25295           0 :                                 return -1;
   25296             :                         }
   25297           0 :                         object->object_dn = talloc_str;
   25298             :                 }
   25299             :         }
   25300           0 :         return 0;
   25301             : }
   25302             : 
   25303           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_get_source_dsa_guid(PyObject *obj, void *closure)
   25304             : {
   25305           0 :         struct drsuapi_DsReplicaGetInfoRequest1 *object = pytalloc_get_ptr(obj);
   25306           0 :         PyObject *py_source_dsa_guid;
   25307           0 :         py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
   25308           0 :         return py_source_dsa_guid;
   25309             : }
   25310             : 
   25311           0 : static int py_drsuapi_DsReplicaGetInfoRequest1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
   25312             : {
   25313           0 :         struct drsuapi_DsReplicaGetInfoRequest1 *object = pytalloc_get_ptr(py_obj);
   25314           0 :         if (value == NULL) {
   25315           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
   25316           0 :                 return -1;
   25317             :         }
   25318           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   25319           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   25320           0 :                 PyErr_NoMemory();
   25321           0 :                 return -1;
   25322             :         }
   25323           0 :         object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
   25324           0 :         return 0;
   25325             : }
   25326             : 
   25327             : static PyGetSetDef py_drsuapi_DsReplicaGetInfoRequest1_getsetters[] = {
   25328             :         {
   25329             :                 .name = discard_const_p(char, "info_type"),
   25330             :                 .get = py_drsuapi_DsReplicaGetInfoRequest1_get_info_type,
   25331             :                 .set = py_drsuapi_DsReplicaGetInfoRequest1_set_info_type,
   25332             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaInfoType")
   25333             :         },
   25334             :         {
   25335             :                 .name = discard_const_p(char, "object_dn"),
   25336             :                 .get = py_drsuapi_DsReplicaGetInfoRequest1_get_object_dn,
   25337             :                 .set = py_drsuapi_DsReplicaGetInfoRequest1_set_object_dn,
   25338             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   25339             :         },
   25340             :         {
   25341             :                 .name = discard_const_p(char, "source_dsa_guid"),
   25342             :                 .get = py_drsuapi_DsReplicaGetInfoRequest1_get_source_dsa_guid,
   25343             :                 .set = py_drsuapi_DsReplicaGetInfoRequest1_set_source_dsa_guid,
   25344             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   25345             :         },
   25346             :         { .name = NULL }
   25347             : };
   25348             : 
   25349          10 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25350             : {
   25351          10 :         return pytalloc_new(struct drsuapi_DsReplicaGetInfoRequest1, type);
   25352             : }
   25353             : 
   25354             : 
   25355             : static PyTypeObject drsuapi_DsReplicaGetInfoRequest1_Type = {
   25356             :         PyVarObject_HEAD_INIT(NULL, 0)
   25357             :         .tp_name = "drsuapi.DsReplicaGetInfoRequest1",
   25358             :         .tp_getset = py_drsuapi_DsReplicaGetInfoRequest1_getsetters,
   25359             :         .tp_methods = NULL,
   25360             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25361             :         .tp_new = py_drsuapi_DsReplicaGetInfoRequest1_new,
   25362             : };
   25363             : 
   25364             : 
   25365           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_info_type(PyObject *obj, void *closure)
   25366             : {
   25367           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(obj);
   25368           0 :         PyObject *py_info_type;
   25369           0 :         py_info_type = PyLong_FromUnsignedLongLong((uint32_t)(object->info_type));
   25370           0 :         return py_info_type;
   25371             : }
   25372             : 
   25373           0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_info_type(PyObject *py_obj, PyObject *value, void *closure)
   25374             : {
   25375           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(py_obj);
   25376           0 :         if (value == NULL) {
   25377           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_type");
   25378           0 :                 return -1;
   25379             :         }
   25380             :         {
   25381           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->info_type));
   25382           0 :                 if (PyLong_Check(value)) {
   25383           0 :                         unsigned long long test_var;
   25384           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25385           0 :                         if (PyErr_Occurred() != NULL) {
   25386           0 :                                 return -1;
   25387             :                         }
   25388           0 :                         if (test_var > uint_max) {
   25389           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25390             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25391           0 :                                 return -1;
   25392             :                         }
   25393           0 :                         object->info_type = test_var;
   25394             :                 } else {
   25395           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25396             :                           PyLong_Type.tp_name);
   25397           0 :                         return -1;
   25398             :                 }
   25399             :         }
   25400           0 :         return 0;
   25401             : }
   25402             : 
   25403           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_object_dn(PyObject *obj, void *closure)
   25404             : {
   25405           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(obj);
   25406           0 :         PyObject *py_object_dn;
   25407           0 :         if (object->object_dn == NULL) {
   25408           0 :                 Py_RETURN_NONE;
   25409             :         }
   25410           0 :         if (object->object_dn == NULL) {
   25411           0 :                 py_object_dn = Py_None;
   25412           0 :                 Py_INCREF(py_object_dn);
   25413             :         } else {
   25414           0 :                 if (object->object_dn == NULL) {
   25415           0 :                         py_object_dn = Py_None;
   25416           0 :                         Py_INCREF(py_object_dn);
   25417             :                 } else {
   25418           0 :                         py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
   25419             :                 }
   25420             :         }
   25421           0 :         return py_object_dn;
   25422             : }
   25423             : 
   25424           0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
   25425             : {
   25426           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(py_obj);
   25427           0 :         if (value == NULL) {
   25428           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
   25429           0 :                 return -1;
   25430             :         }
   25431           0 :         if (value == Py_None) {
   25432           0 :                 object->object_dn = NULL;
   25433             :         } else {
   25434           0 :                 object->object_dn = NULL;
   25435             :                 {
   25436           0 :                         const char *test_str;
   25437           0 :                         const char *talloc_str;
   25438           0 :                         PyObject *unicode = NULL;
   25439           0 :                         if (PyUnicode_Check(value)) {
   25440           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25441           0 :                                 if (unicode == NULL) {
   25442           0 :                                         return -1;
   25443             :                                 }
   25444           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25445           0 :                         } else if (PyBytes_Check(value)) {
   25446           0 :                                 test_str = PyBytes_AS_STRING(value);
   25447             :                         } else {
   25448           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25449           0 :                                 return -1;
   25450             :                         }
   25451           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25452           0 :                         if (unicode != NULL) {
   25453           0 :                                 Py_DECREF(unicode);
   25454             :                         }
   25455           0 :                         if (talloc_str == NULL) {
   25456           0 :                                 PyErr_NoMemory();
   25457           0 :                                 return -1;
   25458             :                         }
   25459           0 :                         object->object_dn = talloc_str;
   25460             :                 }
   25461             :         }
   25462           0 :         return 0;
   25463             : }
   25464             : 
   25465           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_source_dsa_guid(PyObject *obj, void *closure)
   25466             : {
   25467           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(obj);
   25468           0 :         PyObject *py_source_dsa_guid;
   25469           0 :         py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
   25470           0 :         return py_source_dsa_guid;
   25471             : }
   25472             : 
   25473           0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
   25474             : {
   25475           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(py_obj);
   25476           0 :         if (value == NULL) {
   25477           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
   25478           0 :                 return -1;
   25479             :         }
   25480           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   25481           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   25482           0 :                 PyErr_NoMemory();
   25483           0 :                 return -1;
   25484             :         }
   25485           0 :         object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
   25486           0 :         return 0;
   25487             : }
   25488             : 
   25489           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_flags(PyObject *obj, void *closure)
   25490             : {
   25491           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(obj);
   25492           0 :         PyObject *py_flags;
   25493           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   25494           0 :         return py_flags;
   25495             : }
   25496             : 
   25497           0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   25498             : {
   25499           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(py_obj);
   25500           0 :         if (value == NULL) {
   25501           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   25502           0 :                 return -1;
   25503             :         }
   25504             :         {
   25505           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   25506           0 :                 if (PyLong_Check(value)) {
   25507           0 :                         unsigned long long test_var;
   25508           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25509           0 :                         if (PyErr_Occurred() != NULL) {
   25510           0 :                                 return -1;
   25511             :                         }
   25512           0 :                         if (test_var > uint_max) {
   25513           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25514             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25515           0 :                                 return -1;
   25516             :                         }
   25517           0 :                         object->flags = test_var;
   25518             :                 } else {
   25519           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25520             :                           PyLong_Type.tp_name);
   25521           0 :                         return -1;
   25522             :                 }
   25523             :         }
   25524           0 :         return 0;
   25525             : }
   25526             : 
   25527           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_attribute_name(PyObject *obj, void *closure)
   25528             : {
   25529           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(obj);
   25530           0 :         PyObject *py_attribute_name;
   25531           0 :         if (object->attribute_name == NULL) {
   25532           0 :                 Py_RETURN_NONE;
   25533             :         }
   25534           0 :         if (object->attribute_name == NULL) {
   25535           0 :                 py_attribute_name = Py_None;
   25536           0 :                 Py_INCREF(py_attribute_name);
   25537             :         } else {
   25538           0 :                 if (object->attribute_name == NULL) {
   25539           0 :                         py_attribute_name = Py_None;
   25540           0 :                         Py_INCREF(py_attribute_name);
   25541             :                 } else {
   25542           0 :                         py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
   25543             :                 }
   25544             :         }
   25545           0 :         return py_attribute_name;
   25546             : }
   25547             : 
   25548           0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
   25549             : {
   25550           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(py_obj);
   25551           0 :         if (value == NULL) {
   25552           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
   25553           0 :                 return -1;
   25554             :         }
   25555           0 :         if (value == Py_None) {
   25556           0 :                 object->attribute_name = NULL;
   25557             :         } else {
   25558           0 :                 object->attribute_name = NULL;
   25559             :                 {
   25560           0 :                         const char *test_str;
   25561           0 :                         const char *talloc_str;
   25562           0 :                         PyObject *unicode = NULL;
   25563           0 :                         if (PyUnicode_Check(value)) {
   25564           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25565           0 :                                 if (unicode == NULL) {
   25566           0 :                                         return -1;
   25567             :                                 }
   25568           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25569           0 :                         } else if (PyBytes_Check(value)) {
   25570           0 :                                 test_str = PyBytes_AS_STRING(value);
   25571             :                         } else {
   25572           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25573           0 :                                 return -1;
   25574             :                         }
   25575           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25576           0 :                         if (unicode != NULL) {
   25577           0 :                                 Py_DECREF(unicode);
   25578             :                         }
   25579           0 :                         if (talloc_str == NULL) {
   25580           0 :                                 PyErr_NoMemory();
   25581           0 :                                 return -1;
   25582             :                         }
   25583           0 :                         object->attribute_name = talloc_str;
   25584             :                 }
   25585             :         }
   25586           0 :         return 0;
   25587             : }
   25588             : 
   25589           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_value_dn_str(PyObject *obj, void *closure)
   25590             : {
   25591           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(obj);
   25592           0 :         PyObject *py_value_dn_str;
   25593           0 :         if (object->value_dn_str == NULL) {
   25594           0 :                 Py_RETURN_NONE;
   25595             :         }
   25596           0 :         if (object->value_dn_str == NULL) {
   25597           0 :                 py_value_dn_str = Py_None;
   25598           0 :                 Py_INCREF(py_value_dn_str);
   25599             :         } else {
   25600           0 :                 if (object->value_dn_str == NULL) {
   25601           0 :                         py_value_dn_str = Py_None;
   25602           0 :                         Py_INCREF(py_value_dn_str);
   25603             :                 } else {
   25604           0 :                         py_value_dn_str = PyUnicode_Decode(object->value_dn_str, strlen(object->value_dn_str), "utf-8", "ignore");
   25605             :                 }
   25606             :         }
   25607           0 :         return py_value_dn_str;
   25608             : }
   25609             : 
   25610           0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_value_dn_str(PyObject *py_obj, PyObject *value, void *closure)
   25611             : {
   25612           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(py_obj);
   25613           0 :         if (value == NULL) {
   25614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value_dn_str");
   25615           0 :                 return -1;
   25616             :         }
   25617           0 :         if (value == Py_None) {
   25618           0 :                 object->value_dn_str = NULL;
   25619             :         } else {
   25620           0 :                 object->value_dn_str = NULL;
   25621             :                 {
   25622           0 :                         const char *test_str;
   25623           0 :                         const char *talloc_str;
   25624           0 :                         PyObject *unicode = NULL;
   25625           0 :                         if (PyUnicode_Check(value)) {
   25626           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25627           0 :                                 if (unicode == NULL) {
   25628           0 :                                         return -1;
   25629             :                                 }
   25630           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25631           0 :                         } else if (PyBytes_Check(value)) {
   25632           0 :                                 test_str = PyBytes_AS_STRING(value);
   25633             :                         } else {
   25634           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25635           0 :                                 return -1;
   25636             :                         }
   25637           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25638           0 :                         if (unicode != NULL) {
   25639           0 :                                 Py_DECREF(unicode);
   25640             :                         }
   25641           0 :                         if (talloc_str == NULL) {
   25642           0 :                                 PyErr_NoMemory();
   25643           0 :                                 return -1;
   25644             :                         }
   25645           0 :                         object->value_dn_str = talloc_str;
   25646             :                 }
   25647             :         }
   25648           0 :         return 0;
   25649             : }
   25650             : 
   25651           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_enumeration_context(PyObject *obj, void *closure)
   25652             : {
   25653           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(obj);
   25654           0 :         PyObject *py_enumeration_context;
   25655           0 :         py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)(object->enumeration_context));
   25656           0 :         return py_enumeration_context;
   25657             : }
   25658             : 
   25659           0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
   25660             : {
   25661           0 :         struct drsuapi_DsReplicaGetInfoRequest2 *object = pytalloc_get_ptr(py_obj);
   25662           0 :         if (value == NULL) {
   25663           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
   25664           0 :                 return -1;
   25665             :         }
   25666             :         {
   25667           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
   25668           0 :                 if (PyLong_Check(value)) {
   25669           0 :                         unsigned long long test_var;
   25670           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   25671           0 :                         if (PyErr_Occurred() != NULL) {
   25672           0 :                                 return -1;
   25673             :                         }
   25674           0 :                         if (test_var > uint_max) {
   25675           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   25676             :                                   PyLong_Type.tp_name, uint_max, test_var);
   25677           0 :                                 return -1;
   25678             :                         }
   25679           0 :                         object->enumeration_context = test_var;
   25680             :                 } else {
   25681           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   25682             :                           PyLong_Type.tp_name);
   25683           0 :                         return -1;
   25684             :                 }
   25685             :         }
   25686           0 :         return 0;
   25687             : }
   25688             : 
   25689             : static PyGetSetDef py_drsuapi_DsReplicaGetInfoRequest2_getsetters[] = {
   25690             :         {
   25691             :                 .name = discard_const_p(char, "info_type"),
   25692             :                 .get = py_drsuapi_DsReplicaGetInfoRequest2_get_info_type,
   25693             :                 .set = py_drsuapi_DsReplicaGetInfoRequest2_set_info_type,
   25694             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaInfoType")
   25695             :         },
   25696             :         {
   25697             :                 .name = discard_const_p(char, "object_dn"),
   25698             :                 .get = py_drsuapi_DsReplicaGetInfoRequest2_get_object_dn,
   25699             :                 .set = py_drsuapi_DsReplicaGetInfoRequest2_set_object_dn,
   25700             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   25701             :         },
   25702             :         {
   25703             :                 .name = discard_const_p(char, "source_dsa_guid"),
   25704             :                 .get = py_drsuapi_DsReplicaGetInfoRequest2_get_source_dsa_guid,
   25705             :                 .set = py_drsuapi_DsReplicaGetInfoRequest2_set_source_dsa_guid,
   25706             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   25707             :         },
   25708             :         {
   25709             :                 .name = discard_const_p(char, "flags"),
   25710             :                 .get = py_drsuapi_DsReplicaGetInfoRequest2_get_flags,
   25711             :                 .set = py_drsuapi_DsReplicaGetInfoRequest2_set_flags,
   25712             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25713             :         },
   25714             :         {
   25715             :                 .name = discard_const_p(char, "attribute_name"),
   25716             :                 .get = py_drsuapi_DsReplicaGetInfoRequest2_get_attribute_name,
   25717             :                 .set = py_drsuapi_DsReplicaGetInfoRequest2_set_attribute_name,
   25718             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   25719             :         },
   25720             :         {
   25721             :                 .name = discard_const_p(char, "value_dn_str"),
   25722             :                 .get = py_drsuapi_DsReplicaGetInfoRequest2_get_value_dn_str,
   25723             :                 .set = py_drsuapi_DsReplicaGetInfoRequest2_set_value_dn_str,
   25724             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   25725             :         },
   25726             :         {
   25727             :                 .name = discard_const_p(char, "enumeration_context"),
   25728             :                 .get = py_drsuapi_DsReplicaGetInfoRequest2_get_enumeration_context,
   25729             :                 .set = py_drsuapi_DsReplicaGetInfoRequest2_set_enumeration_context,
   25730             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   25731             :         },
   25732             :         { .name = NULL }
   25733             : };
   25734             : 
   25735           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25736             : {
   25737           0 :         return pytalloc_new(struct drsuapi_DsReplicaGetInfoRequest2, type);
   25738             : }
   25739             : 
   25740             : 
   25741             : static PyTypeObject drsuapi_DsReplicaGetInfoRequest2_Type = {
   25742             :         PyVarObject_HEAD_INIT(NULL, 0)
   25743             :         .tp_name = "drsuapi.DsReplicaGetInfoRequest2",
   25744             :         .tp_getset = py_drsuapi_DsReplicaGetInfoRequest2_getsetters,
   25745             :         .tp_methods = NULL,
   25746             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25747             :         .tp_new = py_drsuapi_DsReplicaGetInfoRequest2_new,
   25748             : };
   25749             : 
   25750           0 : static PyObject *py_import_drsuapi_DsReplicaGetInfoRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaGetInfoRequest *in)
   25751             : {
   25752           0 :         PyObject *ret;
   25753             : 
   25754           0 :         switch (level) {
   25755           0 :                 case DRSUAPI_DS_REPLICA_GET_INFO:
   25756           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsReplicaGetInfoRequest1_Type, mem_ctx, &in->req1);
   25757           0 :                         return ret;
   25758             : 
   25759           0 :                 case DRSUAPI_DS_REPLICA_GET_INFO2:
   25760           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsReplicaGetInfoRequest2_Type, mem_ctx, &in->req2);
   25761           0 :                         return ret;
   25762             : 
   25763             :         }
   25764           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   25765           0 :         return NULL;
   25766             : }
   25767             : 
   25768          10 : static union drsuapi_DsReplicaGetInfoRequest *py_export_drsuapi_DsReplicaGetInfoRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   25769             : {
   25770          10 :         union drsuapi_DsReplicaGetInfoRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaGetInfoRequest);
   25771          10 :         switch (level) {
   25772          10 :                 case DRSUAPI_DS_REPLICA_GET_INFO:
   25773          10 :                         if (in == NULL) {
   25774           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   25775           0 :                                 talloc_free(ret); return NULL;
   25776             :                         }
   25777          10 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaGetInfoRequest1_Type, in, talloc_free(ret); return NULL;);
   25778          10 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25779           0 :                                 PyErr_NoMemory();
   25780           0 :                                 talloc_free(ret); return NULL;
   25781             :                         }
   25782          10 :                         ret->req1 = *(struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(in);
   25783          10 :                         break;
   25784             : 
   25785           0 :                 case DRSUAPI_DS_REPLICA_GET_INFO2:
   25786           0 :                         if (in == NULL) {
   25787           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req2");
   25788           0 :                                 talloc_free(ret); return NULL;
   25789             :                         }
   25790           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaGetInfoRequest2_Type, in, talloc_free(ret); return NULL;);
   25791           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   25792           0 :                                 PyErr_NoMemory();
   25793           0 :                                 talloc_free(ret); return NULL;
   25794             :                         }
   25795           0 :                         ret->req2 = *(struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(in);
   25796           0 :                         break;
   25797             : 
   25798           0 :                 default:
   25799           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   25800           0 :                         talloc_free(ret);
   25801           0 :                         ret = NULL;
   25802             :         }
   25803             : 
   25804          10 :         return ret;
   25805             : }
   25806             : 
   25807           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25808             : {
   25809           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   25810           0 :         PyObject *mem_ctx_obj = NULL;
   25811           0 :         TALLOC_CTX *mem_ctx = NULL;
   25812           0 :         int level = 0;
   25813           0 :         PyObject *in_obj = NULL;
   25814           0 :         union drsuapi_DsReplicaGetInfoRequest *in = NULL;
   25815             : 
   25816           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   25817             :                 discard_const_p(char *, kwnames),
   25818             :                 &mem_ctx_obj,
   25819             :                 &level,
   25820             :                 &in_obj)) {
   25821           0 :                 return NULL;
   25822             :         }
   25823           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   25824           0 :         if (mem_ctx == NULL) {
   25825           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   25826           0 :                 return NULL;
   25827             :         }
   25828           0 :         in = (union drsuapi_DsReplicaGetInfoRequest *)pytalloc_get_ptr(in_obj);
   25829           0 :         if (in == NULL) {
   25830           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaGetInfoRequest!");
   25831           0 :                 return NULL;
   25832             :         }
   25833             : 
   25834           0 :         return py_import_drsuapi_DsReplicaGetInfoRequest(mem_ctx, level, in);
   25835             : }
   25836             : 
   25837          10 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25838             : {
   25839          10 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   25840          10 :         PyObject *mem_ctx_obj = NULL;
   25841          10 :         TALLOC_CTX *mem_ctx = NULL;
   25842          10 :         int level = 0;
   25843          10 :         PyObject *in = NULL;
   25844          10 :         union drsuapi_DsReplicaGetInfoRequest *out = NULL;
   25845             : 
   25846          10 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   25847             :                 discard_const_p(char *, kwnames),
   25848             :                 &mem_ctx_obj,
   25849             :                 &level,
   25850             :                 &in)) {
   25851           0 :                 return NULL;
   25852             :         }
   25853          10 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   25854          10 :         if (mem_ctx == NULL) {
   25855           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   25856           0 :                 return NULL;
   25857             :         }
   25858             : 
   25859          10 :         out = py_export_drsuapi_DsReplicaGetInfoRequest(mem_ctx, level, in);
   25860          10 :         if (out == NULL) {
   25861           0 :                 return NULL;
   25862             :         }
   25863             : 
   25864          10 :         return pytalloc_GenericObject_reference(out);
   25865             : }
   25866             : 
   25867             : static PyMethodDef py_drsuapi_DsReplicaGetInfoRequest_methods[] = {
   25868             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfoRequest_import),
   25869             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   25870             :                 "T.__import__(mem_ctx, level, in) => ret." },
   25871             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfoRequest_export),
   25872             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   25873             :                 "T.__export__(mem_ctx, level, in) => ret." },
   25874             :         { NULL, NULL, 0, NULL }
   25875             : };
   25876             : 
   25877           0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   25878             : {
   25879           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   25880           0 :         return NULL;
   25881             : }
   25882             : 
   25883             : 
   25884             : static PyTypeObject drsuapi_DsReplicaGetInfoRequest_Type = {
   25885             :         PyVarObject_HEAD_INIT(NULL, 0)
   25886             :         .tp_name = "drsuapi.DsReplicaGetInfoRequest",
   25887             :         .tp_getset = NULL,
   25888             :         .tp_methods = py_drsuapi_DsReplicaGetInfoRequest_methods,
   25889             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   25890             :         .tp_new = py_drsuapi_DsReplicaGetInfoRequest_new,
   25891             : };
   25892             : 
   25893             : 
   25894          32 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_naming_context_dn(PyObject *obj, void *closure)
   25895             : {
   25896          32 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   25897           0 :         PyObject *py_naming_context_dn;
   25898          32 :         if (object->naming_context_dn == NULL) {
   25899           0 :                 Py_RETURN_NONE;
   25900             :         }
   25901          32 :         if (object->naming_context_dn == NULL) {
   25902           0 :                 py_naming_context_dn = Py_None;
   25903           0 :                 Py_INCREF(py_naming_context_dn);
   25904             :         } else {
   25905          32 :                 if (object->naming_context_dn == NULL) {
   25906           0 :                         py_naming_context_dn = Py_None;
   25907           0 :                         Py_INCREF(py_naming_context_dn);
   25908             :                 } else {
   25909          32 :                         py_naming_context_dn = PyUnicode_Decode(object->naming_context_dn, strlen(object->naming_context_dn), "utf-8", "ignore");
   25910             :                 }
   25911             :         }
   25912          32 :         return py_naming_context_dn;
   25913             : }
   25914             : 
   25915           0 : static int py_drsuapi_DsReplicaNeighbour_set_naming_context_dn(PyObject *py_obj, PyObject *value, void *closure)
   25916             : {
   25917           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   25918           0 :         if (value == NULL) {
   25919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context_dn");
   25920           0 :                 return -1;
   25921             :         }
   25922           0 :         if (value == Py_None) {
   25923           0 :                 object->naming_context_dn = NULL;
   25924             :         } else {
   25925           0 :                 object->naming_context_dn = NULL;
   25926             :                 {
   25927           0 :                         const char *test_str;
   25928           0 :                         const char *talloc_str;
   25929           0 :                         PyObject *unicode = NULL;
   25930           0 :                         if (PyUnicode_Check(value)) {
   25931           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25932           0 :                                 if (unicode == NULL) {
   25933           0 :                                         return -1;
   25934             :                                 }
   25935           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25936           0 :                         } else if (PyBytes_Check(value)) {
   25937           0 :                                 test_str = PyBytes_AS_STRING(value);
   25938             :                         } else {
   25939           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   25940           0 :                                 return -1;
   25941             :                         }
   25942           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   25943           0 :                         if (unicode != NULL) {
   25944           0 :                                 Py_DECREF(unicode);
   25945             :                         }
   25946           0 :                         if (talloc_str == NULL) {
   25947           0 :                                 PyErr_NoMemory();
   25948           0 :                                 return -1;
   25949             :                         }
   25950           0 :                         object->naming_context_dn = talloc_str;
   25951             :                 }
   25952             :         }
   25953           0 :         return 0;
   25954             : }
   25955             : 
   25956          72 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_dn(PyObject *obj, void *closure)
   25957             : {
   25958          72 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   25959           0 :         PyObject *py_source_dsa_obj_dn;
   25960          72 :         if (object->source_dsa_obj_dn == NULL) {
   25961           0 :                 Py_RETURN_NONE;
   25962             :         }
   25963          72 :         if (object->source_dsa_obj_dn == NULL) {
   25964           0 :                 py_source_dsa_obj_dn = Py_None;
   25965           0 :                 Py_INCREF(py_source_dsa_obj_dn);
   25966             :         } else {
   25967          72 :                 if (object->source_dsa_obj_dn == NULL) {
   25968           0 :                         py_source_dsa_obj_dn = Py_None;
   25969           0 :                         Py_INCREF(py_source_dsa_obj_dn);
   25970             :                 } else {
   25971          72 :                         py_source_dsa_obj_dn = PyUnicode_Decode(object->source_dsa_obj_dn, strlen(object->source_dsa_obj_dn), "utf-8", "ignore");
   25972             :                 }
   25973             :         }
   25974          72 :         return py_source_dsa_obj_dn;
   25975             : }
   25976             : 
   25977           0 : static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
   25978             : {
   25979           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   25980           0 :         if (value == NULL) {
   25981           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_obj_dn");
   25982           0 :                 return -1;
   25983             :         }
   25984           0 :         if (value == Py_None) {
   25985           0 :                 object->source_dsa_obj_dn = NULL;
   25986             :         } else {
   25987           0 :                 object->source_dsa_obj_dn = NULL;
   25988             :                 {
   25989           0 :                         const char *test_str;
   25990           0 :                         const char *talloc_str;
   25991           0 :                         PyObject *unicode = NULL;
   25992           0 :                         if (PyUnicode_Check(value)) {
   25993           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   25994           0 :                                 if (unicode == NULL) {
   25995           0 :                                         return -1;
   25996             :                                 }
   25997           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   25998           0 :                         } else if (PyBytes_Check(value)) {
   25999           0 :                                 test_str = PyBytes_AS_STRING(value);
   26000             :                         } else {
   26001           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26002           0 :                                 return -1;
   26003             :                         }
   26004           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26005           0 :                         if (unicode != NULL) {
   26006           0 :                                 Py_DECREF(unicode);
   26007             :                         }
   26008           0 :                         if (talloc_str == NULL) {
   26009           0 :                                 PyErr_NoMemory();
   26010           0 :                                 return -1;
   26011             :                         }
   26012           0 :                         object->source_dsa_obj_dn = talloc_str;
   26013             :                 }
   26014             :         }
   26015           0 :         return 0;
   26016             : }
   26017             : 
   26018           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_address(PyObject *obj, void *closure)
   26019             : {
   26020           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26021           0 :         PyObject *py_source_dsa_address;
   26022           0 :         if (object->source_dsa_address == NULL) {
   26023           0 :                 Py_RETURN_NONE;
   26024             :         }
   26025           0 :         if (object->source_dsa_address == NULL) {
   26026           0 :                 py_source_dsa_address = Py_None;
   26027           0 :                 Py_INCREF(py_source_dsa_address);
   26028             :         } else {
   26029           0 :                 if (object->source_dsa_address == NULL) {
   26030           0 :                         py_source_dsa_address = Py_None;
   26031           0 :                         Py_INCREF(py_source_dsa_address);
   26032             :                 } else {
   26033           0 :                         py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
   26034             :                 }
   26035             :         }
   26036           0 :         return py_source_dsa_address;
   26037             : }
   26038             : 
   26039           0 : static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
   26040             : {
   26041           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26042           0 :         if (value == NULL) {
   26043           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_address");
   26044           0 :                 return -1;
   26045             :         }
   26046           0 :         if (value == Py_None) {
   26047           0 :                 object->source_dsa_address = NULL;
   26048             :         } else {
   26049           0 :                 object->source_dsa_address = NULL;
   26050             :                 {
   26051           0 :                         const char *test_str;
   26052           0 :                         const char *talloc_str;
   26053           0 :                         PyObject *unicode = NULL;
   26054           0 :                         if (PyUnicode_Check(value)) {
   26055           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26056           0 :                                 if (unicode == NULL) {
   26057           0 :                                         return -1;
   26058             :                                 }
   26059           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26060           0 :                         } else if (PyBytes_Check(value)) {
   26061           0 :                                 test_str = PyBytes_AS_STRING(value);
   26062             :                         } else {
   26063           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26064           0 :                                 return -1;
   26065             :                         }
   26066           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26067           0 :                         if (unicode != NULL) {
   26068           0 :                                 Py_DECREF(unicode);
   26069             :                         }
   26070           0 :                         if (talloc_str == NULL) {
   26071           0 :                                 PyErr_NoMemory();
   26072           0 :                                 return -1;
   26073             :                         }
   26074           0 :                         object->source_dsa_address = talloc_str;
   26075             :                 }
   26076             :         }
   26077           0 :         return 0;
   26078             : }
   26079             : 
   26080           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_transport_obj_dn(PyObject *obj, void *closure)
   26081             : {
   26082           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26083           0 :         PyObject *py_transport_obj_dn;
   26084           0 :         if (object->transport_obj_dn == NULL) {
   26085           0 :                 Py_RETURN_NONE;
   26086             :         }
   26087           0 :         if (object->transport_obj_dn == NULL) {
   26088           0 :                 py_transport_obj_dn = Py_None;
   26089           0 :                 Py_INCREF(py_transport_obj_dn);
   26090             :         } else {
   26091           0 :                 if (object->transport_obj_dn == NULL) {
   26092           0 :                         py_transport_obj_dn = Py_None;
   26093           0 :                         Py_INCREF(py_transport_obj_dn);
   26094             :                 } else {
   26095           0 :                         py_transport_obj_dn = PyUnicode_Decode(object->transport_obj_dn, strlen(object->transport_obj_dn), "utf-8", "ignore");
   26096             :                 }
   26097             :         }
   26098           0 :         return py_transport_obj_dn;
   26099             : }
   26100             : 
   26101           0 : static int py_drsuapi_DsReplicaNeighbour_set_transport_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
   26102             : {
   26103           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26104           0 :         if (value == NULL) {
   26105           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport_obj_dn");
   26106           0 :                 return -1;
   26107             :         }
   26108           0 :         if (value == Py_None) {
   26109           0 :                 object->transport_obj_dn = NULL;
   26110             :         } else {
   26111           0 :                 object->transport_obj_dn = NULL;
   26112             :                 {
   26113           0 :                         const char *test_str;
   26114           0 :                         const char *talloc_str;
   26115           0 :                         PyObject *unicode = NULL;
   26116           0 :                         if (PyUnicode_Check(value)) {
   26117           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   26118           0 :                                 if (unicode == NULL) {
   26119           0 :                                         return -1;
   26120             :                                 }
   26121           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   26122           0 :                         } else if (PyBytes_Check(value)) {
   26123           0 :                                 test_str = PyBytes_AS_STRING(value);
   26124             :                         } else {
   26125           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   26126           0 :                                 return -1;
   26127             :                         }
   26128           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   26129           0 :                         if (unicode != NULL) {
   26130           0 :                                 Py_DECREF(unicode);
   26131             :                         }
   26132           0 :                         if (talloc_str == NULL) {
   26133           0 :                                 PyErr_NoMemory();
   26134           0 :                                 return -1;
   26135             :                         }
   26136           0 :                         object->transport_obj_dn = talloc_str;
   26137             :                 }
   26138             :         }
   26139           0 :         return 0;
   26140             : }
   26141             : 
   26142           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_replica_flags(PyObject *obj, void *closure)
   26143             : {
   26144           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26145           0 :         PyObject *py_replica_flags;
   26146           0 :         py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->replica_flags));
   26147           0 :         return py_replica_flags;
   26148             : }
   26149             : 
   26150           0 : static int py_drsuapi_DsReplicaNeighbour_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
   26151             : {
   26152           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26153           0 :         if (value == NULL) {
   26154           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
   26155           0 :                 return -1;
   26156             :         }
   26157             :         {
   26158           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
   26159           0 :                 if (PyLong_Check(value)) {
   26160           0 :                         unsigned long long test_var;
   26161           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26162           0 :                         if (PyErr_Occurred() != NULL) {
   26163           0 :                                 return -1;
   26164             :                         }
   26165           0 :                         if (test_var > uint_max) {
   26166           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26167             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26168           0 :                                 return -1;
   26169             :                         }
   26170           0 :                         object->replica_flags = test_var;
   26171             :                 } else {
   26172           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26173             :                           PyLong_Type.tp_name);
   26174           0 :                         return -1;
   26175             :                 }
   26176             :         }
   26177           0 :         return 0;
   26178             : }
   26179             : 
   26180           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_reserved(PyObject *obj, void *closure)
   26181             : {
   26182           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26183           0 :         PyObject *py_reserved;
   26184           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
   26185           0 :         return py_reserved;
   26186             : }
   26187             : 
   26188           0 : static int py_drsuapi_DsReplicaNeighbour_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   26189             : {
   26190           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26191           0 :         if (value == NULL) {
   26192           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
   26193           0 :                 return -1;
   26194             :         }
   26195             :         {
   26196           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   26197           0 :                 if (PyLong_Check(value)) {
   26198           0 :                         unsigned long long test_var;
   26199           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26200           0 :                         if (PyErr_Occurred() != NULL) {
   26201           0 :                                 return -1;
   26202             :                         }
   26203           0 :                         if (test_var > uint_max) {
   26204           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26205             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26206           0 :                                 return -1;
   26207             :                         }
   26208           0 :                         object->reserved = test_var;
   26209             :                 } else {
   26210           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26211             :                           PyLong_Type.tp_name);
   26212           0 :                         return -1;
   26213             :                 }
   26214             :         }
   26215           0 :         return 0;
   26216             : }
   26217             : 
   26218           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_naming_context_obj_guid(PyObject *obj, void *closure)
   26219             : {
   26220           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26221           0 :         PyObject *py_naming_context_obj_guid;
   26222           0 :         py_naming_context_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->naming_context_obj_guid);
   26223           0 :         return py_naming_context_obj_guid;
   26224             : }
   26225             : 
   26226           0 : static int py_drsuapi_DsReplicaNeighbour_set_naming_context_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
   26227             : {
   26228           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26229           0 :         if (value == NULL) {
   26230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context_obj_guid");
   26231           0 :                 return -1;
   26232             :         }
   26233           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   26234           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   26235           0 :                 PyErr_NoMemory();
   26236           0 :                 return -1;
   26237             :         }
   26238           0 :         object->naming_context_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
   26239           0 :         return 0;
   26240             : }
   26241             : 
   26242          32 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_guid(PyObject *obj, void *closure)
   26243             : {
   26244          32 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26245           0 :         PyObject *py_source_dsa_obj_guid;
   26246          32 :         py_source_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_obj_guid);
   26247          32 :         return py_source_dsa_obj_guid;
   26248             : }
   26249             : 
   26250           0 : static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
   26251             : {
   26252           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26253           0 :         if (value == NULL) {
   26254           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_obj_guid");
   26255           0 :                 return -1;
   26256             :         }
   26257           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   26258           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   26259           0 :                 PyErr_NoMemory();
   26260           0 :                 return -1;
   26261             :         }
   26262           0 :         object->source_dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
   26263           0 :         return 0;
   26264             : }
   26265             : 
   26266           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_invocation_id(PyObject *obj, void *closure)
   26267             : {
   26268           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26269           0 :         PyObject *py_source_dsa_invocation_id;
   26270           0 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
   26271           0 :         return py_source_dsa_invocation_id;
   26272             : }
   26273             : 
   26274           0 : static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
   26275             : {
   26276           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26277           0 :         if (value == NULL) {
   26278           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
   26279           0 :                 return -1;
   26280             :         }
   26281           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   26282           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   26283           0 :                 PyErr_NoMemory();
   26284           0 :                 return -1;
   26285             :         }
   26286           0 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
   26287           0 :         return 0;
   26288             : }
   26289             : 
   26290           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_transport_obj_guid(PyObject *obj, void *closure)
   26291             : {
   26292           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26293           0 :         PyObject *py_transport_obj_guid;
   26294           0 :         py_transport_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->transport_obj_guid);
   26295           0 :         return py_transport_obj_guid;
   26296             : }
   26297             : 
   26298           0 : static int py_drsuapi_DsReplicaNeighbour_set_transport_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
   26299             : {
   26300           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26301           0 :         if (value == NULL) {
   26302           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport_obj_guid");
   26303           0 :                 return -1;
   26304             :         }
   26305           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   26306           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   26307           0 :                 PyErr_NoMemory();
   26308           0 :                 return -1;
   26309             :         }
   26310           0 :         object->transport_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
   26311           0 :         return 0;
   26312             : }
   26313             : 
   26314           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_tmp_highest_usn(PyObject *obj, void *closure)
   26315             : {
   26316           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26317           0 :         PyObject *py_tmp_highest_usn;
   26318           0 :         py_tmp_highest_usn = PyLong_FromUnsignedLongLong(object->tmp_highest_usn);
   26319           0 :         return py_tmp_highest_usn;
   26320             : }
   26321             : 
   26322           0 : static int py_drsuapi_DsReplicaNeighbour_set_tmp_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
   26323             : {
   26324           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26325           0 :         if (value == NULL) {
   26326           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->tmp_highest_usn");
   26327           0 :                 return -1;
   26328             :         }
   26329             :         {
   26330           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->tmp_highest_usn));
   26331           0 :                 if (PyLong_Check(value)) {
   26332           0 :                         unsigned long long test_var;
   26333           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26334           0 :                         if (PyErr_Occurred() != NULL) {
   26335           0 :                                 return -1;
   26336             :                         }
   26337           0 :                         if (test_var > uint_max) {
   26338           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26339             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26340           0 :                                 return -1;
   26341             :                         }
   26342           0 :                         object->tmp_highest_usn = test_var;
   26343             :                 } else {
   26344           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26345             :                           PyLong_Type.tp_name);
   26346           0 :                         return -1;
   26347             :                 }
   26348             :         }
   26349           0 :         return 0;
   26350             : }
   26351             : 
   26352           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_highest_usn(PyObject *obj, void *closure)
   26353             : {
   26354           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26355           0 :         PyObject *py_highest_usn;
   26356           0 :         py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
   26357           0 :         return py_highest_usn;
   26358             : }
   26359             : 
   26360           0 : static int py_drsuapi_DsReplicaNeighbour_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
   26361             : {
   26362           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26363           0 :         if (value == NULL) {
   26364           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
   26365           0 :                 return -1;
   26366             :         }
   26367             :         {
   26368           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
   26369           0 :                 if (PyLong_Check(value)) {
   26370           0 :                         unsigned long long test_var;
   26371           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26372           0 :                         if (PyErr_Occurred() != NULL) {
   26373           0 :                                 return -1;
   26374             :                         }
   26375           0 :                         if (test_var > uint_max) {
   26376           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26377             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26378           0 :                                 return -1;
   26379             :                         }
   26380           0 :                         object->highest_usn = test_var;
   26381             :                 } else {
   26382           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26383             :                           PyLong_Type.tp_name);
   26384           0 :                         return -1;
   26385             :                 }
   26386             :         }
   26387           0 :         return 0;
   26388             : }
   26389             : 
   26390          32 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_last_success(PyObject *obj, void *closure)
   26391             : {
   26392          32 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26393           0 :         PyObject *py_last_success;
   26394          32 :         py_last_success = PyLong_FromUnsignedLongLong(object->last_success);
   26395          32 :         return py_last_success;
   26396             : }
   26397             : 
   26398           0 : static int py_drsuapi_DsReplicaNeighbour_set_last_success(PyObject *py_obj, PyObject *value, void *closure)
   26399             : {
   26400           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26401           0 :         if (value == NULL) {
   26402           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_success");
   26403           0 :                 return -1;
   26404             :         }
   26405             :         {
   26406           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_success));
   26407           0 :                 if (PyLong_Check(value)) {
   26408           0 :                         unsigned long long test_var;
   26409           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26410           0 :                         if (PyErr_Occurred() != NULL) {
   26411           0 :                                 return -1;
   26412             :                         }
   26413           0 :                         if (test_var > uint_max) {
   26414           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26415             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26416           0 :                                 return -1;
   26417             :                         }
   26418           0 :                         object->last_success = test_var;
   26419             :                 } else {
   26420           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26421             :                           PyLong_Type.tp_name);
   26422           0 :                         return -1;
   26423             :                 }
   26424             :         }
   26425           0 :         return 0;
   26426             : }
   26427             : 
   26428          32 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_last_attempt(PyObject *obj, void *closure)
   26429             : {
   26430          32 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26431           0 :         PyObject *py_last_attempt;
   26432          32 :         py_last_attempt = PyLong_FromUnsignedLongLong(object->last_attempt);
   26433          32 :         return py_last_attempt;
   26434             : }
   26435             : 
   26436           0 : static int py_drsuapi_DsReplicaNeighbour_set_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
   26437             : {
   26438           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26439           0 :         if (value == NULL) {
   26440           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_attempt");
   26441           0 :                 return -1;
   26442             :         }
   26443             :         {
   26444           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_attempt));
   26445           0 :                 if (PyLong_Check(value)) {
   26446           0 :                         unsigned long long test_var;
   26447           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26448           0 :                         if (PyErr_Occurred() != NULL) {
   26449           0 :                                 return -1;
   26450             :                         }
   26451           0 :                         if (test_var > uint_max) {
   26452           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26453             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26454           0 :                                 return -1;
   26455             :                         }
   26456           0 :                         object->last_attempt = test_var;
   26457             :                 } else {
   26458           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26459             :                           PyLong_Type.tp_name);
   26460           0 :                         return -1;
   26461             :                 }
   26462             :         }
   26463           0 :         return 0;
   26464             : }
   26465             : 
   26466          32 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_result_last_attempt(PyObject *obj, void *closure)
   26467             : {
   26468          32 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26469           0 :         PyObject *py_result_last_attempt;
   26470          32 :         py_result_last_attempt = PyErr_FromWERROR(object->result_last_attempt);
   26471          32 :         return py_result_last_attempt;
   26472             : }
   26473             : 
   26474           0 : static int py_drsuapi_DsReplicaNeighbour_set_result_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
   26475             : {
   26476           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26477           0 :         if (value == NULL) {
   26478           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->result_last_attempt");
   26479           0 :                 return -1;
   26480             :         }
   26481           0 :         object->result_last_attempt = W_ERROR(PyLong_AsLong(value));
   26482           0 :         return 0;
   26483             : }
   26484             : 
   26485          32 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_consecutive_sync_failures(PyObject *obj, void *closure)
   26486             : {
   26487          32 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(obj);
   26488           0 :         PyObject *py_consecutive_sync_failures;
   26489          32 :         py_consecutive_sync_failures = PyLong_FromUnsignedLongLong((uint32_t)(object->consecutive_sync_failures));
   26490          32 :         return py_consecutive_sync_failures;
   26491             : }
   26492             : 
   26493           0 : static int py_drsuapi_DsReplicaNeighbour_set_consecutive_sync_failures(PyObject *py_obj, PyObject *value, void *closure)
   26494             : {
   26495           0 :         struct drsuapi_DsReplicaNeighbour *object = pytalloc_get_ptr(py_obj);
   26496           0 :         if (value == NULL) {
   26497           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->consecutive_sync_failures");
   26498           0 :                 return -1;
   26499             :         }
   26500             :         {
   26501           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->consecutive_sync_failures));
   26502           0 :                 if (PyLong_Check(value)) {
   26503           0 :                         unsigned long long test_var;
   26504           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26505           0 :                         if (PyErr_Occurred() != NULL) {
   26506           0 :                                 return -1;
   26507             :                         }
   26508           0 :                         if (test_var > uint_max) {
   26509           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26510             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26511           0 :                                 return -1;
   26512             :                         }
   26513           0 :                         object->consecutive_sync_failures = test_var;
   26514             :                 } else {
   26515           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26516             :                           PyLong_Type.tp_name);
   26517           0 :                         return -1;
   26518             :                 }
   26519             :         }
   26520           0 :         return 0;
   26521             : }
   26522             : 
   26523             : static PyGetSetDef py_drsuapi_DsReplicaNeighbour_getsetters[] = {
   26524             :         {
   26525             :                 .name = discard_const_p(char, "naming_context_dn"),
   26526             :                 .get = py_drsuapi_DsReplicaNeighbour_get_naming_context_dn,
   26527             :                 .set = py_drsuapi_DsReplicaNeighbour_set_naming_context_dn,
   26528             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26529             :         },
   26530             :         {
   26531             :                 .name = discard_const_p(char, "source_dsa_obj_dn"),
   26532             :                 .get = py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_dn,
   26533             :                 .set = py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_dn,
   26534             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26535             :         },
   26536             :         {
   26537             :                 .name = discard_const_p(char, "source_dsa_address"),
   26538             :                 .get = py_drsuapi_DsReplicaNeighbour_get_source_dsa_address,
   26539             :                 .set = py_drsuapi_DsReplicaNeighbour_set_source_dsa_address,
   26540             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26541             :         },
   26542             :         {
   26543             :                 .name = discard_const_p(char, "transport_obj_dn"),
   26544             :                 .get = py_drsuapi_DsReplicaNeighbour_get_transport_obj_dn,
   26545             :                 .set = py_drsuapi_DsReplicaNeighbour_set_transport_obj_dn,
   26546             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   26547             :         },
   26548             :         {
   26549             :                 .name = discard_const_p(char, "replica_flags"),
   26550             :                 .get = py_drsuapi_DsReplicaNeighbour_get_replica_flags,
   26551             :                 .set = py_drsuapi_DsReplicaNeighbour_set_replica_flags,
   26552             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
   26553             :         },
   26554             :         {
   26555             :                 .name = discard_const_p(char, "reserved"),
   26556             :                 .get = py_drsuapi_DsReplicaNeighbour_get_reserved,
   26557             :                 .set = py_drsuapi_DsReplicaNeighbour_set_reserved,
   26558             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26559             :         },
   26560             :         {
   26561             :                 .name = discard_const_p(char, "naming_context_obj_guid"),
   26562             :                 .get = py_drsuapi_DsReplicaNeighbour_get_naming_context_obj_guid,
   26563             :                 .set = py_drsuapi_DsReplicaNeighbour_set_naming_context_obj_guid,
   26564             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   26565             :         },
   26566             :         {
   26567             :                 .name = discard_const_p(char, "source_dsa_obj_guid"),
   26568             :                 .get = py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_guid,
   26569             :                 .set = py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_guid,
   26570             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   26571             :         },
   26572             :         {
   26573             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
   26574             :                 .get = py_drsuapi_DsReplicaNeighbour_get_source_dsa_invocation_id,
   26575             :                 .set = py_drsuapi_DsReplicaNeighbour_set_source_dsa_invocation_id,
   26576             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   26577             :         },
   26578             :         {
   26579             :                 .name = discard_const_p(char, "transport_obj_guid"),
   26580             :                 .get = py_drsuapi_DsReplicaNeighbour_get_transport_obj_guid,
   26581             :                 .set = py_drsuapi_DsReplicaNeighbour_set_transport_obj_guid,
   26582             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   26583             :         },
   26584             :         {
   26585             :                 .name = discard_const_p(char, "tmp_highest_usn"),
   26586             :                 .get = py_drsuapi_DsReplicaNeighbour_get_tmp_highest_usn,
   26587             :                 .set = py_drsuapi_DsReplicaNeighbour_set_tmp_highest_usn,
   26588             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   26589             :         },
   26590             :         {
   26591             :                 .name = discard_const_p(char, "highest_usn"),
   26592             :                 .get = py_drsuapi_DsReplicaNeighbour_get_highest_usn,
   26593             :                 .set = py_drsuapi_DsReplicaNeighbour_set_highest_usn,
   26594             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   26595             :         },
   26596             :         {
   26597             :                 .name = discard_const_p(char, "last_success"),
   26598             :                 .get = py_drsuapi_DsReplicaNeighbour_get_last_success,
   26599             :                 .set = py_drsuapi_DsReplicaNeighbour_set_last_success,
   26600             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   26601             :         },
   26602             :         {
   26603             :                 .name = discard_const_p(char, "last_attempt"),
   26604             :                 .get = py_drsuapi_DsReplicaNeighbour_get_last_attempt,
   26605             :                 .set = py_drsuapi_DsReplicaNeighbour_set_last_attempt,
   26606             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   26607             :         },
   26608             :         {
   26609             :                 .name = discard_const_p(char, "result_last_attempt"),
   26610             :                 .get = py_drsuapi_DsReplicaNeighbour_get_result_last_attempt,
   26611             :                 .set = py_drsuapi_DsReplicaNeighbour_set_result_last_attempt,
   26612             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   26613             :         },
   26614             :         {
   26615             :                 .name = discard_const_p(char, "consecutive_sync_failures"),
   26616             :                 .get = py_drsuapi_DsReplicaNeighbour_get_consecutive_sync_failures,
   26617             :                 .set = py_drsuapi_DsReplicaNeighbour_set_consecutive_sync_failures,
   26618             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26619             :         },
   26620             :         { .name = NULL }
   26621             : };
   26622             : 
   26623           0 : static PyObject *py_drsuapi_DsReplicaNeighbour_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26624             : {
   26625           0 :         return pytalloc_new(struct drsuapi_DsReplicaNeighbour, type);
   26626             : }
   26627             : 
   26628             : 
   26629             : static PyTypeObject drsuapi_DsReplicaNeighbour_Type = {
   26630             :         PyVarObject_HEAD_INIT(NULL, 0)
   26631             :         .tp_name = "drsuapi.DsReplicaNeighbour",
   26632             :         .tp_getset = py_drsuapi_DsReplicaNeighbour_getsetters,
   26633             :         .tp_methods = NULL,
   26634             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26635             :         .tp_new = py_drsuapi_DsReplicaNeighbour_new,
   26636             : };
   26637             : 
   26638             : 
   26639           0 : static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_count(PyObject *obj, void *closure)
   26640             : {
   26641           0 :         struct drsuapi_DsReplicaNeighbourCtr *object = pytalloc_get_ptr(obj);
   26642           0 :         PyObject *py_count;
   26643           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   26644           0 :         return py_count;
   26645             : }
   26646             : 
   26647           0 : static int py_drsuapi_DsReplicaNeighbourCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   26648             : {
   26649           0 :         struct drsuapi_DsReplicaNeighbourCtr *object = pytalloc_get_ptr(py_obj);
   26650           0 :         if (value == NULL) {
   26651           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   26652           0 :                 return -1;
   26653             :         }
   26654             :         {
   26655           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   26656           0 :                 if (PyLong_Check(value)) {
   26657           0 :                         unsigned long long test_var;
   26658           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26659           0 :                         if (PyErr_Occurred() != NULL) {
   26660           0 :                                 return -1;
   26661             :                         }
   26662           0 :                         if (test_var > uint_max) {
   26663           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26664             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26665           0 :                                 return -1;
   26666             :                         }
   26667           0 :                         object->count = test_var;
   26668             :                 } else {
   26669           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26670             :                           PyLong_Type.tp_name);
   26671           0 :                         return -1;
   26672             :                 }
   26673             :         }
   26674           0 :         return 0;
   26675             : }
   26676             : 
   26677           0 : static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_reserved(PyObject *obj, void *closure)
   26678             : {
   26679           0 :         struct drsuapi_DsReplicaNeighbourCtr *object = pytalloc_get_ptr(obj);
   26680           0 :         PyObject *py_reserved;
   26681           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
   26682           0 :         return py_reserved;
   26683             : }
   26684             : 
   26685           0 : static int py_drsuapi_DsReplicaNeighbourCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   26686             : {
   26687           0 :         struct drsuapi_DsReplicaNeighbourCtr *object = pytalloc_get_ptr(py_obj);
   26688           0 :         if (value == NULL) {
   26689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
   26690           0 :                 return -1;
   26691             :         }
   26692             :         {
   26693           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   26694           0 :                 if (PyLong_Check(value)) {
   26695           0 :                         unsigned long long test_var;
   26696           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26697           0 :                         if (PyErr_Occurred() != NULL) {
   26698           0 :                                 return -1;
   26699             :                         }
   26700           0 :                         if (test_var > uint_max) {
   26701           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26702             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26703           0 :                                 return -1;
   26704             :                         }
   26705           0 :                         object->reserved = test_var;
   26706             :                 } else {
   26707           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26708             :                           PyLong_Type.tp_name);
   26709           0 :                         return -1;
   26710             :                 }
   26711             :         }
   26712           0 :         return 0;
   26713             : }
   26714             : 
   26715          10 : static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_array(PyObject *obj, void *closure)
   26716             : {
   26717          10 :         struct drsuapi_DsReplicaNeighbourCtr *object = pytalloc_get_ptr(obj);
   26718           0 :         PyObject *py_array;
   26719          10 :         py_array = PyList_New(object->count);
   26720          10 :         if (py_array == NULL) {
   26721           0 :                 return NULL;
   26722             :         }
   26723             :         {
   26724             :                 int array_cntr_0;
   26725          50 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   26726           0 :                         PyObject *py_array_0;
   26727          40 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbour_Type, object->array, &(object->array)[array_cntr_0]);
   26728          40 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   26729             :                 }
   26730             :         }
   26731          10 :         return py_array;
   26732             : }
   26733             : 
   26734           0 : static int py_drsuapi_DsReplicaNeighbourCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   26735             : {
   26736           0 :         struct drsuapi_DsReplicaNeighbourCtr *object = pytalloc_get_ptr(py_obj);
   26737           0 :         if (value == NULL) {
   26738           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   26739           0 :                 return -1;
   26740             :         }
   26741           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   26742             :         {
   26743           0 :                 int array_cntr_0;
   26744           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   26745           0 :                 if (!object->array) { return -1; }
   26746           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   26747           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   26748           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   26749           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   26750           0 :                                 return -1;
   26751             :                         }
   26752           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbour_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   26753           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   26754           0 :                                 PyErr_NoMemory();
   26755           0 :                                 return -1;
   26756             :                         }
   26757           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   26758             :                 }
   26759             :         }
   26760           0 :         return 0;
   26761             : }
   26762             : 
   26763             : static PyGetSetDef py_drsuapi_DsReplicaNeighbourCtr_getsetters[] = {
   26764             :         {
   26765             :                 .name = discard_const_p(char, "count"),
   26766             :                 .get = py_drsuapi_DsReplicaNeighbourCtr_get_count,
   26767             :                 .set = py_drsuapi_DsReplicaNeighbourCtr_set_count,
   26768             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26769             :         },
   26770             :         {
   26771             :                 .name = discard_const_p(char, "reserved"),
   26772             :                 .get = py_drsuapi_DsReplicaNeighbourCtr_get_reserved,
   26773             :                 .set = py_drsuapi_DsReplicaNeighbourCtr_set_reserved,
   26774             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26775             :         },
   26776             :         {
   26777             :                 .name = discard_const_p(char, "array"),
   26778             :                 .get = py_drsuapi_DsReplicaNeighbourCtr_get_array,
   26779             :                 .set = py_drsuapi_DsReplicaNeighbourCtr_set_array,
   26780             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaNeighbour")
   26781             :         },
   26782             :         { .name = NULL }
   26783             : };
   26784             : 
   26785           0 : static PyObject *py_drsuapi_DsReplicaNeighbourCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26786             : {
   26787           0 :         return pytalloc_new(struct drsuapi_DsReplicaNeighbourCtr, type);
   26788             : }
   26789             : 
   26790             : 
   26791             : static PyTypeObject drsuapi_DsReplicaNeighbourCtr_Type = {
   26792             :         PyVarObject_HEAD_INIT(NULL, 0)
   26793             :         .tp_name = "drsuapi.DsReplicaNeighbourCtr",
   26794             :         .tp_getset = py_drsuapi_DsReplicaNeighbourCtr_getsetters,
   26795             :         .tp_methods = NULL,
   26796             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26797             :         .tp_new = py_drsuapi_DsReplicaNeighbourCtr_new,
   26798             : };
   26799             : 
   26800             : 
   26801           0 : static PyObject *py_drsuapi_DsReplicaCursorCtr_get_count(PyObject *obj, void *closure)
   26802             : {
   26803           0 :         struct drsuapi_DsReplicaCursorCtr *object = pytalloc_get_ptr(obj);
   26804           0 :         PyObject *py_count;
   26805           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   26806           0 :         return py_count;
   26807             : }
   26808             : 
   26809           0 : static int py_drsuapi_DsReplicaCursorCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   26810             : {
   26811           0 :         struct drsuapi_DsReplicaCursorCtr *object = pytalloc_get_ptr(py_obj);
   26812           0 :         if (value == NULL) {
   26813           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   26814           0 :                 return -1;
   26815             :         }
   26816             :         {
   26817           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   26818           0 :                 if (PyLong_Check(value)) {
   26819           0 :                         unsigned long long test_var;
   26820           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26821           0 :                         if (PyErr_Occurred() != NULL) {
   26822           0 :                                 return -1;
   26823             :                         }
   26824           0 :                         if (test_var > uint_max) {
   26825           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26826             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26827           0 :                                 return -1;
   26828             :                         }
   26829           0 :                         object->count = test_var;
   26830             :                 } else {
   26831           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26832             :                           PyLong_Type.tp_name);
   26833           0 :                         return -1;
   26834             :                 }
   26835             :         }
   26836           0 :         return 0;
   26837             : }
   26838             : 
   26839           0 : static PyObject *py_drsuapi_DsReplicaCursorCtr_get_reserved(PyObject *obj, void *closure)
   26840             : {
   26841           0 :         struct drsuapi_DsReplicaCursorCtr *object = pytalloc_get_ptr(obj);
   26842           0 :         PyObject *py_reserved;
   26843           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
   26844           0 :         return py_reserved;
   26845             : }
   26846             : 
   26847           0 : static int py_drsuapi_DsReplicaCursorCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   26848             : {
   26849           0 :         struct drsuapi_DsReplicaCursorCtr *object = pytalloc_get_ptr(py_obj);
   26850           0 :         if (value == NULL) {
   26851           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
   26852           0 :                 return -1;
   26853             :         }
   26854             :         {
   26855           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   26856           0 :                 if (PyLong_Check(value)) {
   26857           0 :                         unsigned long long test_var;
   26858           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   26859           0 :                         if (PyErr_Occurred() != NULL) {
   26860           0 :                                 return -1;
   26861             :                         }
   26862           0 :                         if (test_var > uint_max) {
   26863           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   26864             :                                   PyLong_Type.tp_name, uint_max, test_var);
   26865           0 :                                 return -1;
   26866             :                         }
   26867           0 :                         object->reserved = test_var;
   26868             :                 } else {
   26869           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   26870             :                           PyLong_Type.tp_name);
   26871           0 :                         return -1;
   26872             :                 }
   26873             :         }
   26874           0 :         return 0;
   26875             : }
   26876             : 
   26877           0 : static PyObject *py_drsuapi_DsReplicaCursorCtr_get_array(PyObject *obj, void *closure)
   26878             : {
   26879           0 :         struct drsuapi_DsReplicaCursorCtr *object = pytalloc_get_ptr(obj);
   26880           0 :         PyObject *py_array;
   26881           0 :         py_array = PyList_New(object->count);
   26882           0 :         if (py_array == NULL) {
   26883           0 :                 return NULL;
   26884             :         }
   26885             :         {
   26886             :                 int array_cntr_0;
   26887           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   26888           0 :                         PyObject *py_array_0;
   26889           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor_Type, object->array, &(object->array)[array_cntr_0]);
   26890           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   26891             :                 }
   26892             :         }
   26893           0 :         return py_array;
   26894             : }
   26895             : 
   26896           0 : static int py_drsuapi_DsReplicaCursorCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   26897             : {
   26898           0 :         struct drsuapi_DsReplicaCursorCtr *object = pytalloc_get_ptr(py_obj);
   26899           0 :         if (value == NULL) {
   26900           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   26901           0 :                 return -1;
   26902             :         }
   26903           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   26904             :         {
   26905           0 :                 int array_cntr_0;
   26906           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   26907           0 :                 if (!object->array) { return -1; }
   26908           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   26909           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   26910           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   26911           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   26912           0 :                                 return -1;
   26913             :                         }
   26914           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaCursor_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   26915           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   26916           0 :                                 PyErr_NoMemory();
   26917           0 :                                 return -1;
   26918             :                         }
   26919           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   26920             :                 }
   26921             :         }
   26922           0 :         return 0;
   26923             : }
   26924             : 
   26925             : static PyGetSetDef py_drsuapi_DsReplicaCursorCtr_getsetters[] = {
   26926             :         {
   26927             :                 .name = discard_const_p(char, "count"),
   26928             :                 .get = py_drsuapi_DsReplicaCursorCtr_get_count,
   26929             :                 .set = py_drsuapi_DsReplicaCursorCtr_set_count,
   26930             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26931             :         },
   26932             :         {
   26933             :                 .name = discard_const_p(char, "reserved"),
   26934             :                 .get = py_drsuapi_DsReplicaCursorCtr_get_reserved,
   26935             :                 .set = py_drsuapi_DsReplicaCursorCtr_set_reserved,
   26936             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   26937             :         },
   26938             :         {
   26939             :                 .name = discard_const_p(char, "array"),
   26940             :                 .get = py_drsuapi_DsReplicaCursorCtr_get_array,
   26941             :                 .set = py_drsuapi_DsReplicaCursorCtr_set_array,
   26942             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor")
   26943             :         },
   26944             :         { .name = NULL }
   26945             : };
   26946             : 
   26947           0 : static PyObject *py_drsuapi_DsReplicaCursorCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   26948             : {
   26949           0 :         return pytalloc_new(struct drsuapi_DsReplicaCursorCtr, type);
   26950             : }
   26951             : 
   26952             : 
   26953             : static PyTypeObject drsuapi_DsReplicaCursorCtr_Type = {
   26954             :         PyVarObject_HEAD_INIT(NULL, 0)
   26955             :         .tp_name = "drsuapi.DsReplicaCursorCtr",
   26956             :         .tp_getset = py_drsuapi_DsReplicaCursorCtr_getsetters,
   26957             :         .tp_methods = NULL,
   26958             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   26959             :         .tp_new = py_drsuapi_DsReplicaCursorCtr_new,
   26960             : };
   26961             : 
   26962             : 
   26963           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_attribute_name(PyObject *obj, void *closure)
   26964             : {
   26965           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(obj);
   26966           0 :         PyObject *py_attribute_name;
   26967           0 :         if (object->attribute_name == NULL) {
   26968           0 :                 Py_RETURN_NONE;
   26969             :         }
   26970           0 :         if (object->attribute_name == NULL) {
   26971           0 :                 py_attribute_name = Py_None;
   26972           0 :                 Py_INCREF(py_attribute_name);
   26973             :         } else {
   26974           0 :                 if (object->attribute_name == NULL) {
   26975           0 :                         py_attribute_name = Py_None;
   26976           0 :                         Py_INCREF(py_attribute_name);
   26977             :                 } else {
   26978           0 :                         py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
   26979             :                 }
   26980             :         }
   26981           0 :         return py_attribute_name;
   26982             : }
   26983             : 
   26984           0 : static int py_drsuapi_DsReplicaObjMetaData_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
   26985             : {
   26986           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(py_obj);
   26987           0 :         if (value == NULL) {
   26988           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
   26989           0 :                 return -1;
   26990             :         }
   26991           0 :         if (value == Py_None) {
   26992           0 :                 object->attribute_name = NULL;
   26993             :         } else {
   26994           0 :                 object->attribute_name = NULL;
   26995             :                 {
   26996           0 :                         const char *test_str;
   26997           0 :                         const char *talloc_str;
   26998           0 :                         PyObject *unicode = NULL;
   26999           0 :                         if (PyUnicode_Check(value)) {
   27000           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27001           0 :                                 if (unicode == NULL) {
   27002           0 :                                         return -1;
   27003             :                                 }
   27004           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27005           0 :                         } else if (PyBytes_Check(value)) {
   27006           0 :                                 test_str = PyBytes_AS_STRING(value);
   27007             :                         } else {
   27008           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27009           0 :                                 return -1;
   27010             :                         }
   27011           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27012           0 :                         if (unicode != NULL) {
   27013           0 :                                 Py_DECREF(unicode);
   27014             :                         }
   27015           0 :                         if (talloc_str == NULL) {
   27016           0 :                                 PyErr_NoMemory();
   27017           0 :                                 return -1;
   27018             :                         }
   27019           0 :                         object->attribute_name = talloc_str;
   27020             :                 }
   27021             :         }
   27022           0 :         return 0;
   27023             : }
   27024             : 
   27025           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_version(PyObject *obj, void *closure)
   27026             : {
   27027           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(obj);
   27028           0 :         PyObject *py_version;
   27029           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
   27030           0 :         return py_version;
   27031             : }
   27032             : 
   27033           0 : static int py_drsuapi_DsReplicaObjMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
   27034             : {
   27035           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(py_obj);
   27036           0 :         if (value == NULL) {
   27037           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
   27038           0 :                 return -1;
   27039             :         }
   27040             :         {
   27041           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
   27042           0 :                 if (PyLong_Check(value)) {
   27043           0 :                         unsigned long long test_var;
   27044           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27045           0 :                         if (PyErr_Occurred() != NULL) {
   27046           0 :                                 return -1;
   27047             :                         }
   27048           0 :                         if (test_var > uint_max) {
   27049           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27050             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27051           0 :                                 return -1;
   27052             :                         }
   27053           0 :                         object->version = test_var;
   27054             :                 } else {
   27055           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27056             :                           PyLong_Type.tp_name);
   27057           0 :                         return -1;
   27058             :                 }
   27059             :         }
   27060           0 :         return 0;
   27061             : }
   27062             : 
   27063           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_originating_change_time(PyObject *obj, void *closure)
   27064             : {
   27065           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(obj);
   27066           0 :         PyObject *py_originating_change_time;
   27067           0 :         py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
   27068           0 :         return py_originating_change_time;
   27069             : }
   27070             : 
   27071           0 : static int py_drsuapi_DsReplicaObjMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
   27072             : {
   27073           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(py_obj);
   27074           0 :         if (value == NULL) {
   27075           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
   27076           0 :                 return -1;
   27077             :         }
   27078             :         {
   27079           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
   27080           0 :                 if (PyLong_Check(value)) {
   27081           0 :                         unsigned long long test_var;
   27082           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27083           0 :                         if (PyErr_Occurred() != NULL) {
   27084           0 :                                 return -1;
   27085             :                         }
   27086           0 :                         if (test_var > uint_max) {
   27087           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27088             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27089           0 :                                 return -1;
   27090             :                         }
   27091           0 :                         object->originating_change_time = test_var;
   27092             :                 } else {
   27093           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27094             :                           PyLong_Type.tp_name);
   27095           0 :                         return -1;
   27096             :                 }
   27097             :         }
   27098           0 :         return 0;
   27099             : }
   27100             : 
   27101           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
   27102             : {
   27103           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(obj);
   27104           0 :         PyObject *py_originating_invocation_id;
   27105           0 :         py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
   27106           0 :         return py_originating_invocation_id;
   27107             : }
   27108             : 
   27109           0 : static int py_drsuapi_DsReplicaObjMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
   27110             : {
   27111           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(py_obj);
   27112           0 :         if (value == NULL) {
   27113           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
   27114           0 :                 return -1;
   27115             :         }
   27116           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   27117           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27118           0 :                 PyErr_NoMemory();
   27119           0 :                 return -1;
   27120             :         }
   27121           0 :         object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
   27122           0 :         return 0;
   27123             : }
   27124             : 
   27125           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_originating_usn(PyObject *obj, void *closure)
   27126             : {
   27127           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(obj);
   27128           0 :         PyObject *py_originating_usn;
   27129           0 :         py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
   27130           0 :         return py_originating_usn;
   27131             : }
   27132             : 
   27133           0 : static int py_drsuapi_DsReplicaObjMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
   27134             : {
   27135           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(py_obj);
   27136           0 :         if (value == NULL) {
   27137           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
   27138           0 :                 return -1;
   27139             :         }
   27140             :         {
   27141           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
   27142           0 :                 if (PyLong_Check(value)) {
   27143           0 :                         unsigned long long test_var;
   27144           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27145           0 :                         if (PyErr_Occurred() != NULL) {
   27146           0 :                                 return -1;
   27147             :                         }
   27148           0 :                         if (test_var > uint_max) {
   27149           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27150             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27151           0 :                                 return -1;
   27152             :                         }
   27153           0 :                         object->originating_usn = test_var;
   27154             :                 } else {
   27155           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27156             :                           PyLong_Type.tp_name);
   27157           0 :                         return -1;
   27158             :                 }
   27159             :         }
   27160           0 :         return 0;
   27161             : }
   27162             : 
   27163           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_local_usn(PyObject *obj, void *closure)
   27164             : {
   27165           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(obj);
   27166           0 :         PyObject *py_local_usn;
   27167           0 :         py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
   27168           0 :         return py_local_usn;
   27169             : }
   27170             : 
   27171           0 : static int py_drsuapi_DsReplicaObjMetaData_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
   27172             : {
   27173           0 :         struct drsuapi_DsReplicaObjMetaData *object = pytalloc_get_ptr(py_obj);
   27174           0 :         if (value == NULL) {
   27175           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->local_usn");
   27176           0 :                 return -1;
   27177             :         }
   27178             :         {
   27179           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->local_usn));
   27180           0 :                 if (PyLong_Check(value)) {
   27181           0 :                         unsigned long long test_var;
   27182           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27183           0 :                         if (PyErr_Occurred() != NULL) {
   27184           0 :                                 return -1;
   27185             :                         }
   27186           0 :                         if (test_var > uint_max) {
   27187           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27188             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27189           0 :                                 return -1;
   27190             :                         }
   27191           0 :                         object->local_usn = test_var;
   27192             :                 } else {
   27193           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27194             :                           PyLong_Type.tp_name);
   27195           0 :                         return -1;
   27196             :                 }
   27197             :         }
   27198           0 :         return 0;
   27199             : }
   27200             : 
   27201             : static PyGetSetDef py_drsuapi_DsReplicaObjMetaData_getsetters[] = {
   27202             :         {
   27203             :                 .name = discard_const_p(char, "attribute_name"),
   27204             :                 .get = py_drsuapi_DsReplicaObjMetaData_get_attribute_name,
   27205             :                 .set = py_drsuapi_DsReplicaObjMetaData_set_attribute_name,
   27206             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27207             :         },
   27208             :         {
   27209             :                 .name = discard_const_p(char, "version"),
   27210             :                 .get = py_drsuapi_DsReplicaObjMetaData_get_version,
   27211             :                 .set = py_drsuapi_DsReplicaObjMetaData_set_version,
   27212             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27213             :         },
   27214             :         {
   27215             :                 .name = discard_const_p(char, "originating_change_time"),
   27216             :                 .get = py_drsuapi_DsReplicaObjMetaData_get_originating_change_time,
   27217             :                 .set = py_drsuapi_DsReplicaObjMetaData_set_originating_change_time,
   27218             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   27219             :         },
   27220             :         {
   27221             :                 .name = discard_const_p(char, "originating_invocation_id"),
   27222             :                 .get = py_drsuapi_DsReplicaObjMetaData_get_originating_invocation_id,
   27223             :                 .set = py_drsuapi_DsReplicaObjMetaData_set_originating_invocation_id,
   27224             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   27225             :         },
   27226             :         {
   27227             :                 .name = discard_const_p(char, "originating_usn"),
   27228             :                 .get = py_drsuapi_DsReplicaObjMetaData_get_originating_usn,
   27229             :                 .set = py_drsuapi_DsReplicaObjMetaData_set_originating_usn,
   27230             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   27231             :         },
   27232             :         {
   27233             :                 .name = discard_const_p(char, "local_usn"),
   27234             :                 .get = py_drsuapi_DsReplicaObjMetaData_get_local_usn,
   27235             :                 .set = py_drsuapi_DsReplicaObjMetaData_set_local_usn,
   27236             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   27237             :         },
   27238             :         { .name = NULL }
   27239             : };
   27240             : 
   27241           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27242             : {
   27243           0 :         return pytalloc_new(struct drsuapi_DsReplicaObjMetaData, type);
   27244             : }
   27245             : 
   27246             : 
   27247             : static PyTypeObject drsuapi_DsReplicaObjMetaData_Type = {
   27248             :         PyVarObject_HEAD_INIT(NULL, 0)
   27249             :         .tp_name = "drsuapi.DsReplicaObjMetaData",
   27250             :         .tp_getset = py_drsuapi_DsReplicaObjMetaData_getsetters,
   27251             :         .tp_methods = NULL,
   27252             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27253             :         .tp_new = py_drsuapi_DsReplicaObjMetaData_new,
   27254             : };
   27255             : 
   27256             : 
   27257           0 : static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_count(PyObject *obj, void *closure)
   27258             : {
   27259           0 :         struct drsuapi_DsReplicaObjMetaDataCtr *object = pytalloc_get_ptr(obj);
   27260           0 :         PyObject *py_count;
   27261           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   27262           0 :         return py_count;
   27263             : }
   27264             : 
   27265           0 : static int py_drsuapi_DsReplicaObjMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   27266             : {
   27267           0 :         struct drsuapi_DsReplicaObjMetaDataCtr *object = pytalloc_get_ptr(py_obj);
   27268           0 :         if (value == NULL) {
   27269           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   27270           0 :                 return -1;
   27271             :         }
   27272             :         {
   27273           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   27274           0 :                 if (PyLong_Check(value)) {
   27275           0 :                         unsigned long long test_var;
   27276           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27277           0 :                         if (PyErr_Occurred() != NULL) {
   27278           0 :                                 return -1;
   27279             :                         }
   27280           0 :                         if (test_var > uint_max) {
   27281           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27282             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27283           0 :                                 return -1;
   27284             :                         }
   27285           0 :                         object->count = test_var;
   27286             :                 } else {
   27287           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27288             :                           PyLong_Type.tp_name);
   27289           0 :                         return -1;
   27290             :                 }
   27291             :         }
   27292           0 :         return 0;
   27293             : }
   27294             : 
   27295           0 : static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_reserved(PyObject *obj, void *closure)
   27296             : {
   27297           0 :         struct drsuapi_DsReplicaObjMetaDataCtr *object = pytalloc_get_ptr(obj);
   27298           0 :         PyObject *py_reserved;
   27299           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
   27300           0 :         return py_reserved;
   27301             : }
   27302             : 
   27303           0 : static int py_drsuapi_DsReplicaObjMetaDataCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   27304             : {
   27305           0 :         struct drsuapi_DsReplicaObjMetaDataCtr *object = pytalloc_get_ptr(py_obj);
   27306           0 :         if (value == NULL) {
   27307           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
   27308           0 :                 return -1;
   27309             :         }
   27310             :         {
   27311           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   27312           0 :                 if (PyLong_Check(value)) {
   27313           0 :                         unsigned long long test_var;
   27314           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27315           0 :                         if (PyErr_Occurred() != NULL) {
   27316           0 :                                 return -1;
   27317             :                         }
   27318           0 :                         if (test_var > uint_max) {
   27319           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27320             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27321           0 :                                 return -1;
   27322             :                         }
   27323           0 :                         object->reserved = test_var;
   27324             :                 } else {
   27325           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27326             :                           PyLong_Type.tp_name);
   27327           0 :                         return -1;
   27328             :                 }
   27329             :         }
   27330           0 :         return 0;
   27331             : }
   27332             : 
   27333           0 : static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_array(PyObject *obj, void *closure)
   27334             : {
   27335           0 :         struct drsuapi_DsReplicaObjMetaDataCtr *object = pytalloc_get_ptr(obj);
   27336           0 :         PyObject *py_array;
   27337           0 :         py_array = PyList_New(object->count);
   27338           0 :         if (py_array == NULL) {
   27339           0 :                 return NULL;
   27340             :         }
   27341             :         {
   27342             :                 int array_cntr_0;
   27343           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   27344           0 :                         PyObject *py_array_0;
   27345           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData_Type, object->array, &(object->array)[array_cntr_0]);
   27346           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   27347             :                 }
   27348             :         }
   27349           0 :         return py_array;
   27350             : }
   27351             : 
   27352           0 : static int py_drsuapi_DsReplicaObjMetaDataCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   27353             : {
   27354           0 :         struct drsuapi_DsReplicaObjMetaDataCtr *object = pytalloc_get_ptr(py_obj);
   27355           0 :         if (value == NULL) {
   27356           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   27357           0 :                 return -1;
   27358             :         }
   27359           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   27360             :         {
   27361           0 :                 int array_cntr_0;
   27362           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   27363           0 :                 if (!object->array) { return -1; }
   27364           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   27365           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   27366           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   27367           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   27368           0 :                                 return -1;
   27369             :                         }
   27370           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   27371           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   27372           0 :                                 PyErr_NoMemory();
   27373           0 :                                 return -1;
   27374             :                         }
   27375           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   27376             :                 }
   27377             :         }
   27378           0 :         return 0;
   27379             : }
   27380             : 
   27381             : static PyGetSetDef py_drsuapi_DsReplicaObjMetaDataCtr_getsetters[] = {
   27382             :         {
   27383             :                 .name = discard_const_p(char, "count"),
   27384             :                 .get = py_drsuapi_DsReplicaObjMetaDataCtr_get_count,
   27385             :                 .set = py_drsuapi_DsReplicaObjMetaDataCtr_set_count,
   27386             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27387             :         },
   27388             :         {
   27389             :                 .name = discard_const_p(char, "reserved"),
   27390             :                 .get = py_drsuapi_DsReplicaObjMetaDataCtr_get_reserved,
   27391             :                 .set = py_drsuapi_DsReplicaObjMetaDataCtr_set_reserved,
   27392             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27393             :         },
   27394             :         {
   27395             :                 .name = discard_const_p(char, "array"),
   27396             :                 .get = py_drsuapi_DsReplicaObjMetaDataCtr_get_array,
   27397             :                 .set = py_drsuapi_DsReplicaObjMetaDataCtr_set_array,
   27398             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjMetaData")
   27399             :         },
   27400             :         { .name = NULL }
   27401             : };
   27402             : 
   27403           0 : static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27404             : {
   27405           0 :         return pytalloc_new(struct drsuapi_DsReplicaObjMetaDataCtr, type);
   27406             : }
   27407             : 
   27408             : 
   27409             : static PyTypeObject drsuapi_DsReplicaObjMetaDataCtr_Type = {
   27410             :         PyVarObject_HEAD_INIT(NULL, 0)
   27411             :         .tp_name = "drsuapi.DsReplicaObjMetaDataCtr",
   27412             :         .tp_getset = py_drsuapi_DsReplicaObjMetaDataCtr_getsetters,
   27413             :         .tp_methods = NULL,
   27414             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27415             :         .tp_new = py_drsuapi_DsReplicaObjMetaDataCtr_new,
   27416             : };
   27417             : 
   27418             : 
   27419           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_dn(PyObject *obj, void *closure)
   27420             : {
   27421           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(obj);
   27422           0 :         PyObject *py_dsa_obj_dn;
   27423           0 :         if (object->dsa_obj_dn == NULL) {
   27424           0 :                 Py_RETURN_NONE;
   27425             :         }
   27426           0 :         if (object->dsa_obj_dn == NULL) {
   27427           0 :                 py_dsa_obj_dn = Py_None;
   27428           0 :                 Py_INCREF(py_dsa_obj_dn);
   27429             :         } else {
   27430           0 :                 if (object->dsa_obj_dn == NULL) {
   27431           0 :                         py_dsa_obj_dn = Py_None;
   27432           0 :                         Py_INCREF(py_dsa_obj_dn);
   27433             :                 } else {
   27434           0 :                         py_dsa_obj_dn = PyUnicode_Decode(object->dsa_obj_dn, strlen(object->dsa_obj_dn), "utf-8", "ignore");
   27435             :                 }
   27436             :         }
   27437           0 :         return py_dsa_obj_dn;
   27438             : }
   27439             : 
   27440           0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
   27441             : {
   27442           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(py_obj);
   27443           0 :         if (value == NULL) {
   27444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsa_obj_dn");
   27445           0 :                 return -1;
   27446             :         }
   27447           0 :         if (value == Py_None) {
   27448           0 :                 object->dsa_obj_dn = NULL;
   27449             :         } else {
   27450           0 :                 object->dsa_obj_dn = NULL;
   27451             :                 {
   27452           0 :                         const char *test_str;
   27453           0 :                         const char *talloc_str;
   27454           0 :                         PyObject *unicode = NULL;
   27455           0 :                         if (PyUnicode_Check(value)) {
   27456           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   27457           0 :                                 if (unicode == NULL) {
   27458           0 :                                         return -1;
   27459             :                                 }
   27460           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   27461           0 :                         } else if (PyBytes_Check(value)) {
   27462           0 :                                 test_str = PyBytes_AS_STRING(value);
   27463             :                         } else {
   27464           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   27465           0 :                                 return -1;
   27466             :                         }
   27467           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   27468           0 :                         if (unicode != NULL) {
   27469           0 :                                 Py_DECREF(unicode);
   27470             :                         }
   27471           0 :                         if (talloc_str == NULL) {
   27472           0 :                                 PyErr_NoMemory();
   27473           0 :                                 return -1;
   27474             :                         }
   27475           0 :                         object->dsa_obj_dn = talloc_str;
   27476             :                 }
   27477             :         }
   27478           0 :         return 0;
   27479             : }
   27480             : 
   27481           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_guid(PyObject *obj, void *closure)
   27482             : {
   27483           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(obj);
   27484           0 :         PyObject *py_dsa_obj_guid;
   27485           0 :         py_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->dsa_obj_guid);
   27486           0 :         return py_dsa_obj_guid;
   27487             : }
   27488             : 
   27489           0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
   27490             : {
   27491           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(py_obj);
   27492           0 :         if (value == NULL) {
   27493           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsa_obj_guid");
   27494           0 :                 return -1;
   27495             :         }
   27496           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   27497           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   27498           0 :                 PyErr_NoMemory();
   27499           0 :                 return -1;
   27500             :         }
   27501           0 :         object->dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
   27502           0 :         return 0;
   27503             : }
   27504             : 
   27505           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_first_failure(PyObject *obj, void *closure)
   27506             : {
   27507           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(obj);
   27508           0 :         PyObject *py_first_failure;
   27509           0 :         py_first_failure = PyLong_FromUnsignedLongLong(object->first_failure);
   27510           0 :         return py_first_failure;
   27511             : }
   27512             : 
   27513           0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_first_failure(PyObject *py_obj, PyObject *value, void *closure)
   27514             : {
   27515           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(py_obj);
   27516           0 :         if (value == NULL) {
   27517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_failure");
   27518           0 :                 return -1;
   27519             :         }
   27520             :         {
   27521           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->first_failure));
   27522           0 :                 if (PyLong_Check(value)) {
   27523           0 :                         unsigned long long test_var;
   27524           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27525           0 :                         if (PyErr_Occurred() != NULL) {
   27526           0 :                                 return -1;
   27527             :                         }
   27528           0 :                         if (test_var > uint_max) {
   27529           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27530             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27531           0 :                                 return -1;
   27532             :                         }
   27533           0 :                         object->first_failure = test_var;
   27534             :                 } else {
   27535           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27536             :                           PyLong_Type.tp_name);
   27537           0 :                         return -1;
   27538             :                 }
   27539             :         }
   27540           0 :         return 0;
   27541             : }
   27542             : 
   27543           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_num_failures(PyObject *obj, void *closure)
   27544             : {
   27545           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(obj);
   27546           0 :         PyObject *py_num_failures;
   27547           0 :         py_num_failures = PyLong_FromUnsignedLongLong((uint32_t)(object->num_failures));
   27548           0 :         return py_num_failures;
   27549             : }
   27550             : 
   27551           0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_num_failures(PyObject *py_obj, PyObject *value, void *closure)
   27552             : {
   27553           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(py_obj);
   27554           0 :         if (value == NULL) {
   27555           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_failures");
   27556           0 :                 return -1;
   27557             :         }
   27558             :         {
   27559           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_failures));
   27560           0 :                 if (PyLong_Check(value)) {
   27561           0 :                         unsigned long long test_var;
   27562           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27563           0 :                         if (PyErr_Occurred() != NULL) {
   27564           0 :                                 return -1;
   27565             :                         }
   27566           0 :                         if (test_var > uint_max) {
   27567           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27568             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27569           0 :                                 return -1;
   27570             :                         }
   27571           0 :                         object->num_failures = test_var;
   27572             :                 } else {
   27573           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27574             :                           PyLong_Type.tp_name);
   27575           0 :                         return -1;
   27576             :                 }
   27577             :         }
   27578           0 :         return 0;
   27579             : }
   27580             : 
   27581           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_last_result(PyObject *obj, void *closure)
   27582             : {
   27583           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(obj);
   27584           0 :         PyObject *py_last_result;
   27585           0 :         py_last_result = PyErr_FromWERROR(object->last_result);
   27586           0 :         return py_last_result;
   27587             : }
   27588             : 
   27589           0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_last_result(PyObject *py_obj, PyObject *value, void *closure)
   27590             : {
   27591           0 :         struct drsuapi_DsReplicaKccDsaFailure *object = pytalloc_get_ptr(py_obj);
   27592           0 :         if (value == NULL) {
   27593           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_result");
   27594           0 :                 return -1;
   27595             :         }
   27596           0 :         object->last_result = W_ERROR(PyLong_AsLong(value));
   27597           0 :         return 0;
   27598             : }
   27599             : 
   27600             : static PyGetSetDef py_drsuapi_DsReplicaKccDsaFailure_getsetters[] = {
   27601             :         {
   27602             :                 .name = discard_const_p(char, "dsa_obj_dn"),
   27603             :                 .get = py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_dn,
   27604             :                 .set = py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_dn,
   27605             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   27606             :         },
   27607             :         {
   27608             :                 .name = discard_const_p(char, "dsa_obj_guid"),
   27609             :                 .get = py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_guid,
   27610             :                 .set = py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_guid,
   27611             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   27612             :         },
   27613             :         {
   27614             :                 .name = discard_const_p(char, "first_failure"),
   27615             :                 .get = py_drsuapi_DsReplicaKccDsaFailure_get_first_failure,
   27616             :                 .set = py_drsuapi_DsReplicaKccDsaFailure_set_first_failure,
   27617             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   27618             :         },
   27619             :         {
   27620             :                 .name = discard_const_p(char, "num_failures"),
   27621             :                 .get = py_drsuapi_DsReplicaKccDsaFailure_get_num_failures,
   27622             :                 .set = py_drsuapi_DsReplicaKccDsaFailure_set_num_failures,
   27623             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27624             :         },
   27625             :         {
   27626             :                 .name = discard_const_p(char, "last_result"),
   27627             :                 .get = py_drsuapi_DsReplicaKccDsaFailure_get_last_result,
   27628             :                 .set = py_drsuapi_DsReplicaKccDsaFailure_set_last_result,
   27629             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   27630             :         },
   27631             :         { .name = NULL }
   27632             : };
   27633             : 
   27634           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27635             : {
   27636           0 :         return pytalloc_new(struct drsuapi_DsReplicaKccDsaFailure, type);
   27637             : }
   27638             : 
   27639             : 
   27640             : static PyTypeObject drsuapi_DsReplicaKccDsaFailure_Type = {
   27641             :         PyVarObject_HEAD_INIT(NULL, 0)
   27642             :         .tp_name = "drsuapi.DsReplicaKccDsaFailure",
   27643             :         .tp_getset = py_drsuapi_DsReplicaKccDsaFailure_getsetters,
   27644             :         .tp_methods = NULL,
   27645             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27646             :         .tp_new = py_drsuapi_DsReplicaKccDsaFailure_new,
   27647             : };
   27648             : 
   27649             : 
   27650           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_count(PyObject *obj, void *closure)
   27651             : {
   27652           0 :         struct drsuapi_DsReplicaKccDsaFailuresCtr *object = pytalloc_get_ptr(obj);
   27653           0 :         PyObject *py_count;
   27654           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   27655           0 :         return py_count;
   27656             : }
   27657             : 
   27658           0 : static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   27659             : {
   27660           0 :         struct drsuapi_DsReplicaKccDsaFailuresCtr *object = pytalloc_get_ptr(py_obj);
   27661           0 :         if (value == NULL) {
   27662           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   27663           0 :                 return -1;
   27664             :         }
   27665             :         {
   27666           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   27667           0 :                 if (PyLong_Check(value)) {
   27668           0 :                         unsigned long long test_var;
   27669           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27670           0 :                         if (PyErr_Occurred() != NULL) {
   27671           0 :                                 return -1;
   27672             :                         }
   27673           0 :                         if (test_var > uint_max) {
   27674           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27675             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27676           0 :                                 return -1;
   27677             :                         }
   27678           0 :                         object->count = test_var;
   27679             :                 } else {
   27680           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27681             :                           PyLong_Type.tp_name);
   27682           0 :                         return -1;
   27683             :                 }
   27684             :         }
   27685           0 :         return 0;
   27686             : }
   27687             : 
   27688           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_reserved(PyObject *obj, void *closure)
   27689             : {
   27690           0 :         struct drsuapi_DsReplicaKccDsaFailuresCtr *object = pytalloc_get_ptr(obj);
   27691           0 :         PyObject *py_reserved;
   27692           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
   27693           0 :         return py_reserved;
   27694             : }
   27695             : 
   27696           0 : static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   27697             : {
   27698           0 :         struct drsuapi_DsReplicaKccDsaFailuresCtr *object = pytalloc_get_ptr(py_obj);
   27699           0 :         if (value == NULL) {
   27700           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
   27701           0 :                 return -1;
   27702             :         }
   27703             :         {
   27704           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   27705           0 :                 if (PyLong_Check(value)) {
   27706           0 :                         unsigned long long test_var;
   27707           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27708           0 :                         if (PyErr_Occurred() != NULL) {
   27709           0 :                                 return -1;
   27710             :                         }
   27711           0 :                         if (test_var > uint_max) {
   27712           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27713             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27714           0 :                                 return -1;
   27715             :                         }
   27716           0 :                         object->reserved = test_var;
   27717             :                 } else {
   27718           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27719             :                           PyLong_Type.tp_name);
   27720           0 :                         return -1;
   27721             :                 }
   27722             :         }
   27723           0 :         return 0;
   27724             : }
   27725             : 
   27726           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_array(PyObject *obj, void *closure)
   27727             : {
   27728           0 :         struct drsuapi_DsReplicaKccDsaFailuresCtr *object = pytalloc_get_ptr(obj);
   27729           0 :         PyObject *py_array;
   27730           0 :         py_array = PyList_New(object->count);
   27731           0 :         if (py_array == NULL) {
   27732           0 :                 return NULL;
   27733             :         }
   27734             :         {
   27735             :                 int array_cntr_0;
   27736           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   27737           0 :                         PyObject *py_array_0;
   27738           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailure_Type, object->array, &(object->array)[array_cntr_0]);
   27739           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   27740             :                 }
   27741             :         }
   27742           0 :         return py_array;
   27743             : }
   27744             : 
   27745           0 : static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   27746             : {
   27747           0 :         struct drsuapi_DsReplicaKccDsaFailuresCtr *object = pytalloc_get_ptr(py_obj);
   27748           0 :         if (value == NULL) {
   27749           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   27750           0 :                 return -1;
   27751             :         }
   27752           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   27753             :         {
   27754           0 :                 int array_cntr_0;
   27755           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   27756           0 :                 if (!object->array) { return -1; }
   27757           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   27758           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   27759           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   27760           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   27761           0 :                                 return -1;
   27762             :                         }
   27763           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailure_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   27764           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   27765           0 :                                 PyErr_NoMemory();
   27766           0 :                                 return -1;
   27767             :                         }
   27768           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   27769             :                 }
   27770             :         }
   27771           0 :         return 0;
   27772             : }
   27773             : 
   27774             : static PyGetSetDef py_drsuapi_DsReplicaKccDsaFailuresCtr_getsetters[] = {
   27775             :         {
   27776             :                 .name = discard_const_p(char, "count"),
   27777             :                 .get = py_drsuapi_DsReplicaKccDsaFailuresCtr_get_count,
   27778             :                 .set = py_drsuapi_DsReplicaKccDsaFailuresCtr_set_count,
   27779             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27780             :         },
   27781             :         {
   27782             :                 .name = discard_const_p(char, "reserved"),
   27783             :                 .get = py_drsuapi_DsReplicaKccDsaFailuresCtr_get_reserved,
   27784             :                 .set = py_drsuapi_DsReplicaKccDsaFailuresCtr_set_reserved,
   27785             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   27786             :         },
   27787             :         {
   27788             :                 .name = discard_const_p(char, "array"),
   27789             :                 .get = py_drsuapi_DsReplicaKccDsaFailuresCtr_get_array,
   27790             :                 .set = py_drsuapi_DsReplicaKccDsaFailuresCtr_set_array,
   27791             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaKccDsaFailure")
   27792             :         },
   27793             :         { .name = NULL }
   27794             : };
   27795             : 
   27796           0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   27797             : {
   27798           0 :         return pytalloc_new(struct drsuapi_DsReplicaKccDsaFailuresCtr, type);
   27799             : }
   27800             : 
   27801             : 
   27802             : static PyTypeObject drsuapi_DsReplicaKccDsaFailuresCtr_Type = {
   27803             :         PyVarObject_HEAD_INIT(NULL, 0)
   27804             :         .tp_name = "drsuapi.DsReplicaKccDsaFailuresCtr",
   27805             :         .tp_getset = py_drsuapi_DsReplicaKccDsaFailuresCtr_getsetters,
   27806             :         .tp_methods = NULL,
   27807             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   27808             :         .tp_new = py_drsuapi_DsReplicaKccDsaFailuresCtr_new,
   27809             : };
   27810             : 
   27811             : 
   27812           0 : static PyObject *py_drsuapi_DsReplicaOp_get_operation_start(PyObject *obj, void *closure)
   27813             : {
   27814           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   27815           0 :         PyObject *py_operation_start;
   27816           0 :         py_operation_start = PyLong_FromUnsignedLongLong(object->operation_start);
   27817           0 :         return py_operation_start;
   27818             : }
   27819             : 
   27820           0 : static int py_drsuapi_DsReplicaOp_set_operation_start(PyObject *py_obj, PyObject *value, void *closure)
   27821             : {
   27822           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   27823           0 :         if (value == NULL) {
   27824           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->operation_start");
   27825           0 :                 return -1;
   27826             :         }
   27827             :         {
   27828           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->operation_start));
   27829           0 :                 if (PyLong_Check(value)) {
   27830           0 :                         unsigned long long test_var;
   27831           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27832           0 :                         if (PyErr_Occurred() != NULL) {
   27833           0 :                                 return -1;
   27834             :                         }
   27835           0 :                         if (test_var > uint_max) {
   27836           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27837             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27838           0 :                                 return -1;
   27839             :                         }
   27840           0 :                         object->operation_start = test_var;
   27841             :                 } else {
   27842           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27843             :                           PyLong_Type.tp_name);
   27844           0 :                         return -1;
   27845             :                 }
   27846             :         }
   27847           0 :         return 0;
   27848             : }
   27849             : 
   27850           0 : static PyObject *py_drsuapi_DsReplicaOp_get_serial_num(PyObject *obj, void *closure)
   27851             : {
   27852           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   27853           0 :         PyObject *py_serial_num;
   27854           0 :         py_serial_num = PyLong_FromUnsignedLongLong((uint32_t)(object->serial_num));
   27855           0 :         return py_serial_num;
   27856             : }
   27857             : 
   27858           0 : static int py_drsuapi_DsReplicaOp_set_serial_num(PyObject *py_obj, PyObject *value, void *closure)
   27859             : {
   27860           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   27861           0 :         if (value == NULL) {
   27862           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_num");
   27863           0 :                 return -1;
   27864             :         }
   27865             :         {
   27866           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_num));
   27867           0 :                 if (PyLong_Check(value)) {
   27868           0 :                         unsigned long long test_var;
   27869           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27870           0 :                         if (PyErr_Occurred() != NULL) {
   27871           0 :                                 return -1;
   27872             :                         }
   27873           0 :                         if (test_var > uint_max) {
   27874           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27875             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27876           0 :                                 return -1;
   27877             :                         }
   27878           0 :                         object->serial_num = test_var;
   27879             :                 } else {
   27880           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27881             :                           PyLong_Type.tp_name);
   27882           0 :                         return -1;
   27883             :                 }
   27884             :         }
   27885           0 :         return 0;
   27886             : }
   27887             : 
   27888           0 : static PyObject *py_drsuapi_DsReplicaOp_get_priority(PyObject *obj, void *closure)
   27889             : {
   27890           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   27891           0 :         PyObject *py_priority;
   27892           0 :         py_priority = PyLong_FromUnsignedLongLong((uint32_t)(object->priority));
   27893           0 :         return py_priority;
   27894             : }
   27895             : 
   27896           0 : static int py_drsuapi_DsReplicaOp_set_priority(PyObject *py_obj, PyObject *value, void *closure)
   27897             : {
   27898           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   27899           0 :         if (value == NULL) {
   27900           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priority");
   27901           0 :                 return -1;
   27902             :         }
   27903             :         {
   27904           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
   27905           0 :                 if (PyLong_Check(value)) {
   27906           0 :                         unsigned long long test_var;
   27907           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27908           0 :                         if (PyErr_Occurred() != NULL) {
   27909           0 :                                 return -1;
   27910             :                         }
   27911           0 :                         if (test_var > uint_max) {
   27912           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27913             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27914           0 :                                 return -1;
   27915             :                         }
   27916           0 :                         object->priority = test_var;
   27917             :                 } else {
   27918           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27919             :                           PyLong_Type.tp_name);
   27920           0 :                         return -1;
   27921             :                 }
   27922             :         }
   27923           0 :         return 0;
   27924             : }
   27925             : 
   27926           0 : static PyObject *py_drsuapi_DsReplicaOp_get_operation_type(PyObject *obj, void *closure)
   27927             : {
   27928           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   27929           0 :         PyObject *py_operation_type;
   27930           0 :         py_operation_type = PyLong_FromLong((uint16_t)(object->operation_type));
   27931           0 :         return py_operation_type;
   27932             : }
   27933             : 
   27934           0 : static int py_drsuapi_DsReplicaOp_set_operation_type(PyObject *py_obj, PyObject *value, void *closure)
   27935             : {
   27936           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   27937           0 :         if (value == NULL) {
   27938           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->operation_type");
   27939           0 :                 return -1;
   27940             :         }
   27941             :         {
   27942           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->operation_type));
   27943           0 :                 if (PyLong_Check(value)) {
   27944           0 :                         unsigned long long test_var;
   27945           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27946           0 :                         if (PyErr_Occurred() != NULL) {
   27947           0 :                                 return -1;
   27948             :                         }
   27949           0 :                         if (test_var > uint_max) {
   27950           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27951             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27952           0 :                                 return -1;
   27953             :                         }
   27954           0 :                         object->operation_type = test_var;
   27955             :                 } else {
   27956           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27957             :                           PyLong_Type.tp_name);
   27958           0 :                         return -1;
   27959             :                 }
   27960             :         }
   27961           0 :         return 0;
   27962             : }
   27963             : 
   27964           0 : static PyObject *py_drsuapi_DsReplicaOp_get_options(PyObject *obj, void *closure)
   27965             : {
   27966           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   27967           0 :         PyObject *py_options;
   27968           0 :         py_options = PyLong_FromUnsignedLongLong((uint32_t)(object->options));
   27969           0 :         return py_options;
   27970             : }
   27971             : 
   27972           0 : static int py_drsuapi_DsReplicaOp_set_options(PyObject *py_obj, PyObject *value, void *closure)
   27973             : {
   27974           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   27975           0 :         if (value == NULL) {
   27976           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
   27977           0 :                 return -1;
   27978             :         }
   27979             :         {
   27980           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
   27981           0 :                 if (PyLong_Check(value)) {
   27982           0 :                         unsigned long long test_var;
   27983           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   27984           0 :                         if (PyErr_Occurred() != NULL) {
   27985           0 :                                 return -1;
   27986             :                         }
   27987           0 :                         if (test_var > uint_max) {
   27988           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   27989             :                                   PyLong_Type.tp_name, uint_max, test_var);
   27990           0 :                                 return -1;
   27991             :                         }
   27992           0 :                         object->options = test_var;
   27993             :                 } else {
   27994           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   27995             :                           PyLong_Type.tp_name);
   27996           0 :                         return -1;
   27997             :                 }
   27998             :         }
   27999           0 :         return 0;
   28000             : }
   28001             : 
   28002           0 : static PyObject *py_drsuapi_DsReplicaOp_get_nc_dn(PyObject *obj, void *closure)
   28003             : {
   28004           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   28005           0 :         PyObject *py_nc_dn;
   28006           0 :         if (object->nc_dn == NULL) {
   28007           0 :                 Py_RETURN_NONE;
   28008             :         }
   28009           0 :         if (object->nc_dn == NULL) {
   28010           0 :                 py_nc_dn = Py_None;
   28011           0 :                 Py_INCREF(py_nc_dn);
   28012             :         } else {
   28013           0 :                 if (object->nc_dn == NULL) {
   28014           0 :                         py_nc_dn = Py_None;
   28015           0 :                         Py_INCREF(py_nc_dn);
   28016             :                 } else {
   28017           0 :                         py_nc_dn = PyUnicode_Decode(object->nc_dn, strlen(object->nc_dn), "utf-8", "ignore");
   28018             :                 }
   28019             :         }
   28020           0 :         return py_nc_dn;
   28021             : }
   28022             : 
   28023           0 : static int py_drsuapi_DsReplicaOp_set_nc_dn(PyObject *py_obj, PyObject *value, void *closure)
   28024             : {
   28025           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   28026           0 :         if (value == NULL) {
   28027           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nc_dn");
   28028           0 :                 return -1;
   28029             :         }
   28030           0 :         if (value == Py_None) {
   28031           0 :                 object->nc_dn = NULL;
   28032             :         } else {
   28033           0 :                 object->nc_dn = NULL;
   28034             :                 {
   28035           0 :                         const char *test_str;
   28036           0 :                         const char *talloc_str;
   28037           0 :                         PyObject *unicode = NULL;
   28038           0 :                         if (PyUnicode_Check(value)) {
   28039           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28040           0 :                                 if (unicode == NULL) {
   28041           0 :                                         return -1;
   28042             :                                 }
   28043           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28044           0 :                         } else if (PyBytes_Check(value)) {
   28045           0 :                                 test_str = PyBytes_AS_STRING(value);
   28046             :                         } else {
   28047           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28048           0 :                                 return -1;
   28049             :                         }
   28050           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28051           0 :                         if (unicode != NULL) {
   28052           0 :                                 Py_DECREF(unicode);
   28053             :                         }
   28054           0 :                         if (talloc_str == NULL) {
   28055           0 :                                 PyErr_NoMemory();
   28056           0 :                                 return -1;
   28057             :                         }
   28058           0 :                         object->nc_dn = talloc_str;
   28059             :                 }
   28060             :         }
   28061           0 :         return 0;
   28062             : }
   28063             : 
   28064           0 : static PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_obj_dn(PyObject *obj, void *closure)
   28065             : {
   28066           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   28067           0 :         PyObject *py_remote_dsa_obj_dn;
   28068           0 :         if (object->remote_dsa_obj_dn == NULL) {
   28069           0 :                 Py_RETURN_NONE;
   28070             :         }
   28071           0 :         if (object->remote_dsa_obj_dn == NULL) {
   28072           0 :                 py_remote_dsa_obj_dn = Py_None;
   28073           0 :                 Py_INCREF(py_remote_dsa_obj_dn);
   28074             :         } else {
   28075           0 :                 if (object->remote_dsa_obj_dn == NULL) {
   28076           0 :                         py_remote_dsa_obj_dn = Py_None;
   28077           0 :                         Py_INCREF(py_remote_dsa_obj_dn);
   28078             :                 } else {
   28079           0 :                         py_remote_dsa_obj_dn = PyUnicode_Decode(object->remote_dsa_obj_dn, strlen(object->remote_dsa_obj_dn), "utf-8", "ignore");
   28080             :                 }
   28081             :         }
   28082           0 :         return py_remote_dsa_obj_dn;
   28083             : }
   28084             : 
   28085           0 : static int py_drsuapi_DsReplicaOp_set_remote_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
   28086             : {
   28087           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   28088           0 :         if (value == NULL) {
   28089           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->remote_dsa_obj_dn");
   28090           0 :                 return -1;
   28091             :         }
   28092           0 :         if (value == Py_None) {
   28093           0 :                 object->remote_dsa_obj_dn = NULL;
   28094             :         } else {
   28095           0 :                 object->remote_dsa_obj_dn = NULL;
   28096             :                 {
   28097           0 :                         const char *test_str;
   28098           0 :                         const char *talloc_str;
   28099           0 :                         PyObject *unicode = NULL;
   28100           0 :                         if (PyUnicode_Check(value)) {
   28101           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28102           0 :                                 if (unicode == NULL) {
   28103           0 :                                         return -1;
   28104             :                                 }
   28105           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28106           0 :                         } else if (PyBytes_Check(value)) {
   28107           0 :                                 test_str = PyBytes_AS_STRING(value);
   28108             :                         } else {
   28109           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28110           0 :                                 return -1;
   28111             :                         }
   28112           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28113           0 :                         if (unicode != NULL) {
   28114           0 :                                 Py_DECREF(unicode);
   28115             :                         }
   28116           0 :                         if (talloc_str == NULL) {
   28117           0 :                                 PyErr_NoMemory();
   28118           0 :                                 return -1;
   28119             :                         }
   28120           0 :                         object->remote_dsa_obj_dn = talloc_str;
   28121             :                 }
   28122             :         }
   28123           0 :         return 0;
   28124             : }
   28125             : 
   28126           0 : static PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_address(PyObject *obj, void *closure)
   28127             : {
   28128           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   28129           0 :         PyObject *py_remote_dsa_address;
   28130           0 :         if (object->remote_dsa_address == NULL) {
   28131           0 :                 Py_RETURN_NONE;
   28132             :         }
   28133           0 :         if (object->remote_dsa_address == NULL) {
   28134           0 :                 py_remote_dsa_address = Py_None;
   28135           0 :                 Py_INCREF(py_remote_dsa_address);
   28136             :         } else {
   28137           0 :                 if (object->remote_dsa_address == NULL) {
   28138           0 :                         py_remote_dsa_address = Py_None;
   28139           0 :                         Py_INCREF(py_remote_dsa_address);
   28140             :                 } else {
   28141           0 :                         py_remote_dsa_address = PyUnicode_Decode(object->remote_dsa_address, strlen(object->remote_dsa_address), "utf-8", "ignore");
   28142             :                 }
   28143             :         }
   28144           0 :         return py_remote_dsa_address;
   28145             : }
   28146             : 
   28147           0 : static int py_drsuapi_DsReplicaOp_set_remote_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
   28148             : {
   28149           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   28150           0 :         if (value == NULL) {
   28151           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->remote_dsa_address");
   28152           0 :                 return -1;
   28153             :         }
   28154           0 :         if (value == Py_None) {
   28155           0 :                 object->remote_dsa_address = NULL;
   28156             :         } else {
   28157           0 :                 object->remote_dsa_address = NULL;
   28158             :                 {
   28159           0 :                         const char *test_str;
   28160           0 :                         const char *talloc_str;
   28161           0 :                         PyObject *unicode = NULL;
   28162           0 :                         if (PyUnicode_Check(value)) {
   28163           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28164           0 :                                 if (unicode == NULL) {
   28165           0 :                                         return -1;
   28166             :                                 }
   28167           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28168           0 :                         } else if (PyBytes_Check(value)) {
   28169           0 :                                 test_str = PyBytes_AS_STRING(value);
   28170             :                         } else {
   28171           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28172           0 :                                 return -1;
   28173             :                         }
   28174           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28175           0 :                         if (unicode != NULL) {
   28176           0 :                                 Py_DECREF(unicode);
   28177             :                         }
   28178           0 :                         if (talloc_str == NULL) {
   28179           0 :                                 PyErr_NoMemory();
   28180           0 :                                 return -1;
   28181             :                         }
   28182           0 :                         object->remote_dsa_address = talloc_str;
   28183             :                 }
   28184             :         }
   28185           0 :         return 0;
   28186             : }
   28187             : 
   28188           0 : static PyObject *py_drsuapi_DsReplicaOp_get_nc_obj_guid(PyObject *obj, void *closure)
   28189             : {
   28190           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   28191           0 :         PyObject *py_nc_obj_guid;
   28192           0 :         py_nc_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->nc_obj_guid);
   28193           0 :         return py_nc_obj_guid;
   28194             : }
   28195             : 
   28196           0 : static int py_drsuapi_DsReplicaOp_set_nc_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
   28197             : {
   28198           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   28199           0 :         if (value == NULL) {
   28200           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nc_obj_guid");
   28201           0 :                 return -1;
   28202             :         }
   28203           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   28204           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28205           0 :                 PyErr_NoMemory();
   28206           0 :                 return -1;
   28207             :         }
   28208           0 :         object->nc_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
   28209           0 :         return 0;
   28210             : }
   28211             : 
   28212           0 : static PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_obj_guid(PyObject *obj, void *closure)
   28213             : {
   28214           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(obj);
   28215           0 :         PyObject *py_remote_dsa_obj_guid;
   28216           0 :         py_remote_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->remote_dsa_obj_guid);
   28217           0 :         return py_remote_dsa_obj_guid;
   28218             : }
   28219             : 
   28220           0 : static int py_drsuapi_DsReplicaOp_set_remote_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
   28221             : {
   28222           0 :         struct drsuapi_DsReplicaOp *object = pytalloc_get_ptr(py_obj);
   28223           0 :         if (value == NULL) {
   28224           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->remote_dsa_obj_guid");
   28225           0 :                 return -1;
   28226             :         }
   28227           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   28228           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28229           0 :                 PyErr_NoMemory();
   28230           0 :                 return -1;
   28231             :         }
   28232           0 :         object->remote_dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
   28233           0 :         return 0;
   28234             : }
   28235             : 
   28236             : static PyGetSetDef py_drsuapi_DsReplicaOp_getsetters[] = {
   28237             :         {
   28238             :                 .name = discard_const_p(char, "operation_start"),
   28239             :                 .get = py_drsuapi_DsReplicaOp_get_operation_start,
   28240             :                 .set = py_drsuapi_DsReplicaOp_set_operation_start,
   28241             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   28242             :         },
   28243             :         {
   28244             :                 .name = discard_const_p(char, "serial_num"),
   28245             :                 .get = py_drsuapi_DsReplicaOp_get_serial_num,
   28246             :                 .set = py_drsuapi_DsReplicaOp_set_serial_num,
   28247             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28248             :         },
   28249             :         {
   28250             :                 .name = discard_const_p(char, "priority"),
   28251             :                 .get = py_drsuapi_DsReplicaOp_get_priority,
   28252             :                 .set = py_drsuapi_DsReplicaOp_set_priority,
   28253             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28254             :         },
   28255             :         {
   28256             :                 .name = discard_const_p(char, "operation_type"),
   28257             :                 .get = py_drsuapi_DsReplicaOp_get_operation_type,
   28258             :                 .set = py_drsuapi_DsReplicaOp_set_operation_type,
   28259             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOpType")
   28260             :         },
   28261             :         {
   28262             :                 .name = discard_const_p(char, "options"),
   28263             :                 .get = py_drsuapi_DsReplicaOp_get_options,
   28264             :                 .set = py_drsuapi_DsReplicaOp_set_options,
   28265             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
   28266             :         },
   28267             :         {
   28268             :                 .name = discard_const_p(char, "nc_dn"),
   28269             :                 .get = py_drsuapi_DsReplicaOp_get_nc_dn,
   28270             :                 .set = py_drsuapi_DsReplicaOp_set_nc_dn,
   28271             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28272             :         },
   28273             :         {
   28274             :                 .name = discard_const_p(char, "remote_dsa_obj_dn"),
   28275             :                 .get = py_drsuapi_DsReplicaOp_get_remote_dsa_obj_dn,
   28276             :                 .set = py_drsuapi_DsReplicaOp_set_remote_dsa_obj_dn,
   28277             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28278             :         },
   28279             :         {
   28280             :                 .name = discard_const_p(char, "remote_dsa_address"),
   28281             :                 .get = py_drsuapi_DsReplicaOp_get_remote_dsa_address,
   28282             :                 .set = py_drsuapi_DsReplicaOp_set_remote_dsa_address,
   28283             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28284             :         },
   28285             :         {
   28286             :                 .name = discard_const_p(char, "nc_obj_guid"),
   28287             :                 .get = py_drsuapi_DsReplicaOp_get_nc_obj_guid,
   28288             :                 .set = py_drsuapi_DsReplicaOp_set_nc_obj_guid,
   28289             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   28290             :         },
   28291             :         {
   28292             :                 .name = discard_const_p(char, "remote_dsa_obj_guid"),
   28293             :                 .get = py_drsuapi_DsReplicaOp_get_remote_dsa_obj_guid,
   28294             :                 .set = py_drsuapi_DsReplicaOp_set_remote_dsa_obj_guid,
   28295             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   28296             :         },
   28297             :         { .name = NULL }
   28298             : };
   28299             : 
   28300           0 : static PyObject *py_drsuapi_DsReplicaOp_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28301             : {
   28302           0 :         return pytalloc_new(struct drsuapi_DsReplicaOp, type);
   28303             : }
   28304             : 
   28305             : 
   28306             : static PyTypeObject drsuapi_DsReplicaOp_Type = {
   28307             :         PyVarObject_HEAD_INIT(NULL, 0)
   28308             :         .tp_name = "drsuapi.DsReplicaOp",
   28309             :         .tp_getset = py_drsuapi_DsReplicaOp_getsetters,
   28310             :         .tp_methods = NULL,
   28311             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28312             :         .tp_new = py_drsuapi_DsReplicaOp_new,
   28313             : };
   28314             : 
   28315             : 
   28316           0 : static PyObject *py_drsuapi_DsReplicaOpCtr_get_time(PyObject *obj, void *closure)
   28317             : {
   28318           0 :         struct drsuapi_DsReplicaOpCtr *object = pytalloc_get_ptr(obj);
   28319           0 :         PyObject *py_time;
   28320           0 :         py_time = PyLong_FromUnsignedLongLong(object->time);
   28321           0 :         return py_time;
   28322             : }
   28323             : 
   28324           0 : static int py_drsuapi_DsReplicaOpCtr_set_time(PyObject *py_obj, PyObject *value, void *closure)
   28325             : {
   28326           0 :         struct drsuapi_DsReplicaOpCtr *object = pytalloc_get_ptr(py_obj);
   28327           0 :         if (value == NULL) {
   28328           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
   28329           0 :                 return -1;
   28330             :         }
   28331             :         {
   28332           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
   28333           0 :                 if (PyLong_Check(value)) {
   28334           0 :                         unsigned long long test_var;
   28335           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28336           0 :                         if (PyErr_Occurred() != NULL) {
   28337           0 :                                 return -1;
   28338             :                         }
   28339           0 :                         if (test_var > uint_max) {
   28340           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28341             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28342           0 :                                 return -1;
   28343             :                         }
   28344           0 :                         object->time = test_var;
   28345             :                 } else {
   28346           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28347             :                           PyLong_Type.tp_name);
   28348           0 :                         return -1;
   28349             :                 }
   28350             :         }
   28351           0 :         return 0;
   28352             : }
   28353             : 
   28354           0 : static PyObject *py_drsuapi_DsReplicaOpCtr_get_count(PyObject *obj, void *closure)
   28355             : {
   28356           0 :         struct drsuapi_DsReplicaOpCtr *object = pytalloc_get_ptr(obj);
   28357           0 :         PyObject *py_count;
   28358           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   28359           0 :         return py_count;
   28360             : }
   28361             : 
   28362           0 : static int py_drsuapi_DsReplicaOpCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   28363             : {
   28364           0 :         struct drsuapi_DsReplicaOpCtr *object = pytalloc_get_ptr(py_obj);
   28365           0 :         if (value == NULL) {
   28366           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   28367           0 :                 return -1;
   28368             :         }
   28369             :         {
   28370           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   28371           0 :                 if (PyLong_Check(value)) {
   28372           0 :                         unsigned long long test_var;
   28373           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28374           0 :                         if (PyErr_Occurred() != NULL) {
   28375           0 :                                 return -1;
   28376             :                         }
   28377           0 :                         if (test_var > uint_max) {
   28378           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28379             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28380           0 :                                 return -1;
   28381             :                         }
   28382           0 :                         object->count = test_var;
   28383             :                 } else {
   28384           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28385             :                           PyLong_Type.tp_name);
   28386           0 :                         return -1;
   28387             :                 }
   28388             :         }
   28389           0 :         return 0;
   28390             : }
   28391             : 
   28392           0 : static PyObject *py_drsuapi_DsReplicaOpCtr_get_array(PyObject *obj, void *closure)
   28393             : {
   28394           0 :         struct drsuapi_DsReplicaOpCtr *object = pytalloc_get_ptr(obj);
   28395           0 :         PyObject *py_array;
   28396           0 :         py_array = PyList_New(object->count);
   28397           0 :         if (py_array == NULL) {
   28398           0 :                 return NULL;
   28399             :         }
   28400             :         {
   28401             :                 int array_cntr_0;
   28402           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   28403           0 :                         PyObject *py_array_0;
   28404           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaOp_Type, object->array, &(object->array)[array_cntr_0]);
   28405           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   28406             :                 }
   28407             :         }
   28408           0 :         return py_array;
   28409             : }
   28410             : 
   28411           0 : static int py_drsuapi_DsReplicaOpCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   28412             : {
   28413           0 :         struct drsuapi_DsReplicaOpCtr *object = pytalloc_get_ptr(py_obj);
   28414           0 :         if (value == NULL) {
   28415           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   28416           0 :                 return -1;
   28417             :         }
   28418           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   28419             :         {
   28420           0 :                 int array_cntr_0;
   28421           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   28422           0 :                 if (!object->array) { return -1; }
   28423           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   28424           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   28425           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   28426           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   28427           0 :                                 return -1;
   28428             :                         }
   28429           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaOp_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   28430           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   28431           0 :                                 PyErr_NoMemory();
   28432           0 :                                 return -1;
   28433             :                         }
   28434           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   28435             :                 }
   28436             :         }
   28437           0 :         return 0;
   28438             : }
   28439             : 
   28440             : static PyGetSetDef py_drsuapi_DsReplicaOpCtr_getsetters[] = {
   28441             :         {
   28442             :                 .name = discard_const_p(char, "time"),
   28443             :                 .get = py_drsuapi_DsReplicaOpCtr_get_time,
   28444             :                 .set = py_drsuapi_DsReplicaOpCtr_set_time,
   28445             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   28446             :         },
   28447             :         {
   28448             :                 .name = discard_const_p(char, "count"),
   28449             :                 .get = py_drsuapi_DsReplicaOpCtr_get_count,
   28450             :                 .set = py_drsuapi_DsReplicaOpCtr_set_count,
   28451             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28452             :         },
   28453             :         {
   28454             :                 .name = discard_const_p(char, "array"),
   28455             :                 .get = py_drsuapi_DsReplicaOpCtr_get_array,
   28456             :                 .set = py_drsuapi_DsReplicaOpCtr_set_array,
   28457             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOp")
   28458             :         },
   28459             :         { .name = NULL }
   28460             : };
   28461             : 
   28462           0 : static PyObject *py_drsuapi_DsReplicaOpCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   28463             : {
   28464           0 :         return pytalloc_new(struct drsuapi_DsReplicaOpCtr, type);
   28465             : }
   28466             : 
   28467             : 
   28468             : static PyTypeObject drsuapi_DsReplicaOpCtr_Type = {
   28469             :         PyVarObject_HEAD_INIT(NULL, 0)
   28470             :         .tp_name = "drsuapi.DsReplicaOpCtr",
   28471             :         .tp_getset = py_drsuapi_DsReplicaOpCtr_getsetters,
   28472             :         .tp_methods = NULL,
   28473             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   28474             :         .tp_new = py_drsuapi_DsReplicaOpCtr_new,
   28475             : };
   28476             : 
   28477             : 
   28478           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_attribute_name(PyObject *obj, void *closure)
   28479             : {
   28480           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28481           0 :         PyObject *py_attribute_name;
   28482           0 :         if (object->attribute_name == NULL) {
   28483           0 :                 Py_RETURN_NONE;
   28484             :         }
   28485           0 :         if (object->attribute_name == NULL) {
   28486           0 :                 py_attribute_name = Py_None;
   28487           0 :                 Py_INCREF(py_attribute_name);
   28488             :         } else {
   28489           0 :                 if (object->attribute_name == NULL) {
   28490           0 :                         py_attribute_name = Py_None;
   28491           0 :                         Py_INCREF(py_attribute_name);
   28492             :                 } else {
   28493           0 :                         py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
   28494             :                 }
   28495             :         }
   28496           0 :         return py_attribute_name;
   28497             : }
   28498             : 
   28499           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
   28500             : {
   28501           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28502           0 :         if (value == NULL) {
   28503           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
   28504           0 :                 return -1;
   28505             :         }
   28506           0 :         if (value == Py_None) {
   28507           0 :                 object->attribute_name = NULL;
   28508             :         } else {
   28509           0 :                 object->attribute_name = NULL;
   28510             :                 {
   28511           0 :                         const char *test_str;
   28512           0 :                         const char *talloc_str;
   28513           0 :                         PyObject *unicode = NULL;
   28514           0 :                         if (PyUnicode_Check(value)) {
   28515           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28516           0 :                                 if (unicode == NULL) {
   28517           0 :                                         return -1;
   28518             :                                 }
   28519           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28520           0 :                         } else if (PyBytes_Check(value)) {
   28521           0 :                                 test_str = PyBytes_AS_STRING(value);
   28522             :                         } else {
   28523           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28524           0 :                                 return -1;
   28525             :                         }
   28526           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28527           0 :                         if (unicode != NULL) {
   28528           0 :                                 Py_DECREF(unicode);
   28529             :                         }
   28530           0 :                         if (talloc_str == NULL) {
   28531           0 :                                 PyErr_NoMemory();
   28532           0 :                                 return -1;
   28533             :                         }
   28534           0 :                         object->attribute_name = talloc_str;
   28535             :                 }
   28536             :         }
   28537           0 :         return 0;
   28538             : }
   28539             : 
   28540           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_object_dn(PyObject *obj, void *closure)
   28541             : {
   28542           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28543           0 :         PyObject *py_object_dn;
   28544           0 :         if (object->object_dn == NULL) {
   28545           0 :                 Py_RETURN_NONE;
   28546             :         }
   28547           0 :         if (object->object_dn == NULL) {
   28548           0 :                 py_object_dn = Py_None;
   28549           0 :                 Py_INCREF(py_object_dn);
   28550             :         } else {
   28551           0 :                 if (object->object_dn == NULL) {
   28552           0 :                         py_object_dn = Py_None;
   28553           0 :                         Py_INCREF(py_object_dn);
   28554             :                 } else {
   28555           0 :                         py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
   28556             :                 }
   28557             :         }
   28558           0 :         return py_object_dn;
   28559             : }
   28560             : 
   28561           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
   28562             : {
   28563           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28564           0 :         if (value == NULL) {
   28565           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
   28566           0 :                 return -1;
   28567             :         }
   28568           0 :         if (value == Py_None) {
   28569           0 :                 object->object_dn = NULL;
   28570             :         } else {
   28571           0 :                 object->object_dn = NULL;
   28572             :                 {
   28573           0 :                         const char *test_str;
   28574           0 :                         const char *talloc_str;
   28575           0 :                         PyObject *unicode = NULL;
   28576           0 :                         if (PyUnicode_Check(value)) {
   28577           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   28578           0 :                                 if (unicode == NULL) {
   28579           0 :                                         return -1;
   28580             :                                 }
   28581           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   28582           0 :                         } else if (PyBytes_Check(value)) {
   28583           0 :                                 test_str = PyBytes_AS_STRING(value);
   28584             :                         } else {
   28585           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   28586           0 :                                 return -1;
   28587             :                         }
   28588           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   28589           0 :                         if (unicode != NULL) {
   28590           0 :                                 Py_DECREF(unicode);
   28591             :                         }
   28592           0 :                         if (talloc_str == NULL) {
   28593           0 :                                 PyErr_NoMemory();
   28594           0 :                                 return -1;
   28595             :                         }
   28596           0 :                         object->object_dn = talloc_str;
   28597             :                 }
   28598             :         }
   28599           0 :         return 0;
   28600             : }
   28601             : 
   28602           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get___ndr_size_binary(PyObject *obj, void *closure)
   28603             : {
   28604           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28605           0 :         PyObject *py___ndr_size_binary;
   28606           0 :         py___ndr_size_binary = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size_binary));
   28607           0 :         return py___ndr_size_binary;
   28608             : }
   28609             : 
   28610           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
   28611             : {
   28612           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28613           0 :         if (value == NULL) {
   28614           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_binary");
   28615           0 :                 return -1;
   28616             :         }
   28617             :         {
   28618           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_binary));
   28619           0 :                 if (PyLong_Check(value)) {
   28620           0 :                         unsigned long long test_var;
   28621           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28622           0 :                         if (PyErr_Occurred() != NULL) {
   28623           0 :                                 return -1;
   28624             :                         }
   28625           0 :                         if (test_var > uint_max) {
   28626           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28627             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28628           0 :                                 return -1;
   28629             :                         }
   28630           0 :                         object->__ndr_size_binary = test_var;
   28631             :                 } else {
   28632           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28633             :                           PyLong_Type.tp_name);
   28634           0 :                         return -1;
   28635             :                 }
   28636             :         }
   28637           0 :         return 0;
   28638             : }
   28639             : 
   28640           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_binary(PyObject *obj, void *closure)
   28641             : {
   28642           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28643           0 :         PyObject *py_binary;
   28644           0 :         if (object->binary == NULL) {
   28645           0 :                 Py_RETURN_NONE;
   28646             :         }
   28647           0 :         if (object->binary == NULL) {
   28648           0 :                 py_binary = Py_None;
   28649           0 :                 Py_INCREF(py_binary);
   28650             :         } else {
   28651           0 :                 py_binary = PyBytes_FromStringAndSize((char *)(*object->binary).data, (*object->binary).length);
   28652             :         }
   28653           0 :         return py_binary;
   28654             : }
   28655             : 
   28656           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_binary(PyObject *py_obj, PyObject *value, void *closure)
   28657             : {
   28658           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28659           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->binary));
   28660           0 :         if (value == NULL) {
   28661           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary");
   28662           0 :                 return -1;
   28663             :         }
   28664           0 :         if (value == Py_None) {
   28665           0 :                 object->binary = NULL;
   28666             :         } else {
   28667           0 :                 object->binary = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary);
   28668           0 :                 if (object->binary == NULL) {
   28669           0 :                         PyErr_NoMemory();
   28670           0 :                         return -1;
   28671             :                 }
   28672           0 :                 *object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   28673             :         }
   28674           0 :         return 0;
   28675             : }
   28676             : 
   28677           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_deleted(PyObject *obj, void *closure)
   28678             : {
   28679           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28680           0 :         PyObject *py_deleted;
   28681           0 :         py_deleted = PyLong_FromUnsignedLongLong(object->deleted);
   28682           0 :         return py_deleted;
   28683             : }
   28684             : 
   28685           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_deleted(PyObject *py_obj, PyObject *value, void *closure)
   28686             : {
   28687           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28688           0 :         if (value == NULL) {
   28689           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->deleted");
   28690           0 :                 return -1;
   28691             :         }
   28692             :         {
   28693           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->deleted));
   28694           0 :                 if (PyLong_Check(value)) {
   28695           0 :                         unsigned long long test_var;
   28696           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28697           0 :                         if (PyErr_Occurred() != NULL) {
   28698           0 :                                 return -1;
   28699             :                         }
   28700           0 :                         if (test_var > uint_max) {
   28701           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28702             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28703           0 :                                 return -1;
   28704             :                         }
   28705           0 :                         object->deleted = test_var;
   28706             :                 } else {
   28707           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28708             :                           PyLong_Type.tp_name);
   28709           0 :                         return -1;
   28710             :                 }
   28711             :         }
   28712           0 :         return 0;
   28713             : }
   28714             : 
   28715           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_created(PyObject *obj, void *closure)
   28716             : {
   28717           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28718           0 :         PyObject *py_created;
   28719           0 :         py_created = PyLong_FromUnsignedLongLong(object->created);
   28720           0 :         return py_created;
   28721             : }
   28722             : 
   28723           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_created(PyObject *py_obj, PyObject *value, void *closure)
   28724             : {
   28725           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28726           0 :         if (value == NULL) {
   28727           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->created");
   28728           0 :                 return -1;
   28729             :         }
   28730             :         {
   28731           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->created));
   28732           0 :                 if (PyLong_Check(value)) {
   28733           0 :                         unsigned long long test_var;
   28734           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28735           0 :                         if (PyErr_Occurred() != NULL) {
   28736           0 :                                 return -1;
   28737             :                         }
   28738           0 :                         if (test_var > uint_max) {
   28739           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28740             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28741           0 :                                 return -1;
   28742             :                         }
   28743           0 :                         object->created = test_var;
   28744             :                 } else {
   28745           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28746             :                           PyLong_Type.tp_name);
   28747           0 :                         return -1;
   28748             :                 }
   28749             :         }
   28750           0 :         return 0;
   28751             : }
   28752             : 
   28753           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_version(PyObject *obj, void *closure)
   28754             : {
   28755           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28756           0 :         PyObject *py_version;
   28757           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
   28758           0 :         return py_version;
   28759             : }
   28760             : 
   28761           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
   28762             : {
   28763           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28764           0 :         if (value == NULL) {
   28765           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
   28766           0 :                 return -1;
   28767             :         }
   28768             :         {
   28769           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
   28770           0 :                 if (PyLong_Check(value)) {
   28771           0 :                         unsigned long long test_var;
   28772           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28773           0 :                         if (PyErr_Occurred() != NULL) {
   28774           0 :                                 return -1;
   28775             :                         }
   28776           0 :                         if (test_var > uint_max) {
   28777           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28778             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28779           0 :                                 return -1;
   28780             :                         }
   28781           0 :                         object->version = test_var;
   28782             :                 } else {
   28783           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28784             :                           PyLong_Type.tp_name);
   28785           0 :                         return -1;
   28786             :                 }
   28787             :         }
   28788           0 :         return 0;
   28789             : }
   28790             : 
   28791           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_originating_change_time(PyObject *obj, void *closure)
   28792             : {
   28793           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28794           0 :         PyObject *py_originating_change_time;
   28795           0 :         py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
   28796           0 :         return py_originating_change_time;
   28797             : }
   28798             : 
   28799           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
   28800             : {
   28801           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28802           0 :         if (value == NULL) {
   28803           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
   28804           0 :                 return -1;
   28805             :         }
   28806             :         {
   28807           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
   28808           0 :                 if (PyLong_Check(value)) {
   28809           0 :                         unsigned long long test_var;
   28810           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28811           0 :                         if (PyErr_Occurred() != NULL) {
   28812           0 :                                 return -1;
   28813             :                         }
   28814           0 :                         if (test_var > uint_max) {
   28815           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28816             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28817           0 :                                 return -1;
   28818             :                         }
   28819           0 :                         object->originating_change_time = test_var;
   28820             :                 } else {
   28821           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28822             :                           PyLong_Type.tp_name);
   28823           0 :                         return -1;
   28824             :                 }
   28825             :         }
   28826           0 :         return 0;
   28827             : }
   28828             : 
   28829           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
   28830             : {
   28831           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28832           0 :         PyObject *py_originating_invocation_id;
   28833           0 :         py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
   28834           0 :         return py_originating_invocation_id;
   28835             : }
   28836             : 
   28837           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
   28838             : {
   28839           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28840           0 :         if (value == NULL) {
   28841           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
   28842           0 :                 return -1;
   28843             :         }
   28844           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   28845           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   28846           0 :                 PyErr_NoMemory();
   28847           0 :                 return -1;
   28848             :         }
   28849           0 :         object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
   28850           0 :         return 0;
   28851             : }
   28852             : 
   28853           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_originating_usn(PyObject *obj, void *closure)
   28854             : {
   28855           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28856           0 :         PyObject *py_originating_usn;
   28857           0 :         py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
   28858           0 :         return py_originating_usn;
   28859             : }
   28860             : 
   28861           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
   28862             : {
   28863           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28864           0 :         if (value == NULL) {
   28865           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
   28866           0 :                 return -1;
   28867             :         }
   28868             :         {
   28869           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
   28870           0 :                 if (PyLong_Check(value)) {
   28871           0 :                         unsigned long long test_var;
   28872           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28873           0 :                         if (PyErr_Occurred() != NULL) {
   28874           0 :                                 return -1;
   28875             :                         }
   28876           0 :                         if (test_var > uint_max) {
   28877           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28878             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28879           0 :                                 return -1;
   28880             :                         }
   28881           0 :                         object->originating_usn = test_var;
   28882             :                 } else {
   28883           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28884             :                           PyLong_Type.tp_name);
   28885           0 :                         return -1;
   28886             :                 }
   28887             :         }
   28888           0 :         return 0;
   28889             : }
   28890             : 
   28891           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_local_usn(PyObject *obj, void *closure)
   28892             : {
   28893           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(obj);
   28894           0 :         PyObject *py_local_usn;
   28895           0 :         py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
   28896           0 :         return py_local_usn;
   28897             : }
   28898             : 
   28899           0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
   28900             : {
   28901           0 :         struct drsuapi_DsReplicaAttrValMetaData *object = pytalloc_get_ptr(py_obj);
   28902           0 :         if (value == NULL) {
   28903           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->local_usn");
   28904           0 :                 return -1;
   28905             :         }
   28906             :         {
   28907           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->local_usn));
   28908           0 :                 if (PyLong_Check(value)) {
   28909           0 :                         unsigned long long test_var;
   28910           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   28911           0 :                         if (PyErr_Occurred() != NULL) {
   28912           0 :                                 return -1;
   28913             :                         }
   28914           0 :                         if (test_var > uint_max) {
   28915           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   28916             :                                   PyLong_Type.tp_name, uint_max, test_var);
   28917           0 :                                 return -1;
   28918             :                         }
   28919           0 :                         object->local_usn = test_var;
   28920             :                 } else {
   28921           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   28922             :                           PyLong_Type.tp_name);
   28923           0 :                         return -1;
   28924             :                 }
   28925             :         }
   28926           0 :         return 0;
   28927             : }
   28928             : 
   28929             : static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaData_getsetters[] = {
   28930             :         {
   28931             :                 .name = discard_const_p(char, "attribute_name"),
   28932             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_attribute_name,
   28933             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_attribute_name,
   28934             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28935             :         },
   28936             :         {
   28937             :                 .name = discard_const_p(char, "object_dn"),
   28938             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_object_dn,
   28939             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_object_dn,
   28940             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   28941             :         },
   28942             :         {
   28943             :                 .name = discard_const_p(char, "__ndr_size_binary"),
   28944             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get___ndr_size_binary,
   28945             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set___ndr_size_binary,
   28946             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28947             :         },
   28948             :         {
   28949             :                 .name = discard_const_p(char, "binary"),
   28950             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_binary,
   28951             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_binary,
   28952             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   28953             :         },
   28954             :         {
   28955             :                 .name = discard_const_p(char, "deleted"),
   28956             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_deleted,
   28957             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_deleted,
   28958             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   28959             :         },
   28960             :         {
   28961             :                 .name = discard_const_p(char, "created"),
   28962             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_created,
   28963             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_created,
   28964             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   28965             :         },
   28966             :         {
   28967             :                 .name = discard_const_p(char, "version"),
   28968             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_version,
   28969             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_version,
   28970             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   28971             :         },
   28972             :         {
   28973             :                 .name = discard_const_p(char, "originating_change_time"),
   28974             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_originating_change_time,
   28975             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_originating_change_time,
   28976             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   28977             :         },
   28978             :         {
   28979             :                 .name = discard_const_p(char, "originating_invocation_id"),
   28980             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_originating_invocation_id,
   28981             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_originating_invocation_id,
   28982             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   28983             :         },
   28984             :         {
   28985             :                 .name = discard_const_p(char, "originating_usn"),
   28986             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_originating_usn,
   28987             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_originating_usn,
   28988             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   28989             :         },
   28990             :         {
   28991             :                 .name = discard_const_p(char, "local_usn"),
   28992             :                 .get = py_drsuapi_DsReplicaAttrValMetaData_get_local_usn,
   28993             :                 .set = py_drsuapi_DsReplicaAttrValMetaData_set_local_usn,
   28994             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   28995             :         },
   28996             :         { .name = NULL }
   28997             : };
   28998             : 
   28999           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29000             : {
   29001           0 :         return pytalloc_new(struct drsuapi_DsReplicaAttrValMetaData, type);
   29002             : }
   29003             : 
   29004             : 
   29005             : static PyTypeObject drsuapi_DsReplicaAttrValMetaData_Type = {
   29006             :         PyVarObject_HEAD_INIT(NULL, 0)
   29007             :         .tp_name = "drsuapi.DsReplicaAttrValMetaData",
   29008             :         .tp_getset = py_drsuapi_DsReplicaAttrValMetaData_getsetters,
   29009             :         .tp_methods = NULL,
   29010             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29011             :         .tp_new = py_drsuapi_DsReplicaAttrValMetaData_new,
   29012             : };
   29013             : 
   29014             : 
   29015           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_count(PyObject *obj, void *closure)
   29016             : {
   29017           0 :         struct drsuapi_DsReplicaAttrValMetaDataCtr *object = pytalloc_get_ptr(obj);
   29018           0 :         PyObject *py_count;
   29019           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   29020           0 :         return py_count;
   29021             : }
   29022             : 
   29023           0 : static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   29024             : {
   29025           0 :         struct drsuapi_DsReplicaAttrValMetaDataCtr *object = pytalloc_get_ptr(py_obj);
   29026           0 :         if (value == NULL) {
   29027           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   29028           0 :                 return -1;
   29029             :         }
   29030             :         {
   29031           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   29032           0 :                 if (PyLong_Check(value)) {
   29033           0 :                         unsigned long long test_var;
   29034           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29035           0 :                         if (PyErr_Occurred() != NULL) {
   29036           0 :                                 return -1;
   29037             :                         }
   29038           0 :                         if (test_var > uint_max) {
   29039           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29040             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29041           0 :                                 return -1;
   29042             :                         }
   29043           0 :                         object->count = test_var;
   29044             :                 } else {
   29045           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29046             :                           PyLong_Type.tp_name);
   29047           0 :                         return -1;
   29048             :                 }
   29049             :         }
   29050           0 :         return 0;
   29051             : }
   29052             : 
   29053           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_enumeration_context(PyObject *obj, void *closure)
   29054             : {
   29055           0 :         struct drsuapi_DsReplicaAttrValMetaDataCtr *object = pytalloc_get_ptr(obj);
   29056           0 :         PyObject *py_enumeration_context;
   29057           0 :         py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)(object->enumeration_context));
   29058           0 :         return py_enumeration_context;
   29059             : }
   29060             : 
   29061           0 : static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
   29062             : {
   29063           0 :         struct drsuapi_DsReplicaAttrValMetaDataCtr *object = pytalloc_get_ptr(py_obj);
   29064           0 :         if (value == NULL) {
   29065           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
   29066           0 :                 return -1;
   29067             :         }
   29068             :         {
   29069           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
   29070           0 :                 if (PyLong_Check(value)) {
   29071           0 :                         unsigned long long test_var;
   29072           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29073           0 :                         if (PyErr_Occurred() != NULL) {
   29074           0 :                                 return -1;
   29075             :                         }
   29076           0 :                         if (test_var > uint_max) {
   29077           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29078             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29079           0 :                                 return -1;
   29080             :                         }
   29081           0 :                         object->enumeration_context = test_var;
   29082             :                 } else {
   29083           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29084             :                           PyLong_Type.tp_name);
   29085           0 :                         return -1;
   29086             :                 }
   29087             :         }
   29088           0 :         return 0;
   29089             : }
   29090             : 
   29091           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_array(PyObject *obj, void *closure)
   29092             : {
   29093           0 :         struct drsuapi_DsReplicaAttrValMetaDataCtr *object = pytalloc_get_ptr(obj);
   29094           0 :         PyObject *py_array;
   29095           0 :         py_array = PyList_New(object->count);
   29096           0 :         if (py_array == NULL) {
   29097           0 :                 return NULL;
   29098             :         }
   29099             :         {
   29100             :                 int array_cntr_0;
   29101           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   29102           0 :                         PyObject *py_array_0;
   29103           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData_Type, object->array, &(object->array)[array_cntr_0]);
   29104           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   29105             :                 }
   29106             :         }
   29107           0 :         return py_array;
   29108             : }
   29109             : 
   29110           0 : static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   29111             : {
   29112           0 :         struct drsuapi_DsReplicaAttrValMetaDataCtr *object = pytalloc_get_ptr(py_obj);
   29113           0 :         if (value == NULL) {
   29114           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   29115           0 :                 return -1;
   29116             :         }
   29117           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   29118             :         {
   29119           0 :                 int array_cntr_0;
   29120           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   29121           0 :                 if (!object->array) { return -1; }
   29122           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   29123           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   29124           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   29125           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   29126           0 :                                 return -1;
   29127             :                         }
   29128           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   29129           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   29130           0 :                                 PyErr_NoMemory();
   29131           0 :                                 return -1;
   29132             :                         }
   29133           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   29134             :                 }
   29135             :         }
   29136           0 :         return 0;
   29137             : }
   29138             : 
   29139             : static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaDataCtr_getsetters[] = {
   29140             :         {
   29141             :                 .name = discard_const_p(char, "count"),
   29142             :                 .get = py_drsuapi_DsReplicaAttrValMetaDataCtr_get_count,
   29143             :                 .set = py_drsuapi_DsReplicaAttrValMetaDataCtr_set_count,
   29144             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29145             :         },
   29146             :         {
   29147             :                 .name = discard_const_p(char, "enumeration_context"),
   29148             :                 .get = py_drsuapi_DsReplicaAttrValMetaDataCtr_get_enumeration_context,
   29149             :                 .set = py_drsuapi_DsReplicaAttrValMetaDataCtr_set_enumeration_context,
   29150             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29151             :         },
   29152             :         {
   29153             :                 .name = discard_const_p(char, "array"),
   29154             :                 .get = py_drsuapi_DsReplicaAttrValMetaDataCtr_get_array,
   29155             :                 .set = py_drsuapi_DsReplicaAttrValMetaDataCtr_set_array,
   29156             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAttrValMetaData")
   29157             :         },
   29158             :         { .name = NULL }
   29159             : };
   29160             : 
   29161           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29162             : {
   29163           0 :         return pytalloc_new(struct drsuapi_DsReplicaAttrValMetaDataCtr, type);
   29164             : }
   29165             : 
   29166             : 
   29167             : static PyTypeObject drsuapi_DsReplicaAttrValMetaDataCtr_Type = {
   29168             :         PyVarObject_HEAD_INIT(NULL, 0)
   29169             :         .tp_name = "drsuapi.DsReplicaAttrValMetaDataCtr",
   29170             :         .tp_getset = py_drsuapi_DsReplicaAttrValMetaDataCtr_getsetters,
   29171             :         .tp_methods = NULL,
   29172             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29173             :         .tp_new = py_drsuapi_DsReplicaAttrValMetaDataCtr_new,
   29174             : };
   29175             : 
   29176             : 
   29177           0 : static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_count(PyObject *obj, void *closure)
   29178             : {
   29179           0 :         struct drsuapi_DsReplicaCursor2Ctr *object = pytalloc_get_ptr(obj);
   29180           0 :         PyObject *py_count;
   29181           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   29182           0 :         return py_count;
   29183             : }
   29184             : 
   29185           0 : static int py_drsuapi_DsReplicaCursor2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   29186             : {
   29187           0 :         struct drsuapi_DsReplicaCursor2Ctr *object = pytalloc_get_ptr(py_obj);
   29188           0 :         if (value == NULL) {
   29189           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   29190           0 :                 return -1;
   29191             :         }
   29192             :         {
   29193           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   29194           0 :                 if (PyLong_Check(value)) {
   29195           0 :                         unsigned long long test_var;
   29196           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29197           0 :                         if (PyErr_Occurred() != NULL) {
   29198           0 :                                 return -1;
   29199             :                         }
   29200           0 :                         if (test_var > uint_max) {
   29201           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29202             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29203           0 :                                 return -1;
   29204             :                         }
   29205           0 :                         object->count = test_var;
   29206             :                 } else {
   29207           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29208             :                           PyLong_Type.tp_name);
   29209           0 :                         return -1;
   29210             :                 }
   29211             :         }
   29212           0 :         return 0;
   29213             : }
   29214             : 
   29215           0 : static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_enumeration_context(PyObject *obj, void *closure)
   29216             : {
   29217           0 :         struct drsuapi_DsReplicaCursor2Ctr *object = pytalloc_get_ptr(obj);
   29218           0 :         PyObject *py_enumeration_context;
   29219           0 :         py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)(object->enumeration_context));
   29220           0 :         return py_enumeration_context;
   29221             : }
   29222             : 
   29223           0 : static int py_drsuapi_DsReplicaCursor2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
   29224             : {
   29225           0 :         struct drsuapi_DsReplicaCursor2Ctr *object = pytalloc_get_ptr(py_obj);
   29226           0 :         if (value == NULL) {
   29227           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
   29228           0 :                 return -1;
   29229             :         }
   29230             :         {
   29231           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
   29232           0 :                 if (PyLong_Check(value)) {
   29233           0 :                         unsigned long long test_var;
   29234           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29235           0 :                         if (PyErr_Occurred() != NULL) {
   29236           0 :                                 return -1;
   29237             :                         }
   29238           0 :                         if (test_var > uint_max) {
   29239           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29240             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29241           0 :                                 return -1;
   29242             :                         }
   29243           0 :                         object->enumeration_context = test_var;
   29244             :                 } else {
   29245           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29246             :                           PyLong_Type.tp_name);
   29247           0 :                         return -1;
   29248             :                 }
   29249             :         }
   29250           0 :         return 0;
   29251             : }
   29252             : 
   29253           0 : static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_array(PyObject *obj, void *closure)
   29254             : {
   29255           0 :         struct drsuapi_DsReplicaCursor2Ctr *object = pytalloc_get_ptr(obj);
   29256           0 :         PyObject *py_array;
   29257           0 :         py_array = PyList_New(object->count);
   29258           0 :         if (py_array == NULL) {
   29259           0 :                 return NULL;
   29260             :         }
   29261             :         {
   29262             :                 int array_cntr_0;
   29263           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   29264           0 :                         PyObject *py_array_0;
   29265           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2_Type, object->array, &(object->array)[array_cntr_0]);
   29266           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   29267             :                 }
   29268             :         }
   29269           0 :         return py_array;
   29270             : }
   29271             : 
   29272           0 : static int py_drsuapi_DsReplicaCursor2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   29273             : {
   29274           0 :         struct drsuapi_DsReplicaCursor2Ctr *object = pytalloc_get_ptr(py_obj);
   29275           0 :         if (value == NULL) {
   29276           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   29277           0 :                 return -1;
   29278             :         }
   29279           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   29280             :         {
   29281           0 :                 int array_cntr_0;
   29282           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   29283           0 :                 if (!object->array) { return -1; }
   29284           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   29285           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   29286           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   29287           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   29288           0 :                                 return -1;
   29289             :                         }
   29290           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   29291           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   29292           0 :                                 PyErr_NoMemory();
   29293           0 :                                 return -1;
   29294             :                         }
   29295           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   29296             :                 }
   29297             :         }
   29298           0 :         return 0;
   29299             : }
   29300             : 
   29301             : static PyGetSetDef py_drsuapi_DsReplicaCursor2Ctr_getsetters[] = {
   29302             :         {
   29303             :                 .name = discard_const_p(char, "count"),
   29304             :                 .get = py_drsuapi_DsReplicaCursor2Ctr_get_count,
   29305             :                 .set = py_drsuapi_DsReplicaCursor2Ctr_set_count,
   29306             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29307             :         },
   29308             :         {
   29309             :                 .name = discard_const_p(char, "enumeration_context"),
   29310             :                 .get = py_drsuapi_DsReplicaCursor2Ctr_get_enumeration_context,
   29311             :                 .set = py_drsuapi_DsReplicaCursor2Ctr_set_enumeration_context,
   29312             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29313             :         },
   29314             :         {
   29315             :                 .name = discard_const_p(char, "array"),
   29316             :                 .get = py_drsuapi_DsReplicaCursor2Ctr_get_array,
   29317             :                 .set = py_drsuapi_DsReplicaCursor2Ctr_set_array,
   29318             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor2")
   29319             :         },
   29320             :         { .name = NULL }
   29321             : };
   29322             : 
   29323           0 : static PyObject *py_drsuapi_DsReplicaCursor2Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29324             : {
   29325           0 :         return pytalloc_new(struct drsuapi_DsReplicaCursor2Ctr, type);
   29326             : }
   29327             : 
   29328             : 
   29329             : static PyTypeObject drsuapi_DsReplicaCursor2Ctr_Type = {
   29330             :         PyVarObject_HEAD_INIT(NULL, 0)
   29331             :         .tp_name = "drsuapi.DsReplicaCursor2Ctr",
   29332             :         .tp_getset = py_drsuapi_DsReplicaCursor2Ctr_getsetters,
   29333             :         .tp_methods = NULL,
   29334             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29335             :         .tp_new = py_drsuapi_DsReplicaCursor2Ctr_new,
   29336             : };
   29337             : 
   29338             : 
   29339           0 : static PyObject *py_drsuapi_DsReplicaCursor3_get_source_dsa_invocation_id(PyObject *obj, void *closure)
   29340             : {
   29341           0 :         struct drsuapi_DsReplicaCursor3 *object = pytalloc_get_ptr(obj);
   29342           0 :         PyObject *py_source_dsa_invocation_id;
   29343           0 :         py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
   29344           0 :         return py_source_dsa_invocation_id;
   29345             : }
   29346             : 
   29347           0 : static int py_drsuapi_DsReplicaCursor3_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
   29348             : {
   29349           0 :         struct drsuapi_DsReplicaCursor3 *object = pytalloc_get_ptr(py_obj);
   29350           0 :         if (value == NULL) {
   29351           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
   29352           0 :                 return -1;
   29353             :         }
   29354           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   29355           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29356           0 :                 PyErr_NoMemory();
   29357           0 :                 return -1;
   29358             :         }
   29359           0 :         object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
   29360           0 :         return 0;
   29361             : }
   29362             : 
   29363           0 : static PyObject *py_drsuapi_DsReplicaCursor3_get_highest_usn(PyObject *obj, void *closure)
   29364             : {
   29365           0 :         struct drsuapi_DsReplicaCursor3 *object = pytalloc_get_ptr(obj);
   29366           0 :         PyObject *py_highest_usn;
   29367           0 :         py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
   29368           0 :         return py_highest_usn;
   29369             : }
   29370             : 
   29371           0 : static int py_drsuapi_DsReplicaCursor3_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
   29372             : {
   29373           0 :         struct drsuapi_DsReplicaCursor3 *object = pytalloc_get_ptr(py_obj);
   29374           0 :         if (value == NULL) {
   29375           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
   29376           0 :                 return -1;
   29377             :         }
   29378             :         {
   29379           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
   29380           0 :                 if (PyLong_Check(value)) {
   29381           0 :                         unsigned long long test_var;
   29382           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29383           0 :                         if (PyErr_Occurred() != NULL) {
   29384           0 :                                 return -1;
   29385             :                         }
   29386           0 :                         if (test_var > uint_max) {
   29387           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29388             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29389           0 :                                 return -1;
   29390             :                         }
   29391           0 :                         object->highest_usn = test_var;
   29392             :                 } else {
   29393           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29394             :                           PyLong_Type.tp_name);
   29395           0 :                         return -1;
   29396             :                 }
   29397             :         }
   29398           0 :         return 0;
   29399             : }
   29400             : 
   29401           0 : static PyObject *py_drsuapi_DsReplicaCursor3_get_last_sync_success(PyObject *obj, void *closure)
   29402             : {
   29403           0 :         struct drsuapi_DsReplicaCursor3 *object = pytalloc_get_ptr(obj);
   29404           0 :         PyObject *py_last_sync_success;
   29405           0 :         py_last_sync_success = PyLong_FromUnsignedLongLong(object->last_sync_success);
   29406           0 :         return py_last_sync_success;
   29407             : }
   29408             : 
   29409           0 : static int py_drsuapi_DsReplicaCursor3_set_last_sync_success(PyObject *py_obj, PyObject *value, void *closure)
   29410             : {
   29411           0 :         struct drsuapi_DsReplicaCursor3 *object = pytalloc_get_ptr(py_obj);
   29412           0 :         if (value == NULL) {
   29413           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_sync_success");
   29414           0 :                 return -1;
   29415             :         }
   29416             :         {
   29417           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_sync_success));
   29418           0 :                 if (PyLong_Check(value)) {
   29419           0 :                         unsigned long long test_var;
   29420           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29421           0 :                         if (PyErr_Occurred() != NULL) {
   29422           0 :                                 return -1;
   29423             :                         }
   29424           0 :                         if (test_var > uint_max) {
   29425           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29426             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29427           0 :                                 return -1;
   29428             :                         }
   29429           0 :                         object->last_sync_success = test_var;
   29430             :                 } else {
   29431           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29432             :                           PyLong_Type.tp_name);
   29433           0 :                         return -1;
   29434             :                 }
   29435             :         }
   29436           0 :         return 0;
   29437             : }
   29438             : 
   29439           0 : static PyObject *py_drsuapi_DsReplicaCursor3_get_source_dsa_obj_dn(PyObject *obj, void *closure)
   29440             : {
   29441           0 :         struct drsuapi_DsReplicaCursor3 *object = pytalloc_get_ptr(obj);
   29442           0 :         PyObject *py_source_dsa_obj_dn;
   29443           0 :         if (object->source_dsa_obj_dn == NULL) {
   29444           0 :                 Py_RETURN_NONE;
   29445             :         }
   29446           0 :         if (object->source_dsa_obj_dn == NULL) {
   29447           0 :                 py_source_dsa_obj_dn = Py_None;
   29448           0 :                 Py_INCREF(py_source_dsa_obj_dn);
   29449             :         } else {
   29450           0 :                 if (object->source_dsa_obj_dn == NULL) {
   29451           0 :                         py_source_dsa_obj_dn = Py_None;
   29452           0 :                         Py_INCREF(py_source_dsa_obj_dn);
   29453             :                 } else {
   29454           0 :                         py_source_dsa_obj_dn = PyUnicode_Decode(object->source_dsa_obj_dn, strlen(object->source_dsa_obj_dn), "utf-8", "ignore");
   29455             :                 }
   29456             :         }
   29457           0 :         return py_source_dsa_obj_dn;
   29458             : }
   29459             : 
   29460           0 : static int py_drsuapi_DsReplicaCursor3_set_source_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
   29461             : {
   29462           0 :         struct drsuapi_DsReplicaCursor3 *object = pytalloc_get_ptr(py_obj);
   29463           0 :         if (value == NULL) {
   29464           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_obj_dn");
   29465           0 :                 return -1;
   29466             :         }
   29467           0 :         if (value == Py_None) {
   29468           0 :                 object->source_dsa_obj_dn = NULL;
   29469             :         } else {
   29470           0 :                 object->source_dsa_obj_dn = NULL;
   29471             :                 {
   29472           0 :                         const char *test_str;
   29473           0 :                         const char *talloc_str;
   29474           0 :                         PyObject *unicode = NULL;
   29475           0 :                         if (PyUnicode_Check(value)) {
   29476           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29477           0 :                                 if (unicode == NULL) {
   29478           0 :                                         return -1;
   29479             :                                 }
   29480           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29481           0 :                         } else if (PyBytes_Check(value)) {
   29482           0 :                                 test_str = PyBytes_AS_STRING(value);
   29483             :                         } else {
   29484           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29485           0 :                                 return -1;
   29486             :                         }
   29487           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29488           0 :                         if (unicode != NULL) {
   29489           0 :                                 Py_DECREF(unicode);
   29490             :                         }
   29491           0 :                         if (talloc_str == NULL) {
   29492           0 :                                 PyErr_NoMemory();
   29493           0 :                                 return -1;
   29494             :                         }
   29495           0 :                         object->source_dsa_obj_dn = talloc_str;
   29496             :                 }
   29497             :         }
   29498           0 :         return 0;
   29499             : }
   29500             : 
   29501             : static PyGetSetDef py_drsuapi_DsReplicaCursor3_getsetters[] = {
   29502             :         {
   29503             :                 .name = discard_const_p(char, "source_dsa_invocation_id"),
   29504             :                 .get = py_drsuapi_DsReplicaCursor3_get_source_dsa_invocation_id,
   29505             :                 .set = py_drsuapi_DsReplicaCursor3_set_source_dsa_invocation_id,
   29506             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   29507             :         },
   29508             :         {
   29509             :                 .name = discard_const_p(char, "highest_usn"),
   29510             :                 .get = py_drsuapi_DsReplicaCursor3_get_highest_usn,
   29511             :                 .set = py_drsuapi_DsReplicaCursor3_set_highest_usn,
   29512             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   29513             :         },
   29514             :         {
   29515             :                 .name = discard_const_p(char, "last_sync_success"),
   29516             :                 .get = py_drsuapi_DsReplicaCursor3_get_last_sync_success,
   29517             :                 .set = py_drsuapi_DsReplicaCursor3_set_last_sync_success,
   29518             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   29519             :         },
   29520             :         {
   29521             :                 .name = discard_const_p(char, "source_dsa_obj_dn"),
   29522             :                 .get = py_drsuapi_DsReplicaCursor3_get_source_dsa_obj_dn,
   29523             :                 .set = py_drsuapi_DsReplicaCursor3_set_source_dsa_obj_dn,
   29524             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   29525             :         },
   29526             :         { .name = NULL }
   29527             : };
   29528             : 
   29529           0 : static PyObject *py_drsuapi_DsReplicaCursor3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29530             : {
   29531           0 :         return pytalloc_new(struct drsuapi_DsReplicaCursor3, type);
   29532             : }
   29533             : 
   29534             : 
   29535             : static PyTypeObject drsuapi_DsReplicaCursor3_Type = {
   29536             :         PyVarObject_HEAD_INIT(NULL, 0)
   29537             :         .tp_name = "drsuapi.DsReplicaCursor3",
   29538             :         .tp_getset = py_drsuapi_DsReplicaCursor3_getsetters,
   29539             :         .tp_methods = NULL,
   29540             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29541             :         .tp_new = py_drsuapi_DsReplicaCursor3_new,
   29542             : };
   29543             : 
   29544             : 
   29545           0 : static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_count(PyObject *obj, void *closure)
   29546             : {
   29547           0 :         struct drsuapi_DsReplicaCursor3Ctr *object = pytalloc_get_ptr(obj);
   29548           0 :         PyObject *py_count;
   29549           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   29550           0 :         return py_count;
   29551             : }
   29552             : 
   29553           0 : static int py_drsuapi_DsReplicaCursor3Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   29554             : {
   29555           0 :         struct drsuapi_DsReplicaCursor3Ctr *object = pytalloc_get_ptr(py_obj);
   29556           0 :         if (value == NULL) {
   29557           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   29558           0 :                 return -1;
   29559             :         }
   29560             :         {
   29561           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   29562           0 :                 if (PyLong_Check(value)) {
   29563           0 :                         unsigned long long test_var;
   29564           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29565           0 :                         if (PyErr_Occurred() != NULL) {
   29566           0 :                                 return -1;
   29567             :                         }
   29568           0 :                         if (test_var > uint_max) {
   29569           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29570             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29571           0 :                                 return -1;
   29572             :                         }
   29573           0 :                         object->count = test_var;
   29574             :                 } else {
   29575           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29576             :                           PyLong_Type.tp_name);
   29577           0 :                         return -1;
   29578             :                 }
   29579             :         }
   29580           0 :         return 0;
   29581             : }
   29582             : 
   29583           0 : static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_enumeration_context(PyObject *obj, void *closure)
   29584             : {
   29585           0 :         struct drsuapi_DsReplicaCursor3Ctr *object = pytalloc_get_ptr(obj);
   29586           0 :         PyObject *py_enumeration_context;
   29587           0 :         py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)(object->enumeration_context));
   29588           0 :         return py_enumeration_context;
   29589             : }
   29590             : 
   29591           0 : static int py_drsuapi_DsReplicaCursor3Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
   29592             : {
   29593           0 :         struct drsuapi_DsReplicaCursor3Ctr *object = pytalloc_get_ptr(py_obj);
   29594           0 :         if (value == NULL) {
   29595           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
   29596           0 :                 return -1;
   29597             :         }
   29598             :         {
   29599           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
   29600           0 :                 if (PyLong_Check(value)) {
   29601           0 :                         unsigned long long test_var;
   29602           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29603           0 :                         if (PyErr_Occurred() != NULL) {
   29604           0 :                                 return -1;
   29605             :                         }
   29606           0 :                         if (test_var > uint_max) {
   29607           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29608             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29609           0 :                                 return -1;
   29610             :                         }
   29611           0 :                         object->enumeration_context = test_var;
   29612             :                 } else {
   29613           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29614             :                           PyLong_Type.tp_name);
   29615           0 :                         return -1;
   29616             :                 }
   29617             :         }
   29618           0 :         return 0;
   29619             : }
   29620             : 
   29621           0 : static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_array(PyObject *obj, void *closure)
   29622             : {
   29623           0 :         struct drsuapi_DsReplicaCursor3Ctr *object = pytalloc_get_ptr(obj);
   29624           0 :         PyObject *py_array;
   29625           0 :         py_array = PyList_New(object->count);
   29626           0 :         if (py_array == NULL) {
   29627           0 :                 return NULL;
   29628             :         }
   29629             :         {
   29630             :                 int array_cntr_0;
   29631           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   29632           0 :                         PyObject *py_array_0;
   29633           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor3_Type, object->array, &(object->array)[array_cntr_0]);
   29634           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   29635             :                 }
   29636             :         }
   29637           0 :         return py_array;
   29638             : }
   29639             : 
   29640           0 : static int py_drsuapi_DsReplicaCursor3Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   29641             : {
   29642           0 :         struct drsuapi_DsReplicaCursor3Ctr *object = pytalloc_get_ptr(py_obj);
   29643           0 :         if (value == NULL) {
   29644           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   29645           0 :                 return -1;
   29646             :         }
   29647           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   29648             :         {
   29649           0 :                 int array_cntr_0;
   29650           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   29651           0 :                 if (!object->array) { return -1; }
   29652           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   29653           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   29654           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   29655           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   29656           0 :                                 return -1;
   29657             :                         }
   29658           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaCursor3_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   29659           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   29660           0 :                                 PyErr_NoMemory();
   29661           0 :                                 return -1;
   29662             :                         }
   29663           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   29664             :                 }
   29665             :         }
   29666           0 :         return 0;
   29667             : }
   29668             : 
   29669             : static PyGetSetDef py_drsuapi_DsReplicaCursor3Ctr_getsetters[] = {
   29670             :         {
   29671             :                 .name = discard_const_p(char, "count"),
   29672             :                 .get = py_drsuapi_DsReplicaCursor3Ctr_get_count,
   29673             :                 .set = py_drsuapi_DsReplicaCursor3Ctr_set_count,
   29674             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29675             :         },
   29676             :         {
   29677             :                 .name = discard_const_p(char, "enumeration_context"),
   29678             :                 .get = py_drsuapi_DsReplicaCursor3Ctr_get_enumeration_context,
   29679             :                 .set = py_drsuapi_DsReplicaCursor3Ctr_set_enumeration_context,
   29680             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   29681             :         },
   29682             :         {
   29683             :                 .name = discard_const_p(char, "array"),
   29684             :                 .get = py_drsuapi_DsReplicaCursor3Ctr_get_array,
   29685             :                 .set = py_drsuapi_DsReplicaCursor3Ctr_set_array,
   29686             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor3")
   29687             :         },
   29688             :         { .name = NULL }
   29689             : };
   29690             : 
   29691           0 : static PyObject *py_drsuapi_DsReplicaCursor3Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   29692             : {
   29693           0 :         return pytalloc_new(struct drsuapi_DsReplicaCursor3Ctr, type);
   29694             : }
   29695             : 
   29696             : 
   29697             : static PyTypeObject drsuapi_DsReplicaCursor3Ctr_Type = {
   29698             :         PyVarObject_HEAD_INIT(NULL, 0)
   29699             :         .tp_name = "drsuapi.DsReplicaCursor3Ctr",
   29700             :         .tp_getset = py_drsuapi_DsReplicaCursor3Ctr_getsetters,
   29701             :         .tp_methods = NULL,
   29702             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   29703             :         .tp_new = py_drsuapi_DsReplicaCursor3Ctr_new,
   29704             : };
   29705             : 
   29706             : 
   29707           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_attribute_name(PyObject *obj, void *closure)
   29708             : {
   29709           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(obj);
   29710           0 :         PyObject *py_attribute_name;
   29711           0 :         if (object->attribute_name == NULL) {
   29712           0 :                 Py_RETURN_NONE;
   29713             :         }
   29714           0 :         if (object->attribute_name == NULL) {
   29715           0 :                 py_attribute_name = Py_None;
   29716           0 :                 Py_INCREF(py_attribute_name);
   29717             :         } else {
   29718           0 :                 if (object->attribute_name == NULL) {
   29719           0 :                         py_attribute_name = Py_None;
   29720           0 :                         Py_INCREF(py_attribute_name);
   29721             :                 } else {
   29722           0 :                         py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
   29723             :                 }
   29724             :         }
   29725           0 :         return py_attribute_name;
   29726             : }
   29727             : 
   29728           0 : static int py_drsuapi_DsReplicaObjMetaData2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
   29729             : {
   29730           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(py_obj);
   29731           0 :         if (value == NULL) {
   29732           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
   29733           0 :                 return -1;
   29734             :         }
   29735           0 :         if (value == Py_None) {
   29736           0 :                 object->attribute_name = NULL;
   29737             :         } else {
   29738           0 :                 object->attribute_name = NULL;
   29739             :                 {
   29740           0 :                         const char *test_str;
   29741           0 :                         const char *talloc_str;
   29742           0 :                         PyObject *unicode = NULL;
   29743           0 :                         if (PyUnicode_Check(value)) {
   29744           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29745           0 :                                 if (unicode == NULL) {
   29746           0 :                                         return -1;
   29747             :                                 }
   29748           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29749           0 :                         } else if (PyBytes_Check(value)) {
   29750           0 :                                 test_str = PyBytes_AS_STRING(value);
   29751             :                         } else {
   29752           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29753           0 :                                 return -1;
   29754             :                         }
   29755           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29756           0 :                         if (unicode != NULL) {
   29757           0 :                                 Py_DECREF(unicode);
   29758             :                         }
   29759           0 :                         if (talloc_str == NULL) {
   29760           0 :                                 PyErr_NoMemory();
   29761           0 :                                 return -1;
   29762             :                         }
   29763           0 :                         object->attribute_name = talloc_str;
   29764             :                 }
   29765             :         }
   29766           0 :         return 0;
   29767             : }
   29768             : 
   29769           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_version(PyObject *obj, void *closure)
   29770             : {
   29771           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(obj);
   29772           0 :         PyObject *py_version;
   29773           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
   29774           0 :         return py_version;
   29775             : }
   29776             : 
   29777           0 : static int py_drsuapi_DsReplicaObjMetaData2_set_version(PyObject *py_obj, PyObject *value, void *closure)
   29778             : {
   29779           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(py_obj);
   29780           0 :         if (value == NULL) {
   29781           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
   29782           0 :                 return -1;
   29783             :         }
   29784             :         {
   29785           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
   29786           0 :                 if (PyLong_Check(value)) {
   29787           0 :                         unsigned long long test_var;
   29788           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29789           0 :                         if (PyErr_Occurred() != NULL) {
   29790           0 :                                 return -1;
   29791             :                         }
   29792           0 :                         if (test_var > uint_max) {
   29793           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29794             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29795           0 :                                 return -1;
   29796             :                         }
   29797           0 :                         object->version = test_var;
   29798             :                 } else {
   29799           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29800             :                           PyLong_Type.tp_name);
   29801           0 :                         return -1;
   29802             :                 }
   29803             :         }
   29804           0 :         return 0;
   29805             : }
   29806             : 
   29807           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_change_time(PyObject *obj, void *closure)
   29808             : {
   29809           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(obj);
   29810           0 :         PyObject *py_originating_change_time;
   29811           0 :         py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
   29812           0 :         return py_originating_change_time;
   29813             : }
   29814             : 
   29815           0 : static int py_drsuapi_DsReplicaObjMetaData2_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
   29816             : {
   29817           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(py_obj);
   29818           0 :         if (value == NULL) {
   29819           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
   29820           0 :                 return -1;
   29821             :         }
   29822             :         {
   29823           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
   29824           0 :                 if (PyLong_Check(value)) {
   29825           0 :                         unsigned long long test_var;
   29826           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29827           0 :                         if (PyErr_Occurred() != NULL) {
   29828           0 :                                 return -1;
   29829             :                         }
   29830           0 :                         if (test_var > uint_max) {
   29831           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29832             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29833           0 :                                 return -1;
   29834             :                         }
   29835           0 :                         object->originating_change_time = test_var;
   29836             :                 } else {
   29837           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29838             :                           PyLong_Type.tp_name);
   29839           0 :                         return -1;
   29840             :                 }
   29841             :         }
   29842           0 :         return 0;
   29843             : }
   29844             : 
   29845           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_invocation_id(PyObject *obj, void *closure)
   29846             : {
   29847           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(obj);
   29848           0 :         PyObject *py_originating_invocation_id;
   29849           0 :         py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
   29850           0 :         return py_originating_invocation_id;
   29851             : }
   29852             : 
   29853           0 : static int py_drsuapi_DsReplicaObjMetaData2_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
   29854             : {
   29855           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(py_obj);
   29856           0 :         if (value == NULL) {
   29857           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
   29858           0 :                 return -1;
   29859             :         }
   29860           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   29861           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   29862           0 :                 PyErr_NoMemory();
   29863           0 :                 return -1;
   29864             :         }
   29865           0 :         object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
   29866           0 :         return 0;
   29867             : }
   29868             : 
   29869           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_usn(PyObject *obj, void *closure)
   29870             : {
   29871           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(obj);
   29872           0 :         PyObject *py_originating_usn;
   29873           0 :         py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
   29874           0 :         return py_originating_usn;
   29875             : }
   29876             : 
   29877           0 : static int py_drsuapi_DsReplicaObjMetaData2_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
   29878             : {
   29879           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(py_obj);
   29880           0 :         if (value == NULL) {
   29881           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
   29882           0 :                 return -1;
   29883             :         }
   29884             :         {
   29885           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
   29886           0 :                 if (PyLong_Check(value)) {
   29887           0 :                         unsigned long long test_var;
   29888           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29889           0 :                         if (PyErr_Occurred() != NULL) {
   29890           0 :                                 return -1;
   29891             :                         }
   29892           0 :                         if (test_var > uint_max) {
   29893           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29894             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29895           0 :                                 return -1;
   29896             :                         }
   29897           0 :                         object->originating_usn = test_var;
   29898             :                 } else {
   29899           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29900             :                           PyLong_Type.tp_name);
   29901           0 :                         return -1;
   29902             :                 }
   29903             :         }
   29904           0 :         return 0;
   29905             : }
   29906             : 
   29907           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_local_usn(PyObject *obj, void *closure)
   29908             : {
   29909           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(obj);
   29910           0 :         PyObject *py_local_usn;
   29911           0 :         py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
   29912           0 :         return py_local_usn;
   29913             : }
   29914             : 
   29915           0 : static int py_drsuapi_DsReplicaObjMetaData2_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
   29916             : {
   29917           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(py_obj);
   29918           0 :         if (value == NULL) {
   29919           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->local_usn");
   29920           0 :                 return -1;
   29921             :         }
   29922             :         {
   29923           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->local_usn));
   29924           0 :                 if (PyLong_Check(value)) {
   29925           0 :                         unsigned long long test_var;
   29926           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   29927           0 :                         if (PyErr_Occurred() != NULL) {
   29928           0 :                                 return -1;
   29929             :                         }
   29930           0 :                         if (test_var > uint_max) {
   29931           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   29932             :                                   PyLong_Type.tp_name, uint_max, test_var);
   29933           0 :                                 return -1;
   29934             :                         }
   29935           0 :                         object->local_usn = test_var;
   29936             :                 } else {
   29937           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   29938             :                           PyLong_Type.tp_name);
   29939           0 :                         return -1;
   29940             :                 }
   29941             :         }
   29942           0 :         return 0;
   29943             : }
   29944             : 
   29945           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_dsa_dn(PyObject *obj, void *closure)
   29946             : {
   29947           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(obj);
   29948           0 :         PyObject *py_originating_dsa_dn;
   29949           0 :         if (object->originating_dsa_dn == NULL) {
   29950           0 :                 Py_RETURN_NONE;
   29951             :         }
   29952           0 :         if (object->originating_dsa_dn == NULL) {
   29953           0 :                 py_originating_dsa_dn = Py_None;
   29954           0 :                 Py_INCREF(py_originating_dsa_dn);
   29955             :         } else {
   29956           0 :                 if (object->originating_dsa_dn == NULL) {
   29957           0 :                         py_originating_dsa_dn = Py_None;
   29958           0 :                         Py_INCREF(py_originating_dsa_dn);
   29959             :                 } else {
   29960           0 :                         py_originating_dsa_dn = PyUnicode_Decode(object->originating_dsa_dn, strlen(object->originating_dsa_dn), "utf-8", "ignore");
   29961             :                 }
   29962             :         }
   29963           0 :         return py_originating_dsa_dn;
   29964             : }
   29965             : 
   29966           0 : static int py_drsuapi_DsReplicaObjMetaData2_set_originating_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
   29967             : {
   29968           0 :         struct drsuapi_DsReplicaObjMetaData2 *object = pytalloc_get_ptr(py_obj);
   29969           0 :         if (value == NULL) {
   29970           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_dsa_dn");
   29971           0 :                 return -1;
   29972             :         }
   29973           0 :         if (value == Py_None) {
   29974           0 :                 object->originating_dsa_dn = NULL;
   29975             :         } else {
   29976           0 :                 object->originating_dsa_dn = NULL;
   29977             :                 {
   29978           0 :                         const char *test_str;
   29979           0 :                         const char *talloc_str;
   29980           0 :                         PyObject *unicode = NULL;
   29981           0 :                         if (PyUnicode_Check(value)) {
   29982           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   29983           0 :                                 if (unicode == NULL) {
   29984           0 :                                         return -1;
   29985             :                                 }
   29986           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   29987           0 :                         } else if (PyBytes_Check(value)) {
   29988           0 :                                 test_str = PyBytes_AS_STRING(value);
   29989             :                         } else {
   29990           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   29991           0 :                                 return -1;
   29992             :                         }
   29993           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   29994           0 :                         if (unicode != NULL) {
   29995           0 :                                 Py_DECREF(unicode);
   29996             :                         }
   29997           0 :                         if (talloc_str == NULL) {
   29998           0 :                                 PyErr_NoMemory();
   29999           0 :                                 return -1;
   30000             :                         }
   30001           0 :                         object->originating_dsa_dn = talloc_str;
   30002             :                 }
   30003             :         }
   30004           0 :         return 0;
   30005             : }
   30006             : 
   30007             : static PyGetSetDef py_drsuapi_DsReplicaObjMetaData2_getsetters[] = {
   30008             :         {
   30009             :                 .name = discard_const_p(char, "attribute_name"),
   30010             :                 .get = py_drsuapi_DsReplicaObjMetaData2_get_attribute_name,
   30011             :                 .set = py_drsuapi_DsReplicaObjMetaData2_set_attribute_name,
   30012             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30013             :         },
   30014             :         {
   30015             :                 .name = discard_const_p(char, "version"),
   30016             :                 .get = py_drsuapi_DsReplicaObjMetaData2_get_version,
   30017             :                 .set = py_drsuapi_DsReplicaObjMetaData2_set_version,
   30018             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30019             :         },
   30020             :         {
   30021             :                 .name = discard_const_p(char, "originating_change_time"),
   30022             :                 .get = py_drsuapi_DsReplicaObjMetaData2_get_originating_change_time,
   30023             :                 .set = py_drsuapi_DsReplicaObjMetaData2_set_originating_change_time,
   30024             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   30025             :         },
   30026             :         {
   30027             :                 .name = discard_const_p(char, "originating_invocation_id"),
   30028             :                 .get = py_drsuapi_DsReplicaObjMetaData2_get_originating_invocation_id,
   30029             :                 .set = py_drsuapi_DsReplicaObjMetaData2_set_originating_invocation_id,
   30030             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   30031             :         },
   30032             :         {
   30033             :                 .name = discard_const_p(char, "originating_usn"),
   30034             :                 .get = py_drsuapi_DsReplicaObjMetaData2_get_originating_usn,
   30035             :                 .set = py_drsuapi_DsReplicaObjMetaData2_set_originating_usn,
   30036             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   30037             :         },
   30038             :         {
   30039             :                 .name = discard_const_p(char, "local_usn"),
   30040             :                 .get = py_drsuapi_DsReplicaObjMetaData2_get_local_usn,
   30041             :                 .set = py_drsuapi_DsReplicaObjMetaData2_set_local_usn,
   30042             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   30043             :         },
   30044             :         {
   30045             :                 .name = discard_const_p(char, "originating_dsa_dn"),
   30046             :                 .get = py_drsuapi_DsReplicaObjMetaData2_get_originating_dsa_dn,
   30047             :                 .set = py_drsuapi_DsReplicaObjMetaData2_set_originating_dsa_dn,
   30048             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30049             :         },
   30050             :         { .name = NULL }
   30051             : };
   30052             : 
   30053           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30054             : {
   30055           0 :         return pytalloc_new(struct drsuapi_DsReplicaObjMetaData2, type);
   30056             : }
   30057             : 
   30058             : 
   30059             : static PyTypeObject drsuapi_DsReplicaObjMetaData2_Type = {
   30060             :         PyVarObject_HEAD_INIT(NULL, 0)
   30061             :         .tp_name = "drsuapi.DsReplicaObjMetaData2",
   30062             :         .tp_getset = py_drsuapi_DsReplicaObjMetaData2_getsetters,
   30063             :         .tp_methods = NULL,
   30064             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30065             :         .tp_new = py_drsuapi_DsReplicaObjMetaData2_new,
   30066             : };
   30067             : 
   30068             : 
   30069           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_count(PyObject *obj, void *closure)
   30070             : {
   30071           0 :         struct drsuapi_DsReplicaObjMetaData2Ctr *object = pytalloc_get_ptr(obj);
   30072           0 :         PyObject *py_count;
   30073           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   30074           0 :         return py_count;
   30075             : }
   30076             : 
   30077           0 : static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   30078             : {
   30079           0 :         struct drsuapi_DsReplicaObjMetaData2Ctr *object = pytalloc_get_ptr(py_obj);
   30080           0 :         if (value == NULL) {
   30081           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   30082           0 :                 return -1;
   30083             :         }
   30084             :         {
   30085           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   30086           0 :                 if (PyLong_Check(value)) {
   30087           0 :                         unsigned long long test_var;
   30088           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30089           0 :                         if (PyErr_Occurred() != NULL) {
   30090           0 :                                 return -1;
   30091             :                         }
   30092           0 :                         if (test_var > uint_max) {
   30093           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30094             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30095           0 :                                 return -1;
   30096             :                         }
   30097           0 :                         object->count = test_var;
   30098             :                 } else {
   30099           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30100             :                           PyLong_Type.tp_name);
   30101           0 :                         return -1;
   30102             :                 }
   30103             :         }
   30104           0 :         return 0;
   30105             : }
   30106             : 
   30107           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_enumeration_context(PyObject *obj, void *closure)
   30108             : {
   30109           0 :         struct drsuapi_DsReplicaObjMetaData2Ctr *object = pytalloc_get_ptr(obj);
   30110           0 :         PyObject *py_enumeration_context;
   30111           0 :         py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)(object->enumeration_context));
   30112           0 :         return py_enumeration_context;
   30113             : }
   30114             : 
   30115           0 : static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
   30116             : {
   30117           0 :         struct drsuapi_DsReplicaObjMetaData2Ctr *object = pytalloc_get_ptr(py_obj);
   30118           0 :         if (value == NULL) {
   30119           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
   30120           0 :                 return -1;
   30121             :         }
   30122             :         {
   30123           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
   30124           0 :                 if (PyLong_Check(value)) {
   30125           0 :                         unsigned long long test_var;
   30126           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30127           0 :                         if (PyErr_Occurred() != NULL) {
   30128           0 :                                 return -1;
   30129             :                         }
   30130           0 :                         if (test_var > uint_max) {
   30131           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30132             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30133           0 :                                 return -1;
   30134             :                         }
   30135           0 :                         object->enumeration_context = test_var;
   30136             :                 } else {
   30137           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30138             :                           PyLong_Type.tp_name);
   30139           0 :                         return -1;
   30140             :                 }
   30141             :         }
   30142           0 :         return 0;
   30143             : }
   30144             : 
   30145           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_array(PyObject *obj, void *closure)
   30146             : {
   30147           0 :         struct drsuapi_DsReplicaObjMetaData2Ctr *object = pytalloc_get_ptr(obj);
   30148           0 :         PyObject *py_array;
   30149           0 :         py_array = PyList_New(object->count);
   30150           0 :         if (py_array == NULL) {
   30151           0 :                 return NULL;
   30152             :         }
   30153             :         {
   30154             :                 int array_cntr_0;
   30155           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   30156           0 :                         PyObject *py_array_0;
   30157           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData2_Type, object->array, &(object->array)[array_cntr_0]);
   30158           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   30159             :                 }
   30160             :         }
   30161           0 :         return py_array;
   30162             : }
   30163             : 
   30164           0 : static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   30165             : {
   30166           0 :         struct drsuapi_DsReplicaObjMetaData2Ctr *object = pytalloc_get_ptr(py_obj);
   30167           0 :         if (value == NULL) {
   30168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   30169           0 :                 return -1;
   30170             :         }
   30171           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   30172             :         {
   30173           0 :                 int array_cntr_0;
   30174           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   30175           0 :                 if (!object->array) { return -1; }
   30176           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   30177           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   30178           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   30179           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   30180           0 :                                 return -1;
   30181             :                         }
   30182           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   30183           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   30184           0 :                                 PyErr_NoMemory();
   30185           0 :                                 return -1;
   30186             :                         }
   30187           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   30188             :                 }
   30189             :         }
   30190           0 :         return 0;
   30191             : }
   30192             : 
   30193             : static PyGetSetDef py_drsuapi_DsReplicaObjMetaData2Ctr_getsetters[] = {
   30194             :         {
   30195             :                 .name = discard_const_p(char, "count"),
   30196             :                 .get = py_drsuapi_DsReplicaObjMetaData2Ctr_get_count,
   30197             :                 .set = py_drsuapi_DsReplicaObjMetaData2Ctr_set_count,
   30198             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30199             :         },
   30200             :         {
   30201             :                 .name = discard_const_p(char, "enumeration_context"),
   30202             :                 .get = py_drsuapi_DsReplicaObjMetaData2Ctr_get_enumeration_context,
   30203             :                 .set = py_drsuapi_DsReplicaObjMetaData2Ctr_set_enumeration_context,
   30204             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30205             :         },
   30206             :         {
   30207             :                 .name = discard_const_p(char, "array"),
   30208             :                 .get = py_drsuapi_DsReplicaObjMetaData2Ctr_get_array,
   30209             :                 .set = py_drsuapi_DsReplicaObjMetaData2Ctr_set_array,
   30210             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjMetaData2")
   30211             :         },
   30212             :         { .name = NULL }
   30213             : };
   30214             : 
   30215           0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30216             : {
   30217           0 :         return pytalloc_new(struct drsuapi_DsReplicaObjMetaData2Ctr, type);
   30218             : }
   30219             : 
   30220             : 
   30221             : static PyTypeObject drsuapi_DsReplicaObjMetaData2Ctr_Type = {
   30222             :         PyVarObject_HEAD_INIT(NULL, 0)
   30223             :         .tp_name = "drsuapi.DsReplicaObjMetaData2Ctr",
   30224             :         .tp_getset = py_drsuapi_DsReplicaObjMetaData2Ctr_getsetters,
   30225             :         .tp_methods = NULL,
   30226             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30227             :         .tp_new = py_drsuapi_DsReplicaObjMetaData2Ctr_new,
   30228             : };
   30229             : 
   30230             : 
   30231           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_attribute_name(PyObject *obj, void *closure)
   30232             : {
   30233           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30234           0 :         PyObject *py_attribute_name;
   30235           0 :         if (object->attribute_name == NULL) {
   30236           0 :                 Py_RETURN_NONE;
   30237             :         }
   30238           0 :         if (object->attribute_name == NULL) {
   30239           0 :                 py_attribute_name = Py_None;
   30240           0 :                 Py_INCREF(py_attribute_name);
   30241             :         } else {
   30242           0 :                 if (object->attribute_name == NULL) {
   30243           0 :                         py_attribute_name = Py_None;
   30244           0 :                         Py_INCREF(py_attribute_name);
   30245             :                 } else {
   30246           0 :                         py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
   30247             :                 }
   30248             :         }
   30249           0 :         return py_attribute_name;
   30250             : }
   30251             : 
   30252           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
   30253             : {
   30254           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30255           0 :         if (value == NULL) {
   30256           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
   30257           0 :                 return -1;
   30258             :         }
   30259           0 :         if (value == Py_None) {
   30260           0 :                 object->attribute_name = NULL;
   30261             :         } else {
   30262           0 :                 object->attribute_name = NULL;
   30263             :                 {
   30264           0 :                         const char *test_str;
   30265           0 :                         const char *talloc_str;
   30266           0 :                         PyObject *unicode = NULL;
   30267           0 :                         if (PyUnicode_Check(value)) {
   30268           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30269           0 :                                 if (unicode == NULL) {
   30270           0 :                                         return -1;
   30271             :                                 }
   30272           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30273           0 :                         } else if (PyBytes_Check(value)) {
   30274           0 :                                 test_str = PyBytes_AS_STRING(value);
   30275             :                         } else {
   30276           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30277           0 :                                 return -1;
   30278             :                         }
   30279           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30280           0 :                         if (unicode != NULL) {
   30281           0 :                                 Py_DECREF(unicode);
   30282             :                         }
   30283           0 :                         if (talloc_str == NULL) {
   30284           0 :                                 PyErr_NoMemory();
   30285           0 :                                 return -1;
   30286             :                         }
   30287           0 :                         object->attribute_name = talloc_str;
   30288             :                 }
   30289             :         }
   30290           0 :         return 0;
   30291             : }
   30292             : 
   30293           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_object_dn(PyObject *obj, void *closure)
   30294             : {
   30295           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30296           0 :         PyObject *py_object_dn;
   30297           0 :         if (object->object_dn == NULL) {
   30298           0 :                 Py_RETURN_NONE;
   30299             :         }
   30300           0 :         if (object->object_dn == NULL) {
   30301           0 :                 py_object_dn = Py_None;
   30302           0 :                 Py_INCREF(py_object_dn);
   30303             :         } else {
   30304           0 :                 if (object->object_dn == NULL) {
   30305           0 :                         py_object_dn = Py_None;
   30306           0 :                         Py_INCREF(py_object_dn);
   30307             :                 } else {
   30308           0 :                         py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
   30309             :                 }
   30310             :         }
   30311           0 :         return py_object_dn;
   30312             : }
   30313             : 
   30314           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
   30315             : {
   30316           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30317           0 :         if (value == NULL) {
   30318           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
   30319           0 :                 return -1;
   30320             :         }
   30321           0 :         if (value == Py_None) {
   30322           0 :                 object->object_dn = NULL;
   30323             :         } else {
   30324           0 :                 object->object_dn = NULL;
   30325             :                 {
   30326           0 :                         const char *test_str;
   30327           0 :                         const char *talloc_str;
   30328           0 :                         PyObject *unicode = NULL;
   30329           0 :                         if (PyUnicode_Check(value)) {
   30330           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30331           0 :                                 if (unicode == NULL) {
   30332           0 :                                         return -1;
   30333             :                                 }
   30334           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30335           0 :                         } else if (PyBytes_Check(value)) {
   30336           0 :                                 test_str = PyBytes_AS_STRING(value);
   30337             :                         } else {
   30338           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30339           0 :                                 return -1;
   30340             :                         }
   30341           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30342           0 :                         if (unicode != NULL) {
   30343           0 :                                 Py_DECREF(unicode);
   30344             :                         }
   30345           0 :                         if (talloc_str == NULL) {
   30346           0 :                                 PyErr_NoMemory();
   30347           0 :                                 return -1;
   30348             :                         }
   30349           0 :                         object->object_dn = talloc_str;
   30350             :                 }
   30351             :         }
   30352           0 :         return 0;
   30353             : }
   30354             : 
   30355           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get___ndr_size_binary(PyObject *obj, void *closure)
   30356             : {
   30357           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30358           0 :         PyObject *py___ndr_size_binary;
   30359           0 :         py___ndr_size_binary = PyLong_FromUnsignedLongLong((uint32_t)(object->__ndr_size_binary));
   30360           0 :         return py___ndr_size_binary;
   30361             : }
   30362             : 
   30363           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
   30364             : {
   30365           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30366           0 :         if (value == NULL) {
   30367           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_binary");
   30368           0 :                 return -1;
   30369             :         }
   30370             :         {
   30371           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_binary));
   30372           0 :                 if (PyLong_Check(value)) {
   30373           0 :                         unsigned long long test_var;
   30374           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30375           0 :                         if (PyErr_Occurred() != NULL) {
   30376           0 :                                 return -1;
   30377             :                         }
   30378           0 :                         if (test_var > uint_max) {
   30379           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30380             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30381           0 :                                 return -1;
   30382             :                         }
   30383           0 :                         object->__ndr_size_binary = test_var;
   30384             :                 } else {
   30385           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30386             :                           PyLong_Type.tp_name);
   30387           0 :                         return -1;
   30388             :                 }
   30389             :         }
   30390           0 :         return 0;
   30391             : }
   30392             : 
   30393           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_binary(PyObject *obj, void *closure)
   30394             : {
   30395           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30396           0 :         PyObject *py_binary;
   30397           0 :         if (object->binary == NULL) {
   30398           0 :                 Py_RETURN_NONE;
   30399             :         }
   30400           0 :         if (object->binary == NULL) {
   30401           0 :                 py_binary = Py_None;
   30402           0 :                 Py_INCREF(py_binary);
   30403             :         } else {
   30404           0 :                 py_binary = PyBytes_FromStringAndSize((char *)(*object->binary).data, (*object->binary).length);
   30405             :         }
   30406           0 :         return py_binary;
   30407             : }
   30408             : 
   30409           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_binary(PyObject *py_obj, PyObject *value, void *closure)
   30410             : {
   30411           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30412           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->binary));
   30413           0 :         if (value == NULL) {
   30414           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary");
   30415           0 :                 return -1;
   30416             :         }
   30417           0 :         if (value == Py_None) {
   30418           0 :                 object->binary = NULL;
   30419             :         } else {
   30420           0 :                 object->binary = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary);
   30421           0 :                 if (object->binary == NULL) {
   30422           0 :                         PyErr_NoMemory();
   30423           0 :                         return -1;
   30424             :                 }
   30425           0 :                 *object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
   30426             :         }
   30427           0 :         return 0;
   30428             : }
   30429             : 
   30430           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_deleted(PyObject *obj, void *closure)
   30431             : {
   30432           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30433           0 :         PyObject *py_deleted;
   30434           0 :         py_deleted = PyLong_FromUnsignedLongLong(object->deleted);
   30435           0 :         return py_deleted;
   30436             : }
   30437             : 
   30438           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_deleted(PyObject *py_obj, PyObject *value, void *closure)
   30439             : {
   30440           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30441           0 :         if (value == NULL) {
   30442           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->deleted");
   30443           0 :                 return -1;
   30444             :         }
   30445             :         {
   30446           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->deleted));
   30447           0 :                 if (PyLong_Check(value)) {
   30448           0 :                         unsigned long long test_var;
   30449           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30450           0 :                         if (PyErr_Occurred() != NULL) {
   30451           0 :                                 return -1;
   30452             :                         }
   30453           0 :                         if (test_var > uint_max) {
   30454           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30455             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30456           0 :                                 return -1;
   30457             :                         }
   30458           0 :                         object->deleted = test_var;
   30459             :                 } else {
   30460           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30461             :                           PyLong_Type.tp_name);
   30462           0 :                         return -1;
   30463             :                 }
   30464             :         }
   30465           0 :         return 0;
   30466             : }
   30467             : 
   30468           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_created(PyObject *obj, void *closure)
   30469             : {
   30470           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30471           0 :         PyObject *py_created;
   30472           0 :         py_created = PyLong_FromUnsignedLongLong(object->created);
   30473           0 :         return py_created;
   30474             : }
   30475             : 
   30476           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_created(PyObject *py_obj, PyObject *value, void *closure)
   30477             : {
   30478           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30479           0 :         if (value == NULL) {
   30480           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->created");
   30481           0 :                 return -1;
   30482             :         }
   30483             :         {
   30484           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->created));
   30485           0 :                 if (PyLong_Check(value)) {
   30486           0 :                         unsigned long long test_var;
   30487           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30488           0 :                         if (PyErr_Occurred() != NULL) {
   30489           0 :                                 return -1;
   30490             :                         }
   30491           0 :                         if (test_var > uint_max) {
   30492           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30493             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30494           0 :                                 return -1;
   30495             :                         }
   30496           0 :                         object->created = test_var;
   30497             :                 } else {
   30498           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30499             :                           PyLong_Type.tp_name);
   30500           0 :                         return -1;
   30501             :                 }
   30502             :         }
   30503           0 :         return 0;
   30504             : }
   30505             : 
   30506           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_version(PyObject *obj, void *closure)
   30507             : {
   30508           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30509           0 :         PyObject *py_version;
   30510           0 :         py_version = PyLong_FromUnsignedLongLong((uint32_t)(object->version));
   30511           0 :         return py_version;
   30512             : }
   30513             : 
   30514           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_version(PyObject *py_obj, PyObject *value, void *closure)
   30515             : {
   30516           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30517           0 :         if (value == NULL) {
   30518           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
   30519           0 :                 return -1;
   30520             :         }
   30521             :         {
   30522           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
   30523           0 :                 if (PyLong_Check(value)) {
   30524           0 :                         unsigned long long test_var;
   30525           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30526           0 :                         if (PyErr_Occurred() != NULL) {
   30527           0 :                                 return -1;
   30528             :                         }
   30529           0 :                         if (test_var > uint_max) {
   30530           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30531             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30532           0 :                                 return -1;
   30533             :                         }
   30534           0 :                         object->version = test_var;
   30535             :                 } else {
   30536           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30537             :                           PyLong_Type.tp_name);
   30538           0 :                         return -1;
   30539             :                 }
   30540             :         }
   30541           0 :         return 0;
   30542             : }
   30543             : 
   30544           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_change_time(PyObject *obj, void *closure)
   30545             : {
   30546           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30547           0 :         PyObject *py_originating_change_time;
   30548           0 :         py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
   30549           0 :         return py_originating_change_time;
   30550             : }
   30551             : 
   30552           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
   30553             : {
   30554           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30555           0 :         if (value == NULL) {
   30556           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
   30557           0 :                 return -1;
   30558             :         }
   30559             :         {
   30560           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
   30561           0 :                 if (PyLong_Check(value)) {
   30562           0 :                         unsigned long long test_var;
   30563           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30564           0 :                         if (PyErr_Occurred() != NULL) {
   30565           0 :                                 return -1;
   30566             :                         }
   30567           0 :                         if (test_var > uint_max) {
   30568           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30569             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30570           0 :                                 return -1;
   30571             :                         }
   30572           0 :                         object->originating_change_time = test_var;
   30573             :                 } else {
   30574           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30575             :                           PyLong_Type.tp_name);
   30576           0 :                         return -1;
   30577             :                 }
   30578             :         }
   30579           0 :         return 0;
   30580             : }
   30581             : 
   30582           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_invocation_id(PyObject *obj, void *closure)
   30583             : {
   30584           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30585           0 :         PyObject *py_originating_invocation_id;
   30586           0 :         py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
   30587           0 :         return py_originating_invocation_id;
   30588             : }
   30589             : 
   30590           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
   30591             : {
   30592           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30593           0 :         if (value == NULL) {
   30594           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
   30595           0 :                 return -1;
   30596             :         }
   30597           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   30598           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   30599           0 :                 PyErr_NoMemory();
   30600           0 :                 return -1;
   30601             :         }
   30602           0 :         object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
   30603           0 :         return 0;
   30604             : }
   30605             : 
   30606           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_usn(PyObject *obj, void *closure)
   30607             : {
   30608           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30609           0 :         PyObject *py_originating_usn;
   30610           0 :         py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
   30611           0 :         return py_originating_usn;
   30612             : }
   30613             : 
   30614           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
   30615             : {
   30616           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30617           0 :         if (value == NULL) {
   30618           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
   30619           0 :                 return -1;
   30620             :         }
   30621             :         {
   30622           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
   30623           0 :                 if (PyLong_Check(value)) {
   30624           0 :                         unsigned long long test_var;
   30625           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30626           0 :                         if (PyErr_Occurred() != NULL) {
   30627           0 :                                 return -1;
   30628             :                         }
   30629           0 :                         if (test_var > uint_max) {
   30630           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30631             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30632           0 :                                 return -1;
   30633             :                         }
   30634           0 :                         object->originating_usn = test_var;
   30635             :                 } else {
   30636           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30637             :                           PyLong_Type.tp_name);
   30638           0 :                         return -1;
   30639             :                 }
   30640             :         }
   30641           0 :         return 0;
   30642             : }
   30643             : 
   30644           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_local_usn(PyObject *obj, void *closure)
   30645             : {
   30646           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30647           0 :         PyObject *py_local_usn;
   30648           0 :         py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
   30649           0 :         return py_local_usn;
   30650             : }
   30651             : 
   30652           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
   30653             : {
   30654           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30655           0 :         if (value == NULL) {
   30656           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->local_usn");
   30657           0 :                 return -1;
   30658             :         }
   30659             :         {
   30660           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->local_usn));
   30661           0 :                 if (PyLong_Check(value)) {
   30662           0 :                         unsigned long long test_var;
   30663           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30664           0 :                         if (PyErr_Occurred() != NULL) {
   30665           0 :                                 return -1;
   30666             :                         }
   30667           0 :                         if (test_var > uint_max) {
   30668           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30669             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30670           0 :                                 return -1;
   30671             :                         }
   30672           0 :                         object->local_usn = test_var;
   30673             :                 } else {
   30674           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30675             :                           PyLong_Type.tp_name);
   30676           0 :                         return -1;
   30677             :                 }
   30678             :         }
   30679           0 :         return 0;
   30680             : }
   30681             : 
   30682           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_dsa_dn(PyObject *obj, void *closure)
   30683             : {
   30684           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(obj);
   30685           0 :         PyObject *py_originating_dsa_dn;
   30686           0 :         if (object->originating_dsa_dn == NULL) {
   30687           0 :                 Py_RETURN_NONE;
   30688             :         }
   30689           0 :         if (object->originating_dsa_dn == NULL) {
   30690           0 :                 py_originating_dsa_dn = Py_None;
   30691           0 :                 Py_INCREF(py_originating_dsa_dn);
   30692             :         } else {
   30693           0 :                 if (object->originating_dsa_dn == NULL) {
   30694           0 :                         py_originating_dsa_dn = Py_None;
   30695           0 :                         Py_INCREF(py_originating_dsa_dn);
   30696             :                 } else {
   30697           0 :                         py_originating_dsa_dn = PyUnicode_Decode(object->originating_dsa_dn, strlen(object->originating_dsa_dn), "utf-8", "ignore");
   30698             :                 }
   30699             :         }
   30700           0 :         return py_originating_dsa_dn;
   30701             : }
   30702             : 
   30703           0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
   30704             : {
   30705           0 :         struct drsuapi_DsReplicaAttrValMetaData2 *object = pytalloc_get_ptr(py_obj);
   30706           0 :         if (value == NULL) {
   30707           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_dsa_dn");
   30708           0 :                 return -1;
   30709             :         }
   30710           0 :         if (value == Py_None) {
   30711           0 :                 object->originating_dsa_dn = NULL;
   30712             :         } else {
   30713           0 :                 object->originating_dsa_dn = NULL;
   30714             :                 {
   30715           0 :                         const char *test_str;
   30716           0 :                         const char *talloc_str;
   30717           0 :                         PyObject *unicode = NULL;
   30718           0 :                         if (PyUnicode_Check(value)) {
   30719           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   30720           0 :                                 if (unicode == NULL) {
   30721           0 :                                         return -1;
   30722             :                                 }
   30723           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   30724           0 :                         } else if (PyBytes_Check(value)) {
   30725           0 :                                 test_str = PyBytes_AS_STRING(value);
   30726             :                         } else {
   30727           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   30728           0 :                                 return -1;
   30729             :                         }
   30730           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   30731           0 :                         if (unicode != NULL) {
   30732           0 :                                 Py_DECREF(unicode);
   30733             :                         }
   30734           0 :                         if (talloc_str == NULL) {
   30735           0 :                                 PyErr_NoMemory();
   30736           0 :                                 return -1;
   30737             :                         }
   30738           0 :                         object->originating_dsa_dn = talloc_str;
   30739             :                 }
   30740             :         }
   30741           0 :         return 0;
   30742             : }
   30743             : 
   30744             : static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaData2_getsetters[] = {
   30745             :         {
   30746             :                 .name = discard_const_p(char, "attribute_name"),
   30747             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_attribute_name,
   30748             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_attribute_name,
   30749             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30750             :         },
   30751             :         {
   30752             :                 .name = discard_const_p(char, "object_dn"),
   30753             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_object_dn,
   30754             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_object_dn,
   30755             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30756             :         },
   30757             :         {
   30758             :                 .name = discard_const_p(char, "__ndr_size_binary"),
   30759             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get___ndr_size_binary,
   30760             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set___ndr_size_binary,
   30761             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30762             :         },
   30763             :         {
   30764             :                 .name = discard_const_p(char, "binary"),
   30765             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_binary,
   30766             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_binary,
   30767             :                 .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
   30768             :         },
   30769             :         {
   30770             :                 .name = discard_const_p(char, "deleted"),
   30771             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_deleted,
   30772             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_deleted,
   30773             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   30774             :         },
   30775             :         {
   30776             :                 .name = discard_const_p(char, "created"),
   30777             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_created,
   30778             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_created,
   30779             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   30780             :         },
   30781             :         {
   30782             :                 .name = discard_const_p(char, "version"),
   30783             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_version,
   30784             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_version,
   30785             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30786             :         },
   30787             :         {
   30788             :                 .name = discard_const_p(char, "originating_change_time"),
   30789             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_originating_change_time,
   30790             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_originating_change_time,
   30791             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
   30792             :         },
   30793             :         {
   30794             :                 .name = discard_const_p(char, "originating_invocation_id"),
   30795             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_originating_invocation_id,
   30796             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_originating_invocation_id,
   30797             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   30798             :         },
   30799             :         {
   30800             :                 .name = discard_const_p(char, "originating_usn"),
   30801             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_originating_usn,
   30802             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_originating_usn,
   30803             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   30804             :         },
   30805             :         {
   30806             :                 .name = discard_const_p(char, "local_usn"),
   30807             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_local_usn,
   30808             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_local_usn,
   30809             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   30810             :         },
   30811             :         {
   30812             :                 .name = discard_const_p(char, "originating_dsa_dn"),
   30813             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2_get_originating_dsa_dn,
   30814             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2_set_originating_dsa_dn,
   30815             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   30816             :         },
   30817             :         { .name = NULL }
   30818             : };
   30819             : 
   30820           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30821             : {
   30822           0 :         return pytalloc_new(struct drsuapi_DsReplicaAttrValMetaData2, type);
   30823             : }
   30824             : 
   30825             : 
   30826             : static PyTypeObject drsuapi_DsReplicaAttrValMetaData2_Type = {
   30827             :         PyVarObject_HEAD_INIT(NULL, 0)
   30828             :         .tp_name = "drsuapi.DsReplicaAttrValMetaData2",
   30829             :         .tp_getset = py_drsuapi_DsReplicaAttrValMetaData2_getsetters,
   30830             :         .tp_methods = NULL,
   30831             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30832             :         .tp_new = py_drsuapi_DsReplicaAttrValMetaData2_new,
   30833             : };
   30834             : 
   30835             : 
   30836           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_count(PyObject *obj, void *closure)
   30837             : {
   30838           0 :         struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = pytalloc_get_ptr(obj);
   30839           0 :         PyObject *py_count;
   30840           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   30841           0 :         return py_count;
   30842             : }
   30843             : 
   30844           0 : static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   30845             : {
   30846           0 :         struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = pytalloc_get_ptr(py_obj);
   30847           0 :         if (value == NULL) {
   30848           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   30849           0 :                 return -1;
   30850             :         }
   30851             :         {
   30852           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   30853           0 :                 if (PyLong_Check(value)) {
   30854           0 :                         unsigned long long test_var;
   30855           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30856           0 :                         if (PyErr_Occurred() != NULL) {
   30857           0 :                                 return -1;
   30858             :                         }
   30859           0 :                         if (test_var > uint_max) {
   30860           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30861             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30862           0 :                                 return -1;
   30863             :                         }
   30864           0 :                         object->count = test_var;
   30865             :                 } else {
   30866           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30867             :                           PyLong_Type.tp_name);
   30868           0 :                         return -1;
   30869             :                 }
   30870             :         }
   30871           0 :         return 0;
   30872             : }
   30873             : 
   30874           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_enumeration_context(PyObject *obj, void *closure)
   30875             : {
   30876           0 :         struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = pytalloc_get_ptr(obj);
   30877           0 :         PyObject *py_enumeration_context;
   30878           0 :         py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)(object->enumeration_context));
   30879           0 :         return py_enumeration_context;
   30880             : }
   30881             : 
   30882           0 : static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
   30883             : {
   30884           0 :         struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = pytalloc_get_ptr(py_obj);
   30885           0 :         if (value == NULL) {
   30886           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
   30887           0 :                 return -1;
   30888             :         }
   30889             :         {
   30890           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
   30891           0 :                 if (PyLong_Check(value)) {
   30892           0 :                         unsigned long long test_var;
   30893           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   30894           0 :                         if (PyErr_Occurred() != NULL) {
   30895           0 :                                 return -1;
   30896             :                         }
   30897           0 :                         if (test_var > uint_max) {
   30898           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   30899             :                                   PyLong_Type.tp_name, uint_max, test_var);
   30900           0 :                                 return -1;
   30901             :                         }
   30902           0 :                         object->enumeration_context = test_var;
   30903             :                 } else {
   30904           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   30905             :                           PyLong_Type.tp_name);
   30906           0 :                         return -1;
   30907             :                 }
   30908             :         }
   30909           0 :         return 0;
   30910             : }
   30911             : 
   30912           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_array(PyObject *obj, void *closure)
   30913             : {
   30914           0 :         struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = pytalloc_get_ptr(obj);
   30915           0 :         PyObject *py_array;
   30916           0 :         py_array = PyList_New(object->count);
   30917           0 :         if (py_array == NULL) {
   30918           0 :                 return NULL;
   30919             :         }
   30920             :         {
   30921             :                 int array_cntr_0;
   30922           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   30923           0 :                         PyObject *py_array_0;
   30924           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData2_Type, object->array, &(object->array)[array_cntr_0]);
   30925           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   30926             :                 }
   30927             :         }
   30928           0 :         return py_array;
   30929             : }
   30930             : 
   30931           0 : static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   30932             : {
   30933           0 :         struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = pytalloc_get_ptr(py_obj);
   30934           0 :         if (value == NULL) {
   30935           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   30936           0 :                 return -1;
   30937             :         }
   30938           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   30939             :         {
   30940           0 :                 int array_cntr_0;
   30941           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   30942           0 :                 if (!object->array) { return -1; }
   30943           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   30944           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   30945           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   30946           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   30947           0 :                                 return -1;
   30948             :                         }
   30949           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   30950           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   30951           0 :                                 PyErr_NoMemory();
   30952           0 :                                 return -1;
   30953             :                         }
   30954           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   30955             :                 }
   30956             :         }
   30957           0 :         return 0;
   30958             : }
   30959             : 
   30960             : static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaData2Ctr_getsetters[] = {
   30961             :         {
   30962             :                 .name = discard_const_p(char, "count"),
   30963             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_count,
   30964             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_count,
   30965             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30966             :         },
   30967             :         {
   30968             :                 .name = discard_const_p(char, "enumeration_context"),
   30969             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_enumeration_context,
   30970             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_enumeration_context,
   30971             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   30972             :         },
   30973             :         {
   30974             :                 .name = discard_const_p(char, "array"),
   30975             :                 .get = py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_array,
   30976             :                 .set = py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_array,
   30977             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAttrValMetaData2")
   30978             :         },
   30979             :         { .name = NULL }
   30980             : };
   30981             : 
   30982           0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   30983             : {
   30984           0 :         return pytalloc_new(struct drsuapi_DsReplicaAttrValMetaData2Ctr, type);
   30985             : }
   30986             : 
   30987             : 
   30988             : static PyTypeObject drsuapi_DsReplicaAttrValMetaData2Ctr_Type = {
   30989             :         PyVarObject_HEAD_INIT(NULL, 0)
   30990             :         .tp_name = "drsuapi.DsReplicaAttrValMetaData2Ctr",
   30991             :         .tp_getset = py_drsuapi_DsReplicaAttrValMetaData2Ctr_getsetters,
   30992             :         .tp_methods = NULL,
   30993             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   30994             :         .tp_new = py_drsuapi_DsReplicaAttrValMetaData2Ctr_new,
   30995             : };
   30996             : 
   30997             : 
   30998           0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_u1(PyObject *obj, void *closure)
   30999             : {
   31000           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(obj);
   31001           0 :         PyObject *py_u1;
   31002           0 :         py_u1 = PyLong_FromUnsignedLongLong(object->u1);
   31003           0 :         return py_u1;
   31004             : }
   31005             : 
   31006           0 : static int py_drsuapi_DsReplicaConnection04_set_u1(PyObject *py_obj, PyObject *value, void *closure)
   31007             : {
   31008           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(py_obj);
   31009           0 :         if (value == NULL) {
   31010           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u1");
   31011           0 :                 return -1;
   31012             :         }
   31013             :         {
   31014           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u1));
   31015           0 :                 if (PyLong_Check(value)) {
   31016           0 :                         unsigned long long test_var;
   31017           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31018           0 :                         if (PyErr_Occurred() != NULL) {
   31019           0 :                                 return -1;
   31020             :                         }
   31021           0 :                         if (test_var > uint_max) {
   31022           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31023             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31024           0 :                                 return -1;
   31025             :                         }
   31026           0 :                         object->u1 = test_var;
   31027             :                 } else {
   31028           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31029             :                           PyLong_Type.tp_name);
   31030           0 :                         return -1;
   31031             :                 }
   31032             :         }
   31033           0 :         return 0;
   31034             : }
   31035             : 
   31036           0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_u2(PyObject *obj, void *closure)
   31037             : {
   31038           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(obj);
   31039           0 :         PyObject *py_u2;
   31040           0 :         py_u2 = PyLong_FromUnsignedLongLong((uint32_t)(object->u2));
   31041           0 :         return py_u2;
   31042             : }
   31043             : 
   31044           0 : static int py_drsuapi_DsReplicaConnection04_set_u2(PyObject *py_obj, PyObject *value, void *closure)
   31045             : {
   31046           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(py_obj);
   31047           0 :         if (value == NULL) {
   31048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u2");
   31049           0 :                 return -1;
   31050             :         }
   31051             :         {
   31052           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u2));
   31053           0 :                 if (PyLong_Check(value)) {
   31054           0 :                         unsigned long long test_var;
   31055           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31056           0 :                         if (PyErr_Occurred() != NULL) {
   31057           0 :                                 return -1;
   31058             :                         }
   31059           0 :                         if (test_var > uint_max) {
   31060           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31061             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31062           0 :                                 return -1;
   31063             :                         }
   31064           0 :                         object->u2 = test_var;
   31065             :                 } else {
   31066           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31067             :                           PyLong_Type.tp_name);
   31068           0 :                         return -1;
   31069             :                 }
   31070             :         }
   31071           0 :         return 0;
   31072             : }
   31073             : 
   31074           0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_u3(PyObject *obj, void *closure)
   31075             : {
   31076           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(obj);
   31077           0 :         PyObject *py_u3;
   31078           0 :         py_u3 = PyLong_FromUnsignedLongLong((uint32_t)(object->u3));
   31079           0 :         return py_u3;
   31080             : }
   31081             : 
   31082           0 : static int py_drsuapi_DsReplicaConnection04_set_u3(PyObject *py_obj, PyObject *value, void *closure)
   31083             : {
   31084           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(py_obj);
   31085           0 :         if (value == NULL) {
   31086           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u3");
   31087           0 :                 return -1;
   31088             :         }
   31089             :         {
   31090           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u3));
   31091           0 :                 if (PyLong_Check(value)) {
   31092           0 :                         unsigned long long test_var;
   31093           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31094           0 :                         if (PyErr_Occurred() != NULL) {
   31095           0 :                                 return -1;
   31096             :                         }
   31097           0 :                         if (test_var > uint_max) {
   31098           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31099             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31100           0 :                                 return -1;
   31101             :                         }
   31102           0 :                         object->u3 = test_var;
   31103             :                 } else {
   31104           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31105             :                           PyLong_Type.tp_name);
   31106           0 :                         return -1;
   31107             :                 }
   31108             :         }
   31109           0 :         return 0;
   31110             : }
   31111             : 
   31112           0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_bind_guid(PyObject *obj, void *closure)
   31113             : {
   31114           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(obj);
   31115           0 :         PyObject *py_bind_guid;
   31116           0 :         py_bind_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->bind_guid);
   31117           0 :         return py_bind_guid;
   31118             : }
   31119             : 
   31120           0 : static int py_drsuapi_DsReplicaConnection04_set_bind_guid(PyObject *py_obj, PyObject *value, void *closure)
   31121             : {
   31122           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(py_obj);
   31123           0 :         if (value == NULL) {
   31124           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bind_guid");
   31125           0 :                 return -1;
   31126             :         }
   31127           0 :         PY_CHECK_TYPE(GUID_Type, value, return -1;);
   31128           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   31129           0 :                 PyErr_NoMemory();
   31130           0 :                 return -1;
   31131             :         }
   31132           0 :         object->bind_guid = *(struct GUID *)pytalloc_get_ptr(value);
   31133           0 :         return 0;
   31134             : }
   31135             : 
   31136           0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_bind_time(PyObject *obj, void *closure)
   31137             : {
   31138           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(obj);
   31139           0 :         PyObject *py_bind_time;
   31140           0 :         py_bind_time = PyLong_FromUnsignedLongLong(object->bind_time);
   31141           0 :         return py_bind_time;
   31142             : }
   31143             : 
   31144           0 : static int py_drsuapi_DsReplicaConnection04_set_bind_time(PyObject *py_obj, PyObject *value, void *closure)
   31145             : {
   31146           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(py_obj);
   31147           0 :         if (value == NULL) {
   31148           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bind_time");
   31149           0 :                 return -1;
   31150             :         }
   31151             :         {
   31152           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bind_time));
   31153           0 :                 if (PyLong_Check(value)) {
   31154           0 :                         unsigned long long test_var;
   31155           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31156           0 :                         if (PyErr_Occurred() != NULL) {
   31157           0 :                                 return -1;
   31158             :                         }
   31159           0 :                         if (test_var > uint_max) {
   31160           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31161             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31162           0 :                                 return -1;
   31163             :                         }
   31164           0 :                         object->bind_time = test_var;
   31165             :                 } else {
   31166           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31167             :                           PyLong_Type.tp_name);
   31168           0 :                         return -1;
   31169             :                 }
   31170             :         }
   31171           0 :         return 0;
   31172             : }
   31173             : 
   31174           0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_client_ip_address(PyObject *obj, void *closure)
   31175             : {
   31176           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(obj);
   31177           0 :         PyObject *py_client_ip_address;
   31178           0 :         py_client_ip_address = PyString_FromStringOrNULL(object->client_ip_address);
   31179           0 :         return py_client_ip_address;
   31180             : }
   31181             : 
   31182           0 : static int py_drsuapi_DsReplicaConnection04_set_client_ip_address(PyObject *py_obj, PyObject *value, void *closure)
   31183             : {
   31184           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(py_obj);
   31185           0 :         if (value == NULL) {
   31186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_ip_address");
   31187           0 :                 return -1;
   31188             :         }
   31189             :         {
   31190           0 :                 const char *test_str;
   31191           0 :                 const char *talloc_str;
   31192           0 :                 PyObject *unicode = NULL;
   31193           0 :                 if (PyUnicode_Check(value)) {
   31194           0 :                         unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31195           0 :                         if (unicode == NULL) {
   31196           0 :                                 return -1;
   31197             :                         }
   31198           0 :                         test_str = PyBytes_AS_STRING(unicode);
   31199           0 :                 } else if (PyBytes_Check(value)) {
   31200           0 :                         test_str = PyBytes_AS_STRING(value);
   31201             :                 } else {
   31202           0 :                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31203           0 :                         return -1;
   31204             :                 }
   31205           0 :                 talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31206           0 :                 if (unicode != NULL) {
   31207           0 :                         Py_DECREF(unicode);
   31208             :                 }
   31209           0 :                 if (talloc_str == NULL) {
   31210           0 :                         PyErr_NoMemory();
   31211           0 :                         return -1;
   31212             :                 }
   31213           0 :                 object->client_ip_address = talloc_str;
   31214             :         }
   31215           0 :         return 0;
   31216             : }
   31217             : 
   31218           0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_u5(PyObject *obj, void *closure)
   31219             : {
   31220           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(obj);
   31221           0 :         PyObject *py_u5;
   31222           0 :         py_u5 = PyLong_FromUnsignedLongLong((uint32_t)(object->u5));
   31223           0 :         return py_u5;
   31224             : }
   31225             : 
   31226           0 : static int py_drsuapi_DsReplicaConnection04_set_u5(PyObject *py_obj, PyObject *value, void *closure)
   31227             : {
   31228           0 :         struct drsuapi_DsReplicaConnection04 *object = pytalloc_get_ptr(py_obj);
   31229           0 :         if (value == NULL) {
   31230           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u5");
   31231           0 :                 return -1;
   31232             :         }
   31233             :         {
   31234           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u5));
   31235           0 :                 if (PyLong_Check(value)) {
   31236           0 :                         unsigned long long test_var;
   31237           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31238           0 :                         if (PyErr_Occurred() != NULL) {
   31239           0 :                                 return -1;
   31240             :                         }
   31241           0 :                         if (test_var > uint_max) {
   31242           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31243             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31244           0 :                                 return -1;
   31245             :                         }
   31246           0 :                         object->u5 = test_var;
   31247             :                 } else {
   31248           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31249             :                           PyLong_Type.tp_name);
   31250           0 :                         return -1;
   31251             :                 }
   31252             :         }
   31253           0 :         return 0;
   31254             : }
   31255             : 
   31256             : static PyGetSetDef py_drsuapi_DsReplicaConnection04_getsetters[] = {
   31257             :         {
   31258             :                 .name = discard_const_p(char, "u1"),
   31259             :                 .get = py_drsuapi_DsReplicaConnection04_get_u1,
   31260             :                 .set = py_drsuapi_DsReplicaConnection04_set_u1,
   31261             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   31262             :         },
   31263             :         {
   31264             :                 .name = discard_const_p(char, "u2"),
   31265             :                 .get = py_drsuapi_DsReplicaConnection04_get_u2,
   31266             :                 .set = py_drsuapi_DsReplicaConnection04_set_u2,
   31267             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31268             :         },
   31269             :         {
   31270             :                 .name = discard_const_p(char, "u3"),
   31271             :                 .get = py_drsuapi_DsReplicaConnection04_get_u3,
   31272             :                 .set = py_drsuapi_DsReplicaConnection04_set_u3,
   31273             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31274             :         },
   31275             :         {
   31276             :                 .name = discard_const_p(char, "bind_guid"),
   31277             :                 .get = py_drsuapi_DsReplicaConnection04_get_bind_guid,
   31278             :                 .set = py_drsuapi_DsReplicaConnection04_set_bind_guid,
   31279             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   31280             :         },
   31281             :         {
   31282             :                 .name = discard_const_p(char, "bind_time"),
   31283             :                 .get = py_drsuapi_DsReplicaConnection04_get_bind_time,
   31284             :                 .set = py_drsuapi_DsReplicaConnection04_set_bind_time,
   31285             :                 .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
   31286             :         },
   31287             :         {
   31288             :                 .name = discard_const_p(char, "client_ip_address"),
   31289             :                 .get = py_drsuapi_DsReplicaConnection04_get_client_ip_address,
   31290             :                 .set = py_drsuapi_DsReplicaConnection04_set_client_ip_address,
   31291             :                 .doc = discard_const_p(char, "PIDL-generated element of base type ipv4address")
   31292             :         },
   31293             :         {
   31294             :                 .name = discard_const_p(char, "u5"),
   31295             :                 .get = py_drsuapi_DsReplicaConnection04_get_u5,
   31296             :                 .set = py_drsuapi_DsReplicaConnection04_set_u5,
   31297             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31298             :         },
   31299             :         { .name = NULL }
   31300             : };
   31301             : 
   31302           0 : static PyObject *py_drsuapi_DsReplicaConnection04_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   31303             : {
   31304           0 :         return pytalloc_new(struct drsuapi_DsReplicaConnection04, type);
   31305             : }
   31306             : 
   31307             : 
   31308             : static PyTypeObject drsuapi_DsReplicaConnection04_Type = {
   31309             :         PyVarObject_HEAD_INIT(NULL, 0)
   31310             :         .tp_name = "drsuapi.DsReplicaConnection04",
   31311             :         .tp_getset = py_drsuapi_DsReplicaConnection04_getsetters,
   31312             :         .tp_methods = NULL,
   31313             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31314             :         .tp_new = py_drsuapi_DsReplicaConnection04_new,
   31315             : };
   31316             : 
   31317             : 
   31318           0 : static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_count(PyObject *obj, void *closure)
   31319             : {
   31320           0 :         struct drsuapi_DsReplicaConnection04Ctr *object = pytalloc_get_ptr(obj);
   31321           0 :         PyObject *py_count;
   31322           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   31323           0 :         return py_count;
   31324             : }
   31325             : 
   31326           0 : static int py_drsuapi_DsReplicaConnection04Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   31327             : {
   31328           0 :         struct drsuapi_DsReplicaConnection04Ctr *object = pytalloc_get_ptr(py_obj);
   31329           0 :         if (value == NULL) {
   31330           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   31331           0 :                 return -1;
   31332             :         }
   31333             :         {
   31334           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   31335           0 :                 if (PyLong_Check(value)) {
   31336           0 :                         unsigned long long test_var;
   31337           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31338           0 :                         if (PyErr_Occurred() != NULL) {
   31339           0 :                                 return -1;
   31340             :                         }
   31341           0 :                         if (test_var > uint_max) {
   31342           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31343             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31344           0 :                                 return -1;
   31345             :                         }
   31346           0 :                         object->count = test_var;
   31347             :                 } else {
   31348           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31349             :                           PyLong_Type.tp_name);
   31350           0 :                         return -1;
   31351             :                 }
   31352             :         }
   31353           0 :         return 0;
   31354             : }
   31355             : 
   31356           0 : static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_reserved(PyObject *obj, void *closure)
   31357             : {
   31358           0 :         struct drsuapi_DsReplicaConnection04Ctr *object = pytalloc_get_ptr(obj);
   31359           0 :         PyObject *py_reserved;
   31360           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
   31361           0 :         return py_reserved;
   31362             : }
   31363             : 
   31364           0 : static int py_drsuapi_DsReplicaConnection04Ctr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   31365             : {
   31366           0 :         struct drsuapi_DsReplicaConnection04Ctr *object = pytalloc_get_ptr(py_obj);
   31367           0 :         if (value == NULL) {
   31368           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
   31369           0 :                 return -1;
   31370             :         }
   31371             :         {
   31372           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   31373           0 :                 if (PyLong_Check(value)) {
   31374           0 :                         unsigned long long test_var;
   31375           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31376           0 :                         if (PyErr_Occurred() != NULL) {
   31377           0 :                                 return -1;
   31378             :                         }
   31379           0 :                         if (test_var > uint_max) {
   31380           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31381             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31382           0 :                                 return -1;
   31383             :                         }
   31384           0 :                         object->reserved = test_var;
   31385             :                 } else {
   31386           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31387             :                           PyLong_Type.tp_name);
   31388           0 :                         return -1;
   31389             :                 }
   31390             :         }
   31391           0 :         return 0;
   31392             : }
   31393             : 
   31394           0 : static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_array(PyObject *obj, void *closure)
   31395             : {
   31396           0 :         struct drsuapi_DsReplicaConnection04Ctr *object = pytalloc_get_ptr(obj);
   31397           0 :         PyObject *py_array;
   31398           0 :         py_array = PyList_New(object->count);
   31399           0 :         if (py_array == NULL) {
   31400           0 :                 return NULL;
   31401             :         }
   31402             :         {
   31403             :                 int array_cntr_0;
   31404           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   31405           0 :                         PyObject *py_array_0;
   31406           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaConnection04_Type, object->array, &(object->array)[array_cntr_0]);
   31407           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   31408             :                 }
   31409             :         }
   31410           0 :         return py_array;
   31411             : }
   31412             : 
   31413           0 : static int py_drsuapi_DsReplicaConnection04Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   31414             : {
   31415           0 :         struct drsuapi_DsReplicaConnection04Ctr *object = pytalloc_get_ptr(py_obj);
   31416           0 :         if (value == NULL) {
   31417           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   31418           0 :                 return -1;
   31419             :         }
   31420           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   31421             :         {
   31422           0 :                 int array_cntr_0;
   31423           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   31424           0 :                 if (!object->array) { return -1; }
   31425           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   31426           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   31427           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   31428           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   31429           0 :                                 return -1;
   31430             :                         }
   31431           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplicaConnection04_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   31432           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   31433           0 :                                 PyErr_NoMemory();
   31434           0 :                                 return -1;
   31435             :                         }
   31436           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   31437             :                 }
   31438             :         }
   31439           0 :         return 0;
   31440             : }
   31441             : 
   31442             : static PyGetSetDef py_drsuapi_DsReplicaConnection04Ctr_getsetters[] = {
   31443             :         {
   31444             :                 .name = discard_const_p(char, "count"),
   31445             :                 .get = py_drsuapi_DsReplicaConnection04Ctr_get_count,
   31446             :                 .set = py_drsuapi_DsReplicaConnection04Ctr_set_count,
   31447             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31448             :         },
   31449             :         {
   31450             :                 .name = discard_const_p(char, "reserved"),
   31451             :                 .get = py_drsuapi_DsReplicaConnection04Ctr_get_reserved,
   31452             :                 .set = py_drsuapi_DsReplicaConnection04Ctr_set_reserved,
   31453             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31454             :         },
   31455             :         {
   31456             :                 .name = discard_const_p(char, "array"),
   31457             :                 .get = py_drsuapi_DsReplicaConnection04Ctr_get_array,
   31458             :                 .set = py_drsuapi_DsReplicaConnection04Ctr_set_array,
   31459             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaConnection04")
   31460             :         },
   31461             :         { .name = NULL }
   31462             : };
   31463             : 
   31464           0 : static PyObject *py_drsuapi_DsReplicaConnection04Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   31465             : {
   31466           0 :         return pytalloc_new(struct drsuapi_DsReplicaConnection04Ctr, type);
   31467             : }
   31468             : 
   31469             : 
   31470             : static PyTypeObject drsuapi_DsReplicaConnection04Ctr_Type = {
   31471             :         PyVarObject_HEAD_INIT(NULL, 0)
   31472             :         .tp_name = "drsuapi.DsReplicaConnection04Ctr",
   31473             :         .tp_getset = py_drsuapi_DsReplicaConnection04Ctr_getsetters,
   31474             :         .tp_methods = NULL,
   31475             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31476             :         .tp_new = py_drsuapi_DsReplicaConnection04Ctr_new,
   31477             : };
   31478             : 
   31479             : 
   31480           0 : static PyObject *py_drsuapi_DsReplica06_get_str1(PyObject *obj, void *closure)
   31481             : {
   31482           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(obj);
   31483           0 :         PyObject *py_str1;
   31484           0 :         if (object->str1 == NULL) {
   31485           0 :                 Py_RETURN_NONE;
   31486             :         }
   31487           0 :         if (object->str1 == NULL) {
   31488           0 :                 py_str1 = Py_None;
   31489           0 :                 Py_INCREF(py_str1);
   31490             :         } else {
   31491           0 :                 if (object->str1 == NULL) {
   31492           0 :                         py_str1 = Py_None;
   31493           0 :                         Py_INCREF(py_str1);
   31494             :                 } else {
   31495           0 :                         py_str1 = PyUnicode_Decode(object->str1, strlen(object->str1), "utf-8", "ignore");
   31496             :                 }
   31497             :         }
   31498           0 :         return py_str1;
   31499             : }
   31500             : 
   31501           0 : static int py_drsuapi_DsReplica06_set_str1(PyObject *py_obj, PyObject *value, void *closure)
   31502             : {
   31503           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(py_obj);
   31504           0 :         if (value == NULL) {
   31505           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->str1");
   31506           0 :                 return -1;
   31507             :         }
   31508           0 :         if (value == Py_None) {
   31509           0 :                 object->str1 = NULL;
   31510             :         } else {
   31511           0 :                 object->str1 = NULL;
   31512             :                 {
   31513           0 :                         const char *test_str;
   31514           0 :                         const char *talloc_str;
   31515           0 :                         PyObject *unicode = NULL;
   31516           0 :                         if (PyUnicode_Check(value)) {
   31517           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   31518           0 :                                 if (unicode == NULL) {
   31519           0 :                                         return -1;
   31520             :                                 }
   31521           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   31522           0 :                         } else if (PyBytes_Check(value)) {
   31523           0 :                                 test_str = PyBytes_AS_STRING(value);
   31524             :                         } else {
   31525           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   31526           0 :                                 return -1;
   31527             :                         }
   31528           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   31529           0 :                         if (unicode != NULL) {
   31530           0 :                                 Py_DECREF(unicode);
   31531             :                         }
   31532           0 :                         if (talloc_str == NULL) {
   31533           0 :                                 PyErr_NoMemory();
   31534           0 :                                 return -1;
   31535             :                         }
   31536           0 :                         object->str1 = talloc_str;
   31537             :                 }
   31538             :         }
   31539           0 :         return 0;
   31540             : }
   31541             : 
   31542           0 : static PyObject *py_drsuapi_DsReplica06_get_u1(PyObject *obj, void *closure)
   31543             : {
   31544           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(obj);
   31545           0 :         PyObject *py_u1;
   31546           0 :         py_u1 = PyLong_FromUnsignedLongLong((uint32_t)(object->u1));
   31547           0 :         return py_u1;
   31548             : }
   31549             : 
   31550           0 : static int py_drsuapi_DsReplica06_set_u1(PyObject *py_obj, PyObject *value, void *closure)
   31551             : {
   31552           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(py_obj);
   31553           0 :         if (value == NULL) {
   31554           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u1");
   31555           0 :                 return -1;
   31556             :         }
   31557             :         {
   31558           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u1));
   31559           0 :                 if (PyLong_Check(value)) {
   31560           0 :                         unsigned long long test_var;
   31561           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31562           0 :                         if (PyErr_Occurred() != NULL) {
   31563           0 :                                 return -1;
   31564             :                         }
   31565           0 :                         if (test_var > uint_max) {
   31566           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31567             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31568           0 :                                 return -1;
   31569             :                         }
   31570           0 :                         object->u1 = test_var;
   31571             :                 } else {
   31572           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31573             :                           PyLong_Type.tp_name);
   31574           0 :                         return -1;
   31575             :                 }
   31576             :         }
   31577           0 :         return 0;
   31578             : }
   31579             : 
   31580           0 : static PyObject *py_drsuapi_DsReplica06_get_u2(PyObject *obj, void *closure)
   31581             : {
   31582           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(obj);
   31583           0 :         PyObject *py_u2;
   31584           0 :         py_u2 = PyLong_FromUnsignedLongLong((uint32_t)(object->u2));
   31585           0 :         return py_u2;
   31586             : }
   31587             : 
   31588           0 : static int py_drsuapi_DsReplica06_set_u2(PyObject *py_obj, PyObject *value, void *closure)
   31589             : {
   31590           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(py_obj);
   31591           0 :         if (value == NULL) {
   31592           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u2");
   31593           0 :                 return -1;
   31594             :         }
   31595             :         {
   31596           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u2));
   31597           0 :                 if (PyLong_Check(value)) {
   31598           0 :                         unsigned long long test_var;
   31599           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31600           0 :                         if (PyErr_Occurred() != NULL) {
   31601           0 :                                 return -1;
   31602             :                         }
   31603           0 :                         if (test_var > uint_max) {
   31604           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31605             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31606           0 :                                 return -1;
   31607             :                         }
   31608           0 :                         object->u2 = test_var;
   31609             :                 } else {
   31610           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31611             :                           PyLong_Type.tp_name);
   31612           0 :                         return -1;
   31613             :                 }
   31614             :         }
   31615           0 :         return 0;
   31616             : }
   31617             : 
   31618           0 : static PyObject *py_drsuapi_DsReplica06_get_u3(PyObject *obj, void *closure)
   31619             : {
   31620           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(obj);
   31621           0 :         PyObject *py_u3;
   31622           0 :         py_u3 = PyLong_FromUnsignedLongLong((uint32_t)(object->u3));
   31623           0 :         return py_u3;
   31624             : }
   31625             : 
   31626           0 : static int py_drsuapi_DsReplica06_set_u3(PyObject *py_obj, PyObject *value, void *closure)
   31627             : {
   31628           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(py_obj);
   31629           0 :         if (value == NULL) {
   31630           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u3");
   31631           0 :                 return -1;
   31632             :         }
   31633             :         {
   31634           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u3));
   31635           0 :                 if (PyLong_Check(value)) {
   31636           0 :                         unsigned long long test_var;
   31637           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31638           0 :                         if (PyErr_Occurred() != NULL) {
   31639           0 :                                 return -1;
   31640             :                         }
   31641           0 :                         if (test_var > uint_max) {
   31642           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31643             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31644           0 :                                 return -1;
   31645             :                         }
   31646           0 :                         object->u3 = test_var;
   31647             :                 } else {
   31648           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31649             :                           PyLong_Type.tp_name);
   31650           0 :                         return -1;
   31651             :                 }
   31652             :         }
   31653           0 :         return 0;
   31654             : }
   31655             : 
   31656           0 : static PyObject *py_drsuapi_DsReplica06_get_u4(PyObject *obj, void *closure)
   31657             : {
   31658           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(obj);
   31659           0 :         PyObject *py_u4;
   31660           0 :         py_u4 = PyLong_FromUnsignedLongLong((uint32_t)(object->u4));
   31661           0 :         return py_u4;
   31662             : }
   31663             : 
   31664           0 : static int py_drsuapi_DsReplica06_set_u4(PyObject *py_obj, PyObject *value, void *closure)
   31665             : {
   31666           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(py_obj);
   31667           0 :         if (value == NULL) {
   31668           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u4");
   31669           0 :                 return -1;
   31670             :         }
   31671             :         {
   31672           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u4));
   31673           0 :                 if (PyLong_Check(value)) {
   31674           0 :                         unsigned long long test_var;
   31675           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31676           0 :                         if (PyErr_Occurred() != NULL) {
   31677           0 :                                 return -1;
   31678             :                         }
   31679           0 :                         if (test_var > uint_max) {
   31680           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31681             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31682           0 :                                 return -1;
   31683             :                         }
   31684           0 :                         object->u4 = test_var;
   31685             :                 } else {
   31686           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31687             :                           PyLong_Type.tp_name);
   31688           0 :                         return -1;
   31689             :                 }
   31690             :         }
   31691           0 :         return 0;
   31692             : }
   31693             : 
   31694           0 : static PyObject *py_drsuapi_DsReplica06_get_u5(PyObject *obj, void *closure)
   31695             : {
   31696           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(obj);
   31697           0 :         PyObject *py_u5;
   31698           0 :         py_u5 = PyLong_FromUnsignedLongLong((uint32_t)(object->u5));
   31699           0 :         return py_u5;
   31700             : }
   31701             : 
   31702           0 : static int py_drsuapi_DsReplica06_set_u5(PyObject *py_obj, PyObject *value, void *closure)
   31703             : {
   31704           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(py_obj);
   31705           0 :         if (value == NULL) {
   31706           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u5");
   31707           0 :                 return -1;
   31708             :         }
   31709             :         {
   31710           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u5));
   31711           0 :                 if (PyLong_Check(value)) {
   31712           0 :                         unsigned long long test_var;
   31713           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31714           0 :                         if (PyErr_Occurred() != NULL) {
   31715           0 :                                 return -1;
   31716             :                         }
   31717           0 :                         if (test_var > uint_max) {
   31718           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31719             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31720           0 :                                 return -1;
   31721             :                         }
   31722           0 :                         object->u5 = test_var;
   31723             :                 } else {
   31724           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31725             :                           PyLong_Type.tp_name);
   31726           0 :                         return -1;
   31727             :                 }
   31728             :         }
   31729           0 :         return 0;
   31730             : }
   31731             : 
   31732           0 : static PyObject *py_drsuapi_DsReplica06_get_u6(PyObject *obj, void *closure)
   31733             : {
   31734           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(obj);
   31735           0 :         PyObject *py_u6;
   31736           0 :         py_u6 = PyLong_FromUnsignedLongLong(object->u6);
   31737           0 :         return py_u6;
   31738             : }
   31739             : 
   31740           0 : static int py_drsuapi_DsReplica06_set_u6(PyObject *py_obj, PyObject *value, void *closure)
   31741             : {
   31742           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(py_obj);
   31743           0 :         if (value == NULL) {
   31744           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u6");
   31745           0 :                 return -1;
   31746             :         }
   31747             :         {
   31748           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u6));
   31749           0 :                 if (PyLong_Check(value)) {
   31750           0 :                         unsigned long long test_var;
   31751           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31752           0 :                         if (PyErr_Occurred() != NULL) {
   31753           0 :                                 return -1;
   31754             :                         }
   31755           0 :                         if (test_var > uint_max) {
   31756           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31757             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31758           0 :                                 return -1;
   31759             :                         }
   31760           0 :                         object->u6 = test_var;
   31761             :                 } else {
   31762           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31763             :                           PyLong_Type.tp_name);
   31764           0 :                         return -1;
   31765             :                 }
   31766             :         }
   31767           0 :         return 0;
   31768             : }
   31769             : 
   31770           0 : static PyObject *py_drsuapi_DsReplica06_get_u7(PyObject *obj, void *closure)
   31771             : {
   31772           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(obj);
   31773           0 :         PyObject *py_u7;
   31774           0 :         py_u7 = PyLong_FromUnsignedLongLong((uint32_t)(object->u7));
   31775           0 :         return py_u7;
   31776             : }
   31777             : 
   31778           0 : static int py_drsuapi_DsReplica06_set_u7(PyObject *py_obj, PyObject *value, void *closure)
   31779             : {
   31780           0 :         struct drsuapi_DsReplica06 *object = pytalloc_get_ptr(py_obj);
   31781           0 :         if (value == NULL) {
   31782           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u7");
   31783           0 :                 return -1;
   31784             :         }
   31785             :         {
   31786           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u7));
   31787           0 :                 if (PyLong_Check(value)) {
   31788           0 :                         unsigned long long test_var;
   31789           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31790           0 :                         if (PyErr_Occurred() != NULL) {
   31791           0 :                                 return -1;
   31792             :                         }
   31793           0 :                         if (test_var > uint_max) {
   31794           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31795             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31796           0 :                                 return -1;
   31797             :                         }
   31798           0 :                         object->u7 = test_var;
   31799             :                 } else {
   31800           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31801             :                           PyLong_Type.tp_name);
   31802           0 :                         return -1;
   31803             :                 }
   31804             :         }
   31805           0 :         return 0;
   31806             : }
   31807             : 
   31808             : static PyGetSetDef py_drsuapi_DsReplica06_getsetters[] = {
   31809             :         {
   31810             :                 .name = discard_const_p(char, "str1"),
   31811             :                 .get = py_drsuapi_DsReplica06_get_str1,
   31812             :                 .set = py_drsuapi_DsReplica06_set_str1,
   31813             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   31814             :         },
   31815             :         {
   31816             :                 .name = discard_const_p(char, "u1"),
   31817             :                 .get = py_drsuapi_DsReplica06_get_u1,
   31818             :                 .set = py_drsuapi_DsReplica06_set_u1,
   31819             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31820             :         },
   31821             :         {
   31822             :                 .name = discard_const_p(char, "u2"),
   31823             :                 .get = py_drsuapi_DsReplica06_get_u2,
   31824             :                 .set = py_drsuapi_DsReplica06_set_u2,
   31825             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31826             :         },
   31827             :         {
   31828             :                 .name = discard_const_p(char, "u3"),
   31829             :                 .get = py_drsuapi_DsReplica06_get_u3,
   31830             :                 .set = py_drsuapi_DsReplica06_set_u3,
   31831             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31832             :         },
   31833             :         {
   31834             :                 .name = discard_const_p(char, "u4"),
   31835             :                 .get = py_drsuapi_DsReplica06_get_u4,
   31836             :                 .set = py_drsuapi_DsReplica06_set_u4,
   31837             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31838             :         },
   31839             :         {
   31840             :                 .name = discard_const_p(char, "u5"),
   31841             :                 .get = py_drsuapi_DsReplica06_get_u5,
   31842             :                 .set = py_drsuapi_DsReplica06_set_u5,
   31843             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31844             :         },
   31845             :         {
   31846             :                 .name = discard_const_p(char, "u6"),
   31847             :                 .get = py_drsuapi_DsReplica06_get_u6,
   31848             :                 .set = py_drsuapi_DsReplica06_set_u6,
   31849             :                 .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
   31850             :         },
   31851             :         {
   31852             :                 .name = discard_const_p(char, "u7"),
   31853             :                 .get = py_drsuapi_DsReplica06_get_u7,
   31854             :                 .set = py_drsuapi_DsReplica06_set_u7,
   31855             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   31856             :         },
   31857             :         { .name = NULL }
   31858             : };
   31859             : 
   31860           0 : static PyObject *py_drsuapi_DsReplica06_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   31861             : {
   31862           0 :         return pytalloc_new(struct drsuapi_DsReplica06, type);
   31863             : }
   31864             : 
   31865             : 
   31866             : static PyTypeObject drsuapi_DsReplica06_Type = {
   31867             :         PyVarObject_HEAD_INIT(NULL, 0)
   31868             :         .tp_name = "drsuapi.DsReplica06",
   31869             :         .tp_getset = py_drsuapi_DsReplica06_getsetters,
   31870             :         .tp_methods = NULL,
   31871             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   31872             :         .tp_new = py_drsuapi_DsReplica06_new,
   31873             : };
   31874             : 
   31875             : 
   31876           0 : static PyObject *py_drsuapi_DsReplica06Ctr_get_count(PyObject *obj, void *closure)
   31877             : {
   31878           0 :         struct drsuapi_DsReplica06Ctr *object = pytalloc_get_ptr(obj);
   31879           0 :         PyObject *py_count;
   31880           0 :         py_count = PyLong_FromUnsignedLongLong((uint32_t)(object->count));
   31881           0 :         return py_count;
   31882             : }
   31883             : 
   31884           0 : static int py_drsuapi_DsReplica06Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
   31885             : {
   31886           0 :         struct drsuapi_DsReplica06Ctr *object = pytalloc_get_ptr(py_obj);
   31887           0 :         if (value == NULL) {
   31888           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
   31889           0 :                 return -1;
   31890             :         }
   31891             :         {
   31892           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
   31893           0 :                 if (PyLong_Check(value)) {
   31894           0 :                         unsigned long long test_var;
   31895           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31896           0 :                         if (PyErr_Occurred() != NULL) {
   31897           0 :                                 return -1;
   31898             :                         }
   31899           0 :                         if (test_var > uint_max) {
   31900           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31901             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31902           0 :                                 return -1;
   31903             :                         }
   31904           0 :                         object->count = test_var;
   31905             :                 } else {
   31906           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31907             :                           PyLong_Type.tp_name);
   31908           0 :                         return -1;
   31909             :                 }
   31910             :         }
   31911           0 :         return 0;
   31912             : }
   31913             : 
   31914           0 : static PyObject *py_drsuapi_DsReplica06Ctr_get_reserved(PyObject *obj, void *closure)
   31915             : {
   31916           0 :         struct drsuapi_DsReplica06Ctr *object = pytalloc_get_ptr(obj);
   31917           0 :         PyObject *py_reserved;
   31918           0 :         py_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->reserved));
   31919           0 :         return py_reserved;
   31920             : }
   31921             : 
   31922           0 : static int py_drsuapi_DsReplica06Ctr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
   31923             : {
   31924           0 :         struct drsuapi_DsReplica06Ctr *object = pytalloc_get_ptr(py_obj);
   31925           0 :         if (value == NULL) {
   31926           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
   31927           0 :                 return -1;
   31928             :         }
   31929             :         {
   31930           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
   31931           0 :                 if (PyLong_Check(value)) {
   31932           0 :                         unsigned long long test_var;
   31933           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   31934           0 :                         if (PyErr_Occurred() != NULL) {
   31935           0 :                                 return -1;
   31936             :                         }
   31937           0 :                         if (test_var > uint_max) {
   31938           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   31939             :                                   PyLong_Type.tp_name, uint_max, test_var);
   31940           0 :                                 return -1;
   31941             :                         }
   31942           0 :                         object->reserved = test_var;
   31943             :                 } else {
   31944           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   31945             :                           PyLong_Type.tp_name);
   31946           0 :                         return -1;
   31947             :                 }
   31948             :         }
   31949           0 :         return 0;
   31950             : }
   31951             : 
   31952           0 : static PyObject *py_drsuapi_DsReplica06Ctr_get_array(PyObject *obj, void *closure)
   31953             : {
   31954           0 :         struct drsuapi_DsReplica06Ctr *object = pytalloc_get_ptr(obj);
   31955           0 :         PyObject *py_array;
   31956           0 :         py_array = PyList_New(object->count);
   31957           0 :         if (py_array == NULL) {
   31958           0 :                 return NULL;
   31959             :         }
   31960             :         {
   31961             :                 int array_cntr_0;
   31962           0 :                 for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
   31963           0 :                         PyObject *py_array_0;
   31964           0 :                         py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplica06_Type, object->array, &(object->array)[array_cntr_0]);
   31965           0 :                         PyList_SetItem(py_array, array_cntr_0, py_array_0);
   31966             :                 }
   31967             :         }
   31968           0 :         return py_array;
   31969             : }
   31970             : 
   31971           0 : static int py_drsuapi_DsReplica06Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
   31972             : {
   31973           0 :         struct drsuapi_DsReplica06Ctr *object = pytalloc_get_ptr(py_obj);
   31974           0 :         if (value == NULL) {
   31975           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
   31976           0 :                 return -1;
   31977             :         }
   31978           0 :         PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   31979             :         {
   31980           0 :                 int array_cntr_0;
   31981           0 :                 object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
   31982           0 :                 if (!object->array) { return -1; }
   31983           0 :                 talloc_set_name_const(object->array, "ARRAY: object->array");
   31984           0 :                 for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
   31985           0 :                         if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
   31986           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->array)[array_cntr_0]");
   31987           0 :                                 return -1;
   31988             :                         }
   31989           0 :                         PY_CHECK_TYPE(&drsuapi_DsReplica06_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
   31990           0 :                         if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
   31991           0 :                                 PyErr_NoMemory();
   31992           0 :                                 return -1;
   31993             :                         }
   31994           0 :                         (object->array)[array_cntr_0] = *(struct drsuapi_DsReplica06 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
   31995             :                 }
   31996             :         }
   31997           0 :         return 0;
   31998             : }
   31999             : 
   32000             : static PyGetSetDef py_drsuapi_DsReplica06Ctr_getsetters[] = {
   32001             :         {
   32002             :                 .name = discard_const_p(char, "count"),
   32003             :                 .get = py_drsuapi_DsReplica06Ctr_get_count,
   32004             :                 .set = py_drsuapi_DsReplica06Ctr_set_count,
   32005             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32006             :         },
   32007             :         {
   32008             :                 .name = discard_const_p(char, "reserved"),
   32009             :                 .get = py_drsuapi_DsReplica06Ctr_get_reserved,
   32010             :                 .set = py_drsuapi_DsReplica06Ctr_set_reserved,
   32011             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32012             :         },
   32013             :         {
   32014             :                 .name = discard_const_p(char, "array"),
   32015             :                 .get = py_drsuapi_DsReplica06Ctr_get_array,
   32016             :                 .set = py_drsuapi_DsReplica06Ctr_set_array,
   32017             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplica06")
   32018             :         },
   32019             :         { .name = NULL }
   32020             : };
   32021             : 
   32022           0 : static PyObject *py_drsuapi_DsReplica06Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32023             : {
   32024           0 :         return pytalloc_new(struct drsuapi_DsReplica06Ctr, type);
   32025             : }
   32026             : 
   32027             : 
   32028             : static PyTypeObject drsuapi_DsReplica06Ctr_Type = {
   32029             :         PyVarObject_HEAD_INIT(NULL, 0)
   32030             :         .tp_name = "drsuapi.DsReplica06Ctr",
   32031             :         .tp_getset = py_drsuapi_DsReplica06Ctr_getsetters,
   32032             :         .tp_methods = NULL,
   32033             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32034             :         .tp_new = py_drsuapi_DsReplica06Ctr_new,
   32035             : };
   32036             : 
   32037          10 : static PyObject *py_import_drsuapi_DsReplicaInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaInfo *in)
   32038             : {
   32039           0 :         PyObject *ret;
   32040             : 
   32041          10 :         switch (level) {
   32042           5 :                 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
   32043           5 :                         if (in->neighbours == NULL) {
   32044           0 :                                 ret = Py_None;
   32045           0 :                                 Py_INCREF(ret);
   32046             :                         } else {
   32047           5 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbourCtr_Type, in->neighbours, in->neighbours);
   32048             :                         }
   32049           5 :                         return ret;
   32050             : 
   32051           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS:
   32052           0 :                         if (in->cursors == NULL) {
   32053           0 :                                 ret = Py_None;
   32054           0 :                                 Py_INCREF(ret);
   32055             :                         } else {
   32056           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtr_Type, in->cursors, in->cursors);
   32057             :                         }
   32058           0 :                         return ret;
   32059             : 
   32060           0 :                 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
   32061           0 :                         if (in->objmetadata == NULL) {
   32062           0 :                                 ret = Py_None;
   32063           0 :                                 Py_INCREF(ret);
   32064             :                         } else {
   32065           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaDataCtr_Type, in->objmetadata, in->objmetadata);
   32066             :                         }
   32067           0 :                         return ret;
   32068             : 
   32069           0 :                 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
   32070           0 :                         if (in->connectfailures == NULL) {
   32071           0 :                                 ret = Py_None;
   32072           0 :                                 Py_INCREF(ret);
   32073             :                         } else {
   32074           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in->connectfailures, in->connectfailures);
   32075             :                         }
   32076           0 :                         return ret;
   32077             : 
   32078           0 :                 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
   32079           0 :                         if (in->linkfailures == NULL) {
   32080           0 :                                 ret = Py_None;
   32081           0 :                                 Py_INCREF(ret);
   32082             :                         } else {
   32083           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in->linkfailures, in->linkfailures);
   32084             :                         }
   32085           0 :                         return ret;
   32086             : 
   32087           0 :                 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
   32088           0 :                         if (in->pendingops == NULL) {
   32089           0 :                                 ret = Py_None;
   32090           0 :                                 Py_INCREF(ret);
   32091             :                         } else {
   32092           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaOpCtr_Type, in->pendingops, in->pendingops);
   32093             :                         }
   32094           0 :                         return ret;
   32095             : 
   32096           0 :                 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
   32097           0 :                         if (in->attrvalmetadata == NULL) {
   32098           0 :                                 ret = Py_None;
   32099           0 :                                 Py_INCREF(ret);
   32100             :                         } else {
   32101           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaDataCtr_Type, in->attrvalmetadata, in->attrvalmetadata);
   32102             :                         }
   32103           0 :                         return ret;
   32104             : 
   32105           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
   32106           0 :                         if (in->cursors2 == NULL) {
   32107           0 :                                 ret = Py_None;
   32108           0 :                                 Py_INCREF(ret);
   32109             :                         } else {
   32110           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2Ctr_Type, in->cursors2, in->cursors2);
   32111             :                         }
   32112           0 :                         return ret;
   32113             : 
   32114           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
   32115           0 :                         if (in->cursors3 == NULL) {
   32116           0 :                                 ret = Py_None;
   32117           0 :                                 Py_INCREF(ret);
   32118             :                         } else {
   32119           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursor3Ctr_Type, in->cursors3, in->cursors3);
   32120             :                         }
   32121           0 :                         return ret;
   32122             : 
   32123           0 :                 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
   32124           0 :                         if (in->objmetadata2 == NULL) {
   32125           0 :                                 ret = Py_None;
   32126           0 :                                 Py_INCREF(ret);
   32127             :                         } else {
   32128           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData2Ctr_Type, in->objmetadata2, in->objmetadata2);
   32129             :                         }
   32130           0 :                         return ret;
   32131             : 
   32132           0 :                 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
   32133           0 :                         if (in->attrvalmetadata2 == NULL) {
   32134           0 :                                 ret = Py_None;
   32135           0 :                                 Py_INCREF(ret);
   32136             :                         } else {
   32137           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type, in->attrvalmetadata2, in->attrvalmetadata2);
   32138             :                         }
   32139           0 :                         return ret;
   32140             : 
   32141           5 :                 case DRSUAPI_DS_REPLICA_INFO_REPSTO:
   32142           5 :                         if (in->repsto == NULL) {
   32143           0 :                                 ret = Py_None;
   32144           0 :                                 Py_INCREF(ret);
   32145             :                         } else {
   32146           5 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbourCtr_Type, in->repsto, in->repsto);
   32147             :                         }
   32148           5 :                         return ret;
   32149             : 
   32150           0 :                 case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
   32151           0 :                         if (in->clientctx == NULL) {
   32152           0 :                                 ret = Py_None;
   32153           0 :                                 Py_INCREF(ret);
   32154             :                         } else {
   32155           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaConnection04Ctr_Type, in->clientctx, in->clientctx);
   32156             :                         }
   32157           0 :                         return ret;
   32158             : 
   32159           0 :                 case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
   32160           0 :                         if (in->udv1 == NULL) {
   32161           0 :                                 ret = Py_None;
   32162           0 :                                 Py_INCREF(ret);
   32163             :                         } else {
   32164           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, in->udv1, in->udv1);
   32165             :                         }
   32166           0 :                         return ret;
   32167             : 
   32168           0 :                 case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
   32169           0 :                         if (in->srvoutgoingcalls == NULL) {
   32170           0 :                                 ret = Py_None;
   32171           0 :                                 Py_INCREF(ret);
   32172             :                         } else {
   32173           0 :                                 ret = pytalloc_reference_ex(&drsuapi_DsReplica06Ctr_Type, in->srvoutgoingcalls, in->srvoutgoingcalls);
   32174             :                         }
   32175           0 :                         return ret;
   32176             : 
   32177             :         }
   32178           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   32179           0 :         return NULL;
   32180             : }
   32181             : 
   32182           0 : static union drsuapi_DsReplicaInfo *py_export_drsuapi_DsReplicaInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   32183             : {
   32184           0 :         union drsuapi_DsReplicaInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaInfo);
   32185           0 :         switch (level) {
   32186           0 :                 case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
   32187           0 :                         if (in == NULL) {
   32188           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->neighbours");
   32189           0 :                                 talloc_free(ret); return NULL;
   32190             :                         }
   32191           0 :                         if (in == Py_None) {
   32192           0 :                                 ret->neighbours = NULL;
   32193             :                         } else {
   32194           0 :                                 ret->neighbours = NULL;
   32195           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbourCtr_Type, in, talloc_free(ret); return NULL;);
   32196           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32197           0 :                                         PyErr_NoMemory();
   32198           0 :                                         talloc_free(ret); return NULL;
   32199             :                                 }
   32200           0 :                                 ret->neighbours = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(in);
   32201             :                         }
   32202           0 :                         break;
   32203             : 
   32204           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS:
   32205           0 :                         if (in == NULL) {
   32206           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->cursors");
   32207           0 :                                 talloc_free(ret); return NULL;
   32208             :                         }
   32209           0 :                         if (in == Py_None) {
   32210           0 :                                 ret->cursors = NULL;
   32211             :                         } else {
   32212           0 :                                 ret->cursors = NULL;
   32213           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtr_Type, in, talloc_free(ret); return NULL;);
   32214           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32215           0 :                                         PyErr_NoMemory();
   32216           0 :                                         talloc_free(ret); return NULL;
   32217             :                                 }
   32218           0 :                                 ret->cursors = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(in);
   32219             :                         }
   32220           0 :                         break;
   32221             : 
   32222           0 :                 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
   32223           0 :                         if (in == NULL) {
   32224           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->objmetadata");
   32225           0 :                                 talloc_free(ret); return NULL;
   32226             :                         }
   32227           0 :                         if (in == Py_None) {
   32228           0 :                                 ret->objmetadata = NULL;
   32229             :                         } else {
   32230           0 :                                 ret->objmetadata = NULL;
   32231           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaDataCtr_Type, in, talloc_free(ret); return NULL;);
   32232           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32233           0 :                                         PyErr_NoMemory();
   32234           0 :                                         talloc_free(ret); return NULL;
   32235             :                                 }
   32236           0 :                                 ret->objmetadata = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(in);
   32237             :                         }
   32238           0 :                         break;
   32239             : 
   32240           0 :                 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
   32241           0 :                         if (in == NULL) {
   32242           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->connectfailures");
   32243           0 :                                 talloc_free(ret); return NULL;
   32244             :                         }
   32245           0 :                         if (in == Py_None) {
   32246           0 :                                 ret->connectfailures = NULL;
   32247             :                         } else {
   32248           0 :                                 ret->connectfailures = NULL;
   32249           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in, talloc_free(ret); return NULL;);
   32250           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32251           0 :                                         PyErr_NoMemory();
   32252           0 :                                         talloc_free(ret); return NULL;
   32253             :                                 }
   32254           0 :                                 ret->connectfailures = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(in);
   32255             :                         }
   32256           0 :                         break;
   32257             : 
   32258           0 :                 case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
   32259           0 :                         if (in == NULL) {
   32260           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->linkfailures");
   32261           0 :                                 talloc_free(ret); return NULL;
   32262             :                         }
   32263           0 :                         if (in == Py_None) {
   32264           0 :                                 ret->linkfailures = NULL;
   32265             :                         } else {
   32266           0 :                                 ret->linkfailures = NULL;
   32267           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in, talloc_free(ret); return NULL;);
   32268           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32269           0 :                                         PyErr_NoMemory();
   32270           0 :                                         talloc_free(ret); return NULL;
   32271             :                                 }
   32272           0 :                                 ret->linkfailures = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(in);
   32273             :                         }
   32274           0 :                         break;
   32275             : 
   32276           0 :                 case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
   32277           0 :                         if (in == NULL) {
   32278           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->pendingops");
   32279           0 :                                 talloc_free(ret); return NULL;
   32280             :                         }
   32281           0 :                         if (in == Py_None) {
   32282           0 :                                 ret->pendingops = NULL;
   32283             :                         } else {
   32284           0 :                                 ret->pendingops = NULL;
   32285           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaOpCtr_Type, in, talloc_free(ret); return NULL;);
   32286           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32287           0 :                                         PyErr_NoMemory();
   32288           0 :                                         talloc_free(ret); return NULL;
   32289             :                                 }
   32290           0 :                                 ret->pendingops = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(in);
   32291             :                         }
   32292           0 :                         break;
   32293             : 
   32294           0 :                 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
   32295           0 :                         if (in == NULL) {
   32296           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->attrvalmetadata");
   32297           0 :                                 talloc_free(ret); return NULL;
   32298             :                         }
   32299           0 :                         if (in == Py_None) {
   32300           0 :                                 ret->attrvalmetadata = NULL;
   32301             :                         } else {
   32302           0 :                                 ret->attrvalmetadata = NULL;
   32303           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaDataCtr_Type, in, talloc_free(ret); return NULL;);
   32304           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32305           0 :                                         PyErr_NoMemory();
   32306           0 :                                         talloc_free(ret); return NULL;
   32307             :                                 }
   32308           0 :                                 ret->attrvalmetadata = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(in);
   32309             :                         }
   32310           0 :                         break;
   32311             : 
   32312           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
   32313           0 :                         if (in == NULL) {
   32314           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->cursors2");
   32315           0 :                                 talloc_free(ret); return NULL;
   32316             :                         }
   32317           0 :                         if (in == Py_None) {
   32318           0 :                                 ret->cursors2 = NULL;
   32319             :                         } else {
   32320           0 :                                 ret->cursors2 = NULL;
   32321           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2Ctr_Type, in, talloc_free(ret); return NULL;);
   32322           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32323           0 :                                         PyErr_NoMemory();
   32324           0 :                                         talloc_free(ret); return NULL;
   32325             :                                 }
   32326           0 :                                 ret->cursors2 = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(in);
   32327             :                         }
   32328           0 :                         break;
   32329             : 
   32330           0 :                 case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
   32331           0 :                         if (in == NULL) {
   32332           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->cursors3");
   32333           0 :                                 talloc_free(ret); return NULL;
   32334             :                         }
   32335           0 :                         if (in == Py_None) {
   32336           0 :                                 ret->cursors3 = NULL;
   32337             :                         } else {
   32338           0 :                                 ret->cursors3 = NULL;
   32339           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursor3Ctr_Type, in, talloc_free(ret); return NULL;);
   32340           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32341           0 :                                         PyErr_NoMemory();
   32342           0 :                                         talloc_free(ret); return NULL;
   32343             :                                 }
   32344           0 :                                 ret->cursors3 = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(in);
   32345             :                         }
   32346           0 :                         break;
   32347             : 
   32348           0 :                 case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
   32349           0 :                         if (in == NULL) {
   32350           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->objmetadata2");
   32351           0 :                                 talloc_free(ret); return NULL;
   32352             :                         }
   32353           0 :                         if (in == Py_None) {
   32354           0 :                                 ret->objmetadata2 = NULL;
   32355             :                         } else {
   32356           0 :                                 ret->objmetadata2 = NULL;
   32357           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData2Ctr_Type, in, talloc_free(ret); return NULL;);
   32358           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32359           0 :                                         PyErr_NoMemory();
   32360           0 :                                         talloc_free(ret); return NULL;
   32361             :                                 }
   32362           0 :                                 ret->objmetadata2 = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(in);
   32363             :                         }
   32364           0 :                         break;
   32365             : 
   32366           0 :                 case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
   32367           0 :                         if (in == NULL) {
   32368           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->attrvalmetadata2");
   32369           0 :                                 talloc_free(ret); return NULL;
   32370             :                         }
   32371           0 :                         if (in == Py_None) {
   32372           0 :                                 ret->attrvalmetadata2 = NULL;
   32373             :                         } else {
   32374           0 :                                 ret->attrvalmetadata2 = NULL;
   32375           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type, in, talloc_free(ret); return NULL;);
   32376           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32377           0 :                                         PyErr_NoMemory();
   32378           0 :                                         talloc_free(ret); return NULL;
   32379             :                                 }
   32380           0 :                                 ret->attrvalmetadata2 = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(in);
   32381             :                         }
   32382           0 :                         break;
   32383             : 
   32384           0 :                 case DRSUAPI_DS_REPLICA_INFO_REPSTO:
   32385           0 :                         if (in == NULL) {
   32386           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->repsto");
   32387           0 :                                 talloc_free(ret); return NULL;
   32388             :                         }
   32389           0 :                         if (in == Py_None) {
   32390           0 :                                 ret->repsto = NULL;
   32391             :                         } else {
   32392           0 :                                 ret->repsto = NULL;
   32393           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbourCtr_Type, in, talloc_free(ret); return NULL;);
   32394           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32395           0 :                                         PyErr_NoMemory();
   32396           0 :                                         talloc_free(ret); return NULL;
   32397             :                                 }
   32398           0 :                                 ret->repsto = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(in);
   32399             :                         }
   32400           0 :                         break;
   32401             : 
   32402           0 :                 case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
   32403           0 :                         if (in == NULL) {
   32404           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->clientctx");
   32405           0 :                                 talloc_free(ret); return NULL;
   32406             :                         }
   32407           0 :                         if (in == Py_None) {
   32408           0 :                                 ret->clientctx = NULL;
   32409             :                         } else {
   32410           0 :                                 ret->clientctx = NULL;
   32411           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaConnection04Ctr_Type, in, talloc_free(ret); return NULL;);
   32412           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32413           0 :                                         PyErr_NoMemory();
   32414           0 :                                         talloc_free(ret); return NULL;
   32415             :                                 }
   32416           0 :                                 ret->clientctx = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(in);
   32417             :                         }
   32418           0 :                         break;
   32419             : 
   32420           0 :                 case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
   32421           0 :                         if (in == NULL) {
   32422           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->udv1");
   32423           0 :                                 talloc_free(ret); return NULL;
   32424             :                         }
   32425           0 :                         if (in == Py_None) {
   32426           0 :                                 ret->udv1 = NULL;
   32427             :                         } else {
   32428           0 :                                 ret->udv1 = NULL;
   32429           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, in, talloc_free(ret); return NULL;);
   32430           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32431           0 :                                         PyErr_NoMemory();
   32432           0 :                                         talloc_free(ret); return NULL;
   32433             :                                 }
   32434           0 :                                 ret->udv1 = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(in);
   32435             :                         }
   32436           0 :                         break;
   32437             : 
   32438           0 :                 case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
   32439           0 :                         if (in == NULL) {
   32440           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->srvoutgoingcalls");
   32441           0 :                                 talloc_free(ret); return NULL;
   32442             :                         }
   32443           0 :                         if (in == Py_None) {
   32444           0 :                                 ret->srvoutgoingcalls = NULL;
   32445             :                         } else {
   32446           0 :                                 ret->srvoutgoingcalls = NULL;
   32447           0 :                                 PY_CHECK_TYPE(&drsuapi_DsReplica06Ctr_Type, in, talloc_free(ret); return NULL;);
   32448           0 :                                 if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32449           0 :                                         PyErr_NoMemory();
   32450           0 :                                         talloc_free(ret); return NULL;
   32451             :                                 }
   32452           0 :                                 ret->srvoutgoingcalls = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(in);
   32453             :                         }
   32454           0 :                         break;
   32455             : 
   32456           0 :                 default:
   32457           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   32458           0 :                         talloc_free(ret);
   32459           0 :                         ret = NULL;
   32460             :         }
   32461             : 
   32462           0 :         return ret;
   32463             : }
   32464             : 
   32465          10 : static PyObject *py_drsuapi_DsReplicaInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32466             : {
   32467          10 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   32468          10 :         PyObject *mem_ctx_obj = NULL;
   32469          10 :         TALLOC_CTX *mem_ctx = NULL;
   32470          10 :         int level = 0;
   32471          10 :         PyObject *in_obj = NULL;
   32472          10 :         union drsuapi_DsReplicaInfo *in = NULL;
   32473             : 
   32474          10 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   32475             :                 discard_const_p(char *, kwnames),
   32476             :                 &mem_ctx_obj,
   32477             :                 &level,
   32478             :                 &in_obj)) {
   32479           0 :                 return NULL;
   32480             :         }
   32481          10 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   32482          10 :         if (mem_ctx == NULL) {
   32483           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   32484           0 :                 return NULL;
   32485             :         }
   32486          10 :         in = (union drsuapi_DsReplicaInfo *)pytalloc_get_ptr(in_obj);
   32487          10 :         if (in == NULL) {
   32488           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaInfo!");
   32489           0 :                 return NULL;
   32490             :         }
   32491             : 
   32492          10 :         return py_import_drsuapi_DsReplicaInfo(mem_ctx, level, in);
   32493             : }
   32494             : 
   32495           0 : static PyObject *py_drsuapi_DsReplicaInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32496             : {
   32497           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   32498           0 :         PyObject *mem_ctx_obj = NULL;
   32499           0 :         TALLOC_CTX *mem_ctx = NULL;
   32500           0 :         int level = 0;
   32501           0 :         PyObject *in = NULL;
   32502           0 :         union drsuapi_DsReplicaInfo *out = NULL;
   32503             : 
   32504           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   32505             :                 discard_const_p(char *, kwnames),
   32506             :                 &mem_ctx_obj,
   32507             :                 &level,
   32508             :                 &in)) {
   32509           0 :                 return NULL;
   32510             :         }
   32511           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   32512           0 :         if (mem_ctx == NULL) {
   32513           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   32514           0 :                 return NULL;
   32515             :         }
   32516             : 
   32517           0 :         out = py_export_drsuapi_DsReplicaInfo(mem_ctx, level, in);
   32518           0 :         if (out == NULL) {
   32519           0 :                 return NULL;
   32520             :         }
   32521             : 
   32522           0 :         return pytalloc_GenericObject_reference(out);
   32523             : }
   32524             : 
   32525             : static PyMethodDef py_drsuapi_DsReplicaInfo_methods[] = {
   32526             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaInfo_import),
   32527             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   32528             :                 "T.__import__(mem_ctx, level, in) => ret." },
   32529             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaInfo_export),
   32530             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   32531             :                 "T.__export__(mem_ctx, level, in) => ret." },
   32532             :         { NULL, NULL, 0, NULL }
   32533             : };
   32534             : 
   32535           0 : static PyObject *py_drsuapi_DsReplicaInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32536             : {
   32537           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   32538           0 :         return NULL;
   32539             : }
   32540             : 
   32541             : 
   32542             : static PyTypeObject drsuapi_DsReplicaInfo_Type = {
   32543             :         PyVarObject_HEAD_INIT(NULL, 0)
   32544             :         .tp_name = "drsuapi.DsReplicaInfo",
   32545             :         .tp_getset = NULL,
   32546             :         .tp_methods = py_drsuapi_DsReplicaInfo_methods,
   32547             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32548             :         .tp_new = py_drsuapi_DsReplicaInfo_new,
   32549             : };
   32550             : 
   32551             : 
   32552           0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr1_get_num_entries(PyObject *obj, void *closure)
   32553             : {
   32554           0 :         struct drsuapi_DsGetMemberships2Ctr1 *object = pytalloc_get_ptr(obj);
   32555           0 :         PyObject *py_num_entries;
   32556           0 :         py_num_entries = PyLong_FromUnsignedLongLong((uint32_t)(object->num_entries));
   32557           0 :         return py_num_entries;
   32558             : }
   32559             : 
   32560           0 : static int py_drsuapi_DsGetMemberships2Ctr1_set_num_entries(PyObject *py_obj, PyObject *value, void *closure)
   32561             : {
   32562           0 :         struct drsuapi_DsGetMemberships2Ctr1 *object = pytalloc_get_ptr(py_obj);
   32563           0 :         if (value == NULL) {
   32564           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_entries");
   32565           0 :                 return -1;
   32566             :         }
   32567             :         {
   32568           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_entries));
   32569           0 :                 if (PyLong_Check(value)) {
   32570           0 :                         unsigned long long test_var;
   32571           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32572           0 :                         if (PyErr_Occurred() != NULL) {
   32573           0 :                                 return -1;
   32574             :                         }
   32575           0 :                         if (test_var > uint_max) {
   32576           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32577             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32578           0 :                                 return -1;
   32579             :                         }
   32580           0 :                         object->num_entries = test_var;
   32581             :                 } else {
   32582           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32583             :                           PyLong_Type.tp_name);
   32584           0 :                         return -1;
   32585             :                 }
   32586             :         }
   32587           0 :         return 0;
   32588             : }
   32589             : 
   32590           0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr1_get_ctrl_array(PyObject *obj, void *closure)
   32591             : {
   32592           0 :         struct drsuapi_DsGetMemberships2Ctr1 *object = pytalloc_get_ptr(obj);
   32593           0 :         PyObject *py_ctrl_array;
   32594           0 :         if (object->ctrl_array == NULL) {
   32595           0 :                 Py_RETURN_NONE;
   32596             :         }
   32597           0 :         if (object->ctrl_array == NULL) {
   32598           0 :                 py_ctrl_array = Py_None;
   32599           0 :                 Py_INCREF(py_ctrl_array);
   32600             :         } else {
   32601           0 :                 py_ctrl_array = PyList_New(object->num_entries);
   32602           0 :                 if (py_ctrl_array == NULL) {
   32603           0 :                         return NULL;
   32604             :                 }
   32605             :                 {
   32606             :                         int ctrl_array_cntr_1;
   32607           0 :                         for (ctrl_array_cntr_1 = 0; ctrl_array_cntr_1 < (object->num_entries); ctrl_array_cntr_1++) {
   32608           0 :                                 PyObject *py_ctrl_array_1;
   32609           0 :                                 if ((object->ctrl_array)[ctrl_array_cntr_1] == NULL) {
   32610           0 :                                         py_ctrl_array_1 = Py_None;
   32611           0 :                                         Py_INCREF(py_ctrl_array_1);
   32612             :                                 } else {
   32613           0 :                                         py_ctrl_array_1 = pytalloc_reference_ex(&drsuapi_DsGetMembershipsCtr1_Type, (object->ctrl_array)[ctrl_array_cntr_1], (object->ctrl_array)[ctrl_array_cntr_1]);
   32614             :                                 }
   32615           0 :                                 PyList_SetItem(py_ctrl_array, ctrl_array_cntr_1, py_ctrl_array_1);
   32616             :                         }
   32617             :                 }
   32618             :         }
   32619           0 :         return py_ctrl_array;
   32620             : }
   32621             : 
   32622           0 : static int py_drsuapi_DsGetMemberships2Ctr1_set_ctrl_array(PyObject *py_obj, PyObject *value, void *closure)
   32623             : {
   32624           0 :         struct drsuapi_DsGetMemberships2Ctr1 *object = pytalloc_get_ptr(py_obj);
   32625           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ctrl_array));
   32626           0 :         if (value == NULL) {
   32627           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctrl_array");
   32628           0 :                 return -1;
   32629             :         }
   32630           0 :         if (value == Py_None) {
   32631           0 :                 object->ctrl_array = NULL;
   32632             :         } else {
   32633           0 :                 object->ctrl_array = NULL;
   32634           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   32635             :                 {
   32636           0 :                         int ctrl_array_cntr_1;
   32637           0 :                         object->ctrl_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ctrl_array, PyList_GET_SIZE(value));
   32638           0 :                         if (!object->ctrl_array) { return -1; }
   32639           0 :                         talloc_set_name_const(object->ctrl_array, "ARRAY: object->ctrl_array");
   32640           0 :                         for (ctrl_array_cntr_1 = 0; ctrl_array_cntr_1 < PyList_GET_SIZE(value); ctrl_array_cntr_1++) {
   32641           0 :                                 if (PyList_GET_ITEM(value, ctrl_array_cntr_1) == NULL) {
   32642           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->ctrl_array)[ctrl_array_cntr_1]");
   32643           0 :                                         return -1;
   32644             :                                 }
   32645           0 :                                 if (PyList_GET_ITEM(value, ctrl_array_cntr_1) == Py_None) {
   32646           0 :                                         (object->ctrl_array)[ctrl_array_cntr_1] = NULL;
   32647             :                                 } else {
   32648           0 :                                         (object->ctrl_array)[ctrl_array_cntr_1] = NULL;
   32649           0 :                                         PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, PyList_GET_ITEM(value, ctrl_array_cntr_1), return -1;);
   32650           0 :                                         if (talloc_reference(object->ctrl_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ctrl_array_cntr_1))) == NULL) {
   32651           0 :                                                 PyErr_NoMemory();
   32652           0 :                                                 return -1;
   32653             :                                         }
   32654           0 :                                         (object->ctrl_array)[ctrl_array_cntr_1] = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, ctrl_array_cntr_1));
   32655             :                                 }
   32656             :                         }
   32657             :                 }
   32658             :         }
   32659           0 :         return 0;
   32660             : }
   32661             : 
   32662             : static PyGetSetDef py_drsuapi_DsGetMemberships2Ctr1_getsetters[] = {
   32663             :         {
   32664             :                 .name = discard_const_p(char, "num_entries"),
   32665             :                 .get = py_drsuapi_DsGetMemberships2Ctr1_get_num_entries,
   32666             :                 .set = py_drsuapi_DsGetMemberships2Ctr1_set_num_entries,
   32667             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32668             :         },
   32669             :         {
   32670             :                 .name = discard_const_p(char, "ctrl_array"),
   32671             :                 .get = py_drsuapi_DsGetMemberships2Ctr1_get_ctrl_array,
   32672             :                 .set = py_drsuapi_DsGetMemberships2Ctr1_set_ctrl_array,
   32673             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMembershipsCtr1")
   32674             :         },
   32675             :         { .name = NULL }
   32676             : };
   32677             : 
   32678           0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32679             : {
   32680           0 :         return pytalloc_new(struct drsuapi_DsGetMemberships2Ctr1, type);
   32681             : }
   32682             : 
   32683             : 
   32684             : static PyTypeObject drsuapi_DsGetMemberships2Ctr1_Type = {
   32685             :         PyVarObject_HEAD_INIT(NULL, 0)
   32686             :         .tp_name = "drsuapi.DsGetMemberships2Ctr1",
   32687             :         .tp_getset = py_drsuapi_DsGetMemberships2Ctr1_getsetters,
   32688             :         .tp_methods = NULL,
   32689             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32690             :         .tp_new = py_drsuapi_DsGetMemberships2Ctr1_new,
   32691             : };
   32692             : 
   32693           0 : static PyObject *py_import_drsuapi_DsGetMemberships2Ctr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMemberships2Ctr *in)
   32694             : {
   32695           0 :         PyObject *ret;
   32696             : 
   32697           0 :         switch (level) {
   32698           0 :                 case 1:
   32699           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsCtr1_Type, mem_ctx, &in->ctr1);
   32700           0 :                         return ret;
   32701             : 
   32702             :         }
   32703           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   32704           0 :         return NULL;
   32705             : }
   32706             : 
   32707           0 : static union drsuapi_DsGetMemberships2Ctr *py_export_drsuapi_DsGetMemberships2Ctr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   32708             : {
   32709           0 :         union drsuapi_DsGetMemberships2Ctr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Ctr);
   32710           0 :         switch (level) {
   32711           0 :                 case 1:
   32712           0 :                         if (in == NULL) {
   32713           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   32714           0 :                                 talloc_free(ret); return NULL;
   32715             :                         }
   32716           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, in, talloc_free(ret); return NULL;);
   32717           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32718           0 :                                 PyErr_NoMemory();
   32719           0 :                                 talloc_free(ret); return NULL;
   32720             :                         }
   32721           0 :                         ret->ctr1 = *(struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(in);
   32722           0 :                         break;
   32723             : 
   32724           0 :                 default:
   32725           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   32726           0 :                         talloc_free(ret);
   32727           0 :                         ret = NULL;
   32728             :         }
   32729             : 
   32730           0 :         return ret;
   32731             : }
   32732             : 
   32733           0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32734             : {
   32735           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   32736           0 :         PyObject *mem_ctx_obj = NULL;
   32737           0 :         TALLOC_CTX *mem_ctx = NULL;
   32738           0 :         int level = 0;
   32739           0 :         PyObject *in_obj = NULL;
   32740           0 :         union drsuapi_DsGetMemberships2Ctr *in = NULL;
   32741             : 
   32742           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   32743             :                 discard_const_p(char *, kwnames),
   32744             :                 &mem_ctx_obj,
   32745             :                 &level,
   32746             :                 &in_obj)) {
   32747           0 :                 return NULL;
   32748             :         }
   32749           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   32750           0 :         if (mem_ctx == NULL) {
   32751           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   32752           0 :                 return NULL;
   32753             :         }
   32754           0 :         in = (union drsuapi_DsGetMemberships2Ctr *)pytalloc_get_ptr(in_obj);
   32755           0 :         if (in == NULL) {
   32756           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetMemberships2Ctr!");
   32757           0 :                 return NULL;
   32758             :         }
   32759             : 
   32760           0 :         return py_import_drsuapi_DsGetMemberships2Ctr(mem_ctx, level, in);
   32761             : }
   32762             : 
   32763           0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32764             : {
   32765           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   32766           0 :         PyObject *mem_ctx_obj = NULL;
   32767           0 :         TALLOC_CTX *mem_ctx = NULL;
   32768           0 :         int level = 0;
   32769           0 :         PyObject *in = NULL;
   32770           0 :         union drsuapi_DsGetMemberships2Ctr *out = NULL;
   32771             : 
   32772           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   32773             :                 discard_const_p(char *, kwnames),
   32774             :                 &mem_ctx_obj,
   32775             :                 &level,
   32776             :                 &in)) {
   32777           0 :                 return NULL;
   32778             :         }
   32779           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   32780           0 :         if (mem_ctx == NULL) {
   32781           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   32782           0 :                 return NULL;
   32783             :         }
   32784             : 
   32785           0 :         out = py_export_drsuapi_DsGetMemberships2Ctr(mem_ctx, level, in);
   32786           0 :         if (out == NULL) {
   32787           0 :                 return NULL;
   32788             :         }
   32789             : 
   32790           0 :         return pytalloc_GenericObject_reference(out);
   32791             : }
   32792             : 
   32793             : static PyMethodDef py_drsuapi_DsGetMemberships2Ctr_methods[] = {
   32794             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2Ctr_import),
   32795             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   32796             :                 "T.__import__(mem_ctx, level, in) => ret." },
   32797             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2Ctr_export),
   32798             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   32799             :                 "T.__export__(mem_ctx, level, in) => ret." },
   32800             :         { NULL, NULL, 0, NULL }
   32801             : };
   32802             : 
   32803           0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32804             : {
   32805           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   32806           0 :         return NULL;
   32807             : }
   32808             : 
   32809             : 
   32810             : static PyTypeObject drsuapi_DsGetMemberships2Ctr_Type = {
   32811             :         PyVarObject_HEAD_INIT(NULL, 0)
   32812             :         .tp_name = "drsuapi.DsGetMemberships2Ctr",
   32813             :         .tp_getset = NULL,
   32814             :         .tp_methods = py_drsuapi_DsGetMemberships2Ctr_methods,
   32815             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32816             :         .tp_new = py_drsuapi_DsGetMemberships2Ctr_new,
   32817             : };
   32818             : 
   32819             : 
   32820           0 : static PyObject *py_drsuapi_DsGetMemberships2Request1_get_num_req(PyObject *obj, void *closure)
   32821             : {
   32822           0 :         struct drsuapi_DsGetMemberships2Request1 *object = pytalloc_get_ptr(obj);
   32823           0 :         PyObject *py_num_req;
   32824           0 :         py_num_req = PyLong_FromUnsignedLongLong((uint32_t)(object->num_req));
   32825           0 :         return py_num_req;
   32826             : }
   32827             : 
   32828           0 : static int py_drsuapi_DsGetMemberships2Request1_set_num_req(PyObject *py_obj, PyObject *value, void *closure)
   32829             : {
   32830           0 :         struct drsuapi_DsGetMemberships2Request1 *object = pytalloc_get_ptr(py_obj);
   32831           0 :         if (value == NULL) {
   32832           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_req");
   32833           0 :                 return -1;
   32834             :         }
   32835             :         {
   32836           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_req));
   32837           0 :                 if (PyLong_Check(value)) {
   32838           0 :                         unsigned long long test_var;
   32839           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   32840           0 :                         if (PyErr_Occurred() != NULL) {
   32841           0 :                                 return -1;
   32842             :                         }
   32843           0 :                         if (test_var > uint_max) {
   32844           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   32845             :                                   PyLong_Type.tp_name, uint_max, test_var);
   32846           0 :                                 return -1;
   32847             :                         }
   32848           0 :                         object->num_req = test_var;
   32849             :                 } else {
   32850           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   32851             :                           PyLong_Type.tp_name);
   32852           0 :                         return -1;
   32853             :                 }
   32854             :         }
   32855           0 :         return 0;
   32856             : }
   32857             : 
   32858           0 : static PyObject *py_drsuapi_DsGetMemberships2Request1_get_req_array(PyObject *obj, void *closure)
   32859             : {
   32860           0 :         struct drsuapi_DsGetMemberships2Request1 *object = pytalloc_get_ptr(obj);
   32861           0 :         PyObject *py_req_array;
   32862           0 :         if (object->req_array == NULL) {
   32863           0 :                 Py_RETURN_NONE;
   32864             :         }
   32865           0 :         if (object->req_array == NULL) {
   32866           0 :                 py_req_array = Py_None;
   32867           0 :                 Py_INCREF(py_req_array);
   32868             :         } else {
   32869           0 :                 py_req_array = PyList_New(object->num_req);
   32870           0 :                 if (py_req_array == NULL) {
   32871           0 :                         return NULL;
   32872             :                 }
   32873             :                 {
   32874             :                         int req_array_cntr_1;
   32875           0 :                         for (req_array_cntr_1 = 0; req_array_cntr_1 < (object->num_req); req_array_cntr_1++) {
   32876           0 :                                 PyObject *py_req_array_1;
   32877           0 :                                 if ((object->req_array)[req_array_cntr_1] == NULL) {
   32878           0 :                                         py_req_array_1 = Py_None;
   32879           0 :                                         Py_INCREF(py_req_array_1);
   32880             :                                 } else {
   32881           0 :                                         py_req_array_1 = pytalloc_reference_ex(&drsuapi_DsGetMembershipsRequest1_Type, (object->req_array)[req_array_cntr_1], (object->req_array)[req_array_cntr_1]);
   32882             :                                 }
   32883           0 :                                 PyList_SetItem(py_req_array, req_array_cntr_1, py_req_array_1);
   32884             :                         }
   32885             :                 }
   32886             :         }
   32887           0 :         return py_req_array;
   32888             : }
   32889             : 
   32890           0 : static int py_drsuapi_DsGetMemberships2Request1_set_req_array(PyObject *py_obj, PyObject *value, void *closure)
   32891             : {
   32892           0 :         struct drsuapi_DsGetMemberships2Request1 *object = pytalloc_get_ptr(py_obj);
   32893           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->req_array));
   32894           0 :         if (value == NULL) {
   32895           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->req_array");
   32896           0 :                 return -1;
   32897             :         }
   32898           0 :         if (value == Py_None) {
   32899           0 :                 object->req_array = NULL;
   32900             :         } else {
   32901           0 :                 object->req_array = NULL;
   32902           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   32903             :                 {
   32904           0 :                         int req_array_cntr_1;
   32905           0 :                         object->req_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->req_array, PyList_GET_SIZE(value));
   32906           0 :                         if (!object->req_array) { return -1; }
   32907           0 :                         talloc_set_name_const(object->req_array, "ARRAY: object->req_array");
   32908           0 :                         for (req_array_cntr_1 = 0; req_array_cntr_1 < PyList_GET_SIZE(value); req_array_cntr_1++) {
   32909           0 :                                 if (PyList_GET_ITEM(value, req_array_cntr_1) == NULL) {
   32910           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->req_array)[req_array_cntr_1]");
   32911           0 :                                         return -1;
   32912             :                                 }
   32913           0 :                                 if (PyList_GET_ITEM(value, req_array_cntr_1) == Py_None) {
   32914           0 :                                         (object->req_array)[req_array_cntr_1] = NULL;
   32915             :                                 } else {
   32916           0 :                                         (object->req_array)[req_array_cntr_1] = NULL;
   32917           0 :                                         PY_CHECK_TYPE(&drsuapi_DsGetMembershipsRequest1_Type, PyList_GET_ITEM(value, req_array_cntr_1), return -1;);
   32918           0 :                                         if (talloc_reference(object->req_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, req_array_cntr_1))) == NULL) {
   32919           0 :                                                 PyErr_NoMemory();
   32920           0 :                                                 return -1;
   32921             :                                         }
   32922           0 :                                         (object->req_array)[req_array_cntr_1] = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, req_array_cntr_1));
   32923             :                                 }
   32924             :                         }
   32925             :                 }
   32926             :         }
   32927           0 :         return 0;
   32928             : }
   32929             : 
   32930             : static PyGetSetDef py_drsuapi_DsGetMemberships2Request1_getsetters[] = {
   32931             :         {
   32932             :                 .name = discard_const_p(char, "num_req"),
   32933             :                 .get = py_drsuapi_DsGetMemberships2Request1_get_num_req,
   32934             :                 .set = py_drsuapi_DsGetMemberships2Request1_set_num_req,
   32935             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   32936             :         },
   32937             :         {
   32938             :                 .name = discard_const_p(char, "req_array"),
   32939             :                 .get = py_drsuapi_DsGetMemberships2Request1_get_req_array,
   32940             :                 .set = py_drsuapi_DsGetMemberships2Request1_set_req_array,
   32941             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMembershipsRequest1")
   32942             :         },
   32943             :         { .name = NULL }
   32944             : };
   32945             : 
   32946           0 : static PyObject *py_drsuapi_DsGetMemberships2Request1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   32947             : {
   32948           0 :         return pytalloc_new(struct drsuapi_DsGetMemberships2Request1, type);
   32949             : }
   32950             : 
   32951             : 
   32952             : static PyTypeObject drsuapi_DsGetMemberships2Request1_Type = {
   32953             :         PyVarObject_HEAD_INIT(NULL, 0)
   32954             :         .tp_name = "drsuapi.DsGetMemberships2Request1",
   32955             :         .tp_getset = py_drsuapi_DsGetMemberships2Request1_getsetters,
   32956             :         .tp_methods = NULL,
   32957             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   32958             :         .tp_new = py_drsuapi_DsGetMemberships2Request1_new,
   32959             : };
   32960             : 
   32961           0 : static PyObject *py_import_drsuapi_DsGetMemberships2Request(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMemberships2Request *in)
   32962             : {
   32963           0 :         PyObject *ret;
   32964             : 
   32965           0 :         switch (level) {
   32966           0 :                 case 1:
   32967           0 :                         ret = pytalloc_reference_ex(&drsuapi_DsGetMemberships2Request1_Type, mem_ctx, &in->req1);
   32968           0 :                         return ret;
   32969             : 
   32970             :         }
   32971           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   32972           0 :         return NULL;
   32973             : }
   32974             : 
   32975           0 : static union drsuapi_DsGetMemberships2Request *py_export_drsuapi_DsGetMemberships2Request(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   32976             : {
   32977           0 :         union drsuapi_DsGetMemberships2Request *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Request);
   32978           0 :         switch (level) {
   32979           0 :                 case 1:
   32980           0 :                         if (in == NULL) {
   32981           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   32982           0 :                                 talloc_free(ret); return NULL;
   32983             :                         }
   32984           0 :                         PY_CHECK_TYPE(&drsuapi_DsGetMemberships2Request1_Type, in, talloc_free(ret); return NULL;);
   32985           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   32986           0 :                                 PyErr_NoMemory();
   32987           0 :                                 talloc_free(ret); return NULL;
   32988             :                         }
   32989           0 :                         ret->req1 = *(struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(in);
   32990           0 :                         break;
   32991             : 
   32992           0 :                 default:
   32993           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   32994           0 :                         talloc_free(ret);
   32995           0 :                         ret = NULL;
   32996             :         }
   32997             : 
   32998           0 :         return ret;
   32999             : }
   33000             : 
   33001           0 : static PyObject *py_drsuapi_DsGetMemberships2Request_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33002             : {
   33003           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   33004           0 :         PyObject *mem_ctx_obj = NULL;
   33005           0 :         TALLOC_CTX *mem_ctx = NULL;
   33006           0 :         int level = 0;
   33007           0 :         PyObject *in_obj = NULL;
   33008           0 :         union drsuapi_DsGetMemberships2Request *in = NULL;
   33009             : 
   33010           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   33011             :                 discard_const_p(char *, kwnames),
   33012             :                 &mem_ctx_obj,
   33013             :                 &level,
   33014             :                 &in_obj)) {
   33015           0 :                 return NULL;
   33016             :         }
   33017           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   33018           0 :         if (mem_ctx == NULL) {
   33019           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   33020           0 :                 return NULL;
   33021             :         }
   33022           0 :         in = (union drsuapi_DsGetMemberships2Request *)pytalloc_get_ptr(in_obj);
   33023           0 :         if (in == NULL) {
   33024           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetMemberships2Request!");
   33025           0 :                 return NULL;
   33026             :         }
   33027             : 
   33028           0 :         return py_import_drsuapi_DsGetMemberships2Request(mem_ctx, level, in);
   33029             : }
   33030             : 
   33031           0 : static PyObject *py_drsuapi_DsGetMemberships2Request_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33032             : {
   33033           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   33034           0 :         PyObject *mem_ctx_obj = NULL;
   33035           0 :         TALLOC_CTX *mem_ctx = NULL;
   33036           0 :         int level = 0;
   33037           0 :         PyObject *in = NULL;
   33038           0 :         union drsuapi_DsGetMemberships2Request *out = NULL;
   33039             : 
   33040           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   33041             :                 discard_const_p(char *, kwnames),
   33042             :                 &mem_ctx_obj,
   33043             :                 &level,
   33044             :                 &in)) {
   33045           0 :                 return NULL;
   33046             :         }
   33047           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   33048           0 :         if (mem_ctx == NULL) {
   33049           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   33050           0 :                 return NULL;
   33051             :         }
   33052             : 
   33053           0 :         out = py_export_drsuapi_DsGetMemberships2Request(mem_ctx, level, in);
   33054           0 :         if (out == NULL) {
   33055           0 :                 return NULL;
   33056             :         }
   33057             : 
   33058           0 :         return pytalloc_GenericObject_reference(out);
   33059             : }
   33060             : 
   33061             : static PyMethodDef py_drsuapi_DsGetMemberships2Request_methods[] = {
   33062             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2Request_import),
   33063             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   33064             :                 "T.__import__(mem_ctx, level, in) => ret." },
   33065             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2Request_export),
   33066             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   33067             :                 "T.__export__(mem_ctx, level, in) => ret." },
   33068             :         { NULL, NULL, 0, NULL }
   33069             : };
   33070             : 
   33071           0 : static PyObject *py_drsuapi_DsGetMemberships2Request_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33072             : {
   33073           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   33074           0 :         return NULL;
   33075             : }
   33076             : 
   33077             : 
   33078             : static PyTypeObject drsuapi_DsGetMemberships2Request_Type = {
   33079             :         PyVarObject_HEAD_INIT(NULL, 0)
   33080             :         .tp_name = "drsuapi.DsGetMemberships2Request",
   33081             :         .tp_getset = NULL,
   33082             :         .tp_methods = py_drsuapi_DsGetMemberships2Request_methods,
   33083             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33084             :         .tp_new = py_drsuapi_DsGetMemberships2Request_new,
   33085             : };
   33086             : 
   33087             : 
   33088           0 : static PyObject *py_drsuapi_DsSiteCostInfo_get_error_code(PyObject *obj, void *closure)
   33089             : {
   33090           0 :         struct drsuapi_DsSiteCostInfo *object = pytalloc_get_ptr(obj);
   33091           0 :         PyObject *py_error_code;
   33092           0 :         py_error_code = PyErr_FromWERROR(object->error_code);
   33093           0 :         return py_error_code;
   33094             : }
   33095             : 
   33096           0 : static int py_drsuapi_DsSiteCostInfo_set_error_code(PyObject *py_obj, PyObject *value, void *closure)
   33097             : {
   33098           0 :         struct drsuapi_DsSiteCostInfo *object = pytalloc_get_ptr(py_obj);
   33099           0 :         if (value == NULL) {
   33100           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->error_code");
   33101           0 :                 return -1;
   33102             :         }
   33103           0 :         object->error_code = W_ERROR(PyLong_AsLong(value));
   33104           0 :         return 0;
   33105             : }
   33106             : 
   33107           0 : static PyObject *py_drsuapi_DsSiteCostInfo_get_site_cost(PyObject *obj, void *closure)
   33108             : {
   33109           0 :         struct drsuapi_DsSiteCostInfo *object = pytalloc_get_ptr(obj);
   33110           0 :         PyObject *py_site_cost;
   33111           0 :         py_site_cost = PyLong_FromUnsignedLongLong((uint32_t)(object->site_cost));
   33112           0 :         return py_site_cost;
   33113             : }
   33114             : 
   33115           0 : static int py_drsuapi_DsSiteCostInfo_set_site_cost(PyObject *py_obj, PyObject *value, void *closure)
   33116             : {
   33117           0 :         struct drsuapi_DsSiteCostInfo *object = pytalloc_get_ptr(py_obj);
   33118           0 :         if (value == NULL) {
   33119           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_cost");
   33120           0 :                 return -1;
   33121             :         }
   33122             :         {
   33123           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->site_cost));
   33124           0 :                 if (PyLong_Check(value)) {
   33125           0 :                         unsigned long long test_var;
   33126           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33127           0 :                         if (PyErr_Occurred() != NULL) {
   33128           0 :                                 return -1;
   33129             :                         }
   33130           0 :                         if (test_var > uint_max) {
   33131           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33132             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33133           0 :                                 return -1;
   33134             :                         }
   33135           0 :                         object->site_cost = test_var;
   33136             :                 } else {
   33137           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33138             :                           PyLong_Type.tp_name);
   33139           0 :                         return -1;
   33140             :                 }
   33141             :         }
   33142           0 :         return 0;
   33143             : }
   33144             : 
   33145             : static PyGetSetDef py_drsuapi_DsSiteCostInfo_getsetters[] = {
   33146             :         {
   33147             :                 .name = discard_const_p(char, "error_code"),
   33148             :                 .get = py_drsuapi_DsSiteCostInfo_get_error_code,
   33149             :                 .set = py_drsuapi_DsSiteCostInfo_set_error_code,
   33150             :                 .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
   33151             :         },
   33152             :         {
   33153             :                 .name = discard_const_p(char, "site_cost"),
   33154             :                 .get = py_drsuapi_DsSiteCostInfo_get_site_cost,
   33155             :                 .set = py_drsuapi_DsSiteCostInfo_set_site_cost,
   33156             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33157             :         },
   33158             :         { .name = NULL }
   33159             : };
   33160             : 
   33161           0 : static PyObject *py_drsuapi_DsSiteCostInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33162             : {
   33163           0 :         return pytalloc_new(struct drsuapi_DsSiteCostInfo, type);
   33164             : }
   33165             : 
   33166             : 
   33167             : static PyTypeObject drsuapi_DsSiteCostInfo_Type = {
   33168             :         PyVarObject_HEAD_INIT(NULL, 0)
   33169             :         .tp_name = "drsuapi.DsSiteCostInfo",
   33170             :         .tp_getset = py_drsuapi_DsSiteCostInfo_getsetters,
   33171             :         .tp_methods = NULL,
   33172             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33173             :         .tp_new = py_drsuapi_DsSiteCostInfo_new,
   33174             : };
   33175             : 
   33176             : 
   33177           0 : static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_num_info(PyObject *obj, void *closure)
   33178             : {
   33179           0 :         struct drsuapi_QuerySitesByCostCtr1 *object = pytalloc_get_ptr(obj);
   33180           0 :         PyObject *py_num_info;
   33181           0 :         py_num_info = PyLong_FromUnsignedLongLong((uint32_t)(object->num_info));
   33182           0 :         return py_num_info;
   33183             : }
   33184             : 
   33185           0 : static int py_drsuapi_QuerySitesByCostCtr1_set_num_info(PyObject *py_obj, PyObject *value, void *closure)
   33186             : {
   33187           0 :         struct drsuapi_QuerySitesByCostCtr1 *object = pytalloc_get_ptr(py_obj);
   33188           0 :         if (value == NULL) {
   33189           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_info");
   33190           0 :                 return -1;
   33191             :         }
   33192             :         {
   33193           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_info));
   33194           0 :                 if (PyLong_Check(value)) {
   33195           0 :                         unsigned long long test_var;
   33196           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33197           0 :                         if (PyErr_Occurred() != NULL) {
   33198           0 :                                 return -1;
   33199             :                         }
   33200           0 :                         if (test_var > uint_max) {
   33201           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33202             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33203           0 :                                 return -1;
   33204             :                         }
   33205           0 :                         object->num_info = test_var;
   33206             :                 } else {
   33207           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33208             :                           PyLong_Type.tp_name);
   33209           0 :                         return -1;
   33210             :                 }
   33211             :         }
   33212           0 :         return 0;
   33213             : }
   33214             : 
   33215           0 : static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_info(PyObject *obj, void *closure)
   33216             : {
   33217           0 :         struct drsuapi_QuerySitesByCostCtr1 *object = pytalloc_get_ptr(obj);
   33218           0 :         PyObject *py_info;
   33219           0 :         if (object->info == NULL) {
   33220           0 :                 Py_RETURN_NONE;
   33221             :         }
   33222           0 :         if (object->info == NULL) {
   33223           0 :                 py_info = Py_None;
   33224           0 :                 Py_INCREF(py_info);
   33225             :         } else {
   33226           0 :                 py_info = PyList_New(object->num_info);
   33227           0 :                 if (py_info == NULL) {
   33228           0 :                         return NULL;
   33229             :                 }
   33230             :                 {
   33231             :                         int info_cntr_1;
   33232           0 :                         for (info_cntr_1 = 0; info_cntr_1 < (object->num_info); info_cntr_1++) {
   33233           0 :                                 PyObject *py_info_1;
   33234           0 :                                 py_info_1 = pytalloc_reference_ex(&drsuapi_DsSiteCostInfo_Type, object->info, &(object->info)[info_cntr_1]);
   33235           0 :                                 PyList_SetItem(py_info, info_cntr_1, py_info_1);
   33236             :                         }
   33237             :                 }
   33238             :         }
   33239           0 :         return py_info;
   33240             : }
   33241             : 
   33242           0 : static int py_drsuapi_QuerySitesByCostCtr1_set_info(PyObject *py_obj, PyObject *value, void *closure)
   33243             : {
   33244           0 :         struct drsuapi_QuerySitesByCostCtr1 *object = pytalloc_get_ptr(py_obj);
   33245           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
   33246           0 :         if (value == NULL) {
   33247           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
   33248           0 :                 return -1;
   33249             :         }
   33250           0 :         if (value == Py_None) {
   33251           0 :                 object->info = NULL;
   33252             :         } else {
   33253           0 :                 object->info = NULL;
   33254           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   33255             :                 {
   33256           0 :                         int info_cntr_1;
   33257           0 :                         object->info = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info, PyList_GET_SIZE(value));
   33258           0 :                         if (!object->info) { return -1; }
   33259           0 :                         talloc_set_name_const(object->info, "ARRAY: object->info");
   33260           0 :                         for (info_cntr_1 = 0; info_cntr_1 < PyList_GET_SIZE(value); info_cntr_1++) {
   33261           0 :                                 if (PyList_GET_ITEM(value, info_cntr_1) == NULL) {
   33262           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->info)[info_cntr_1]");
   33263           0 :                                         return -1;
   33264             :                                 }
   33265           0 :                                 PY_CHECK_TYPE(&drsuapi_DsSiteCostInfo_Type, PyList_GET_ITEM(value, info_cntr_1), return -1;);
   33266           0 :                                 if (talloc_reference(object->info, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_cntr_1))) == NULL) {
   33267           0 :                                         PyErr_NoMemory();
   33268           0 :                                         return -1;
   33269             :                                 }
   33270           0 :                                 (object->info)[info_cntr_1] = *(struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_cntr_1));
   33271             :                         }
   33272             :                 }
   33273             :         }
   33274           0 :         return 0;
   33275             : }
   33276             : 
   33277           0 : static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_flags_reserved(PyObject *obj, void *closure)
   33278             : {
   33279           0 :         struct drsuapi_QuerySitesByCostCtr1 *object = pytalloc_get_ptr(obj);
   33280           0 :         PyObject *py_flags_reserved;
   33281           0 :         py_flags_reserved = PyLong_FromUnsignedLongLong((uint32_t)(object->flags_reserved));
   33282           0 :         return py_flags_reserved;
   33283             : }
   33284             : 
   33285           0 : static int py_drsuapi_QuerySitesByCostCtr1_set_flags_reserved(PyObject *py_obj, PyObject *value, void *closure)
   33286             : {
   33287           0 :         struct drsuapi_QuerySitesByCostCtr1 *object = pytalloc_get_ptr(py_obj);
   33288           0 :         if (value == NULL) {
   33289           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags_reserved");
   33290           0 :                 return -1;
   33291             :         }
   33292             :         {
   33293           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags_reserved));
   33294           0 :                 if (PyLong_Check(value)) {
   33295           0 :                         unsigned long long test_var;
   33296           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33297           0 :                         if (PyErr_Occurred() != NULL) {
   33298           0 :                                 return -1;
   33299             :                         }
   33300           0 :                         if (test_var > uint_max) {
   33301           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33302             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33303           0 :                                 return -1;
   33304             :                         }
   33305           0 :                         object->flags_reserved = test_var;
   33306             :                 } else {
   33307           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33308             :                           PyLong_Type.tp_name);
   33309           0 :                         return -1;
   33310             :                 }
   33311             :         }
   33312           0 :         return 0;
   33313             : }
   33314             : 
   33315             : static PyGetSetDef py_drsuapi_QuerySitesByCostCtr1_getsetters[] = {
   33316             :         {
   33317             :                 .name = discard_const_p(char, "num_info"),
   33318             :                 .get = py_drsuapi_QuerySitesByCostCtr1_get_num_info,
   33319             :                 .set = py_drsuapi_QuerySitesByCostCtr1_set_num_info,
   33320             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33321             :         },
   33322             :         {
   33323             :                 .name = discard_const_p(char, "info"),
   33324             :                 .get = py_drsuapi_QuerySitesByCostCtr1_get_info,
   33325             :                 .set = py_drsuapi_QuerySitesByCostCtr1_set_info,
   33326             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsSiteCostInfo")
   33327             :         },
   33328             :         {
   33329             :                 .name = discard_const_p(char, "flags_reserved"),
   33330             :                 .get = py_drsuapi_QuerySitesByCostCtr1_get_flags_reserved,
   33331             :                 .set = py_drsuapi_QuerySitesByCostCtr1_set_flags_reserved,
   33332             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33333             :         },
   33334             :         { .name = NULL }
   33335             : };
   33336             : 
   33337           0 : static PyObject *py_drsuapi_QuerySitesByCostCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33338             : {
   33339           0 :         return pytalloc_new(struct drsuapi_QuerySitesByCostCtr1, type);
   33340             : }
   33341             : 
   33342             : 
   33343             : static PyTypeObject drsuapi_QuerySitesByCostCtr1_Type = {
   33344             :         PyVarObject_HEAD_INIT(NULL, 0)
   33345             :         .tp_name = "drsuapi.QuerySitesByCostCtr1",
   33346             :         .tp_getset = py_drsuapi_QuerySitesByCostCtr1_getsetters,
   33347             :         .tp_methods = NULL,
   33348             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33349             :         .tp_new = py_drsuapi_QuerySitesByCostCtr1_new,
   33350             : };
   33351             : 
   33352           0 : static PyObject *py_import_drsuapi_QuerySitesByCostCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_QuerySitesByCostCtr *in)
   33353             : {
   33354           0 :         PyObject *ret;
   33355             : 
   33356           0 :         switch (level) {
   33357           0 :                 case 1:
   33358           0 :                         ret = pytalloc_reference_ex(&drsuapi_QuerySitesByCostCtr1_Type, mem_ctx, &in->ctr1);
   33359           0 :                         return ret;
   33360             : 
   33361             :         }
   33362           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   33363           0 :         return NULL;
   33364             : }
   33365             : 
   33366           0 : static union drsuapi_QuerySitesByCostCtr *py_export_drsuapi_QuerySitesByCostCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   33367             : {
   33368           0 :         union drsuapi_QuerySitesByCostCtr *ret = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostCtr);
   33369           0 :         switch (level) {
   33370           0 :                 case 1:
   33371           0 :                         if (in == NULL) {
   33372           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
   33373           0 :                                 talloc_free(ret); return NULL;
   33374             :                         }
   33375           0 :                         PY_CHECK_TYPE(&drsuapi_QuerySitesByCostCtr1_Type, in, talloc_free(ret); return NULL;);
   33376           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   33377           0 :                                 PyErr_NoMemory();
   33378           0 :                                 talloc_free(ret); return NULL;
   33379             :                         }
   33380           0 :                         ret->ctr1 = *(struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(in);
   33381           0 :                         break;
   33382             : 
   33383           0 :                 default:
   33384           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   33385           0 :                         talloc_free(ret);
   33386           0 :                         ret = NULL;
   33387             :         }
   33388             : 
   33389           0 :         return ret;
   33390             : }
   33391             : 
   33392           0 : static PyObject *py_drsuapi_QuerySitesByCostCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33393             : {
   33394           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   33395           0 :         PyObject *mem_ctx_obj = NULL;
   33396           0 :         TALLOC_CTX *mem_ctx = NULL;
   33397           0 :         int level = 0;
   33398           0 :         PyObject *in_obj = NULL;
   33399           0 :         union drsuapi_QuerySitesByCostCtr *in = NULL;
   33400             : 
   33401           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   33402             :                 discard_const_p(char *, kwnames),
   33403             :                 &mem_ctx_obj,
   33404             :                 &level,
   33405             :                 &in_obj)) {
   33406           0 :                 return NULL;
   33407             :         }
   33408           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   33409           0 :         if (mem_ctx == NULL) {
   33410           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   33411           0 :                 return NULL;
   33412             :         }
   33413           0 :         in = (union drsuapi_QuerySitesByCostCtr *)pytalloc_get_ptr(in_obj);
   33414           0 :         if (in == NULL) {
   33415           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_QuerySitesByCostCtr!");
   33416           0 :                 return NULL;
   33417             :         }
   33418             : 
   33419           0 :         return py_import_drsuapi_QuerySitesByCostCtr(mem_ctx, level, in);
   33420             : }
   33421             : 
   33422           0 : static PyObject *py_drsuapi_QuerySitesByCostCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33423             : {
   33424           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   33425           0 :         PyObject *mem_ctx_obj = NULL;
   33426           0 :         TALLOC_CTX *mem_ctx = NULL;
   33427           0 :         int level = 0;
   33428           0 :         PyObject *in = NULL;
   33429           0 :         union drsuapi_QuerySitesByCostCtr *out = NULL;
   33430             : 
   33431           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   33432             :                 discard_const_p(char *, kwnames),
   33433             :                 &mem_ctx_obj,
   33434             :                 &level,
   33435             :                 &in)) {
   33436           0 :                 return NULL;
   33437             :         }
   33438           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   33439           0 :         if (mem_ctx == NULL) {
   33440           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   33441           0 :                 return NULL;
   33442             :         }
   33443             : 
   33444           0 :         out = py_export_drsuapi_QuerySitesByCostCtr(mem_ctx, level, in);
   33445           0 :         if (out == NULL) {
   33446           0 :                 return NULL;
   33447             :         }
   33448             : 
   33449           0 :         return pytalloc_GenericObject_reference(out);
   33450             : }
   33451             : 
   33452             : static PyMethodDef py_drsuapi_QuerySitesByCostCtr_methods[] = {
   33453             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCostCtr_import),
   33454             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   33455             :                 "T.__import__(mem_ctx, level, in) => ret." },
   33456             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCostCtr_export),
   33457             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   33458             :                 "T.__export__(mem_ctx, level, in) => ret." },
   33459             :         { NULL, NULL, 0, NULL }
   33460             : };
   33461             : 
   33462           0 : static PyObject *py_drsuapi_QuerySitesByCostCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33463             : {
   33464           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   33465           0 :         return NULL;
   33466             : }
   33467             : 
   33468             : 
   33469             : static PyTypeObject drsuapi_QuerySitesByCostCtr_Type = {
   33470             :         PyVarObject_HEAD_INIT(NULL, 0)
   33471             :         .tp_name = "drsuapi.QuerySitesByCostCtr",
   33472             :         .tp_getset = NULL,
   33473             :         .tp_methods = py_drsuapi_QuerySitesByCostCtr_methods,
   33474             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33475             :         .tp_new = py_drsuapi_QuerySitesByCostCtr_new,
   33476             : };
   33477             : 
   33478             : 
   33479           0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_site_from(PyObject *obj, void *closure)
   33480             : {
   33481           0 :         struct drsuapi_QuerySitesByCostRequest1 *object = pytalloc_get_ptr(obj);
   33482           0 :         PyObject *py_site_from;
   33483           0 :         if (object->site_from == NULL) {
   33484           0 :                 Py_RETURN_NONE;
   33485             :         }
   33486           0 :         if (object->site_from == NULL) {
   33487           0 :                 py_site_from = Py_None;
   33488           0 :                 Py_INCREF(py_site_from);
   33489             :         } else {
   33490           0 :                 if (object->site_from == NULL) {
   33491           0 :                         py_site_from = Py_None;
   33492           0 :                         Py_INCREF(py_site_from);
   33493             :                 } else {
   33494           0 :                         py_site_from = PyUnicode_Decode(object->site_from, strlen(object->site_from), "utf-8", "ignore");
   33495             :                 }
   33496             :         }
   33497           0 :         return py_site_from;
   33498             : }
   33499             : 
   33500           0 : static int py_drsuapi_QuerySitesByCostRequest1_set_site_from(PyObject *py_obj, PyObject *value, void *closure)
   33501             : {
   33502           0 :         struct drsuapi_QuerySitesByCostRequest1 *object = pytalloc_get_ptr(py_obj);
   33503           0 :         if (value == NULL) {
   33504           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_from");
   33505           0 :                 return -1;
   33506             :         }
   33507           0 :         if (value == Py_None) {
   33508           0 :                 object->site_from = NULL;
   33509             :         } else {
   33510           0 :                 object->site_from = NULL;
   33511             :                 {
   33512           0 :                         const char *test_str;
   33513           0 :                         const char *talloc_str;
   33514           0 :                         PyObject *unicode = NULL;
   33515           0 :                         if (PyUnicode_Check(value)) {
   33516           0 :                                 unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
   33517           0 :                                 if (unicode == NULL) {
   33518           0 :                                         return -1;
   33519             :                                 }
   33520           0 :                                 test_str = PyBytes_AS_STRING(unicode);
   33521           0 :                         } else if (PyBytes_Check(value)) {
   33522           0 :                                 test_str = PyBytes_AS_STRING(value);
   33523             :                         } else {
   33524           0 :                                 PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
   33525           0 :                                 return -1;
   33526             :                         }
   33527           0 :                         talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
   33528           0 :                         if (unicode != NULL) {
   33529           0 :                                 Py_DECREF(unicode);
   33530             :                         }
   33531           0 :                         if (talloc_str == NULL) {
   33532           0 :                                 PyErr_NoMemory();
   33533           0 :                                 return -1;
   33534             :                         }
   33535           0 :                         object->site_from = talloc_str;
   33536             :                 }
   33537             :         }
   33538           0 :         return 0;
   33539             : }
   33540             : 
   33541           0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_num_req(PyObject *obj, void *closure)
   33542             : {
   33543           0 :         struct drsuapi_QuerySitesByCostRequest1 *object = pytalloc_get_ptr(obj);
   33544           0 :         PyObject *py_num_req;
   33545           0 :         py_num_req = PyLong_FromUnsignedLongLong((uint32_t)(object->num_req));
   33546           0 :         return py_num_req;
   33547             : }
   33548             : 
   33549           0 : static int py_drsuapi_QuerySitesByCostRequest1_set_num_req(PyObject *py_obj, PyObject *value, void *closure)
   33550             : {
   33551           0 :         struct drsuapi_QuerySitesByCostRequest1 *object = pytalloc_get_ptr(py_obj);
   33552           0 :         if (value == NULL) {
   33553           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_req");
   33554           0 :                 return -1;
   33555             :         }
   33556             :         {
   33557           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_req));
   33558           0 :                 if (PyLong_Check(value)) {
   33559           0 :                         unsigned long long test_var;
   33560           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33561           0 :                         if (PyErr_Occurred() != NULL) {
   33562           0 :                                 return -1;
   33563             :                         }
   33564           0 :                         if (test_var > uint_max) {
   33565           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33566             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33567           0 :                                 return -1;
   33568             :                         }
   33569           0 :                         object->num_req = test_var;
   33570             :                 } else {
   33571           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33572             :                           PyLong_Type.tp_name);
   33573           0 :                         return -1;
   33574             :                 }
   33575             :         }
   33576           0 :         return 0;
   33577             : }
   33578             : 
   33579           0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_site_to(PyObject *obj, void *closure)
   33580             : {
   33581           0 :         struct drsuapi_QuerySitesByCostRequest1 *object = pytalloc_get_ptr(obj);
   33582           0 :         PyObject *py_site_to;
   33583           0 :         if (object->site_to == NULL) {
   33584           0 :                 Py_RETURN_NONE;
   33585             :         }
   33586           0 :         if (object->site_to == NULL) {
   33587           0 :                 py_site_to = Py_None;
   33588           0 :                 Py_INCREF(py_site_to);
   33589             :         } else {
   33590           0 :                 py_site_to = PyList_New(object->num_req);
   33591           0 :                 if (py_site_to == NULL) {
   33592           0 :                         return NULL;
   33593             :                 }
   33594             :                 {
   33595             :                         int site_to_cntr_1;
   33596           0 :                         for (site_to_cntr_1 = 0; site_to_cntr_1 < (object->num_req); site_to_cntr_1++) {
   33597           0 :                                 PyObject *py_site_to_1;
   33598           0 :                                 if ((object->site_to)[site_to_cntr_1] == NULL) {
   33599           0 :                                         py_site_to_1 = Py_None;
   33600           0 :                                         Py_INCREF(py_site_to_1);
   33601             :                                 } else {
   33602           0 :                                         if ((object->site_to)[site_to_cntr_1] == NULL) {
   33603           0 :                                                 py_site_to_1 = Py_None;
   33604           0 :                                                 Py_INCREF(py_site_to_1);
   33605             :                                         } else {
   33606           0 :                                                 py_site_to_1 = PyUnicode_Decode((object->site_to)[site_to_cntr_1], strlen((object->site_to)[site_to_cntr_1]), "utf-8", "ignore");
   33607             :                                         }
   33608             :                                 }
   33609           0 :                                 PyList_SetItem(py_site_to, site_to_cntr_1, py_site_to_1);
   33610             :                         }
   33611             :                 }
   33612             :         }
   33613           0 :         return py_site_to;
   33614             : }
   33615             : 
   33616           0 : static int py_drsuapi_QuerySitesByCostRequest1_set_site_to(PyObject *py_obj, PyObject *value, void *closure)
   33617             : {
   33618           0 :         struct drsuapi_QuerySitesByCostRequest1 *object = pytalloc_get_ptr(py_obj);
   33619           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->site_to));
   33620           0 :         if (value == NULL) {
   33621           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_to");
   33622           0 :                 return -1;
   33623             :         }
   33624           0 :         if (value == Py_None) {
   33625           0 :                 object->site_to = NULL;
   33626             :         } else {
   33627           0 :                 object->site_to = NULL;
   33628           0 :                 PY_CHECK_TYPE(&PyList_Type, value, return -1;);
   33629             :                 {
   33630           0 :                         int site_to_cntr_1;
   33631           0 :                         object->site_to = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->site_to, PyList_GET_SIZE(value));
   33632           0 :                         if (!object->site_to) { return -1; }
   33633           0 :                         talloc_set_name_const(object->site_to, "ARRAY: object->site_to");
   33634           0 :                         for (site_to_cntr_1 = 0; site_to_cntr_1 < PyList_GET_SIZE(value); site_to_cntr_1++) {
   33635           0 :                                 if (PyList_GET_ITEM(value, site_to_cntr_1) == NULL) {
   33636           0 :                                         PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct (object->site_to)[site_to_cntr_1]");
   33637           0 :                                         return -1;
   33638             :                                 }
   33639           0 :                                 if (PyList_GET_ITEM(value, site_to_cntr_1) == Py_None) {
   33640           0 :                                         (object->site_to)[site_to_cntr_1] = NULL;
   33641             :                                 } else {
   33642           0 :                                         (object->site_to)[site_to_cntr_1] = NULL;
   33643             :                                         {
   33644           0 :                                                 const char *test_str;
   33645           0 :                                                 const char *talloc_str;
   33646           0 :                                                 PyObject *unicode = NULL;
   33647           0 :                                                 if (PyUnicode_Check(PyList_GET_ITEM(value, site_to_cntr_1))) {
   33648           0 :                                                         unicode = PyUnicode_AsEncodedString(PyList_GET_ITEM(value, site_to_cntr_1), "utf-8", "ignore");
   33649           0 :                                                         if (unicode == NULL) {
   33650           0 :                                                                 return -1;
   33651             :                                                         }
   33652           0 :                                                         test_str = PyBytes_AS_STRING(unicode);
   33653           0 :                                                 } else if (PyBytes_Check(PyList_GET_ITEM(value, site_to_cntr_1))) {
   33654           0 :                                                         test_str = PyBytes_AS_STRING(PyList_GET_ITEM(value, site_to_cntr_1));
   33655             :                                                 } else {
   33656           0 :                                                         PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(PyList_GET_ITEM(value, site_to_cntr_1))->tp_name);
   33657           0 :                                                         return -1;
   33658             :                                                 }
   33659           0 :                                                 talloc_str = talloc_strdup(object->site_to, test_str);
   33660           0 :                                                 if (unicode != NULL) {
   33661           0 :                                                         Py_DECREF(unicode);
   33662             :                                                 }
   33663           0 :                                                 if (talloc_str == NULL) {
   33664           0 :                                                         PyErr_NoMemory();
   33665           0 :                                                         return -1;
   33666             :                                                 }
   33667           0 :                                                 (object->site_to)[site_to_cntr_1] = talloc_str;
   33668             :                                         }
   33669             :                                 }
   33670             :                         }
   33671             :                 }
   33672             :         }
   33673           0 :         return 0;
   33674             : }
   33675             : 
   33676           0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_flags(PyObject *obj, void *closure)
   33677             : {
   33678           0 :         struct drsuapi_QuerySitesByCostRequest1 *object = pytalloc_get_ptr(obj);
   33679           0 :         PyObject *py_flags;
   33680           0 :         py_flags = PyLong_FromUnsignedLongLong((uint32_t)(object->flags));
   33681           0 :         return py_flags;
   33682             : }
   33683             : 
   33684           0 : static int py_drsuapi_QuerySitesByCostRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
   33685             : {
   33686           0 :         struct drsuapi_QuerySitesByCostRequest1 *object = pytalloc_get_ptr(py_obj);
   33687           0 :         if (value == NULL) {
   33688           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
   33689           0 :                 return -1;
   33690             :         }
   33691             :         {
   33692           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
   33693           0 :                 if (PyLong_Check(value)) {
   33694           0 :                         unsigned long long test_var;
   33695           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   33696           0 :                         if (PyErr_Occurred() != NULL) {
   33697           0 :                                 return -1;
   33698             :                         }
   33699           0 :                         if (test_var > uint_max) {
   33700           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   33701             :                                   PyLong_Type.tp_name, uint_max, test_var);
   33702           0 :                                 return -1;
   33703             :                         }
   33704           0 :                         object->flags = test_var;
   33705             :                 } else {
   33706           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   33707             :                           PyLong_Type.tp_name);
   33708           0 :                         return -1;
   33709             :                 }
   33710             :         }
   33711           0 :         return 0;
   33712             : }
   33713             : 
   33714             : static PyGetSetDef py_drsuapi_QuerySitesByCostRequest1_getsetters[] = {
   33715             :         {
   33716             :                 .name = discard_const_p(char, "site_from"),
   33717             :                 .get = py_drsuapi_QuerySitesByCostRequest1_get_site_from,
   33718             :                 .set = py_drsuapi_QuerySitesByCostRequest1_set_site_from,
   33719             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33720             :         },
   33721             :         {
   33722             :                 .name = discard_const_p(char, "num_req"),
   33723             :                 .get = py_drsuapi_QuerySitesByCostRequest1_get_num_req,
   33724             :                 .set = py_drsuapi_QuerySitesByCostRequest1_set_num_req,
   33725             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33726             :         },
   33727             :         {
   33728             :                 .name = discard_const_p(char, "site_to"),
   33729             :                 .get = py_drsuapi_QuerySitesByCostRequest1_get_site_to,
   33730             :                 .set = py_drsuapi_QuerySitesByCostRequest1_set_site_to,
   33731             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
   33732             :         },
   33733             :         {
   33734             :                 .name = discard_const_p(char, "flags"),
   33735             :                 .get = py_drsuapi_QuerySitesByCostRequest1_get_flags,
   33736             :                 .set = py_drsuapi_QuerySitesByCostRequest1_set_flags,
   33737             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   33738             :         },
   33739             :         { .name = NULL }
   33740             : };
   33741             : 
   33742           0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33743             : {
   33744           0 :         return pytalloc_new(struct drsuapi_QuerySitesByCostRequest1, type);
   33745             : }
   33746             : 
   33747             : 
   33748             : static PyTypeObject drsuapi_QuerySitesByCostRequest1_Type = {
   33749             :         PyVarObject_HEAD_INIT(NULL, 0)
   33750             :         .tp_name = "drsuapi.QuerySitesByCostRequest1",
   33751             :         .tp_getset = py_drsuapi_QuerySitesByCostRequest1_getsetters,
   33752             :         .tp_methods = NULL,
   33753             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33754             :         .tp_new = py_drsuapi_QuerySitesByCostRequest1_new,
   33755             : };
   33756             : 
   33757           0 : static PyObject *py_import_drsuapi_QuerySitesByCostRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_QuerySitesByCostRequest *in)
   33758             : {
   33759           0 :         PyObject *ret;
   33760             : 
   33761           0 :         switch (level) {
   33762           0 :                 case 1:
   33763           0 :                         ret = pytalloc_reference_ex(&drsuapi_QuerySitesByCostRequest1_Type, mem_ctx, &in->req1);
   33764           0 :                         return ret;
   33765             : 
   33766             :         }
   33767           0 :         PyErr_SetString(PyExc_TypeError, "unknown union level");
   33768           0 :         return NULL;
   33769             : }
   33770             : 
   33771           0 : static union drsuapi_QuerySitesByCostRequest *py_export_drsuapi_QuerySitesByCostRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
   33772             : {
   33773           0 :         union drsuapi_QuerySitesByCostRequest *ret = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostRequest);
   33774           0 :         switch (level) {
   33775           0 :                 case 1:
   33776           0 :                         if (in == NULL) {
   33777           0 :                                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
   33778           0 :                                 talloc_free(ret); return NULL;
   33779             :                         }
   33780           0 :                         PY_CHECK_TYPE(&drsuapi_QuerySitesByCostRequest1_Type, in, talloc_free(ret); return NULL;);
   33781           0 :                         if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
   33782           0 :                                 PyErr_NoMemory();
   33783           0 :                                 talloc_free(ret); return NULL;
   33784             :                         }
   33785           0 :                         ret->req1 = *(struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(in);
   33786           0 :                         break;
   33787             : 
   33788           0 :                 default:
   33789           0 :                         PyErr_SetString(PyExc_TypeError, "invalid union level value");
   33790           0 :                         talloc_free(ret);
   33791           0 :                         ret = NULL;
   33792             :         }
   33793             : 
   33794           0 :         return ret;
   33795             : }
   33796             : 
   33797           0 : static PyObject *py_drsuapi_QuerySitesByCostRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33798             : {
   33799           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   33800           0 :         PyObject *mem_ctx_obj = NULL;
   33801           0 :         TALLOC_CTX *mem_ctx = NULL;
   33802           0 :         int level = 0;
   33803           0 :         PyObject *in_obj = NULL;
   33804           0 :         union drsuapi_QuerySitesByCostRequest *in = NULL;
   33805             : 
   33806           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
   33807             :                 discard_const_p(char *, kwnames),
   33808             :                 &mem_ctx_obj,
   33809             :                 &level,
   33810             :                 &in_obj)) {
   33811           0 :                 return NULL;
   33812             :         }
   33813           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   33814           0 :         if (mem_ctx == NULL) {
   33815           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   33816           0 :                 return NULL;
   33817             :         }
   33818           0 :         in = (union drsuapi_QuerySitesByCostRequest *)pytalloc_get_ptr(in_obj);
   33819           0 :         if (in == NULL) {
   33820           0 :                 PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_QuerySitesByCostRequest!");
   33821           0 :                 return NULL;
   33822             :         }
   33823             : 
   33824           0 :         return py_import_drsuapi_QuerySitesByCostRequest(mem_ctx, level, in);
   33825             : }
   33826             : 
   33827           0 : static PyObject *py_drsuapi_QuerySitesByCostRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33828             : {
   33829           0 :         const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
   33830           0 :         PyObject *mem_ctx_obj = NULL;
   33831           0 :         TALLOC_CTX *mem_ctx = NULL;
   33832           0 :         int level = 0;
   33833           0 :         PyObject *in = NULL;
   33834           0 :         union drsuapi_QuerySitesByCostRequest *out = NULL;
   33835             : 
   33836           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
   33837             :                 discard_const_p(char *, kwnames),
   33838             :                 &mem_ctx_obj,
   33839             :                 &level,
   33840             :                 &in)) {
   33841           0 :                 return NULL;
   33842             :         }
   33843           0 :         mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
   33844           0 :         if (mem_ctx == NULL) {
   33845           0 :                 PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
   33846           0 :                 return NULL;
   33847             :         }
   33848             : 
   33849           0 :         out = py_export_drsuapi_QuerySitesByCostRequest(mem_ctx, level, in);
   33850           0 :         if (out == NULL) {
   33851           0 :                 return NULL;
   33852             :         }
   33853             : 
   33854           0 :         return pytalloc_GenericObject_reference(out);
   33855             : }
   33856             : 
   33857             : static PyMethodDef py_drsuapi_QuerySitesByCostRequest_methods[] = {
   33858             :         { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCostRequest_import),
   33859             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   33860             :                 "T.__import__(mem_ctx, level, in) => ret." },
   33861             :         { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCostRequest_export),
   33862             :                 METH_VARARGS|METH_KEYWORDS|METH_CLASS,
   33863             :                 "T.__export__(mem_ctx, level, in) => ret." },
   33864             :         { NULL, NULL, 0, NULL }
   33865             : };
   33866             : 
   33867           0 : static PyObject *py_drsuapi_QuerySitesByCostRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   33868             : {
   33869           0 :         PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
   33870           0 :         return NULL;
   33871             : }
   33872             : 
   33873             : 
   33874             : static PyTypeObject drsuapi_QuerySitesByCostRequest_Type = {
   33875             :         PyVarObject_HEAD_INIT(NULL, 0)
   33876             :         .tp_name = "drsuapi.QuerySitesByCostRequest",
   33877             :         .tp_getset = NULL,
   33878             :         .tp_methods = py_drsuapi_QuerySitesByCostRequest_methods,
   33879             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   33880             :         .tp_new = py_drsuapi_QuerySitesByCostRequest_new,
   33881             : };
   33882             : 
   33883             : 
   33884             : 
   33885           0 : static PyObject *py_drsuapi_DsBind_in_get_bind_guid(PyObject *obj, void *closure)
   33886             : {
   33887           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(obj);
   33888           0 :         PyObject *py_bind_guid;
   33889           0 :         if (object->in.bind_guid == NULL) {
   33890           0 :                 Py_RETURN_NONE;
   33891             :         }
   33892           0 :         if (object->in.bind_guid == NULL) {
   33893           0 :                 py_bind_guid = Py_None;
   33894           0 :                 Py_INCREF(py_bind_guid);
   33895             :         } else {
   33896           0 :                 py_bind_guid = pytalloc_reference_ex(GUID_Type, object->in.bind_guid, object->in.bind_guid);
   33897             :         }
   33898           0 :         return py_bind_guid;
   33899             : }
   33900             : 
   33901           0 : static int py_drsuapi_DsBind_in_set_bind_guid(PyObject *py_obj, PyObject *value, void *closure)
   33902             : {
   33903           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(py_obj);
   33904           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_guid));
   33905           0 :         if (value == NULL) {
   33906           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_guid");
   33907           0 :                 return -1;
   33908             :         }
   33909           0 :         if (value == Py_None) {
   33910           0 :                 object->in.bind_guid = NULL;
   33911             :         } else {
   33912           0 :                 object->in.bind_guid = NULL;
   33913           0 :                 PY_CHECK_TYPE(GUID_Type, value, return -1;);
   33914           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33915           0 :                         PyErr_NoMemory();
   33916           0 :                         return -1;
   33917             :                 }
   33918           0 :                 object->in.bind_guid = (struct GUID *)pytalloc_get_ptr(value);
   33919             :         }
   33920           0 :         return 0;
   33921             : }
   33922             : 
   33923           0 : static PyObject *py_drsuapi_DsBind_in_get_bind_info(PyObject *obj, void *closure)
   33924             : {
   33925           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(obj);
   33926           0 :         PyObject *py_bind_info;
   33927           0 :         if (object->in.bind_info == NULL) {
   33928           0 :                 Py_RETURN_NONE;
   33929             :         }
   33930           0 :         if (object->in.bind_info == NULL) {
   33931           0 :                 py_bind_info = Py_None;
   33932           0 :                 Py_INCREF(py_bind_info);
   33933             :         } else {
   33934           0 :                 py_bind_info = pytalloc_reference_ex(&drsuapi_DsBindInfoCtr_Type, object->in.bind_info, object->in.bind_info);
   33935             :         }
   33936           0 :         return py_bind_info;
   33937             : }
   33938             : 
   33939           0 : static int py_drsuapi_DsBind_in_set_bind_info(PyObject *py_obj, PyObject *value, void *closure)
   33940             : {
   33941           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(py_obj);
   33942           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_info));
   33943           0 :         if (value == NULL) {
   33944           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_info");
   33945           0 :                 return -1;
   33946             :         }
   33947           0 :         if (value == Py_None) {
   33948           0 :                 object->in.bind_info = NULL;
   33949             :         } else {
   33950           0 :                 object->in.bind_info = NULL;
   33951           0 :                 PY_CHECK_TYPE(&drsuapi_DsBindInfoCtr_Type, value, return -1;);
   33952           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33953           0 :                         PyErr_NoMemory();
   33954           0 :                         return -1;
   33955             :                 }
   33956           0 :                 object->in.bind_info = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(value);
   33957             :         }
   33958           0 :         return 0;
   33959             : }
   33960             : 
   33961           0 : static PyObject *py_drsuapi_DsBind_out_get_bind_info(PyObject *obj, void *closure)
   33962             : {
   33963           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(obj);
   33964           0 :         PyObject *py_bind_info;
   33965           0 :         if (object->out.bind_info == NULL) {
   33966           0 :                 Py_RETURN_NONE;
   33967             :         }
   33968           0 :         if (object->out.bind_info == NULL) {
   33969           0 :                 py_bind_info = Py_None;
   33970           0 :                 Py_INCREF(py_bind_info);
   33971             :         } else {
   33972           0 :                 py_bind_info = pytalloc_reference_ex(&drsuapi_DsBindInfoCtr_Type, object->out.bind_info, object->out.bind_info);
   33973             :         }
   33974           0 :         return py_bind_info;
   33975             : }
   33976             : 
   33977           0 : static int py_drsuapi_DsBind_out_set_bind_info(PyObject *py_obj, PyObject *value, void *closure)
   33978             : {
   33979           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(py_obj);
   33980           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.bind_info));
   33981           0 :         if (value == NULL) {
   33982           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.bind_info");
   33983           0 :                 return -1;
   33984             :         }
   33985           0 :         if (value == Py_None) {
   33986           0 :                 object->out.bind_info = NULL;
   33987             :         } else {
   33988           0 :                 object->out.bind_info = NULL;
   33989           0 :                 PY_CHECK_TYPE(&drsuapi_DsBindInfoCtr_Type, value, return -1;);
   33990           0 :                 if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   33991           0 :                         PyErr_NoMemory();
   33992           0 :                         return -1;
   33993             :                 }
   33994           0 :                 object->out.bind_info = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(value);
   33995             :         }
   33996           0 :         return 0;
   33997             : }
   33998             : 
   33999           0 : static PyObject *py_drsuapi_DsBind_out_get_bind_handle(PyObject *obj, void *closure)
   34000             : {
   34001           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(obj);
   34002           0 :         PyObject *py_bind_handle;
   34003           0 :         if (object->out.bind_handle == NULL) {
   34004           0 :                 Py_RETURN_NONE;
   34005             :         }
   34006           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->out.bind_handle, object->out.bind_handle);
   34007           0 :         return py_bind_handle;
   34008             : }
   34009             : 
   34010           0 : static int py_drsuapi_DsBind_out_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   34011             : {
   34012           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(py_obj);
   34013           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.bind_handle));
   34014           0 :         if (value == NULL) {
   34015           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.bind_handle");
   34016           0 :                 return -1;
   34017             :         }
   34018           0 :         object->out.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.bind_handle);
   34019           0 :         if (object->out.bind_handle == NULL) {
   34020           0 :                 PyErr_NoMemory();
   34021           0 :                 return -1;
   34022             :         }
   34023           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   34024           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34025           0 :                 PyErr_NoMemory();
   34026           0 :                 return -1;
   34027             :         }
   34028           0 :         object->out.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   34029           0 :         return 0;
   34030             : }
   34031             : 
   34032           0 : static PyObject *py_drsuapi_DsBind_get_result(PyObject *obj, void *closure)
   34033             : {
   34034           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(obj);
   34035           0 :         PyObject *py_result;
   34036           0 :         py_result = PyErr_FromWERROR(object->out.result);
   34037           0 :         return py_result;
   34038             : }
   34039             : 
   34040           0 : static int py_drsuapi_DsBind_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34041             : {
   34042           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(py_obj);
   34043           0 :         if (value == NULL) {
   34044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   34045           0 :                 return -1;
   34046             :         }
   34047           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   34048           0 :         return 0;
   34049             : }
   34050             : 
   34051             : static PyGetSetDef py_drsuapi_DsBind_getsetters[] = {
   34052             :         {
   34053             :                 .name = discard_const_p(char, "in_bind_guid"),
   34054             :                 .get = py_drsuapi_DsBind_in_get_bind_guid,
   34055             :                 .set = py_drsuapi_DsBind_in_set_bind_guid,
   34056             :                 .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
   34057             :         },
   34058             :         {
   34059             :                 .name = discard_const_p(char, "in_bind_info"),
   34060             :                 .get = py_drsuapi_DsBind_in_get_bind_info,
   34061             :                 .set = py_drsuapi_DsBind_in_set_bind_info,
   34062             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsBindInfoCtr")
   34063             :         },
   34064             :         {
   34065             :                 .name = discard_const_p(char, "out_bind_info"),
   34066             :                 .get = py_drsuapi_DsBind_out_get_bind_info,
   34067             :                 .set = py_drsuapi_DsBind_out_set_bind_info,
   34068             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsBindInfoCtr")
   34069             :         },
   34070             :         {
   34071             :                 .name = discard_const_p(char, "out_bind_handle"),
   34072             :                 .get = py_drsuapi_DsBind_out_get_bind_handle,
   34073             :                 .set = py_drsuapi_DsBind_out_set_bind_handle,
   34074             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   34075             :         },
   34076             :         {
   34077             :                 .name = discard_const_p(char, "result"),
   34078             :                 .get = py_drsuapi_DsBind_get_result,
   34079             :                 .set = py_drsuapi_DsBind_set_result,
   34080             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   34081             :         },
   34082             :         { .name = NULL }
   34083             : };
   34084             : 
   34085           0 : static PyObject *py_drsuapi_DsBind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   34086             : {
   34087           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsBind, type);
   34088           0 :         struct drsuapi_DsBind *_self = (struct drsuapi_DsBind *)pytalloc_get_ptr(self);
   34089           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   34090           0 :         _self->out.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   34091           0 :         return self;
   34092             : }
   34093             : 
   34094           0 : static PyObject *py_drsuapi_DsBind_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   34095             : {
   34096             : 
   34097             : 
   34098           0 :         return PyLong_FromLong(0);
   34099             : }
   34100             : 
   34101           0 : static PyObject *py_drsuapi_DsBind_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   34102             : {
   34103           0 :         const struct ndr_interface_call *call = NULL;
   34104           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(py_obj);
   34105           0 :         PyObject *ret = NULL;
   34106           0 :         struct ndr_push *push = NULL;
   34107           0 :         DATA_BLOB blob;
   34108           0 :         enum ndr_err_code err;
   34109             : 
   34110           0 :         if (ndr_table_drsuapi.num_calls < 1) {
   34111           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsBind_ndr_pack");
   34112           0 :                 return NULL;
   34113             :         }
   34114           0 :         call = &ndr_table_drsuapi.calls[0];
   34115             : 
   34116           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   34117           0 :         if (push == NULL) {
   34118           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34119           0 :                 return NULL;
   34120             :         }
   34121             : 
   34122           0 :         push->flags |= ndr_push_flags;
   34123             : 
   34124           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   34125           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34126           0 :                 TALLOC_FREE(push);
   34127           0 :                 PyErr_SetNdrError(err);
   34128           0 :                 return NULL;
   34129             :         }
   34130           0 :         blob = ndr_push_blob(push);
   34131           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   34132           0 :         TALLOC_FREE(push);
   34133           0 :         return ret;
   34134             : }
   34135             : 
   34136           0 : static PyObject *py_drsuapi_DsBind_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34137             : {
   34138           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34139           0 :         PyObject *bigendian_obj = NULL;
   34140           0 :         PyObject *ndr64_obj = NULL;
   34141           0 :         libndr_flags ndr_push_flags = 0;
   34142             : 
   34143           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   34144             :                 discard_const_p(char *, kwnames),
   34145             :                 &bigendian_obj,
   34146             :                 &ndr64_obj)) {
   34147           0 :                 return NULL;
   34148             :         }
   34149             : 
   34150           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34151           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34152             :         }
   34153           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34154           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34155             :         }
   34156             : 
   34157           0 :         return py_drsuapi_DsBind_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   34158             : }
   34159             : 
   34160           0 : static PyObject *py_drsuapi_DsBind_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34161             : {
   34162           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34163           0 :         PyObject *bigendian_obj = NULL;
   34164           0 :         PyObject *ndr64_obj = NULL;
   34165           0 :         libndr_flags ndr_push_flags = 0;
   34166             : 
   34167           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   34168             :                 discard_const_p(char *, kwnames),
   34169             :                 &bigendian_obj,
   34170             :                 &ndr64_obj)) {
   34171           0 :                 return NULL;
   34172             :         }
   34173             : 
   34174           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34175           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34176             :         }
   34177           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34178           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34179             :         }
   34180             : 
   34181           0 :         return py_drsuapi_DsBind_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   34182             : }
   34183             : 
   34184           0 : static PyObject *py_drsuapi_DsBind_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   34185             : {
   34186           0 :         const struct ndr_interface_call *call = NULL;
   34187           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(py_obj);
   34188           0 :         struct ndr_pull *pull = NULL;
   34189           0 :         enum ndr_err_code err;
   34190             : 
   34191           0 :         if (ndr_table_drsuapi.num_calls < 1) {
   34192           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsBind_ndr_unpack");
   34193           0 :                 return NULL;
   34194             :         }
   34195           0 :         call = &ndr_table_drsuapi.calls[0];
   34196             : 
   34197           0 :         pull = ndr_pull_init_blob(blob, object);
   34198           0 :         if (pull == NULL) {
   34199           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34200           0 :                 return NULL;
   34201             :         }
   34202             : 
   34203           0 :         pull->flags |= ndr_pull_flags;
   34204             : 
   34205           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   34206           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34207           0 :                 TALLOC_FREE(pull);
   34208           0 :                 PyErr_SetNdrError(err);
   34209           0 :                 return NULL;
   34210             :         }
   34211           0 :         if (!allow_remaining) {
   34212           0 :                 uint32_t highest_ofs;
   34213             : 
   34214           0 :                 if (pull->offset > pull->relative_highest_offset) {
   34215           0 :                         highest_ofs = pull->offset;
   34216             :                 } else {
   34217           0 :                         highest_ofs = pull->relative_highest_offset;
   34218             :                 }
   34219           0 :                 if (highest_ofs < pull->data_size) {
   34220           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   34221             :                                 "not all bytes consumed ofs[%u] size[%u]",
   34222             :                                 highest_ofs, pull->data_size);
   34223           0 :                         TALLOC_FREE(pull);
   34224           0 :                         PyErr_SetNdrError(err);
   34225           0 :                         return NULL;
   34226             :                 }
   34227             :         }
   34228             : 
   34229           0 :         TALLOC_FREE(pull);
   34230           0 :         Py_RETURN_NONE;
   34231             : }
   34232             : 
   34233           0 : static PyObject *py_drsuapi_DsBind_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34234             : {
   34235           0 :         DATA_BLOB blob;
   34236           0 :         Py_ssize_t blob_length = 0;
   34237           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34238           0 :         PyObject *bigendian_obj = NULL;
   34239           0 :         PyObject *ndr64_obj = NULL;
   34240           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34241           0 :         PyObject *allow_remaining_obj = NULL;
   34242           0 :         bool allow_remaining = false;
   34243             : 
   34244           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34245             :                 discard_const_p(char *, kwnames),
   34246             :                 &blob.data, &blob_length,
   34247             :                 &bigendian_obj,
   34248             :                 &ndr64_obj,
   34249             :                 &allow_remaining_obj)) {
   34250           0 :                 return NULL;
   34251             :         }
   34252           0 :         blob.length = blob_length;
   34253             : 
   34254           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34255           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34256             :         }
   34257           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34258           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34259             :         }
   34260             : 
   34261           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34262           0 :                 allow_remaining = true;
   34263             :         }
   34264             : 
   34265           0 :         return py_drsuapi_DsBind_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34266             : }
   34267             : 
   34268           0 : static PyObject *py_drsuapi_DsBind_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34269             : {
   34270           0 :         DATA_BLOB blob;
   34271           0 :         Py_ssize_t blob_length = 0;
   34272           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34273           0 :         PyObject *bigendian_obj = NULL;
   34274           0 :         PyObject *ndr64_obj = NULL;
   34275           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34276           0 :         PyObject *allow_remaining_obj = NULL;
   34277           0 :         bool allow_remaining = false;
   34278             : 
   34279           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34280             :                 discard_const_p(char *, kwnames),
   34281             :                 &blob.data, &blob_length,
   34282             :                 &bigendian_obj,
   34283             :                 &ndr64_obj,
   34284             :                 &allow_remaining_obj)) {
   34285           0 :                 return NULL;
   34286             :         }
   34287           0 :         blob.length = blob_length;
   34288             : 
   34289           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34290           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34291             :         }
   34292           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34293           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34294             :         }
   34295             : 
   34296           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34297           0 :                 allow_remaining = true;
   34298             :         }
   34299             : 
   34300           0 :         return py_drsuapi_DsBind_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34301             : }
   34302             : 
   34303           0 : static PyObject *py_drsuapi_DsBind_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   34304             : {
   34305           0 :         const struct ndr_interface_call *call = NULL;
   34306           0 :         struct drsuapi_DsBind *object = pytalloc_get_ptr(py_obj);
   34307           0 :         PyObject *ret;
   34308           0 :         char *retstr;
   34309             : 
   34310           0 :         if (ndr_table_drsuapi.num_calls < 1) {
   34311           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsBind_ndr_print");
   34312           0 :                 return NULL;
   34313             :         }
   34314           0 :         call = &ndr_table_drsuapi.calls[0];
   34315             : 
   34316           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34317           0 :         ret = PyUnicode_FromString(retstr);
   34318           0 :         TALLOC_FREE(retstr);
   34319             : 
   34320           0 :         return ret;
   34321             : }
   34322             : 
   34323           0 : static PyObject *py_drsuapi_DsBind_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34324             : {
   34325           0 :         return py_drsuapi_DsBind_ndr_print(py_obj, "drsuapi_DsBind_in", NDR_IN);
   34326             : }
   34327             : 
   34328           0 : static PyObject *py_drsuapi_DsBind_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34329             : {
   34330           0 :         return py_drsuapi_DsBind_ndr_print(py_obj, "drsuapi_DsBind_out", NDR_OUT);
   34331             : }
   34332             : 
   34333             : static PyMethodDef py_drsuapi_DsBind_methods[] = {
   34334             :         { "opnum", (PyCFunction)py_drsuapi_DsBind_ndr_opnum, METH_NOARGS|METH_CLASS,
   34335             :                 "drsuapi.DsBind.opnum() -> 0 (0x00) " },
   34336             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBind_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34337             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34338             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBind_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34339             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34340             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBind_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34341             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34342             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBind_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34343             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34344             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsBind_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34345             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsBind_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34346             :         { NULL, NULL, 0, NULL }
   34347             : };
   34348             : 
   34349             : 
   34350             : static PyTypeObject drsuapi_DsBind_Type = {
   34351             :         PyVarObject_HEAD_INIT(NULL, 0)
   34352             :         .tp_name = "drsuapi.DsBind",
   34353             :         .tp_getset = py_drsuapi_DsBind_getsetters,
   34354             :         .tp_methods = py_drsuapi_DsBind_methods,
   34355             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34356             :         .tp_new = py_drsuapi_DsBind_new,
   34357             : };
   34358             : 
   34359        1614 : static bool pack_py_drsuapi_DsBind_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsBind *r)
   34360             : {
   34361           0 :         PyObject *py_bind_guid;
   34362           0 :         PyObject *py_bind_info;
   34363        1614 :         const char *kwnames[] = {
   34364             :                 "bind_guid", "bind_info", NULL
   34365             :         };
   34366             : 
   34367        1614 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:drsuapi_DsBind", discard_const_p(char *, kwnames), &py_bind_guid, &py_bind_info)) {
   34368           0 :                 return false;
   34369             :         }
   34370             : 
   34371        1614 :         if (py_bind_guid == NULL) {
   34372           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_guid");
   34373           0 :                 return false;
   34374             :         }
   34375        1614 :         if (py_bind_guid == Py_None) {
   34376           0 :                 r->in.bind_guid = NULL;
   34377             :         } else {
   34378        1614 :                 r->in.bind_guid = NULL;
   34379        1614 :                 PY_CHECK_TYPE(GUID_Type, py_bind_guid, return false;);
   34380        1614 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_guid)) == NULL) {
   34381           0 :                         PyErr_NoMemory();
   34382           0 :                         return false;
   34383             :                 }
   34384        1614 :                 r->in.bind_guid = (struct GUID *)pytalloc_get_ptr(py_bind_guid);
   34385             :         }
   34386        1614 :         if (py_bind_info == NULL) {
   34387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_info");
   34388           0 :                 return false;
   34389             :         }
   34390        1614 :         if (py_bind_info == Py_None) {
   34391           0 :                 r->in.bind_info = NULL;
   34392             :         } else {
   34393        1614 :                 r->in.bind_info = NULL;
   34394        1614 :                 PY_CHECK_TYPE(&drsuapi_DsBindInfoCtr_Type, py_bind_info, return false;);
   34395        1614 :                 if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_info)) == NULL) {
   34396           0 :                         PyErr_NoMemory();
   34397           0 :                         return false;
   34398             :                 }
   34399        1614 :                 r->in.bind_info = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(py_bind_info);
   34400             :         }
   34401        1614 :         return true;
   34402             : }
   34403             : 
   34404        1614 : static PyObject *unpack_py_drsuapi_DsBind_args_out(struct drsuapi_DsBind *r)
   34405             : {
   34406           0 :         PyObject *result;
   34407           0 :         PyObject *py_bind_info;
   34408           0 :         PyObject *py_bind_handle;
   34409        1614 :         result = PyTuple_New(2);
   34410        1614 :         if (r->out.bind_info == NULL) {
   34411           0 :                 py_bind_info = Py_None;
   34412           0 :                 Py_INCREF(py_bind_info);
   34413             :         } else {
   34414        1614 :                 py_bind_info = pytalloc_reference_ex(&drsuapi_DsBindInfoCtr_Type, r->out.bind_info, r->out.bind_info);
   34415             :         }
   34416        1614 :         PyTuple_SetItem(result, 0, py_bind_info);
   34417        1614 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, r->out.bind_handle, r->out.bind_handle);
   34418        1614 :         PyTuple_SetItem(result, 1, py_bind_handle);
   34419        1614 :         if (!W_ERROR_IS_OK(r->out.result)) {
   34420           0 :                 PyErr_SetWERROR(r->out.result);
   34421           0 :                 return NULL;
   34422             :         }
   34423             : 
   34424        1614 :         return result;
   34425             : }
   34426             : 
   34427             : 
   34428           0 : static PyObject *py_drsuapi_DsUnbind_in_get_bind_handle(PyObject *obj, void *closure)
   34429             : {
   34430           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(obj);
   34431           0 :         PyObject *py_bind_handle;
   34432           0 :         if (object->in.bind_handle == NULL) {
   34433           0 :                 Py_RETURN_NONE;
   34434             :         }
   34435           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   34436           0 :         return py_bind_handle;
   34437             : }
   34438             : 
   34439           0 : static int py_drsuapi_DsUnbind_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   34440             : {
   34441           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(py_obj);
   34442           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   34443           0 :         if (value == NULL) {
   34444           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   34445           0 :                 return -1;
   34446             :         }
   34447           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   34448           0 :         if (object->in.bind_handle == NULL) {
   34449           0 :                 PyErr_NoMemory();
   34450           0 :                 return -1;
   34451             :         }
   34452           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   34453           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34454           0 :                 PyErr_NoMemory();
   34455           0 :                 return -1;
   34456             :         }
   34457           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   34458           0 :         return 0;
   34459             : }
   34460             : 
   34461           0 : static PyObject *py_drsuapi_DsUnbind_out_get_bind_handle(PyObject *obj, void *closure)
   34462             : {
   34463           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(obj);
   34464           0 :         PyObject *py_bind_handle;
   34465           0 :         if (object->out.bind_handle == NULL) {
   34466           0 :                 Py_RETURN_NONE;
   34467             :         }
   34468           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->out.bind_handle, object->out.bind_handle);
   34469           0 :         return py_bind_handle;
   34470             : }
   34471             : 
   34472           0 : static int py_drsuapi_DsUnbind_out_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   34473             : {
   34474           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(py_obj);
   34475           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.bind_handle));
   34476           0 :         if (value == NULL) {
   34477           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.bind_handle");
   34478           0 :                 return -1;
   34479             :         }
   34480           0 :         object->out.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.bind_handle);
   34481           0 :         if (object->out.bind_handle == NULL) {
   34482           0 :                 PyErr_NoMemory();
   34483           0 :                 return -1;
   34484             :         }
   34485           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   34486           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34487           0 :                 PyErr_NoMemory();
   34488           0 :                 return -1;
   34489             :         }
   34490           0 :         object->out.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   34491           0 :         return 0;
   34492             : }
   34493             : 
   34494           0 : static PyObject *py_drsuapi_DsUnbind_get_result(PyObject *obj, void *closure)
   34495             : {
   34496           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(obj);
   34497           0 :         PyObject *py_result;
   34498           0 :         py_result = PyErr_FromWERROR(object->out.result);
   34499           0 :         return py_result;
   34500             : }
   34501             : 
   34502           0 : static int py_drsuapi_DsUnbind_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34503             : {
   34504           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(py_obj);
   34505           0 :         if (value == NULL) {
   34506           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   34507           0 :                 return -1;
   34508             :         }
   34509           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   34510           0 :         return 0;
   34511             : }
   34512             : 
   34513             : static PyGetSetDef py_drsuapi_DsUnbind_getsetters[] = {
   34514             :         {
   34515             :                 .name = discard_const_p(char, "in_bind_handle"),
   34516             :                 .get = py_drsuapi_DsUnbind_in_get_bind_handle,
   34517             :                 .set = py_drsuapi_DsUnbind_in_set_bind_handle,
   34518             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   34519             :         },
   34520             :         {
   34521             :                 .name = discard_const_p(char, "out_bind_handle"),
   34522             :                 .get = py_drsuapi_DsUnbind_out_get_bind_handle,
   34523             :                 .set = py_drsuapi_DsUnbind_out_set_bind_handle,
   34524             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   34525             :         },
   34526             :         {
   34527             :                 .name = discard_const_p(char, "result"),
   34528             :                 .get = py_drsuapi_DsUnbind_get_result,
   34529             :                 .set = py_drsuapi_DsUnbind_set_result,
   34530             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   34531             :         },
   34532             :         { .name = NULL }
   34533             : };
   34534             : 
   34535           0 : static PyObject *py_drsuapi_DsUnbind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   34536             : {
   34537           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsUnbind, type);
   34538           0 :         struct drsuapi_DsUnbind *_self = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(self);
   34539           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   34540           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   34541           0 :         _self->out.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   34542           0 :         return self;
   34543             : }
   34544             : 
   34545           0 : static PyObject *py_drsuapi_DsUnbind_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   34546             : {
   34547             : 
   34548             : 
   34549           0 :         return PyLong_FromLong(1);
   34550             : }
   34551             : 
   34552           0 : static PyObject *py_drsuapi_DsUnbind_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   34553             : {
   34554           0 :         const struct ndr_interface_call *call = NULL;
   34555           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(py_obj);
   34556           0 :         PyObject *ret = NULL;
   34557           0 :         struct ndr_push *push = NULL;
   34558           0 :         DATA_BLOB blob;
   34559           0 :         enum ndr_err_code err;
   34560             : 
   34561           0 :         if (ndr_table_drsuapi.num_calls < 2) {
   34562           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsUnbind_ndr_pack");
   34563           0 :                 return NULL;
   34564             :         }
   34565           0 :         call = &ndr_table_drsuapi.calls[1];
   34566             : 
   34567           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   34568           0 :         if (push == NULL) {
   34569           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34570           0 :                 return NULL;
   34571             :         }
   34572             : 
   34573           0 :         push->flags |= ndr_push_flags;
   34574             : 
   34575           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   34576           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34577           0 :                 TALLOC_FREE(push);
   34578           0 :                 PyErr_SetNdrError(err);
   34579           0 :                 return NULL;
   34580             :         }
   34581           0 :         blob = ndr_push_blob(push);
   34582           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   34583           0 :         TALLOC_FREE(push);
   34584           0 :         return ret;
   34585             : }
   34586             : 
   34587           0 : static PyObject *py_drsuapi_DsUnbind_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34588             : {
   34589           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34590           0 :         PyObject *bigendian_obj = NULL;
   34591           0 :         PyObject *ndr64_obj = NULL;
   34592           0 :         libndr_flags ndr_push_flags = 0;
   34593             : 
   34594           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   34595             :                 discard_const_p(char *, kwnames),
   34596             :                 &bigendian_obj,
   34597             :                 &ndr64_obj)) {
   34598           0 :                 return NULL;
   34599             :         }
   34600             : 
   34601           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34602           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34603             :         }
   34604           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34605           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34606             :         }
   34607             : 
   34608           0 :         return py_drsuapi_DsUnbind_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   34609             : }
   34610             : 
   34611           0 : static PyObject *py_drsuapi_DsUnbind_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34612             : {
   34613           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   34614           0 :         PyObject *bigendian_obj = NULL;
   34615           0 :         PyObject *ndr64_obj = NULL;
   34616           0 :         libndr_flags ndr_push_flags = 0;
   34617             : 
   34618           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   34619             :                 discard_const_p(char *, kwnames),
   34620             :                 &bigendian_obj,
   34621             :                 &ndr64_obj)) {
   34622           0 :                 return NULL;
   34623             :         }
   34624             : 
   34625           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34626           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   34627             :         }
   34628           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34629           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   34630             :         }
   34631             : 
   34632           0 :         return py_drsuapi_DsUnbind_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   34633             : }
   34634             : 
   34635           0 : static PyObject *py_drsuapi_DsUnbind_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   34636             : {
   34637           0 :         const struct ndr_interface_call *call = NULL;
   34638           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(py_obj);
   34639           0 :         struct ndr_pull *pull = NULL;
   34640           0 :         enum ndr_err_code err;
   34641             : 
   34642           0 :         if (ndr_table_drsuapi.num_calls < 2) {
   34643           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsUnbind_ndr_unpack");
   34644           0 :                 return NULL;
   34645             :         }
   34646           0 :         call = &ndr_table_drsuapi.calls[1];
   34647             : 
   34648           0 :         pull = ndr_pull_init_blob(blob, object);
   34649           0 :         if (pull == NULL) {
   34650           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   34651           0 :                 return NULL;
   34652             :         }
   34653             : 
   34654           0 :         pull->flags |= ndr_pull_flags;
   34655             : 
   34656           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   34657           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   34658           0 :                 TALLOC_FREE(pull);
   34659           0 :                 PyErr_SetNdrError(err);
   34660           0 :                 return NULL;
   34661             :         }
   34662           0 :         if (!allow_remaining) {
   34663           0 :                 uint32_t highest_ofs;
   34664             : 
   34665           0 :                 if (pull->offset > pull->relative_highest_offset) {
   34666           0 :                         highest_ofs = pull->offset;
   34667             :                 } else {
   34668           0 :                         highest_ofs = pull->relative_highest_offset;
   34669             :                 }
   34670           0 :                 if (highest_ofs < pull->data_size) {
   34671           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   34672             :                                 "not all bytes consumed ofs[%u] size[%u]",
   34673             :                                 highest_ofs, pull->data_size);
   34674           0 :                         TALLOC_FREE(pull);
   34675           0 :                         PyErr_SetNdrError(err);
   34676           0 :                         return NULL;
   34677             :                 }
   34678             :         }
   34679             : 
   34680           0 :         TALLOC_FREE(pull);
   34681           0 :         Py_RETURN_NONE;
   34682             : }
   34683             : 
   34684           0 : static PyObject *py_drsuapi_DsUnbind_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34685             : {
   34686           0 :         DATA_BLOB blob;
   34687           0 :         Py_ssize_t blob_length = 0;
   34688           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34689           0 :         PyObject *bigendian_obj = NULL;
   34690           0 :         PyObject *ndr64_obj = NULL;
   34691           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34692           0 :         PyObject *allow_remaining_obj = NULL;
   34693           0 :         bool allow_remaining = false;
   34694             : 
   34695           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   34696             :                 discard_const_p(char *, kwnames),
   34697             :                 &blob.data, &blob_length,
   34698             :                 &bigendian_obj,
   34699             :                 &ndr64_obj,
   34700             :                 &allow_remaining_obj)) {
   34701           0 :                 return NULL;
   34702             :         }
   34703           0 :         blob.length = blob_length;
   34704             : 
   34705           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34706           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34707             :         }
   34708           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34709           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34710             :         }
   34711             : 
   34712           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34713           0 :                 allow_remaining = true;
   34714             :         }
   34715             : 
   34716           0 :         return py_drsuapi_DsUnbind_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   34717             : }
   34718             : 
   34719           0 : static PyObject *py_drsuapi_DsUnbind_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   34720             : {
   34721           0 :         DATA_BLOB blob;
   34722           0 :         Py_ssize_t blob_length = 0;
   34723           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   34724           0 :         PyObject *bigendian_obj = NULL;
   34725           0 :         PyObject *ndr64_obj = NULL;
   34726           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   34727           0 :         PyObject *allow_remaining_obj = NULL;
   34728           0 :         bool allow_remaining = false;
   34729             : 
   34730           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   34731             :                 discard_const_p(char *, kwnames),
   34732             :                 &blob.data, &blob_length,
   34733             :                 &bigendian_obj,
   34734             :                 &ndr64_obj,
   34735             :                 &allow_remaining_obj)) {
   34736           0 :                 return NULL;
   34737             :         }
   34738           0 :         blob.length = blob_length;
   34739             : 
   34740           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   34741           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   34742             :         }
   34743           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   34744           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   34745             :         }
   34746             : 
   34747           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   34748           0 :                 allow_remaining = true;
   34749             :         }
   34750             : 
   34751           0 :         return py_drsuapi_DsUnbind_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   34752             : }
   34753             : 
   34754           0 : static PyObject *py_drsuapi_DsUnbind_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   34755             : {
   34756           0 :         const struct ndr_interface_call *call = NULL;
   34757           0 :         struct drsuapi_DsUnbind *object = pytalloc_get_ptr(py_obj);
   34758           0 :         PyObject *ret;
   34759           0 :         char *retstr;
   34760             : 
   34761           0 :         if (ndr_table_drsuapi.num_calls < 2) {
   34762           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsUnbind_ndr_print");
   34763           0 :                 return NULL;
   34764             :         }
   34765           0 :         call = &ndr_table_drsuapi.calls[1];
   34766             : 
   34767           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   34768           0 :         ret = PyUnicode_FromString(retstr);
   34769           0 :         TALLOC_FREE(retstr);
   34770             : 
   34771           0 :         return ret;
   34772             : }
   34773             : 
   34774           0 : static PyObject *py_drsuapi_DsUnbind_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34775             : {
   34776           0 :         return py_drsuapi_DsUnbind_ndr_print(py_obj, "drsuapi_DsUnbind_in", NDR_IN);
   34777             : }
   34778             : 
   34779           0 : static PyObject *py_drsuapi_DsUnbind_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   34780             : {
   34781           0 :         return py_drsuapi_DsUnbind_ndr_print(py_obj, "drsuapi_DsUnbind_out", NDR_OUT);
   34782             : }
   34783             : 
   34784             : static PyMethodDef py_drsuapi_DsUnbind_methods[] = {
   34785             :         { "opnum", (PyCFunction)py_drsuapi_DsUnbind_ndr_opnum, METH_NOARGS|METH_CLASS,
   34786             :                 "drsuapi.DsUnbind.opnum() -> 1 (0x01) " },
   34787             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsUnbind_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   34788             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   34789             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsUnbind_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   34790             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   34791             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsUnbind_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   34792             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   34793             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsUnbind_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   34794             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   34795             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsUnbind_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   34796             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsUnbind_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   34797             :         { NULL, NULL, 0, NULL }
   34798             : };
   34799             : 
   34800             : 
   34801             : static PyTypeObject drsuapi_DsUnbind_Type = {
   34802             :         PyVarObject_HEAD_INIT(NULL, 0)
   34803             :         .tp_name = "drsuapi.DsUnbind",
   34804             :         .tp_getset = py_drsuapi_DsUnbind_getsetters,
   34805             :         .tp_methods = py_drsuapi_DsUnbind_methods,
   34806             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   34807             :         .tp_new = py_drsuapi_DsUnbind_new,
   34808             : };
   34809             : 
   34810           1 : static bool pack_py_drsuapi_DsUnbind_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsUnbind *r)
   34811             : {
   34812           0 :         PyObject *py_bind_handle;
   34813           1 :         const char *kwnames[] = {
   34814             :                 "bind_handle", NULL
   34815             :         };
   34816             : 
   34817           1 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:drsuapi_DsUnbind", discard_const_p(char *, kwnames), &py_bind_handle)) {
   34818           0 :                 return false;
   34819             :         }
   34820             : 
   34821           1 :         if (py_bind_handle == NULL) {
   34822           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   34823           0 :                 return false;
   34824             :         }
   34825           1 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   34826           1 :         if (r->in.bind_handle == NULL) {
   34827           0 :                 PyErr_NoMemory();
   34828           0 :                 return false;
   34829             :         }
   34830           1 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   34831           1 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   34832           0 :                 PyErr_NoMemory();
   34833           0 :                 return false;
   34834             :         }
   34835           1 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   34836           1 :         return true;
   34837             : }
   34838             : 
   34839           1 : static PyObject *unpack_py_drsuapi_DsUnbind_args_out(struct drsuapi_DsUnbind *r)
   34840             : {
   34841           0 :         PyObject *result;
   34842           0 :         PyObject *py_bind_handle;
   34843           1 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, r->out.bind_handle, r->out.bind_handle);
   34844           1 :         result = py_bind_handle;
   34845           1 :         if (!W_ERROR_IS_OK(r->out.result)) {
   34846           0 :                 PyErr_SetWERROR(r->out.result);
   34847           0 :                 return NULL;
   34848             :         }
   34849             : 
   34850           1 :         return result;
   34851             : }
   34852             : 
   34853             : 
   34854           0 : static PyObject *py_drsuapi_DsReplicaSync_in_get_bind_handle(PyObject *obj, void *closure)
   34855             : {
   34856           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(obj);
   34857           0 :         PyObject *py_bind_handle;
   34858           0 :         if (object->in.bind_handle == NULL) {
   34859           0 :                 Py_RETURN_NONE;
   34860             :         }
   34861           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   34862           0 :         return py_bind_handle;
   34863             : }
   34864             : 
   34865           0 : static int py_drsuapi_DsReplicaSync_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   34866             : {
   34867           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(py_obj);
   34868           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   34869           0 :         if (value == NULL) {
   34870           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   34871           0 :                 return -1;
   34872             :         }
   34873           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   34874           0 :         if (object->in.bind_handle == NULL) {
   34875           0 :                 PyErr_NoMemory();
   34876           0 :                 return -1;
   34877             :         }
   34878           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   34879           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   34880           0 :                 PyErr_NoMemory();
   34881           0 :                 return -1;
   34882             :         }
   34883           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   34884           0 :         return 0;
   34885             : }
   34886             : 
   34887           0 : static PyObject *py_drsuapi_DsReplicaSync_in_get_level(PyObject *obj, void *closure)
   34888             : {
   34889           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(obj);
   34890           0 :         PyObject *py_level;
   34891           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   34892           0 :         return py_level;
   34893             : }
   34894             : 
   34895           0 : static int py_drsuapi_DsReplicaSync_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   34896             : {
   34897           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(py_obj);
   34898           0 :         if (value == NULL) {
   34899           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   34900           0 :                 return -1;
   34901             :         }
   34902             :         {
   34903           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   34904           0 :                 if (PyLong_Check(value)) {
   34905           0 :                         unsigned long long test_var;
   34906           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   34907           0 :                         if (PyErr_Occurred() != NULL) {
   34908           0 :                                 return -1;
   34909             :                         }
   34910           0 :                         if (test_var > uint_max) {
   34911           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   34912             :                                   PyLong_Type.tp_name, uint_max, test_var);
   34913           0 :                                 return -1;
   34914             :                         }
   34915           0 :                         object->in.level = test_var;
   34916             :                 } else {
   34917           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   34918             :                           PyLong_Type.tp_name);
   34919           0 :                         return -1;
   34920             :                 }
   34921             :         }
   34922           0 :         return 0;
   34923             : }
   34924             : 
   34925           0 : static PyObject *py_drsuapi_DsReplicaSync_in_get_req(PyObject *obj, void *closure)
   34926             : {
   34927           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(obj);
   34928           0 :         PyObject *py_req;
   34929           0 :         if (object->in.req == NULL) {
   34930           0 :                 Py_RETURN_NONE;
   34931             :         }
   34932           0 :         py_req = pyrpc_import_union(&drsuapi_DsReplicaSyncRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsReplicaSyncRequest");
   34933           0 :         if (py_req == NULL) {
   34934           0 :                 return NULL;
   34935             :         }
   34936           0 :         return py_req;
   34937             : }
   34938             : 
   34939           0 : static int py_drsuapi_DsReplicaSync_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   34940             : {
   34941           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(py_obj);
   34942           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   34943           0 :         if (value == NULL) {
   34944           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   34945           0 :                 return -1;
   34946             :         }
   34947           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   34948           0 :         if (object->in.req == NULL) {
   34949           0 :                 PyErr_NoMemory();
   34950           0 :                 return -1;
   34951             :         }
   34952             :         {
   34953           0 :                 union drsuapi_DsReplicaSyncRequest *req_switch_1;
   34954           0 :                 req_switch_1 = (union drsuapi_DsReplicaSyncRequest *)pyrpc_export_union(&drsuapi_DsReplicaSyncRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsReplicaSyncRequest");
   34955           0 :                 if (req_switch_1 == NULL) {
   34956           0 :                         return -1;
   34957             :                 }
   34958           0 :                 object->in.req = req_switch_1;
   34959             :         }
   34960           0 :         return 0;
   34961             : }
   34962             : 
   34963           0 : static PyObject *py_drsuapi_DsReplicaSync_get_result(PyObject *obj, void *closure)
   34964             : {
   34965           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(obj);
   34966           0 :         PyObject *py_result;
   34967           0 :         py_result = PyErr_FromWERROR(object->out.result);
   34968           0 :         return py_result;
   34969             : }
   34970             : 
   34971           0 : static int py_drsuapi_DsReplicaSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
   34972             : {
   34973           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(py_obj);
   34974           0 :         if (value == NULL) {
   34975           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   34976           0 :                 return -1;
   34977             :         }
   34978           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   34979           0 :         return 0;
   34980             : }
   34981             : 
   34982             : static PyGetSetDef py_drsuapi_DsReplicaSync_getsetters[] = {
   34983             :         {
   34984             :                 .name = discard_const_p(char, "in_bind_handle"),
   34985             :                 .get = py_drsuapi_DsReplicaSync_in_get_bind_handle,
   34986             :                 .set = py_drsuapi_DsReplicaSync_in_set_bind_handle,
   34987             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   34988             :         },
   34989             :         {
   34990             :                 .name = discard_const_p(char, "in_level"),
   34991             :                 .get = py_drsuapi_DsReplicaSync_in_get_level,
   34992             :                 .set = py_drsuapi_DsReplicaSync_in_set_level,
   34993             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   34994             :         },
   34995             :         {
   34996             :                 .name = discard_const_p(char, "in_req"),
   34997             :                 .get = py_drsuapi_DsReplicaSync_in_get_req,
   34998             :                 .set = py_drsuapi_DsReplicaSync_in_set_req,
   34999             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaSyncRequest")
   35000             :         },
   35001             :         {
   35002             :                 .name = discard_const_p(char, "result"),
   35003             :                 .get = py_drsuapi_DsReplicaSync_get_result,
   35004             :                 .set = py_drsuapi_DsReplicaSync_set_result,
   35005             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   35006             :         },
   35007             :         { .name = NULL }
   35008             : };
   35009             : 
   35010           0 : static PyObject *py_drsuapi_DsReplicaSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35011             : {
   35012           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsReplicaSync, type);
   35013           0 :         struct drsuapi_DsReplicaSync *_self = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(self);
   35014           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   35015           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   35016           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsReplicaSyncRequest);
   35017           0 :         return self;
   35018             : }
   35019             : 
   35020           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35021             : {
   35022             : 
   35023             : 
   35024           0 :         return PyLong_FromLong(2);
   35025             : }
   35026             : 
   35027           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   35028             : {
   35029           0 :         const struct ndr_interface_call *call = NULL;
   35030           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(py_obj);
   35031           0 :         PyObject *ret = NULL;
   35032           0 :         struct ndr_push *push = NULL;
   35033           0 :         DATA_BLOB blob;
   35034           0 :         enum ndr_err_code err;
   35035             : 
   35036           0 :         if (ndr_table_drsuapi.num_calls < 3) {
   35037           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaSync_ndr_pack");
   35038           0 :                 return NULL;
   35039             :         }
   35040           0 :         call = &ndr_table_drsuapi.calls[2];
   35041             : 
   35042           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   35043           0 :         if (push == NULL) {
   35044           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35045           0 :                 return NULL;
   35046             :         }
   35047             : 
   35048           0 :         push->flags |= ndr_push_flags;
   35049             : 
   35050           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   35051           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35052           0 :                 TALLOC_FREE(push);
   35053           0 :                 PyErr_SetNdrError(err);
   35054           0 :                 return NULL;
   35055             :         }
   35056           0 :         blob = ndr_push_blob(push);
   35057           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   35058           0 :         TALLOC_FREE(push);
   35059           0 :         return ret;
   35060             : }
   35061             : 
   35062           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35063             : {
   35064           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35065           0 :         PyObject *bigendian_obj = NULL;
   35066           0 :         PyObject *ndr64_obj = NULL;
   35067           0 :         libndr_flags ndr_push_flags = 0;
   35068             : 
   35069           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   35070             :                 discard_const_p(char *, kwnames),
   35071             :                 &bigendian_obj,
   35072             :                 &ndr64_obj)) {
   35073           0 :                 return NULL;
   35074             :         }
   35075             : 
   35076           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35077           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35078             :         }
   35079           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35080           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35081             :         }
   35082             : 
   35083           0 :         return py_drsuapi_DsReplicaSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   35084             : }
   35085             : 
   35086           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35087             : {
   35088           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35089           0 :         PyObject *bigendian_obj = NULL;
   35090           0 :         PyObject *ndr64_obj = NULL;
   35091           0 :         libndr_flags ndr_push_flags = 0;
   35092             : 
   35093           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   35094             :                 discard_const_p(char *, kwnames),
   35095             :                 &bigendian_obj,
   35096             :                 &ndr64_obj)) {
   35097           0 :                 return NULL;
   35098             :         }
   35099             : 
   35100           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35101           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35102             :         }
   35103           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35104           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35105             :         }
   35106             : 
   35107           0 :         return py_drsuapi_DsReplicaSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   35108             : }
   35109             : 
   35110           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   35111             : {
   35112           0 :         const struct ndr_interface_call *call = NULL;
   35113           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(py_obj);
   35114           0 :         struct ndr_pull *pull = NULL;
   35115           0 :         enum ndr_err_code err;
   35116             : 
   35117           0 :         if (ndr_table_drsuapi.num_calls < 3) {
   35118           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaSync_ndr_unpack");
   35119           0 :                 return NULL;
   35120             :         }
   35121           0 :         call = &ndr_table_drsuapi.calls[2];
   35122             : 
   35123           0 :         pull = ndr_pull_init_blob(blob, object);
   35124           0 :         if (pull == NULL) {
   35125           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35126           0 :                 return NULL;
   35127             :         }
   35128             : 
   35129           0 :         pull->flags |= ndr_pull_flags;
   35130             : 
   35131           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   35132           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35133           0 :                 TALLOC_FREE(pull);
   35134           0 :                 PyErr_SetNdrError(err);
   35135           0 :                 return NULL;
   35136             :         }
   35137           0 :         if (!allow_remaining) {
   35138           0 :                 uint32_t highest_ofs;
   35139             : 
   35140           0 :                 if (pull->offset > pull->relative_highest_offset) {
   35141           0 :                         highest_ofs = pull->offset;
   35142             :                 } else {
   35143           0 :                         highest_ofs = pull->relative_highest_offset;
   35144             :                 }
   35145           0 :                 if (highest_ofs < pull->data_size) {
   35146           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   35147             :                                 "not all bytes consumed ofs[%u] size[%u]",
   35148             :                                 highest_ofs, pull->data_size);
   35149           0 :                         TALLOC_FREE(pull);
   35150           0 :                         PyErr_SetNdrError(err);
   35151           0 :                         return NULL;
   35152             :                 }
   35153             :         }
   35154             : 
   35155           0 :         TALLOC_FREE(pull);
   35156           0 :         Py_RETURN_NONE;
   35157             : }
   35158             : 
   35159           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35160             : {
   35161           0 :         DATA_BLOB blob;
   35162           0 :         Py_ssize_t blob_length = 0;
   35163           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35164           0 :         PyObject *bigendian_obj = NULL;
   35165           0 :         PyObject *ndr64_obj = NULL;
   35166           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35167           0 :         PyObject *allow_remaining_obj = NULL;
   35168           0 :         bool allow_remaining = false;
   35169             : 
   35170           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   35171             :                 discard_const_p(char *, kwnames),
   35172             :                 &blob.data, &blob_length,
   35173             :                 &bigendian_obj,
   35174             :                 &ndr64_obj,
   35175             :                 &allow_remaining_obj)) {
   35176           0 :                 return NULL;
   35177             :         }
   35178           0 :         blob.length = blob_length;
   35179             : 
   35180           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35181           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35182             :         }
   35183           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35184           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35185             :         }
   35186             : 
   35187           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35188           0 :                 allow_remaining = true;
   35189             :         }
   35190             : 
   35191           0 :         return py_drsuapi_DsReplicaSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   35192             : }
   35193             : 
   35194           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35195             : {
   35196           0 :         DATA_BLOB blob;
   35197           0 :         Py_ssize_t blob_length = 0;
   35198           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35199           0 :         PyObject *bigendian_obj = NULL;
   35200           0 :         PyObject *ndr64_obj = NULL;
   35201           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35202           0 :         PyObject *allow_remaining_obj = NULL;
   35203           0 :         bool allow_remaining = false;
   35204             : 
   35205           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   35206             :                 discard_const_p(char *, kwnames),
   35207             :                 &blob.data, &blob_length,
   35208             :                 &bigendian_obj,
   35209             :                 &ndr64_obj,
   35210             :                 &allow_remaining_obj)) {
   35211           0 :                 return NULL;
   35212             :         }
   35213           0 :         blob.length = blob_length;
   35214             : 
   35215           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35216           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35217             :         }
   35218           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35219           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35220             :         }
   35221             : 
   35222           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35223           0 :                 allow_remaining = true;
   35224             :         }
   35225             : 
   35226           0 :         return py_drsuapi_DsReplicaSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   35227             : }
   35228             : 
   35229           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   35230             : {
   35231           0 :         const struct ndr_interface_call *call = NULL;
   35232           0 :         struct drsuapi_DsReplicaSync *object = pytalloc_get_ptr(py_obj);
   35233           0 :         PyObject *ret;
   35234           0 :         char *retstr;
   35235             : 
   35236           0 :         if (ndr_table_drsuapi.num_calls < 3) {
   35237           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaSync_ndr_print");
   35238           0 :                 return NULL;
   35239             :         }
   35240           0 :         call = &ndr_table_drsuapi.calls[2];
   35241             : 
   35242           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   35243           0 :         ret = PyUnicode_FromString(retstr);
   35244           0 :         TALLOC_FREE(retstr);
   35245             : 
   35246           0 :         return ret;
   35247             : }
   35248             : 
   35249           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35250             : {
   35251           0 :         return py_drsuapi_DsReplicaSync_ndr_print(py_obj, "drsuapi_DsReplicaSync_in", NDR_IN);
   35252             : }
   35253             : 
   35254           0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35255             : {
   35256           0 :         return py_drsuapi_DsReplicaSync_ndr_print(py_obj, "drsuapi_DsReplicaSync_out", NDR_OUT);
   35257             : }
   35258             : 
   35259             : static PyMethodDef py_drsuapi_DsReplicaSync_methods[] = {
   35260             :         { "opnum", (PyCFunction)py_drsuapi_DsReplicaSync_ndr_opnum, METH_NOARGS|METH_CLASS,
   35261             :                 "drsuapi.DsReplicaSync.opnum() -> 2 (0x02) " },
   35262             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   35263             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   35264             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   35265             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   35266             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   35267             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   35268             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   35269             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   35270             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaSync_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   35271             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaSync_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   35272             :         { NULL, NULL, 0, NULL }
   35273             : };
   35274             : 
   35275             : 
   35276             : static PyTypeObject drsuapi_DsReplicaSync_Type = {
   35277             :         PyVarObject_HEAD_INIT(NULL, 0)
   35278             :         .tp_name = "drsuapi.DsReplicaSync",
   35279             :         .tp_getset = py_drsuapi_DsReplicaSync_getsetters,
   35280             :         .tp_methods = py_drsuapi_DsReplicaSync_methods,
   35281             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   35282             :         .tp_new = py_drsuapi_DsReplicaSync_new,
   35283             : };
   35284             : 
   35285         967 : static bool pack_py_drsuapi_DsReplicaSync_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaSync *r)
   35286             : {
   35287           0 :         PyObject *py_bind_handle;
   35288           0 :         PyObject *py_level;
   35289           0 :         PyObject *py_req;
   35290         967 :         const char *kwnames[] = {
   35291             :                 "bind_handle", "level", "req", NULL
   35292             :         };
   35293             : 
   35294         967 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaSync", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   35295           0 :                 return false;
   35296             :         }
   35297             : 
   35298         967 :         if (py_bind_handle == NULL) {
   35299           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   35300           0 :                 return false;
   35301             :         }
   35302         967 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   35303         967 :         if (r->in.bind_handle == NULL) {
   35304           0 :                 PyErr_NoMemory();
   35305           0 :                 return false;
   35306             :         }
   35307         967 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   35308         967 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   35309           0 :                 PyErr_NoMemory();
   35310           0 :                 return false;
   35311             :         }
   35312         967 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   35313         967 :         if (py_level == NULL) {
   35314           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   35315           0 :                 return false;
   35316             :         }
   35317             :         {
   35318         967 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   35319         967 :                 if (PyLong_Check(py_level)) {
   35320           0 :                         unsigned long long test_var;
   35321         967 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   35322         967 :                         if (PyErr_Occurred() != NULL) {
   35323           0 :                                 return false;
   35324             :                         }
   35325         967 :                         if (test_var > uint_max) {
   35326           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35327             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35328           0 :                                 return false;
   35329             :                         }
   35330         967 :                         r->in.level = test_var;
   35331             :                 } else {
   35332           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35333             :                           PyLong_Type.tp_name);
   35334           0 :                         return false;
   35335             :                 }
   35336             :         }
   35337         967 :         if (py_req == NULL) {
   35338           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   35339           0 :                 return false;
   35340             :         }
   35341         967 :         r->in.req = talloc_ptrtype(r, r->in.req);
   35342         967 :         if (r->in.req == NULL) {
   35343           0 :                 PyErr_NoMemory();
   35344           0 :                 return false;
   35345             :         }
   35346             :         {
   35347           0 :                 union drsuapi_DsReplicaSyncRequest *req_switch_1;
   35348         967 :                 req_switch_1 = (union drsuapi_DsReplicaSyncRequest *)pyrpc_export_union(&drsuapi_DsReplicaSyncRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaSyncRequest");
   35349         967 :                 if (req_switch_1 == NULL) {
   35350           0 :                         return false;
   35351             :                 }
   35352         967 :                 r->in.req = req_switch_1;
   35353             :         }
   35354         967 :         return true;
   35355             : }
   35356             : 
   35357         967 : static PyObject *unpack_py_drsuapi_DsReplicaSync_args_out(struct drsuapi_DsReplicaSync *r)
   35358             : {
   35359           0 :         PyObject *result;
   35360         967 :         result = Py_None;
   35361         962 :         Py_INCREF(result);
   35362         967 :         if (!W_ERROR_IS_OK(r->out.result)) {
   35363           2 :                 PyErr_SetWERROR(r->out.result);
   35364           2 :                 return NULL;
   35365             :         }
   35366             : 
   35367         965 :         return result;
   35368             : }
   35369             : 
   35370             : 
   35371           0 : static PyObject *py_drsuapi_DsGetNCChanges_in_get_bind_handle(PyObject *obj, void *closure)
   35372             : {
   35373           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(obj);
   35374           0 :         PyObject *py_bind_handle;
   35375           0 :         if (object->in.bind_handle == NULL) {
   35376           0 :                 Py_RETURN_NONE;
   35377             :         }
   35378           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   35379           0 :         return py_bind_handle;
   35380             : }
   35381             : 
   35382           0 : static int py_drsuapi_DsGetNCChanges_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   35383             : {
   35384           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35385           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   35386           0 :         if (value == NULL) {
   35387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   35388           0 :                 return -1;
   35389             :         }
   35390           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   35391           0 :         if (object->in.bind_handle == NULL) {
   35392           0 :                 PyErr_NoMemory();
   35393           0 :                 return -1;
   35394             :         }
   35395           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   35396           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   35397           0 :                 PyErr_NoMemory();
   35398           0 :                 return -1;
   35399             :         }
   35400           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   35401           0 :         return 0;
   35402             : }
   35403             : 
   35404           0 : static PyObject *py_drsuapi_DsGetNCChanges_in_get_level(PyObject *obj, void *closure)
   35405             : {
   35406           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(obj);
   35407           0 :         PyObject *py_level;
   35408           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   35409           0 :         return py_level;
   35410             : }
   35411             : 
   35412           0 : static int py_drsuapi_DsGetNCChanges_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   35413             : {
   35414           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35415           0 :         if (value == NULL) {
   35416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   35417           0 :                 return -1;
   35418             :         }
   35419             :         {
   35420           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   35421           0 :                 if (PyLong_Check(value)) {
   35422           0 :                         unsigned long long test_var;
   35423           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35424           0 :                         if (PyErr_Occurred() != NULL) {
   35425           0 :                                 return -1;
   35426             :                         }
   35427           0 :                         if (test_var > uint_max) {
   35428           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35429             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35430           0 :                                 return -1;
   35431             :                         }
   35432           0 :                         object->in.level = test_var;
   35433             :                 } else {
   35434           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35435             :                           PyLong_Type.tp_name);
   35436           0 :                         return -1;
   35437             :                 }
   35438             :         }
   35439           0 :         return 0;
   35440             : }
   35441             : 
   35442           0 : static PyObject *py_drsuapi_DsGetNCChanges_in_get_req(PyObject *obj, void *closure)
   35443             : {
   35444           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(obj);
   35445           0 :         PyObject *py_req;
   35446           0 :         if (object->in.req == NULL) {
   35447           0 :                 Py_RETURN_NONE;
   35448             :         }
   35449           0 :         py_req = pyrpc_import_union(&drsuapi_DsGetNCChangesRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetNCChangesRequest");
   35450           0 :         if (py_req == NULL) {
   35451           0 :                 return NULL;
   35452             :         }
   35453           0 :         return py_req;
   35454             : }
   35455             : 
   35456           0 : static int py_drsuapi_DsGetNCChanges_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   35457             : {
   35458           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35459           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   35460           0 :         if (value == NULL) {
   35461           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   35462           0 :                 return -1;
   35463             :         }
   35464           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   35465           0 :         if (object->in.req == NULL) {
   35466           0 :                 PyErr_NoMemory();
   35467           0 :                 return -1;
   35468             :         }
   35469             :         {
   35470           0 :                 union drsuapi_DsGetNCChangesRequest *req_switch_1;
   35471           0 :                 req_switch_1 = (union drsuapi_DsGetNCChangesRequest *)pyrpc_export_union(&drsuapi_DsGetNCChangesRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsGetNCChangesRequest");
   35472           0 :                 if (req_switch_1 == NULL) {
   35473           0 :                         return -1;
   35474             :                 }
   35475           0 :                 object->in.req = req_switch_1;
   35476             :         }
   35477           0 :         return 0;
   35478             : }
   35479             : 
   35480           0 : static PyObject *py_drsuapi_DsGetNCChanges_out_get_level_out(PyObject *obj, void *closure)
   35481             : {
   35482           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(obj);
   35483           0 :         PyObject *py_level_out;
   35484           0 :         if (object->out.level_out == NULL) {
   35485           0 :                 Py_RETURN_NONE;
   35486             :         }
   35487           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   35488           0 :         return py_level_out;
   35489             : }
   35490             : 
   35491           0 : static int py_drsuapi_DsGetNCChanges_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   35492             : {
   35493           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35494           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   35495           0 :         if (value == NULL) {
   35496           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   35497           0 :                 return -1;
   35498             :         }
   35499           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   35500           0 :         if (object->out.level_out == NULL) {
   35501           0 :                 PyErr_NoMemory();
   35502           0 :                 return -1;
   35503             :         }
   35504             :         {
   35505           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   35506           0 :                 if (PyLong_Check(value)) {
   35507           0 :                         unsigned long long test_var;
   35508           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   35509           0 :                         if (PyErr_Occurred() != NULL) {
   35510           0 :                                 return -1;
   35511             :                         }
   35512           0 :                         if (test_var > uint_max) {
   35513           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35514             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35515           0 :                                 return -1;
   35516             :                         }
   35517           0 :                         *object->out.level_out = test_var;
   35518             :                 } else {
   35519           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35520             :                           PyLong_Type.tp_name);
   35521           0 :                         return -1;
   35522             :                 }
   35523             :         }
   35524           0 :         return 0;
   35525             : }
   35526             : 
   35527           0 : static PyObject *py_drsuapi_DsGetNCChanges_out_get_ctr(PyObject *obj, void *closure)
   35528             : {
   35529           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(obj);
   35530           0 :         PyObject *py_ctr;
   35531           0 :         if (object->out.ctr == NULL) {
   35532           0 :                 Py_RETURN_NONE;
   35533             :         }
   35534           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetNCChangesCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsGetNCChangesCtr");
   35535           0 :         if (py_ctr == NULL) {
   35536           0 :                 return NULL;
   35537             :         }
   35538           0 :         return py_ctr;
   35539             : }
   35540             : 
   35541           0 : static int py_drsuapi_DsGetNCChanges_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   35542             : {
   35543           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35544           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   35545           0 :         if (value == NULL) {
   35546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   35547           0 :                 return -1;
   35548             :         }
   35549           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   35550           0 :         if (object->out.ctr == NULL) {
   35551           0 :                 PyErr_NoMemory();
   35552           0 :                 return -1;
   35553             :         }
   35554             :         {
   35555           0 :                 union drsuapi_DsGetNCChangesCtr *ctr_switch_1;
   35556           0 :                 ctr_switch_1 = (union drsuapi_DsGetNCChangesCtr *)pyrpc_export_union(&drsuapi_DsGetNCChangesCtr_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsGetNCChangesCtr");
   35557           0 :                 if (ctr_switch_1 == NULL) {
   35558           0 :                         return -1;
   35559             :                 }
   35560           0 :                 object->out.ctr = ctr_switch_1;
   35561             :         }
   35562           0 :         return 0;
   35563             : }
   35564             : 
   35565           0 : static PyObject *py_drsuapi_DsGetNCChanges_get_result(PyObject *obj, void *closure)
   35566             : {
   35567           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(obj);
   35568           0 :         PyObject *py_result;
   35569           0 :         py_result = PyErr_FromWERROR(object->out.result);
   35570           0 :         return py_result;
   35571             : }
   35572             : 
   35573           0 : static int py_drsuapi_DsGetNCChanges_set_result(PyObject *py_obj, PyObject *value, void *closure)
   35574             : {
   35575           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35576           0 :         if (value == NULL) {
   35577           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   35578           0 :                 return -1;
   35579             :         }
   35580           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   35581           0 :         return 0;
   35582             : }
   35583             : 
   35584             : static PyGetSetDef py_drsuapi_DsGetNCChanges_getsetters[] = {
   35585             :         {
   35586             :                 .name = discard_const_p(char, "in_bind_handle"),
   35587             :                 .get = py_drsuapi_DsGetNCChanges_in_get_bind_handle,
   35588             :                 .set = py_drsuapi_DsGetNCChanges_in_set_bind_handle,
   35589             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   35590             :         },
   35591             :         {
   35592             :                 .name = discard_const_p(char, "in_level"),
   35593             :                 .get = py_drsuapi_DsGetNCChanges_in_get_level,
   35594             :                 .set = py_drsuapi_DsGetNCChanges_in_set_level,
   35595             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35596             :         },
   35597             :         {
   35598             :                 .name = discard_const_p(char, "in_req"),
   35599             :                 .get = py_drsuapi_DsGetNCChanges_in_get_req,
   35600             :                 .set = py_drsuapi_DsGetNCChanges_in_set_req,
   35601             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesRequest")
   35602             :         },
   35603             :         {
   35604             :                 .name = discard_const_p(char, "out_level_out"),
   35605             :                 .get = py_drsuapi_DsGetNCChanges_out_get_level_out,
   35606             :                 .set = py_drsuapi_DsGetNCChanges_out_set_level_out,
   35607             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   35608             :         },
   35609             :         {
   35610             :                 .name = discard_const_p(char, "out_ctr"),
   35611             :                 .get = py_drsuapi_DsGetNCChanges_out_get_ctr,
   35612             :                 .set = py_drsuapi_DsGetNCChanges_out_set_ctr,
   35613             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr")
   35614             :         },
   35615             :         {
   35616             :                 .name = discard_const_p(char, "result"),
   35617             :                 .get = py_drsuapi_DsGetNCChanges_get_result,
   35618             :                 .set = py_drsuapi_DsGetNCChanges_set_result,
   35619             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   35620             :         },
   35621             :         { .name = NULL }
   35622             : };
   35623             : 
   35624           0 : static PyObject *py_drsuapi_DsGetNCChanges_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   35625             : {
   35626           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsGetNCChanges, type);
   35627           0 :         struct drsuapi_DsGetNCChanges *_self = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(self);
   35628           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   35629           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   35630           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesRequest);
   35631           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   35632           0 :         _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesCtr);
   35633           0 :         return self;
   35634             : }
   35635             : 
   35636           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   35637             : {
   35638             : 
   35639             : 
   35640           0 :         return PyLong_FromLong(3);
   35641             : }
   35642             : 
   35643           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   35644             : {
   35645           0 :         const struct ndr_interface_call *call = NULL;
   35646           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35647           0 :         PyObject *ret = NULL;
   35648           0 :         struct ndr_push *push = NULL;
   35649           0 :         DATA_BLOB blob;
   35650           0 :         enum ndr_err_code err;
   35651             : 
   35652           0 :         if (ndr_table_drsuapi.num_calls < 4) {
   35653           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNCChanges_ndr_pack");
   35654           0 :                 return NULL;
   35655             :         }
   35656           0 :         call = &ndr_table_drsuapi.calls[3];
   35657             : 
   35658           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   35659           0 :         if (push == NULL) {
   35660           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35661           0 :                 return NULL;
   35662             :         }
   35663             : 
   35664           0 :         push->flags |= ndr_push_flags;
   35665             : 
   35666           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   35667           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35668           0 :                 TALLOC_FREE(push);
   35669           0 :                 PyErr_SetNdrError(err);
   35670           0 :                 return NULL;
   35671             :         }
   35672           0 :         blob = ndr_push_blob(push);
   35673           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   35674           0 :         TALLOC_FREE(push);
   35675           0 :         return ret;
   35676             : }
   35677             : 
   35678           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35679             : {
   35680           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35681           0 :         PyObject *bigendian_obj = NULL;
   35682           0 :         PyObject *ndr64_obj = NULL;
   35683           0 :         libndr_flags ndr_push_flags = 0;
   35684             : 
   35685           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   35686             :                 discard_const_p(char *, kwnames),
   35687             :                 &bigendian_obj,
   35688             :                 &ndr64_obj)) {
   35689           0 :                 return NULL;
   35690             :         }
   35691             : 
   35692           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35693           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35694             :         }
   35695           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35696           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35697             :         }
   35698             : 
   35699           0 :         return py_drsuapi_DsGetNCChanges_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   35700             : }
   35701             : 
   35702           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35703             : {
   35704           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   35705           0 :         PyObject *bigendian_obj = NULL;
   35706           0 :         PyObject *ndr64_obj = NULL;
   35707           0 :         libndr_flags ndr_push_flags = 0;
   35708             : 
   35709           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   35710             :                 discard_const_p(char *, kwnames),
   35711             :                 &bigendian_obj,
   35712             :                 &ndr64_obj)) {
   35713           0 :                 return NULL;
   35714             :         }
   35715             : 
   35716           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35717           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   35718             :         }
   35719           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35720           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   35721             :         }
   35722             : 
   35723           0 :         return py_drsuapi_DsGetNCChanges_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   35724             : }
   35725             : 
   35726           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   35727             : {
   35728           0 :         const struct ndr_interface_call *call = NULL;
   35729           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35730           0 :         struct ndr_pull *pull = NULL;
   35731           0 :         enum ndr_err_code err;
   35732             : 
   35733           0 :         if (ndr_table_drsuapi.num_calls < 4) {
   35734           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNCChanges_ndr_unpack");
   35735           0 :                 return NULL;
   35736             :         }
   35737           0 :         call = &ndr_table_drsuapi.calls[3];
   35738             : 
   35739           0 :         pull = ndr_pull_init_blob(blob, object);
   35740           0 :         if (pull == NULL) {
   35741           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   35742           0 :                 return NULL;
   35743             :         }
   35744             : 
   35745           0 :         pull->flags |= ndr_pull_flags;
   35746             : 
   35747           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   35748           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   35749           0 :                 TALLOC_FREE(pull);
   35750           0 :                 PyErr_SetNdrError(err);
   35751           0 :                 return NULL;
   35752             :         }
   35753           0 :         if (!allow_remaining) {
   35754           0 :                 uint32_t highest_ofs;
   35755             : 
   35756           0 :                 if (pull->offset > pull->relative_highest_offset) {
   35757           0 :                         highest_ofs = pull->offset;
   35758             :                 } else {
   35759           0 :                         highest_ofs = pull->relative_highest_offset;
   35760             :                 }
   35761           0 :                 if (highest_ofs < pull->data_size) {
   35762           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   35763             :                                 "not all bytes consumed ofs[%u] size[%u]",
   35764             :                                 highest_ofs, pull->data_size);
   35765           0 :                         TALLOC_FREE(pull);
   35766           0 :                         PyErr_SetNdrError(err);
   35767           0 :                         return NULL;
   35768             :                 }
   35769             :         }
   35770             : 
   35771           0 :         TALLOC_FREE(pull);
   35772           0 :         Py_RETURN_NONE;
   35773             : }
   35774             : 
   35775           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35776             : {
   35777           0 :         DATA_BLOB blob;
   35778           0 :         Py_ssize_t blob_length = 0;
   35779           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35780           0 :         PyObject *bigendian_obj = NULL;
   35781           0 :         PyObject *ndr64_obj = NULL;
   35782           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35783           0 :         PyObject *allow_remaining_obj = NULL;
   35784           0 :         bool allow_remaining = false;
   35785             : 
   35786           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   35787             :                 discard_const_p(char *, kwnames),
   35788             :                 &blob.data, &blob_length,
   35789             :                 &bigendian_obj,
   35790             :                 &ndr64_obj,
   35791             :                 &allow_remaining_obj)) {
   35792           0 :                 return NULL;
   35793             :         }
   35794           0 :         blob.length = blob_length;
   35795             : 
   35796           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35797           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35798             :         }
   35799           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35800           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35801             :         }
   35802             : 
   35803           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35804           0 :                 allow_remaining = true;
   35805             :         }
   35806             : 
   35807           0 :         return py_drsuapi_DsGetNCChanges_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   35808             : }
   35809             : 
   35810           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   35811             : {
   35812           0 :         DATA_BLOB blob;
   35813           0 :         Py_ssize_t blob_length = 0;
   35814           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   35815           0 :         PyObject *bigendian_obj = NULL;
   35816           0 :         PyObject *ndr64_obj = NULL;
   35817           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   35818           0 :         PyObject *allow_remaining_obj = NULL;
   35819           0 :         bool allow_remaining = false;
   35820             : 
   35821           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   35822             :                 discard_const_p(char *, kwnames),
   35823             :                 &blob.data, &blob_length,
   35824             :                 &bigendian_obj,
   35825             :                 &ndr64_obj,
   35826             :                 &allow_remaining_obj)) {
   35827           0 :                 return NULL;
   35828             :         }
   35829           0 :         blob.length = blob_length;
   35830             : 
   35831           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   35832           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   35833             :         }
   35834           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   35835           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   35836             :         }
   35837             : 
   35838           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   35839           0 :                 allow_remaining = true;
   35840             :         }
   35841             : 
   35842           0 :         return py_drsuapi_DsGetNCChanges_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   35843             : }
   35844             : 
   35845           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   35846             : {
   35847           0 :         const struct ndr_interface_call *call = NULL;
   35848           0 :         struct drsuapi_DsGetNCChanges *object = pytalloc_get_ptr(py_obj);
   35849           0 :         PyObject *ret;
   35850           0 :         char *retstr;
   35851             : 
   35852           0 :         if (ndr_table_drsuapi.num_calls < 4) {
   35853           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNCChanges_ndr_print");
   35854           0 :                 return NULL;
   35855             :         }
   35856           0 :         call = &ndr_table_drsuapi.calls[3];
   35857             : 
   35858           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   35859           0 :         ret = PyUnicode_FromString(retstr);
   35860           0 :         TALLOC_FREE(retstr);
   35861             : 
   35862           0 :         return ret;
   35863             : }
   35864             : 
   35865           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35866             : {
   35867           0 :         return py_drsuapi_DsGetNCChanges_ndr_print(py_obj, "drsuapi_DsGetNCChanges_in", NDR_IN);
   35868             : }
   35869             : 
   35870           0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   35871             : {
   35872           0 :         return py_drsuapi_DsGetNCChanges_ndr_print(py_obj, "drsuapi_DsGetNCChanges_out", NDR_OUT);
   35873             : }
   35874             : 
   35875             : static PyMethodDef py_drsuapi_DsGetNCChanges_methods[] = {
   35876             :         { "opnum", (PyCFunction)py_drsuapi_DsGetNCChanges_ndr_opnum, METH_NOARGS|METH_CLASS,
   35877             :                 "drsuapi.DsGetNCChanges.opnum() -> 3 (0x03) " },
   35878             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChanges_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   35879             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   35880             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChanges_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   35881             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   35882             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChanges_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   35883             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   35884             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChanges_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   35885             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   35886             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetNCChanges_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   35887             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetNCChanges_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   35888             :         { NULL, NULL, 0, NULL }
   35889             : };
   35890             : 
   35891             : 
   35892             : static PyTypeObject drsuapi_DsGetNCChanges_Type = {
   35893             :         PyVarObject_HEAD_INIT(NULL, 0)
   35894             :         .tp_name = "drsuapi.DsGetNCChanges",
   35895             :         .tp_getset = py_drsuapi_DsGetNCChanges_getsetters,
   35896             :         .tp_methods = py_drsuapi_DsGetNCChanges_methods,
   35897             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   35898             :         .tp_new = py_drsuapi_DsGetNCChanges_new,
   35899             : };
   35900             : 
   35901        5455 : static bool pack_py_drsuapi_DsGetNCChanges_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetNCChanges *r)
   35902             : {
   35903           0 :         PyObject *py_bind_handle;
   35904           0 :         PyObject *py_level;
   35905           0 :         PyObject *py_req;
   35906        5455 :         const char *kwnames[] = {
   35907             :                 "bind_handle", "level", "req", NULL
   35908             :         };
   35909             : 
   35910        5455 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetNCChanges", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   35911           0 :                 return false;
   35912             :         }
   35913             : 
   35914        5455 :         if (py_bind_handle == NULL) {
   35915           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   35916           0 :                 return false;
   35917             :         }
   35918        5455 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   35919        5455 :         if (r->in.bind_handle == NULL) {
   35920           0 :                 PyErr_NoMemory();
   35921           0 :                 return false;
   35922             :         }
   35923        5455 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   35924        5455 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   35925           0 :                 PyErr_NoMemory();
   35926           0 :                 return false;
   35927             :         }
   35928        5455 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   35929        5455 :         if (py_level == NULL) {
   35930           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   35931           0 :                 return false;
   35932             :         }
   35933             :         {
   35934        5455 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   35935        5455 :                 if (PyLong_Check(py_level)) {
   35936           0 :                         unsigned long long test_var;
   35937        5455 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   35938        5455 :                         if (PyErr_Occurred() != NULL) {
   35939           0 :                                 return false;
   35940             :                         }
   35941        5455 :                         if (test_var > uint_max) {
   35942           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   35943             :                                   PyLong_Type.tp_name, uint_max, test_var);
   35944           0 :                                 return false;
   35945             :                         }
   35946        5455 :                         r->in.level = test_var;
   35947             :                 } else {
   35948           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   35949             :                           PyLong_Type.tp_name);
   35950           0 :                         return false;
   35951             :                 }
   35952             :         }
   35953        5455 :         if (py_req == NULL) {
   35954           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   35955           0 :                 return false;
   35956             :         }
   35957        5455 :         r->in.req = talloc_ptrtype(r, r->in.req);
   35958        5455 :         if (r->in.req == NULL) {
   35959           0 :                 PyErr_NoMemory();
   35960           0 :                 return false;
   35961             :         }
   35962             :         {
   35963           0 :                 union drsuapi_DsGetNCChangesRequest *req_switch_1;
   35964        5455 :                 req_switch_1 = (union drsuapi_DsGetNCChangesRequest *)pyrpc_export_union(&drsuapi_DsGetNCChangesRequest_Type, r, r->in.level, py_req, "union drsuapi_DsGetNCChangesRequest");
   35965        5455 :                 if (req_switch_1 == NULL) {
   35966           0 :                         return false;
   35967             :                 }
   35968        5455 :                 r->in.req = req_switch_1;
   35969             :         }
   35970        5455 :         return true;
   35971             : }
   35972             : 
   35973        5455 : static PyObject *unpack_py_drsuapi_DsGetNCChanges_args_out(struct drsuapi_DsGetNCChanges *r)
   35974             : {
   35975           0 :         PyObject *result;
   35976           0 :         PyObject *py_level_out;
   35977           0 :         PyObject *py_ctr;
   35978        5455 :         result = PyTuple_New(2);
   35979        5455 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   35980        5455 :         PyTuple_SetItem(result, 0, py_level_out);
   35981        5455 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetNCChangesCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsGetNCChangesCtr");
   35982        5455 :         if (py_ctr == NULL) {
   35983           0 :                 return NULL;
   35984             :         }
   35985        5455 :         PyTuple_SetItem(result, 1, py_ctr);
   35986        5455 :         if (!W_ERROR_IS_OK(r->out.result)) {
   35987         102 :                 PyErr_SetWERROR(r->out.result);
   35988         102 :                 return NULL;
   35989             :         }
   35990             : 
   35991        5353 :         return result;
   35992             : }
   35993             : 
   35994             : 
   35995           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_in_get_bind_handle(PyObject *obj, void *closure)
   35996             : {
   35997           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(obj);
   35998           0 :         PyObject *py_bind_handle;
   35999           0 :         if (object->in.bind_handle == NULL) {
   36000           0 :                 Py_RETURN_NONE;
   36001             :         }
   36002           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   36003           0 :         return py_bind_handle;
   36004             : }
   36005             : 
   36006           0 : static int py_drsuapi_DsReplicaUpdateRefs_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   36007             : {
   36008           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(py_obj);
   36009           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   36010           0 :         if (value == NULL) {
   36011           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   36012           0 :                 return -1;
   36013             :         }
   36014           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   36015           0 :         if (object->in.bind_handle == NULL) {
   36016           0 :                 PyErr_NoMemory();
   36017           0 :                 return -1;
   36018             :         }
   36019           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   36020           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   36021           0 :                 PyErr_NoMemory();
   36022           0 :                 return -1;
   36023             :         }
   36024           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   36025           0 :         return 0;
   36026             : }
   36027             : 
   36028           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_in_get_level(PyObject *obj, void *closure)
   36029             : {
   36030           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(obj);
   36031           0 :         PyObject *py_level;
   36032           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   36033           0 :         return py_level;
   36034             : }
   36035             : 
   36036           0 : static int py_drsuapi_DsReplicaUpdateRefs_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   36037             : {
   36038           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(py_obj);
   36039           0 :         if (value == NULL) {
   36040           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   36041           0 :                 return -1;
   36042             :         }
   36043             :         {
   36044           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   36045           0 :                 if (PyLong_Check(value)) {
   36046           0 :                         unsigned long long test_var;
   36047           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36048           0 :                         if (PyErr_Occurred() != NULL) {
   36049           0 :                                 return -1;
   36050             :                         }
   36051           0 :                         if (test_var > uint_max) {
   36052           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36053             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36054           0 :                                 return -1;
   36055             :                         }
   36056           0 :                         object->in.level = test_var;
   36057             :                 } else {
   36058           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36059             :                           PyLong_Type.tp_name);
   36060           0 :                         return -1;
   36061             :                 }
   36062             :         }
   36063           0 :         return 0;
   36064             : }
   36065             : 
   36066           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_in_get_req(PyObject *obj, void *closure)
   36067             : {
   36068           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(obj);
   36069           0 :         PyObject *py_req;
   36070           0 :         py_req = pyrpc_import_union(&drsuapi_DsReplicaUpdateRefsRequest_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.req, "union drsuapi_DsReplicaUpdateRefsRequest");
   36071           0 :         if (py_req == NULL) {
   36072           0 :                 return NULL;
   36073             :         }
   36074           0 :         return py_req;
   36075             : }
   36076             : 
   36077           0 : static int py_drsuapi_DsReplicaUpdateRefs_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   36078             : {
   36079           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(py_obj);
   36080           0 :         if (value == NULL) {
   36081           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   36082           0 :                 return -1;
   36083             :         }
   36084             :         {
   36085           0 :                 union drsuapi_DsReplicaUpdateRefsRequest *req_switch_0;
   36086           0 :                 req_switch_0 = (union drsuapi_DsReplicaUpdateRefsRequest *)pyrpc_export_union(&drsuapi_DsReplicaUpdateRefsRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsReplicaUpdateRefsRequest");
   36087           0 :                 if (req_switch_0 == NULL) {
   36088           0 :                         return -1;
   36089             :                 }
   36090           0 :                 object->in.req = *req_switch_0;
   36091             :         }
   36092           0 :         return 0;
   36093             : }
   36094             : 
   36095           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_get_result(PyObject *obj, void *closure)
   36096             : {
   36097           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(obj);
   36098           0 :         PyObject *py_result;
   36099           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36100           0 :         return py_result;
   36101             : }
   36102             : 
   36103           0 : static int py_drsuapi_DsReplicaUpdateRefs_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36104             : {
   36105           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(py_obj);
   36106           0 :         if (value == NULL) {
   36107           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   36108           0 :                 return -1;
   36109             :         }
   36110           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36111           0 :         return 0;
   36112             : }
   36113             : 
   36114             : static PyGetSetDef py_drsuapi_DsReplicaUpdateRefs_getsetters[] = {
   36115             :         {
   36116             :                 .name = discard_const_p(char, "in_bind_handle"),
   36117             :                 .get = py_drsuapi_DsReplicaUpdateRefs_in_get_bind_handle,
   36118             :                 .set = py_drsuapi_DsReplicaUpdateRefs_in_set_bind_handle,
   36119             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   36120             :         },
   36121             :         {
   36122             :                 .name = discard_const_p(char, "in_level"),
   36123             :                 .get = py_drsuapi_DsReplicaUpdateRefs_in_get_level,
   36124             :                 .set = py_drsuapi_DsReplicaUpdateRefs_in_set_level,
   36125             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36126             :         },
   36127             :         {
   36128             :                 .name = discard_const_p(char, "in_req"),
   36129             :                 .get = py_drsuapi_DsReplicaUpdateRefs_in_get_req,
   36130             :                 .set = py_drsuapi_DsReplicaUpdateRefs_in_set_req,
   36131             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaUpdateRefsRequest")
   36132             :         },
   36133             :         {
   36134             :                 .name = discard_const_p(char, "result"),
   36135             :                 .get = py_drsuapi_DsReplicaUpdateRefs_get_result,
   36136             :                 .set = py_drsuapi_DsReplicaUpdateRefs_set_result,
   36137             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   36138             :         },
   36139             :         { .name = NULL }
   36140             : };
   36141             : 
   36142           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   36143             : {
   36144           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsReplicaUpdateRefs, type);
   36145           0 :         struct drsuapi_DsReplicaUpdateRefs *_self = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(self);
   36146           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   36147           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   36148           0 :         return self;
   36149             : }
   36150             : 
   36151           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   36152             : {
   36153             : 
   36154             : 
   36155           0 :         return PyLong_FromLong(4);
   36156             : }
   36157             : 
   36158           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   36159             : {
   36160           0 :         const struct ndr_interface_call *call = NULL;
   36161           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(py_obj);
   36162           0 :         PyObject *ret = NULL;
   36163           0 :         struct ndr_push *push = NULL;
   36164           0 :         DATA_BLOB blob;
   36165           0 :         enum ndr_err_code err;
   36166             : 
   36167           0 :         if (ndr_table_drsuapi.num_calls < 5) {
   36168           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaUpdateRefs_ndr_pack");
   36169           0 :                 return NULL;
   36170             :         }
   36171           0 :         call = &ndr_table_drsuapi.calls[4];
   36172             : 
   36173           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   36174           0 :         if (push == NULL) {
   36175           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36176           0 :                 return NULL;
   36177             :         }
   36178             : 
   36179           0 :         push->flags |= ndr_push_flags;
   36180             : 
   36181           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   36182           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36183           0 :                 TALLOC_FREE(push);
   36184           0 :                 PyErr_SetNdrError(err);
   36185           0 :                 return NULL;
   36186             :         }
   36187           0 :         blob = ndr_push_blob(push);
   36188           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   36189           0 :         TALLOC_FREE(push);
   36190           0 :         return ret;
   36191             : }
   36192             : 
   36193           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36194             : {
   36195           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36196           0 :         PyObject *bigendian_obj = NULL;
   36197           0 :         PyObject *ndr64_obj = NULL;
   36198           0 :         libndr_flags ndr_push_flags = 0;
   36199             : 
   36200           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   36201             :                 discard_const_p(char *, kwnames),
   36202             :                 &bigendian_obj,
   36203             :                 &ndr64_obj)) {
   36204           0 :                 return NULL;
   36205             :         }
   36206             : 
   36207           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36208           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36209             :         }
   36210           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36211           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36212             :         }
   36213             : 
   36214           0 :         return py_drsuapi_DsReplicaUpdateRefs_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   36215             : }
   36216             : 
   36217           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36218             : {
   36219           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36220           0 :         PyObject *bigendian_obj = NULL;
   36221           0 :         PyObject *ndr64_obj = NULL;
   36222           0 :         libndr_flags ndr_push_flags = 0;
   36223             : 
   36224           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   36225             :                 discard_const_p(char *, kwnames),
   36226             :                 &bigendian_obj,
   36227             :                 &ndr64_obj)) {
   36228           0 :                 return NULL;
   36229             :         }
   36230             : 
   36231           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36232           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36233             :         }
   36234           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36235           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36236             :         }
   36237             : 
   36238           0 :         return py_drsuapi_DsReplicaUpdateRefs_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   36239             : }
   36240             : 
   36241           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   36242             : {
   36243           0 :         const struct ndr_interface_call *call = NULL;
   36244           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(py_obj);
   36245           0 :         struct ndr_pull *pull = NULL;
   36246           0 :         enum ndr_err_code err;
   36247             : 
   36248           0 :         if (ndr_table_drsuapi.num_calls < 5) {
   36249           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaUpdateRefs_ndr_unpack");
   36250           0 :                 return NULL;
   36251             :         }
   36252           0 :         call = &ndr_table_drsuapi.calls[4];
   36253             : 
   36254           0 :         pull = ndr_pull_init_blob(blob, object);
   36255           0 :         if (pull == NULL) {
   36256           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36257           0 :                 return NULL;
   36258             :         }
   36259             : 
   36260           0 :         pull->flags |= ndr_pull_flags;
   36261             : 
   36262           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   36263           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36264           0 :                 TALLOC_FREE(pull);
   36265           0 :                 PyErr_SetNdrError(err);
   36266           0 :                 return NULL;
   36267             :         }
   36268           0 :         if (!allow_remaining) {
   36269           0 :                 uint32_t highest_ofs;
   36270             : 
   36271           0 :                 if (pull->offset > pull->relative_highest_offset) {
   36272           0 :                         highest_ofs = pull->offset;
   36273             :                 } else {
   36274           0 :                         highest_ofs = pull->relative_highest_offset;
   36275             :                 }
   36276           0 :                 if (highest_ofs < pull->data_size) {
   36277           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   36278             :                                 "not all bytes consumed ofs[%u] size[%u]",
   36279             :                                 highest_ofs, pull->data_size);
   36280           0 :                         TALLOC_FREE(pull);
   36281           0 :                         PyErr_SetNdrError(err);
   36282           0 :                         return NULL;
   36283             :                 }
   36284             :         }
   36285             : 
   36286           0 :         TALLOC_FREE(pull);
   36287           0 :         Py_RETURN_NONE;
   36288             : }
   36289             : 
   36290           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36291             : {
   36292           0 :         DATA_BLOB blob;
   36293           0 :         Py_ssize_t blob_length = 0;
   36294           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36295           0 :         PyObject *bigendian_obj = NULL;
   36296           0 :         PyObject *ndr64_obj = NULL;
   36297           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36298           0 :         PyObject *allow_remaining_obj = NULL;
   36299           0 :         bool allow_remaining = false;
   36300             : 
   36301           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   36302             :                 discard_const_p(char *, kwnames),
   36303             :                 &blob.data, &blob_length,
   36304             :                 &bigendian_obj,
   36305             :                 &ndr64_obj,
   36306             :                 &allow_remaining_obj)) {
   36307           0 :                 return NULL;
   36308             :         }
   36309           0 :         blob.length = blob_length;
   36310             : 
   36311           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36312           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36313             :         }
   36314           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36315           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36316             :         }
   36317             : 
   36318           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36319           0 :                 allow_remaining = true;
   36320             :         }
   36321             : 
   36322           0 :         return py_drsuapi_DsReplicaUpdateRefs_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   36323             : }
   36324             : 
   36325           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36326             : {
   36327           0 :         DATA_BLOB blob;
   36328           0 :         Py_ssize_t blob_length = 0;
   36329           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36330           0 :         PyObject *bigendian_obj = NULL;
   36331           0 :         PyObject *ndr64_obj = NULL;
   36332           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36333           0 :         PyObject *allow_remaining_obj = NULL;
   36334           0 :         bool allow_remaining = false;
   36335             : 
   36336           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   36337             :                 discard_const_p(char *, kwnames),
   36338             :                 &blob.data, &blob_length,
   36339             :                 &bigendian_obj,
   36340             :                 &ndr64_obj,
   36341             :                 &allow_remaining_obj)) {
   36342           0 :                 return NULL;
   36343             :         }
   36344           0 :         blob.length = blob_length;
   36345             : 
   36346           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36347           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36348             :         }
   36349           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36350           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36351             :         }
   36352             : 
   36353           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36354           0 :                 allow_remaining = true;
   36355             :         }
   36356             : 
   36357           0 :         return py_drsuapi_DsReplicaUpdateRefs_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   36358             : }
   36359             : 
   36360           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   36361             : {
   36362           0 :         const struct ndr_interface_call *call = NULL;
   36363           0 :         struct drsuapi_DsReplicaUpdateRefs *object = pytalloc_get_ptr(py_obj);
   36364           0 :         PyObject *ret;
   36365           0 :         char *retstr;
   36366             : 
   36367           0 :         if (ndr_table_drsuapi.num_calls < 5) {
   36368           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaUpdateRefs_ndr_print");
   36369           0 :                 return NULL;
   36370             :         }
   36371           0 :         call = &ndr_table_drsuapi.calls[4];
   36372             : 
   36373           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   36374           0 :         ret = PyUnicode_FromString(retstr);
   36375           0 :         TALLOC_FREE(retstr);
   36376             : 
   36377           0 :         return ret;
   36378             : }
   36379             : 
   36380           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36381             : {
   36382           0 :         return py_drsuapi_DsReplicaUpdateRefs_ndr_print(py_obj, "drsuapi_DsReplicaUpdateRefs_in", NDR_IN);
   36383             : }
   36384             : 
   36385           0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36386             : {
   36387           0 :         return py_drsuapi_DsReplicaUpdateRefs_ndr_print(py_obj, "drsuapi_DsReplicaUpdateRefs_out", NDR_OUT);
   36388             : }
   36389             : 
   36390             : static PyMethodDef py_drsuapi_DsReplicaUpdateRefs_methods[] = {
   36391             :         { "opnum", (PyCFunction)py_drsuapi_DsReplicaUpdateRefs_ndr_opnum, METH_NOARGS|METH_CLASS,
   36392             :                 "drsuapi.DsReplicaUpdateRefs.opnum() -> 4 (0x04) " },
   36393             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefs_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   36394             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   36395             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefs_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   36396             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   36397             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefs_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   36398             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   36399             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefs_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   36400             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   36401             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaUpdateRefs_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   36402             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaUpdateRefs_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   36403             :         { NULL, NULL, 0, NULL }
   36404             : };
   36405             : 
   36406             : 
   36407             : static PyTypeObject drsuapi_DsReplicaUpdateRefs_Type = {
   36408             :         PyVarObject_HEAD_INIT(NULL, 0)
   36409             :         .tp_name = "drsuapi.DsReplicaUpdateRefs",
   36410             :         .tp_getset = py_drsuapi_DsReplicaUpdateRefs_getsetters,
   36411             :         .tp_methods = py_drsuapi_DsReplicaUpdateRefs_methods,
   36412             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   36413             :         .tp_new = py_drsuapi_DsReplicaUpdateRefs_new,
   36414             : };
   36415             : 
   36416         195 : static bool pack_py_drsuapi_DsReplicaUpdateRefs_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaUpdateRefs *r)
   36417             : {
   36418           0 :         PyObject *py_bind_handle;
   36419           0 :         PyObject *py_level;
   36420           0 :         PyObject *py_req;
   36421         195 :         const char *kwnames[] = {
   36422             :                 "bind_handle", "level", "req", NULL
   36423             :         };
   36424             : 
   36425         195 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaUpdateRefs", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   36426           0 :                 return false;
   36427             :         }
   36428             : 
   36429         195 :         if (py_bind_handle == NULL) {
   36430           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   36431           0 :                 return false;
   36432             :         }
   36433         195 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   36434         195 :         if (r->in.bind_handle == NULL) {
   36435           0 :                 PyErr_NoMemory();
   36436           0 :                 return false;
   36437             :         }
   36438         195 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   36439         195 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   36440           0 :                 PyErr_NoMemory();
   36441           0 :                 return false;
   36442             :         }
   36443         195 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   36444         195 :         if (py_level == NULL) {
   36445           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   36446           0 :                 return false;
   36447             :         }
   36448             :         {
   36449         195 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   36450         195 :                 if (PyLong_Check(py_level)) {
   36451           0 :                         unsigned long long test_var;
   36452         195 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   36453         195 :                         if (PyErr_Occurred() != NULL) {
   36454           0 :                                 return false;
   36455             :                         }
   36456         195 :                         if (test_var > uint_max) {
   36457           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36458             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36459           0 :                                 return false;
   36460             :                         }
   36461         195 :                         r->in.level = test_var;
   36462             :                 } else {
   36463           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36464             :                           PyLong_Type.tp_name);
   36465           0 :                         return false;
   36466             :                 }
   36467             :         }
   36468         195 :         if (py_req == NULL) {
   36469           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   36470           0 :                 return false;
   36471             :         }
   36472             :         {
   36473           0 :                 union drsuapi_DsReplicaUpdateRefsRequest *req_switch_0;
   36474         195 :                 req_switch_0 = (union drsuapi_DsReplicaUpdateRefsRequest *)pyrpc_export_union(&drsuapi_DsReplicaUpdateRefsRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaUpdateRefsRequest");
   36475         195 :                 if (req_switch_0 == NULL) {
   36476           0 :                         return false;
   36477             :                 }
   36478         195 :                 r->in.req = *req_switch_0;
   36479             :         }
   36480         195 :         return true;
   36481             : }
   36482             : 
   36483         195 : static PyObject *unpack_py_drsuapi_DsReplicaUpdateRefs_args_out(struct drsuapi_DsReplicaUpdateRefs *r)
   36484             : {
   36485           0 :         PyObject *result;
   36486         195 :         result = Py_None;
   36487         180 :         Py_INCREF(result);
   36488         195 :         if (!W_ERROR_IS_OK(r->out.result)) {
   36489           0 :                 PyErr_SetWERROR(r->out.result);
   36490           0 :                 return NULL;
   36491             :         }
   36492             : 
   36493         195 :         return result;
   36494             : }
   36495             : 
   36496             : 
   36497           0 : static PyObject *py_drsuapi_DsReplicaAdd_in_get_bind_handle(PyObject *obj, void *closure)
   36498             : {
   36499           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(obj);
   36500           0 :         PyObject *py_bind_handle;
   36501           0 :         if (object->in.bind_handle == NULL) {
   36502           0 :                 Py_RETURN_NONE;
   36503             :         }
   36504           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   36505           0 :         return py_bind_handle;
   36506             : }
   36507             : 
   36508           0 : static int py_drsuapi_DsReplicaAdd_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   36509             : {
   36510           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(py_obj);
   36511           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   36512           0 :         if (value == NULL) {
   36513           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   36514           0 :                 return -1;
   36515             :         }
   36516           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   36517           0 :         if (object->in.bind_handle == NULL) {
   36518           0 :                 PyErr_NoMemory();
   36519           0 :                 return -1;
   36520             :         }
   36521           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   36522           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   36523           0 :                 PyErr_NoMemory();
   36524           0 :                 return -1;
   36525             :         }
   36526           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   36527           0 :         return 0;
   36528             : }
   36529             : 
   36530           0 : static PyObject *py_drsuapi_DsReplicaAdd_in_get_level(PyObject *obj, void *closure)
   36531             : {
   36532           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(obj);
   36533           0 :         PyObject *py_level;
   36534           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   36535           0 :         return py_level;
   36536             : }
   36537             : 
   36538           0 : static int py_drsuapi_DsReplicaAdd_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   36539             : {
   36540           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(py_obj);
   36541           0 :         if (value == NULL) {
   36542           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   36543           0 :                 return -1;
   36544             :         }
   36545             :         {
   36546           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   36547           0 :                 if (PyLong_Check(value)) {
   36548           0 :                         unsigned long long test_var;
   36549           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   36550           0 :                         if (PyErr_Occurred() != NULL) {
   36551           0 :                                 return -1;
   36552             :                         }
   36553           0 :                         if (test_var > uint_max) {
   36554           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36555             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36556           0 :                                 return -1;
   36557             :                         }
   36558           0 :                         object->in.level = test_var;
   36559             :                 } else {
   36560           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36561             :                           PyLong_Type.tp_name);
   36562           0 :                         return -1;
   36563             :                 }
   36564             :         }
   36565           0 :         return 0;
   36566             : }
   36567             : 
   36568           0 : static PyObject *py_drsuapi_DsReplicaAdd_in_get_req(PyObject *obj, void *closure)
   36569             : {
   36570           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(obj);
   36571           0 :         PyObject *py_req;
   36572           0 :         py_req = pyrpc_import_union(&drsuapi_DsReplicaAddRequest_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.req, "union drsuapi_DsReplicaAddRequest");
   36573           0 :         if (py_req == NULL) {
   36574           0 :                 return NULL;
   36575             :         }
   36576           0 :         return py_req;
   36577             : }
   36578             : 
   36579           0 : static int py_drsuapi_DsReplicaAdd_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   36580             : {
   36581           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(py_obj);
   36582           0 :         if (value == NULL) {
   36583           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   36584           0 :                 return -1;
   36585             :         }
   36586             :         {
   36587           0 :                 union drsuapi_DsReplicaAddRequest *req_switch_0;
   36588           0 :                 req_switch_0 = (union drsuapi_DsReplicaAddRequest *)pyrpc_export_union(&drsuapi_DsReplicaAddRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsReplicaAddRequest");
   36589           0 :                 if (req_switch_0 == NULL) {
   36590           0 :                         return -1;
   36591             :                 }
   36592           0 :                 object->in.req = *req_switch_0;
   36593             :         }
   36594           0 :         return 0;
   36595             : }
   36596             : 
   36597           0 : static PyObject *py_drsuapi_DsReplicaAdd_get_result(PyObject *obj, void *closure)
   36598             : {
   36599           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(obj);
   36600           0 :         PyObject *py_result;
   36601           0 :         py_result = PyErr_FromWERROR(object->out.result);
   36602           0 :         return py_result;
   36603             : }
   36604             : 
   36605           0 : static int py_drsuapi_DsReplicaAdd_set_result(PyObject *py_obj, PyObject *value, void *closure)
   36606             : {
   36607           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(py_obj);
   36608           0 :         if (value == NULL) {
   36609           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   36610           0 :                 return -1;
   36611             :         }
   36612           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   36613           0 :         return 0;
   36614             : }
   36615             : 
   36616             : static PyGetSetDef py_drsuapi_DsReplicaAdd_getsetters[] = {
   36617             :         {
   36618             :                 .name = discard_const_p(char, "in_bind_handle"),
   36619             :                 .get = py_drsuapi_DsReplicaAdd_in_get_bind_handle,
   36620             :                 .set = py_drsuapi_DsReplicaAdd_in_set_bind_handle,
   36621             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   36622             :         },
   36623             :         {
   36624             :                 .name = discard_const_p(char, "in_level"),
   36625             :                 .get = py_drsuapi_DsReplicaAdd_in_get_level,
   36626             :                 .set = py_drsuapi_DsReplicaAdd_in_set_level,
   36627             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   36628             :         },
   36629             :         {
   36630             :                 .name = discard_const_p(char, "in_req"),
   36631             :                 .get = py_drsuapi_DsReplicaAdd_in_get_req,
   36632             :                 .set = py_drsuapi_DsReplicaAdd_in_set_req,
   36633             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAddRequest")
   36634             :         },
   36635             :         {
   36636             :                 .name = discard_const_p(char, "result"),
   36637             :                 .get = py_drsuapi_DsReplicaAdd_get_result,
   36638             :                 .set = py_drsuapi_DsReplicaAdd_set_result,
   36639             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   36640             :         },
   36641             :         { .name = NULL }
   36642             : };
   36643             : 
   36644           0 : static PyObject *py_drsuapi_DsReplicaAdd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   36645             : {
   36646           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsReplicaAdd, type);
   36647           0 :         struct drsuapi_DsReplicaAdd *_self = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(self);
   36648           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   36649           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   36650           0 :         return self;
   36651             : }
   36652             : 
   36653           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   36654             : {
   36655             : 
   36656             : 
   36657           0 :         return PyLong_FromLong(5);
   36658             : }
   36659             : 
   36660           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   36661             : {
   36662           0 :         const struct ndr_interface_call *call = NULL;
   36663           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(py_obj);
   36664           0 :         PyObject *ret = NULL;
   36665           0 :         struct ndr_push *push = NULL;
   36666           0 :         DATA_BLOB blob;
   36667           0 :         enum ndr_err_code err;
   36668             : 
   36669           0 :         if (ndr_table_drsuapi.num_calls < 6) {
   36670           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaAdd_ndr_pack");
   36671           0 :                 return NULL;
   36672             :         }
   36673           0 :         call = &ndr_table_drsuapi.calls[5];
   36674             : 
   36675           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   36676           0 :         if (push == NULL) {
   36677           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36678           0 :                 return NULL;
   36679             :         }
   36680             : 
   36681           0 :         push->flags |= ndr_push_flags;
   36682             : 
   36683           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   36684           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36685           0 :                 TALLOC_FREE(push);
   36686           0 :                 PyErr_SetNdrError(err);
   36687           0 :                 return NULL;
   36688             :         }
   36689           0 :         blob = ndr_push_blob(push);
   36690           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   36691           0 :         TALLOC_FREE(push);
   36692           0 :         return ret;
   36693             : }
   36694             : 
   36695           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36696             : {
   36697           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36698           0 :         PyObject *bigendian_obj = NULL;
   36699           0 :         PyObject *ndr64_obj = NULL;
   36700           0 :         libndr_flags ndr_push_flags = 0;
   36701             : 
   36702           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   36703             :                 discard_const_p(char *, kwnames),
   36704             :                 &bigendian_obj,
   36705             :                 &ndr64_obj)) {
   36706           0 :                 return NULL;
   36707             :         }
   36708             : 
   36709           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36710           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36711             :         }
   36712           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36713           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36714             :         }
   36715             : 
   36716           0 :         return py_drsuapi_DsReplicaAdd_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   36717             : }
   36718             : 
   36719           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36720             : {
   36721           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   36722           0 :         PyObject *bigendian_obj = NULL;
   36723           0 :         PyObject *ndr64_obj = NULL;
   36724           0 :         libndr_flags ndr_push_flags = 0;
   36725             : 
   36726           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   36727             :                 discard_const_p(char *, kwnames),
   36728             :                 &bigendian_obj,
   36729             :                 &ndr64_obj)) {
   36730           0 :                 return NULL;
   36731             :         }
   36732             : 
   36733           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36734           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   36735             :         }
   36736           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36737           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   36738             :         }
   36739             : 
   36740           0 :         return py_drsuapi_DsReplicaAdd_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   36741             : }
   36742             : 
   36743           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   36744             : {
   36745           0 :         const struct ndr_interface_call *call = NULL;
   36746           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(py_obj);
   36747           0 :         struct ndr_pull *pull = NULL;
   36748           0 :         enum ndr_err_code err;
   36749             : 
   36750           0 :         if (ndr_table_drsuapi.num_calls < 6) {
   36751           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaAdd_ndr_unpack");
   36752           0 :                 return NULL;
   36753             :         }
   36754           0 :         call = &ndr_table_drsuapi.calls[5];
   36755             : 
   36756           0 :         pull = ndr_pull_init_blob(blob, object);
   36757           0 :         if (pull == NULL) {
   36758           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   36759           0 :                 return NULL;
   36760             :         }
   36761             : 
   36762           0 :         pull->flags |= ndr_pull_flags;
   36763             : 
   36764           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   36765           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   36766           0 :                 TALLOC_FREE(pull);
   36767           0 :                 PyErr_SetNdrError(err);
   36768           0 :                 return NULL;
   36769             :         }
   36770           0 :         if (!allow_remaining) {
   36771           0 :                 uint32_t highest_ofs;
   36772             : 
   36773           0 :                 if (pull->offset > pull->relative_highest_offset) {
   36774           0 :                         highest_ofs = pull->offset;
   36775             :                 } else {
   36776           0 :                         highest_ofs = pull->relative_highest_offset;
   36777             :                 }
   36778           0 :                 if (highest_ofs < pull->data_size) {
   36779           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   36780             :                                 "not all bytes consumed ofs[%u] size[%u]",
   36781             :                                 highest_ofs, pull->data_size);
   36782           0 :                         TALLOC_FREE(pull);
   36783           0 :                         PyErr_SetNdrError(err);
   36784           0 :                         return NULL;
   36785             :                 }
   36786             :         }
   36787             : 
   36788           0 :         TALLOC_FREE(pull);
   36789           0 :         Py_RETURN_NONE;
   36790             : }
   36791             : 
   36792           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36793             : {
   36794           0 :         DATA_BLOB blob;
   36795           0 :         Py_ssize_t blob_length = 0;
   36796           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36797           0 :         PyObject *bigendian_obj = NULL;
   36798           0 :         PyObject *ndr64_obj = NULL;
   36799           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36800           0 :         PyObject *allow_remaining_obj = NULL;
   36801           0 :         bool allow_remaining = false;
   36802             : 
   36803           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   36804             :                 discard_const_p(char *, kwnames),
   36805             :                 &blob.data, &blob_length,
   36806             :                 &bigendian_obj,
   36807             :                 &ndr64_obj,
   36808             :                 &allow_remaining_obj)) {
   36809           0 :                 return NULL;
   36810             :         }
   36811           0 :         blob.length = blob_length;
   36812             : 
   36813           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36814           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36815             :         }
   36816           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36817           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36818             :         }
   36819             : 
   36820           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36821           0 :                 allow_remaining = true;
   36822             :         }
   36823             : 
   36824           0 :         return py_drsuapi_DsReplicaAdd_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   36825             : }
   36826             : 
   36827           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   36828             : {
   36829           0 :         DATA_BLOB blob;
   36830           0 :         Py_ssize_t blob_length = 0;
   36831           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   36832           0 :         PyObject *bigendian_obj = NULL;
   36833           0 :         PyObject *ndr64_obj = NULL;
   36834           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   36835           0 :         PyObject *allow_remaining_obj = NULL;
   36836           0 :         bool allow_remaining = false;
   36837             : 
   36838           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   36839             :                 discard_const_p(char *, kwnames),
   36840             :                 &blob.data, &blob_length,
   36841             :                 &bigendian_obj,
   36842             :                 &ndr64_obj,
   36843             :                 &allow_remaining_obj)) {
   36844           0 :                 return NULL;
   36845             :         }
   36846           0 :         blob.length = blob_length;
   36847             : 
   36848           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   36849           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   36850             :         }
   36851           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   36852           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   36853             :         }
   36854             : 
   36855           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   36856           0 :                 allow_remaining = true;
   36857             :         }
   36858             : 
   36859           0 :         return py_drsuapi_DsReplicaAdd_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   36860             : }
   36861             : 
   36862           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   36863             : {
   36864           0 :         const struct ndr_interface_call *call = NULL;
   36865           0 :         struct drsuapi_DsReplicaAdd *object = pytalloc_get_ptr(py_obj);
   36866           0 :         PyObject *ret;
   36867           0 :         char *retstr;
   36868             : 
   36869           0 :         if (ndr_table_drsuapi.num_calls < 6) {
   36870           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaAdd_ndr_print");
   36871           0 :                 return NULL;
   36872             :         }
   36873           0 :         call = &ndr_table_drsuapi.calls[5];
   36874             : 
   36875           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   36876           0 :         ret = PyUnicode_FromString(retstr);
   36877           0 :         TALLOC_FREE(retstr);
   36878             : 
   36879           0 :         return ret;
   36880             : }
   36881             : 
   36882           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36883             : {
   36884           0 :         return py_drsuapi_DsReplicaAdd_ndr_print(py_obj, "drsuapi_DsReplicaAdd_in", NDR_IN);
   36885             : }
   36886             : 
   36887           0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   36888             : {
   36889           0 :         return py_drsuapi_DsReplicaAdd_ndr_print(py_obj, "drsuapi_DsReplicaAdd_out", NDR_OUT);
   36890             : }
   36891             : 
   36892             : static PyMethodDef py_drsuapi_DsReplicaAdd_methods[] = {
   36893             :         { "opnum", (PyCFunction)py_drsuapi_DsReplicaAdd_ndr_opnum, METH_NOARGS|METH_CLASS,
   36894             :                 "drsuapi.DsReplicaAdd.opnum() -> 5 (0x05) " },
   36895             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAdd_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   36896             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   36897             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAdd_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   36898             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   36899             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAdd_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   36900             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   36901             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAdd_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   36902             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   36903             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaAdd_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   36904             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaAdd_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   36905             :         { NULL, NULL, 0, NULL }
   36906             : };
   36907             : 
   36908             : 
   36909             : static PyTypeObject drsuapi_DsReplicaAdd_Type = {
   36910             :         PyVarObject_HEAD_INIT(NULL, 0)
   36911             :         .tp_name = "drsuapi.DsReplicaAdd",
   36912             :         .tp_getset = py_drsuapi_DsReplicaAdd_getsetters,
   36913             :         .tp_methods = py_drsuapi_DsReplicaAdd_methods,
   36914             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   36915             :         .tp_new = py_drsuapi_DsReplicaAdd_new,
   36916             : };
   36917             : 
   36918           0 : static bool pack_py_drsuapi_DsReplicaAdd_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaAdd *r)
   36919             : {
   36920           0 :         PyObject *py_bind_handle;
   36921           0 :         PyObject *py_level;
   36922           0 :         PyObject *py_req;
   36923           0 :         const char *kwnames[] = {
   36924             :                 "bind_handle", "level", "req", NULL
   36925             :         };
   36926             : 
   36927           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaAdd", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   36928           0 :                 return false;
   36929             :         }
   36930             : 
   36931           0 :         if (py_bind_handle == NULL) {
   36932           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   36933           0 :                 return false;
   36934             :         }
   36935           0 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   36936           0 :         if (r->in.bind_handle == NULL) {
   36937           0 :                 PyErr_NoMemory();
   36938           0 :                 return false;
   36939             :         }
   36940           0 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   36941           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   36942           0 :                 PyErr_NoMemory();
   36943           0 :                 return false;
   36944             :         }
   36945           0 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   36946           0 :         if (py_level == NULL) {
   36947           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   36948           0 :                 return false;
   36949             :         }
   36950             :         {
   36951           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   36952           0 :                 if (PyLong_Check(py_level)) {
   36953           0 :                         unsigned long long test_var;
   36954           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   36955           0 :                         if (PyErr_Occurred() != NULL) {
   36956           0 :                                 return false;
   36957             :                         }
   36958           0 :                         if (test_var > uint_max) {
   36959           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   36960             :                                   PyLong_Type.tp_name, uint_max, test_var);
   36961           0 :                                 return false;
   36962             :                         }
   36963           0 :                         r->in.level = test_var;
   36964             :                 } else {
   36965           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   36966             :                           PyLong_Type.tp_name);
   36967           0 :                         return false;
   36968             :                 }
   36969             :         }
   36970           0 :         if (py_req == NULL) {
   36971           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   36972           0 :                 return false;
   36973             :         }
   36974             :         {
   36975           0 :                 union drsuapi_DsReplicaAddRequest *req_switch_0;
   36976           0 :                 req_switch_0 = (union drsuapi_DsReplicaAddRequest *)pyrpc_export_union(&drsuapi_DsReplicaAddRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaAddRequest");
   36977           0 :                 if (req_switch_0 == NULL) {
   36978           0 :                         return false;
   36979             :                 }
   36980           0 :                 r->in.req = *req_switch_0;
   36981             :         }
   36982           0 :         return true;
   36983             : }
   36984             : 
   36985           0 : static PyObject *unpack_py_drsuapi_DsReplicaAdd_args_out(struct drsuapi_DsReplicaAdd *r)
   36986             : {
   36987           0 :         PyObject *result;
   36988           0 :         result = Py_None;
   36989           0 :         Py_INCREF(result);
   36990           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   36991           0 :                 PyErr_SetWERROR(r->out.result);
   36992           0 :                 return NULL;
   36993             :         }
   36994             : 
   36995           0 :         return result;
   36996             : }
   36997             : 
   36998             : 
   36999           0 : static PyObject *py_drsuapi_DsReplicaDel_in_get_bind_handle(PyObject *obj, void *closure)
   37000             : {
   37001           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(obj);
   37002           0 :         PyObject *py_bind_handle;
   37003           0 :         if (object->in.bind_handle == NULL) {
   37004           0 :                 Py_RETURN_NONE;
   37005             :         }
   37006           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   37007           0 :         return py_bind_handle;
   37008             : }
   37009             : 
   37010           0 : static int py_drsuapi_DsReplicaDel_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   37011             : {
   37012           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(py_obj);
   37013           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   37014           0 :         if (value == NULL) {
   37015           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   37016           0 :                 return -1;
   37017             :         }
   37018           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   37019           0 :         if (object->in.bind_handle == NULL) {
   37020           0 :                 PyErr_NoMemory();
   37021           0 :                 return -1;
   37022             :         }
   37023           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   37024           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   37025           0 :                 PyErr_NoMemory();
   37026           0 :                 return -1;
   37027             :         }
   37028           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   37029           0 :         return 0;
   37030             : }
   37031             : 
   37032           0 : static PyObject *py_drsuapi_DsReplicaDel_in_get_level(PyObject *obj, void *closure)
   37033             : {
   37034           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(obj);
   37035           0 :         PyObject *py_level;
   37036           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   37037           0 :         return py_level;
   37038             : }
   37039             : 
   37040           0 : static int py_drsuapi_DsReplicaDel_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   37041             : {
   37042           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(py_obj);
   37043           0 :         if (value == NULL) {
   37044           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   37045           0 :                 return -1;
   37046             :         }
   37047             :         {
   37048           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   37049           0 :                 if (PyLong_Check(value)) {
   37050           0 :                         unsigned long long test_var;
   37051           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   37052           0 :                         if (PyErr_Occurred() != NULL) {
   37053           0 :                                 return -1;
   37054             :                         }
   37055           0 :                         if (test_var > uint_max) {
   37056           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37057             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37058           0 :                                 return -1;
   37059             :                         }
   37060           0 :                         object->in.level = test_var;
   37061             :                 } else {
   37062           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37063             :                           PyLong_Type.tp_name);
   37064           0 :                         return -1;
   37065             :                 }
   37066             :         }
   37067           0 :         return 0;
   37068             : }
   37069             : 
   37070           0 : static PyObject *py_drsuapi_DsReplicaDel_in_get_req(PyObject *obj, void *closure)
   37071             : {
   37072           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(obj);
   37073           0 :         PyObject *py_req;
   37074           0 :         py_req = pyrpc_import_union(&drsuapi_DsReplicaDelRequest_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.req, "union drsuapi_DsReplicaDelRequest");
   37075           0 :         if (py_req == NULL) {
   37076           0 :                 return NULL;
   37077             :         }
   37078           0 :         return py_req;
   37079             : }
   37080             : 
   37081           0 : static int py_drsuapi_DsReplicaDel_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   37082             : {
   37083           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(py_obj);
   37084           0 :         if (value == NULL) {
   37085           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   37086           0 :                 return -1;
   37087             :         }
   37088             :         {
   37089           0 :                 union drsuapi_DsReplicaDelRequest *req_switch_0;
   37090           0 :                 req_switch_0 = (union drsuapi_DsReplicaDelRequest *)pyrpc_export_union(&drsuapi_DsReplicaDelRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsReplicaDelRequest");
   37091           0 :                 if (req_switch_0 == NULL) {
   37092           0 :                         return -1;
   37093             :                 }
   37094           0 :                 object->in.req = *req_switch_0;
   37095             :         }
   37096           0 :         return 0;
   37097             : }
   37098             : 
   37099           0 : static PyObject *py_drsuapi_DsReplicaDel_get_result(PyObject *obj, void *closure)
   37100             : {
   37101           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(obj);
   37102           0 :         PyObject *py_result;
   37103           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37104           0 :         return py_result;
   37105             : }
   37106             : 
   37107           0 : static int py_drsuapi_DsReplicaDel_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37108             : {
   37109           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(py_obj);
   37110           0 :         if (value == NULL) {
   37111           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   37112           0 :                 return -1;
   37113             :         }
   37114           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   37115           0 :         return 0;
   37116             : }
   37117             : 
   37118             : static PyGetSetDef py_drsuapi_DsReplicaDel_getsetters[] = {
   37119             :         {
   37120             :                 .name = discard_const_p(char, "in_bind_handle"),
   37121             :                 .get = py_drsuapi_DsReplicaDel_in_get_bind_handle,
   37122             :                 .set = py_drsuapi_DsReplicaDel_in_set_bind_handle,
   37123             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   37124             :         },
   37125             :         {
   37126             :                 .name = discard_const_p(char, "in_level"),
   37127             :                 .get = py_drsuapi_DsReplicaDel_in_get_level,
   37128             :                 .set = py_drsuapi_DsReplicaDel_in_set_level,
   37129             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   37130             :         },
   37131             :         {
   37132             :                 .name = discard_const_p(char, "in_req"),
   37133             :                 .get = py_drsuapi_DsReplicaDel_in_get_req,
   37134             :                 .set = py_drsuapi_DsReplicaDel_in_set_req,
   37135             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaDelRequest")
   37136             :         },
   37137             :         {
   37138             :                 .name = discard_const_p(char, "result"),
   37139             :                 .get = py_drsuapi_DsReplicaDel_get_result,
   37140             :                 .set = py_drsuapi_DsReplicaDel_set_result,
   37141             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37142             :         },
   37143             :         { .name = NULL }
   37144             : };
   37145             : 
   37146           0 : static PyObject *py_drsuapi_DsReplicaDel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37147             : {
   37148           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsReplicaDel, type);
   37149           0 :         struct drsuapi_DsReplicaDel *_self = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(self);
   37150           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   37151           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   37152           0 :         return self;
   37153             : }
   37154             : 
   37155           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37156             : {
   37157             : 
   37158             : 
   37159           0 :         return PyLong_FromLong(6);
   37160             : }
   37161             : 
   37162           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   37163             : {
   37164           0 :         const struct ndr_interface_call *call = NULL;
   37165           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(py_obj);
   37166           0 :         PyObject *ret = NULL;
   37167           0 :         struct ndr_push *push = NULL;
   37168           0 :         DATA_BLOB blob;
   37169           0 :         enum ndr_err_code err;
   37170             : 
   37171           0 :         if (ndr_table_drsuapi.num_calls < 7) {
   37172           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaDel_ndr_pack");
   37173           0 :                 return NULL;
   37174             :         }
   37175           0 :         call = &ndr_table_drsuapi.calls[6];
   37176             : 
   37177           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37178           0 :         if (push == NULL) {
   37179           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37180           0 :                 return NULL;
   37181             :         }
   37182             : 
   37183           0 :         push->flags |= ndr_push_flags;
   37184             : 
   37185           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37186           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37187           0 :                 TALLOC_FREE(push);
   37188           0 :                 PyErr_SetNdrError(err);
   37189           0 :                 return NULL;
   37190             :         }
   37191           0 :         blob = ndr_push_blob(push);
   37192           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37193           0 :         TALLOC_FREE(push);
   37194           0 :         return ret;
   37195             : }
   37196             : 
   37197           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37198             : {
   37199           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37200           0 :         PyObject *bigendian_obj = NULL;
   37201           0 :         PyObject *ndr64_obj = NULL;
   37202           0 :         libndr_flags ndr_push_flags = 0;
   37203             : 
   37204           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37205             :                 discard_const_p(char *, kwnames),
   37206             :                 &bigendian_obj,
   37207             :                 &ndr64_obj)) {
   37208           0 :                 return NULL;
   37209             :         }
   37210             : 
   37211           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37212           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37213             :         }
   37214           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37215           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37216             :         }
   37217             : 
   37218           0 :         return py_drsuapi_DsReplicaDel_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37219             : }
   37220             : 
   37221           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37222             : {
   37223           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37224           0 :         PyObject *bigendian_obj = NULL;
   37225           0 :         PyObject *ndr64_obj = NULL;
   37226           0 :         libndr_flags ndr_push_flags = 0;
   37227             : 
   37228           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37229             :                 discard_const_p(char *, kwnames),
   37230             :                 &bigendian_obj,
   37231             :                 &ndr64_obj)) {
   37232           0 :                 return NULL;
   37233             :         }
   37234             : 
   37235           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37236           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37237             :         }
   37238           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37239           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37240             :         }
   37241             : 
   37242           0 :         return py_drsuapi_DsReplicaDel_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37243             : }
   37244             : 
   37245           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   37246             : {
   37247           0 :         const struct ndr_interface_call *call = NULL;
   37248           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(py_obj);
   37249           0 :         struct ndr_pull *pull = NULL;
   37250           0 :         enum ndr_err_code err;
   37251             : 
   37252           0 :         if (ndr_table_drsuapi.num_calls < 7) {
   37253           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaDel_ndr_unpack");
   37254           0 :                 return NULL;
   37255             :         }
   37256           0 :         call = &ndr_table_drsuapi.calls[6];
   37257             : 
   37258           0 :         pull = ndr_pull_init_blob(blob, object);
   37259           0 :         if (pull == NULL) {
   37260           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37261           0 :                 return NULL;
   37262             :         }
   37263             : 
   37264           0 :         pull->flags |= ndr_pull_flags;
   37265             : 
   37266           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37267           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37268           0 :                 TALLOC_FREE(pull);
   37269           0 :                 PyErr_SetNdrError(err);
   37270           0 :                 return NULL;
   37271             :         }
   37272           0 :         if (!allow_remaining) {
   37273           0 :                 uint32_t highest_ofs;
   37274             : 
   37275           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37276           0 :                         highest_ofs = pull->offset;
   37277             :                 } else {
   37278           0 :                         highest_ofs = pull->relative_highest_offset;
   37279             :                 }
   37280           0 :                 if (highest_ofs < pull->data_size) {
   37281           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37282             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37283             :                                 highest_ofs, pull->data_size);
   37284           0 :                         TALLOC_FREE(pull);
   37285           0 :                         PyErr_SetNdrError(err);
   37286           0 :                         return NULL;
   37287             :                 }
   37288             :         }
   37289             : 
   37290           0 :         TALLOC_FREE(pull);
   37291           0 :         Py_RETURN_NONE;
   37292             : }
   37293             : 
   37294           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37295             : {
   37296           0 :         DATA_BLOB blob;
   37297           0 :         Py_ssize_t blob_length = 0;
   37298           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37299           0 :         PyObject *bigendian_obj = NULL;
   37300           0 :         PyObject *ndr64_obj = NULL;
   37301           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37302           0 :         PyObject *allow_remaining_obj = NULL;
   37303           0 :         bool allow_remaining = false;
   37304             : 
   37305           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37306             :                 discard_const_p(char *, kwnames),
   37307             :                 &blob.data, &blob_length,
   37308             :                 &bigendian_obj,
   37309             :                 &ndr64_obj,
   37310             :                 &allow_remaining_obj)) {
   37311           0 :                 return NULL;
   37312             :         }
   37313           0 :         blob.length = blob_length;
   37314             : 
   37315           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37316           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37317             :         }
   37318           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37319           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37320             :         }
   37321             : 
   37322           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37323           0 :                 allow_remaining = true;
   37324             :         }
   37325             : 
   37326           0 :         return py_drsuapi_DsReplicaDel_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37327             : }
   37328             : 
   37329           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37330             : {
   37331           0 :         DATA_BLOB blob;
   37332           0 :         Py_ssize_t blob_length = 0;
   37333           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37334           0 :         PyObject *bigendian_obj = NULL;
   37335           0 :         PyObject *ndr64_obj = NULL;
   37336           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37337           0 :         PyObject *allow_remaining_obj = NULL;
   37338           0 :         bool allow_remaining = false;
   37339             : 
   37340           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37341             :                 discard_const_p(char *, kwnames),
   37342             :                 &blob.data, &blob_length,
   37343             :                 &bigendian_obj,
   37344             :                 &ndr64_obj,
   37345             :                 &allow_remaining_obj)) {
   37346           0 :                 return NULL;
   37347             :         }
   37348           0 :         blob.length = blob_length;
   37349             : 
   37350           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37351           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37352             :         }
   37353           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37354           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37355             :         }
   37356             : 
   37357           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37358           0 :                 allow_remaining = true;
   37359             :         }
   37360             : 
   37361           0 :         return py_drsuapi_DsReplicaDel_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37362             : }
   37363             : 
   37364           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   37365             : {
   37366           0 :         const struct ndr_interface_call *call = NULL;
   37367           0 :         struct drsuapi_DsReplicaDel *object = pytalloc_get_ptr(py_obj);
   37368           0 :         PyObject *ret;
   37369           0 :         char *retstr;
   37370             : 
   37371           0 :         if (ndr_table_drsuapi.num_calls < 7) {
   37372           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaDel_ndr_print");
   37373           0 :                 return NULL;
   37374             :         }
   37375           0 :         call = &ndr_table_drsuapi.calls[6];
   37376             : 
   37377           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37378           0 :         ret = PyUnicode_FromString(retstr);
   37379           0 :         TALLOC_FREE(retstr);
   37380             : 
   37381           0 :         return ret;
   37382             : }
   37383             : 
   37384           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37385             : {
   37386           0 :         return py_drsuapi_DsReplicaDel_ndr_print(py_obj, "drsuapi_DsReplicaDel_in", NDR_IN);
   37387             : }
   37388             : 
   37389           0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37390             : {
   37391           0 :         return py_drsuapi_DsReplicaDel_ndr_print(py_obj, "drsuapi_DsReplicaDel_out", NDR_OUT);
   37392             : }
   37393             : 
   37394             : static PyMethodDef py_drsuapi_DsReplicaDel_methods[] = {
   37395             :         { "opnum", (PyCFunction)py_drsuapi_DsReplicaDel_ndr_opnum, METH_NOARGS|METH_CLASS,
   37396             :                 "drsuapi.DsReplicaDel.opnum() -> 6 (0x06) " },
   37397             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDel_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37398             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37399             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDel_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37400             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37401             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDel_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37402             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37403             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDel_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37404             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37405             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaDel_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37406             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaDel_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37407             :         { NULL, NULL, 0, NULL }
   37408             : };
   37409             : 
   37410             : 
   37411             : static PyTypeObject drsuapi_DsReplicaDel_Type = {
   37412             :         PyVarObject_HEAD_INIT(NULL, 0)
   37413             :         .tp_name = "drsuapi.DsReplicaDel",
   37414             :         .tp_getset = py_drsuapi_DsReplicaDel_getsetters,
   37415             :         .tp_methods = py_drsuapi_DsReplicaDel_methods,
   37416             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37417             :         .tp_new = py_drsuapi_DsReplicaDel_new,
   37418             : };
   37419             : 
   37420           0 : static bool pack_py_drsuapi_DsReplicaDel_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaDel *r)
   37421             : {
   37422           0 :         PyObject *py_bind_handle;
   37423           0 :         PyObject *py_level;
   37424           0 :         PyObject *py_req;
   37425           0 :         const char *kwnames[] = {
   37426             :                 "bind_handle", "level", "req", NULL
   37427             :         };
   37428             : 
   37429           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaDel", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   37430           0 :                 return false;
   37431             :         }
   37432             : 
   37433           0 :         if (py_bind_handle == NULL) {
   37434           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   37435           0 :                 return false;
   37436             :         }
   37437           0 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   37438           0 :         if (r->in.bind_handle == NULL) {
   37439           0 :                 PyErr_NoMemory();
   37440           0 :                 return false;
   37441             :         }
   37442           0 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   37443           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   37444           0 :                 PyErr_NoMemory();
   37445           0 :                 return false;
   37446             :         }
   37447           0 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   37448           0 :         if (py_level == NULL) {
   37449           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   37450           0 :                 return false;
   37451             :         }
   37452             :         {
   37453           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   37454           0 :                 if (PyLong_Check(py_level)) {
   37455           0 :                         unsigned long long test_var;
   37456           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   37457           0 :                         if (PyErr_Occurred() != NULL) {
   37458           0 :                                 return false;
   37459             :                         }
   37460           0 :                         if (test_var > uint_max) {
   37461           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37462             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37463           0 :                                 return false;
   37464             :                         }
   37465           0 :                         r->in.level = test_var;
   37466             :                 } else {
   37467           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37468             :                           PyLong_Type.tp_name);
   37469           0 :                         return false;
   37470             :                 }
   37471             :         }
   37472           0 :         if (py_req == NULL) {
   37473           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   37474           0 :                 return false;
   37475             :         }
   37476             :         {
   37477           0 :                 union drsuapi_DsReplicaDelRequest *req_switch_0;
   37478           0 :                 req_switch_0 = (union drsuapi_DsReplicaDelRequest *)pyrpc_export_union(&drsuapi_DsReplicaDelRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaDelRequest");
   37479           0 :                 if (req_switch_0 == NULL) {
   37480           0 :                         return false;
   37481             :                 }
   37482           0 :                 r->in.req = *req_switch_0;
   37483             :         }
   37484           0 :         return true;
   37485             : }
   37486             : 
   37487           0 : static PyObject *unpack_py_drsuapi_DsReplicaDel_args_out(struct drsuapi_DsReplicaDel *r)
   37488             : {
   37489           0 :         PyObject *result;
   37490           0 :         result = Py_None;
   37491           0 :         Py_INCREF(result);
   37492           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37493           0 :                 PyErr_SetWERROR(r->out.result);
   37494           0 :                 return NULL;
   37495             :         }
   37496             : 
   37497           0 :         return result;
   37498             : }
   37499             : 
   37500             : 
   37501           0 : static PyObject *py_drsuapi_DsReplicaMod_in_get_bind_handle(PyObject *obj, void *closure)
   37502             : {
   37503           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(obj);
   37504           0 :         PyObject *py_bind_handle;
   37505           0 :         if (object->in.bind_handle == NULL) {
   37506           0 :                 Py_RETURN_NONE;
   37507             :         }
   37508           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   37509           0 :         return py_bind_handle;
   37510             : }
   37511             : 
   37512           0 : static int py_drsuapi_DsReplicaMod_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   37513             : {
   37514           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(py_obj);
   37515           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   37516           0 :         if (value == NULL) {
   37517           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   37518           0 :                 return -1;
   37519             :         }
   37520           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   37521           0 :         if (object->in.bind_handle == NULL) {
   37522           0 :                 PyErr_NoMemory();
   37523           0 :                 return -1;
   37524             :         }
   37525           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   37526           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   37527           0 :                 PyErr_NoMemory();
   37528           0 :                 return -1;
   37529             :         }
   37530           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   37531           0 :         return 0;
   37532             : }
   37533             : 
   37534           0 : static PyObject *py_drsuapi_DsReplicaMod_in_get_level(PyObject *obj, void *closure)
   37535             : {
   37536           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(obj);
   37537           0 :         PyObject *py_level;
   37538           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   37539           0 :         return py_level;
   37540             : }
   37541             : 
   37542           0 : static int py_drsuapi_DsReplicaMod_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   37543             : {
   37544           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(py_obj);
   37545           0 :         if (value == NULL) {
   37546           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   37547           0 :                 return -1;
   37548             :         }
   37549             :         {
   37550           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   37551           0 :                 if (PyLong_Check(value)) {
   37552           0 :                         unsigned long long test_var;
   37553           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   37554           0 :                         if (PyErr_Occurred() != NULL) {
   37555           0 :                                 return -1;
   37556             :                         }
   37557           0 :                         if (test_var > uint_max) {
   37558           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37559             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37560           0 :                                 return -1;
   37561             :                         }
   37562           0 :                         object->in.level = test_var;
   37563             :                 } else {
   37564           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37565             :                           PyLong_Type.tp_name);
   37566           0 :                         return -1;
   37567             :                 }
   37568             :         }
   37569           0 :         return 0;
   37570             : }
   37571             : 
   37572           0 : static PyObject *py_drsuapi_DsReplicaMod_in_get_req(PyObject *obj, void *closure)
   37573             : {
   37574           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(obj);
   37575           0 :         PyObject *py_req;
   37576           0 :         py_req = pyrpc_import_union(&drsuapi_DsReplicaModRequest_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.req, "union drsuapi_DsReplicaModRequest");
   37577           0 :         if (py_req == NULL) {
   37578           0 :                 return NULL;
   37579             :         }
   37580           0 :         return py_req;
   37581             : }
   37582             : 
   37583           0 : static int py_drsuapi_DsReplicaMod_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   37584             : {
   37585           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(py_obj);
   37586           0 :         if (value == NULL) {
   37587           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   37588           0 :                 return -1;
   37589             :         }
   37590             :         {
   37591           0 :                 union drsuapi_DsReplicaModRequest *req_switch_0;
   37592           0 :                 req_switch_0 = (union drsuapi_DsReplicaModRequest *)pyrpc_export_union(&drsuapi_DsReplicaModRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsReplicaModRequest");
   37593           0 :                 if (req_switch_0 == NULL) {
   37594           0 :                         return -1;
   37595             :                 }
   37596           0 :                 object->in.req = *req_switch_0;
   37597             :         }
   37598           0 :         return 0;
   37599             : }
   37600             : 
   37601           0 : static PyObject *py_drsuapi_DsReplicaMod_get_result(PyObject *obj, void *closure)
   37602             : {
   37603           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(obj);
   37604           0 :         PyObject *py_result;
   37605           0 :         py_result = PyErr_FromWERROR(object->out.result);
   37606           0 :         return py_result;
   37607             : }
   37608             : 
   37609           0 : static int py_drsuapi_DsReplicaMod_set_result(PyObject *py_obj, PyObject *value, void *closure)
   37610             : {
   37611           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(py_obj);
   37612           0 :         if (value == NULL) {
   37613           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   37614           0 :                 return -1;
   37615             :         }
   37616           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   37617           0 :         return 0;
   37618             : }
   37619             : 
   37620             : static PyGetSetDef py_drsuapi_DsReplicaMod_getsetters[] = {
   37621             :         {
   37622             :                 .name = discard_const_p(char, "in_bind_handle"),
   37623             :                 .get = py_drsuapi_DsReplicaMod_in_get_bind_handle,
   37624             :                 .set = py_drsuapi_DsReplicaMod_in_set_bind_handle,
   37625             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   37626             :         },
   37627             :         {
   37628             :                 .name = discard_const_p(char, "in_level"),
   37629             :                 .get = py_drsuapi_DsReplicaMod_in_get_level,
   37630             :                 .set = py_drsuapi_DsReplicaMod_in_set_level,
   37631             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   37632             :         },
   37633             :         {
   37634             :                 .name = discard_const_p(char, "in_req"),
   37635             :                 .get = py_drsuapi_DsReplicaMod_in_get_req,
   37636             :                 .set = py_drsuapi_DsReplicaMod_in_set_req,
   37637             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaModRequest")
   37638             :         },
   37639             :         {
   37640             :                 .name = discard_const_p(char, "result"),
   37641             :                 .get = py_drsuapi_DsReplicaMod_get_result,
   37642             :                 .set = py_drsuapi_DsReplicaMod_set_result,
   37643             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   37644             :         },
   37645             :         { .name = NULL }
   37646             : };
   37647             : 
   37648           0 : static PyObject *py_drsuapi_DsReplicaMod_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   37649             : {
   37650           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsReplicaMod, type);
   37651           0 :         struct drsuapi_DsReplicaMod *_self = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(self);
   37652           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   37653           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   37654           0 :         return self;
   37655             : }
   37656             : 
   37657           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   37658             : {
   37659             : 
   37660             : 
   37661           0 :         return PyLong_FromLong(7);
   37662             : }
   37663             : 
   37664           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   37665             : {
   37666           0 :         const struct ndr_interface_call *call = NULL;
   37667           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(py_obj);
   37668           0 :         PyObject *ret = NULL;
   37669           0 :         struct ndr_push *push = NULL;
   37670           0 :         DATA_BLOB blob;
   37671           0 :         enum ndr_err_code err;
   37672             : 
   37673           0 :         if (ndr_table_drsuapi.num_calls < 8) {
   37674           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaMod_ndr_pack");
   37675           0 :                 return NULL;
   37676             :         }
   37677           0 :         call = &ndr_table_drsuapi.calls[7];
   37678             : 
   37679           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   37680           0 :         if (push == NULL) {
   37681           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37682           0 :                 return NULL;
   37683             :         }
   37684             : 
   37685           0 :         push->flags |= ndr_push_flags;
   37686             : 
   37687           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   37688           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37689           0 :                 TALLOC_FREE(push);
   37690           0 :                 PyErr_SetNdrError(err);
   37691           0 :                 return NULL;
   37692             :         }
   37693           0 :         blob = ndr_push_blob(push);
   37694           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   37695           0 :         TALLOC_FREE(push);
   37696           0 :         return ret;
   37697             : }
   37698             : 
   37699           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37700             : {
   37701           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37702           0 :         PyObject *bigendian_obj = NULL;
   37703           0 :         PyObject *ndr64_obj = NULL;
   37704           0 :         libndr_flags ndr_push_flags = 0;
   37705             : 
   37706           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   37707             :                 discard_const_p(char *, kwnames),
   37708             :                 &bigendian_obj,
   37709             :                 &ndr64_obj)) {
   37710           0 :                 return NULL;
   37711             :         }
   37712             : 
   37713           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37714           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37715             :         }
   37716           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37717           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37718             :         }
   37719             : 
   37720           0 :         return py_drsuapi_DsReplicaMod_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   37721             : }
   37722             : 
   37723           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37724             : {
   37725           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   37726           0 :         PyObject *bigendian_obj = NULL;
   37727           0 :         PyObject *ndr64_obj = NULL;
   37728           0 :         libndr_flags ndr_push_flags = 0;
   37729             : 
   37730           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   37731             :                 discard_const_p(char *, kwnames),
   37732             :                 &bigendian_obj,
   37733             :                 &ndr64_obj)) {
   37734           0 :                 return NULL;
   37735             :         }
   37736             : 
   37737           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37738           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   37739             :         }
   37740           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37741           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   37742             :         }
   37743             : 
   37744           0 :         return py_drsuapi_DsReplicaMod_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   37745             : }
   37746             : 
   37747           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   37748             : {
   37749           0 :         const struct ndr_interface_call *call = NULL;
   37750           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(py_obj);
   37751           0 :         struct ndr_pull *pull = NULL;
   37752           0 :         enum ndr_err_code err;
   37753             : 
   37754           0 :         if (ndr_table_drsuapi.num_calls < 8) {
   37755           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaMod_ndr_unpack");
   37756           0 :                 return NULL;
   37757             :         }
   37758           0 :         call = &ndr_table_drsuapi.calls[7];
   37759             : 
   37760           0 :         pull = ndr_pull_init_blob(blob, object);
   37761           0 :         if (pull == NULL) {
   37762           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   37763           0 :                 return NULL;
   37764             :         }
   37765             : 
   37766           0 :         pull->flags |= ndr_pull_flags;
   37767             : 
   37768           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   37769           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   37770           0 :                 TALLOC_FREE(pull);
   37771           0 :                 PyErr_SetNdrError(err);
   37772           0 :                 return NULL;
   37773             :         }
   37774           0 :         if (!allow_remaining) {
   37775           0 :                 uint32_t highest_ofs;
   37776             : 
   37777           0 :                 if (pull->offset > pull->relative_highest_offset) {
   37778           0 :                         highest_ofs = pull->offset;
   37779             :                 } else {
   37780           0 :                         highest_ofs = pull->relative_highest_offset;
   37781             :                 }
   37782           0 :                 if (highest_ofs < pull->data_size) {
   37783           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   37784             :                                 "not all bytes consumed ofs[%u] size[%u]",
   37785             :                                 highest_ofs, pull->data_size);
   37786           0 :                         TALLOC_FREE(pull);
   37787           0 :                         PyErr_SetNdrError(err);
   37788           0 :                         return NULL;
   37789             :                 }
   37790             :         }
   37791             : 
   37792           0 :         TALLOC_FREE(pull);
   37793           0 :         Py_RETURN_NONE;
   37794             : }
   37795             : 
   37796           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37797             : {
   37798           0 :         DATA_BLOB blob;
   37799           0 :         Py_ssize_t blob_length = 0;
   37800           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37801           0 :         PyObject *bigendian_obj = NULL;
   37802           0 :         PyObject *ndr64_obj = NULL;
   37803           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37804           0 :         PyObject *allow_remaining_obj = NULL;
   37805           0 :         bool allow_remaining = false;
   37806             : 
   37807           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   37808             :                 discard_const_p(char *, kwnames),
   37809             :                 &blob.data, &blob_length,
   37810             :                 &bigendian_obj,
   37811             :                 &ndr64_obj,
   37812             :                 &allow_remaining_obj)) {
   37813           0 :                 return NULL;
   37814             :         }
   37815           0 :         blob.length = blob_length;
   37816             : 
   37817           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37818           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37819             :         }
   37820           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37821           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37822             :         }
   37823             : 
   37824           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37825           0 :                 allow_remaining = true;
   37826             :         }
   37827             : 
   37828           0 :         return py_drsuapi_DsReplicaMod_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   37829             : }
   37830             : 
   37831           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   37832             : {
   37833           0 :         DATA_BLOB blob;
   37834           0 :         Py_ssize_t blob_length = 0;
   37835           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   37836           0 :         PyObject *bigendian_obj = NULL;
   37837           0 :         PyObject *ndr64_obj = NULL;
   37838           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   37839           0 :         PyObject *allow_remaining_obj = NULL;
   37840           0 :         bool allow_remaining = false;
   37841             : 
   37842           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   37843             :                 discard_const_p(char *, kwnames),
   37844             :                 &blob.data, &blob_length,
   37845             :                 &bigendian_obj,
   37846             :                 &ndr64_obj,
   37847             :                 &allow_remaining_obj)) {
   37848           0 :                 return NULL;
   37849             :         }
   37850           0 :         blob.length = blob_length;
   37851             : 
   37852           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   37853           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   37854             :         }
   37855           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   37856           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   37857             :         }
   37858             : 
   37859           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   37860           0 :                 allow_remaining = true;
   37861             :         }
   37862             : 
   37863           0 :         return py_drsuapi_DsReplicaMod_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   37864             : }
   37865             : 
   37866           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   37867             : {
   37868           0 :         const struct ndr_interface_call *call = NULL;
   37869           0 :         struct drsuapi_DsReplicaMod *object = pytalloc_get_ptr(py_obj);
   37870           0 :         PyObject *ret;
   37871           0 :         char *retstr;
   37872             : 
   37873           0 :         if (ndr_table_drsuapi.num_calls < 8) {
   37874           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaMod_ndr_print");
   37875           0 :                 return NULL;
   37876             :         }
   37877           0 :         call = &ndr_table_drsuapi.calls[7];
   37878             : 
   37879           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   37880           0 :         ret = PyUnicode_FromString(retstr);
   37881           0 :         TALLOC_FREE(retstr);
   37882             : 
   37883           0 :         return ret;
   37884             : }
   37885             : 
   37886           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37887             : {
   37888           0 :         return py_drsuapi_DsReplicaMod_ndr_print(py_obj, "drsuapi_DsReplicaMod_in", NDR_IN);
   37889             : }
   37890             : 
   37891           0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   37892             : {
   37893           0 :         return py_drsuapi_DsReplicaMod_ndr_print(py_obj, "drsuapi_DsReplicaMod_out", NDR_OUT);
   37894             : }
   37895             : 
   37896             : static PyMethodDef py_drsuapi_DsReplicaMod_methods[] = {
   37897             :         { "opnum", (PyCFunction)py_drsuapi_DsReplicaMod_ndr_opnum, METH_NOARGS|METH_CLASS,
   37898             :                 "drsuapi.DsReplicaMod.opnum() -> 7 (0x07) " },
   37899             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMod_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   37900             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   37901             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMod_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   37902             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   37903             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMod_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   37904             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   37905             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMod_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   37906             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   37907             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaMod_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   37908             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaMod_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   37909             :         { NULL, NULL, 0, NULL }
   37910             : };
   37911             : 
   37912             : 
   37913             : static PyTypeObject drsuapi_DsReplicaMod_Type = {
   37914             :         PyVarObject_HEAD_INIT(NULL, 0)
   37915             :         .tp_name = "drsuapi.DsReplicaMod",
   37916             :         .tp_getset = py_drsuapi_DsReplicaMod_getsetters,
   37917             :         .tp_methods = py_drsuapi_DsReplicaMod_methods,
   37918             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   37919             :         .tp_new = py_drsuapi_DsReplicaMod_new,
   37920             : };
   37921             : 
   37922           0 : static bool pack_py_drsuapi_DsReplicaMod_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaMod *r)
   37923             : {
   37924           0 :         PyObject *py_bind_handle;
   37925           0 :         PyObject *py_level;
   37926           0 :         PyObject *py_req;
   37927           0 :         const char *kwnames[] = {
   37928             :                 "bind_handle", "level", "req", NULL
   37929             :         };
   37930             : 
   37931           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaMod", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   37932           0 :                 return false;
   37933             :         }
   37934             : 
   37935           0 :         if (py_bind_handle == NULL) {
   37936           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   37937           0 :                 return false;
   37938             :         }
   37939           0 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   37940           0 :         if (r->in.bind_handle == NULL) {
   37941           0 :                 PyErr_NoMemory();
   37942           0 :                 return false;
   37943             :         }
   37944           0 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   37945           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   37946           0 :                 PyErr_NoMemory();
   37947           0 :                 return false;
   37948             :         }
   37949           0 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   37950           0 :         if (py_level == NULL) {
   37951           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   37952           0 :                 return false;
   37953             :         }
   37954             :         {
   37955           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   37956           0 :                 if (PyLong_Check(py_level)) {
   37957           0 :                         unsigned long long test_var;
   37958           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   37959           0 :                         if (PyErr_Occurred() != NULL) {
   37960           0 :                                 return false;
   37961             :                         }
   37962           0 :                         if (test_var > uint_max) {
   37963           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   37964             :                                   PyLong_Type.tp_name, uint_max, test_var);
   37965           0 :                                 return false;
   37966             :                         }
   37967           0 :                         r->in.level = test_var;
   37968             :                 } else {
   37969           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   37970             :                           PyLong_Type.tp_name);
   37971           0 :                         return false;
   37972             :                 }
   37973             :         }
   37974           0 :         if (py_req == NULL) {
   37975           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   37976           0 :                 return false;
   37977             :         }
   37978             :         {
   37979           0 :                 union drsuapi_DsReplicaModRequest *req_switch_0;
   37980           0 :                 req_switch_0 = (union drsuapi_DsReplicaModRequest *)pyrpc_export_union(&drsuapi_DsReplicaModRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaModRequest");
   37981           0 :                 if (req_switch_0 == NULL) {
   37982           0 :                         return false;
   37983             :                 }
   37984           0 :                 r->in.req = *req_switch_0;
   37985             :         }
   37986           0 :         return true;
   37987             : }
   37988             : 
   37989           0 : static PyObject *unpack_py_drsuapi_DsReplicaMod_args_out(struct drsuapi_DsReplicaMod *r)
   37990             : {
   37991           0 :         PyObject *result;
   37992           0 :         result = Py_None;
   37993           0 :         Py_INCREF(result);
   37994           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   37995           0 :                 PyErr_SetWERROR(r->out.result);
   37996           0 :                 return NULL;
   37997             :         }
   37998             : 
   37999           0 :         return result;
   38000             : }
   38001             : 
   38002             : 
   38003           0 : static PyObject *py_drsuapi_DsGetMemberships_in_get_bind_handle(PyObject *obj, void *closure)
   38004             : {
   38005           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(obj);
   38006           0 :         PyObject *py_bind_handle;
   38007           0 :         if (object->in.bind_handle == NULL) {
   38008           0 :                 Py_RETURN_NONE;
   38009             :         }
   38010           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   38011           0 :         return py_bind_handle;
   38012             : }
   38013             : 
   38014           0 : static int py_drsuapi_DsGetMemberships_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   38015             : {
   38016           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38017           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   38018           0 :         if (value == NULL) {
   38019           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   38020           0 :                 return -1;
   38021             :         }
   38022           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   38023           0 :         if (object->in.bind_handle == NULL) {
   38024           0 :                 PyErr_NoMemory();
   38025           0 :                 return -1;
   38026             :         }
   38027           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   38028           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38029           0 :                 PyErr_NoMemory();
   38030           0 :                 return -1;
   38031             :         }
   38032           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   38033           0 :         return 0;
   38034             : }
   38035             : 
   38036           0 : static PyObject *py_drsuapi_DsGetMemberships_in_get_level(PyObject *obj, void *closure)
   38037             : {
   38038           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(obj);
   38039           0 :         PyObject *py_level;
   38040           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   38041           0 :         return py_level;
   38042             : }
   38043             : 
   38044           0 : static int py_drsuapi_DsGetMemberships_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   38045             : {
   38046           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38047           0 :         if (value == NULL) {
   38048           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   38049           0 :                 return -1;
   38050             :         }
   38051             :         {
   38052           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   38053           0 :                 if (PyLong_Check(value)) {
   38054           0 :                         unsigned long long test_var;
   38055           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38056           0 :                         if (PyErr_Occurred() != NULL) {
   38057           0 :                                 return -1;
   38058             :                         }
   38059           0 :                         if (test_var > uint_max) {
   38060           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38061             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38062           0 :                                 return -1;
   38063             :                         }
   38064           0 :                         object->in.level = test_var;
   38065             :                 } else {
   38066           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38067             :                           PyLong_Type.tp_name);
   38068           0 :                         return -1;
   38069             :                 }
   38070             :         }
   38071           0 :         return 0;
   38072             : }
   38073             : 
   38074           0 : static PyObject *py_drsuapi_DsGetMemberships_in_get_req(PyObject *obj, void *closure)
   38075             : {
   38076           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(obj);
   38077           0 :         PyObject *py_req;
   38078           0 :         if (object->in.req == NULL) {
   38079           0 :                 Py_RETURN_NONE;
   38080             :         }
   38081           0 :         py_req = pyrpc_import_union(&drsuapi_DsGetMembershipsRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetMembershipsRequest");
   38082           0 :         if (py_req == NULL) {
   38083           0 :                 return NULL;
   38084             :         }
   38085           0 :         return py_req;
   38086             : }
   38087             : 
   38088           0 : static int py_drsuapi_DsGetMemberships_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   38089             : {
   38090           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38091           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   38092           0 :         if (value == NULL) {
   38093           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   38094           0 :                 return -1;
   38095             :         }
   38096           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   38097           0 :         if (object->in.req == NULL) {
   38098           0 :                 PyErr_NoMemory();
   38099           0 :                 return -1;
   38100             :         }
   38101             :         {
   38102           0 :                 union drsuapi_DsGetMembershipsRequest *req_switch_1;
   38103           0 :                 req_switch_1 = (union drsuapi_DsGetMembershipsRequest *)pyrpc_export_union(&drsuapi_DsGetMembershipsRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsGetMembershipsRequest");
   38104           0 :                 if (req_switch_1 == NULL) {
   38105           0 :                         return -1;
   38106             :                 }
   38107           0 :                 object->in.req = req_switch_1;
   38108             :         }
   38109           0 :         return 0;
   38110             : }
   38111             : 
   38112           0 : static PyObject *py_drsuapi_DsGetMemberships_out_get_level_out(PyObject *obj, void *closure)
   38113             : {
   38114           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(obj);
   38115           0 :         PyObject *py_level_out;
   38116           0 :         if (object->out.level_out == NULL) {
   38117           0 :                 Py_RETURN_NONE;
   38118             :         }
   38119           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   38120           0 :         return py_level_out;
   38121             : }
   38122             : 
   38123           0 : static int py_drsuapi_DsGetMemberships_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   38124             : {
   38125           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38126           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   38127           0 :         if (value == NULL) {
   38128           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   38129           0 :                 return -1;
   38130             :         }
   38131           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   38132           0 :         if (object->out.level_out == NULL) {
   38133           0 :                 PyErr_NoMemory();
   38134           0 :                 return -1;
   38135             :         }
   38136             :         {
   38137           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   38138           0 :                 if (PyLong_Check(value)) {
   38139           0 :                         unsigned long long test_var;
   38140           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38141           0 :                         if (PyErr_Occurred() != NULL) {
   38142           0 :                                 return -1;
   38143             :                         }
   38144           0 :                         if (test_var > uint_max) {
   38145           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38146             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38147           0 :                                 return -1;
   38148             :                         }
   38149           0 :                         *object->out.level_out = test_var;
   38150             :                 } else {
   38151           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38152             :                           PyLong_Type.tp_name);
   38153           0 :                         return -1;
   38154             :                 }
   38155             :         }
   38156           0 :         return 0;
   38157             : }
   38158             : 
   38159           0 : static PyObject *py_drsuapi_DsGetMemberships_out_get_ctr(PyObject *obj, void *closure)
   38160             : {
   38161           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(obj);
   38162           0 :         PyObject *py_ctr;
   38163           0 :         if (object->out.ctr == NULL) {
   38164           0 :                 Py_RETURN_NONE;
   38165             :         }
   38166           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetMembershipsCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsGetMembershipsCtr");
   38167           0 :         if (py_ctr == NULL) {
   38168           0 :                 return NULL;
   38169             :         }
   38170           0 :         return py_ctr;
   38171             : }
   38172             : 
   38173           0 : static int py_drsuapi_DsGetMemberships_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   38174             : {
   38175           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38176           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   38177           0 :         if (value == NULL) {
   38178           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   38179           0 :                 return -1;
   38180             :         }
   38181           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   38182           0 :         if (object->out.ctr == NULL) {
   38183           0 :                 PyErr_NoMemory();
   38184           0 :                 return -1;
   38185             :         }
   38186             :         {
   38187           0 :                 union drsuapi_DsGetMembershipsCtr *ctr_switch_1;
   38188           0 :                 ctr_switch_1 = (union drsuapi_DsGetMembershipsCtr *)pyrpc_export_union(&drsuapi_DsGetMembershipsCtr_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsGetMembershipsCtr");
   38189           0 :                 if (ctr_switch_1 == NULL) {
   38190           0 :                         return -1;
   38191             :                 }
   38192           0 :                 object->out.ctr = ctr_switch_1;
   38193             :         }
   38194           0 :         return 0;
   38195             : }
   38196             : 
   38197           0 : static PyObject *py_drsuapi_DsGetMemberships_get_result(PyObject *obj, void *closure)
   38198             : {
   38199           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(obj);
   38200           0 :         PyObject *py_result;
   38201           0 :         py_result = PyErr_FromWERROR(object->out.result);
   38202           0 :         return py_result;
   38203             : }
   38204             : 
   38205           0 : static int py_drsuapi_DsGetMemberships_set_result(PyObject *py_obj, PyObject *value, void *closure)
   38206             : {
   38207           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38208           0 :         if (value == NULL) {
   38209           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   38210           0 :                 return -1;
   38211             :         }
   38212           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   38213           0 :         return 0;
   38214             : }
   38215             : 
   38216             : static PyGetSetDef py_drsuapi_DsGetMemberships_getsetters[] = {
   38217             :         {
   38218             :                 .name = discard_const_p(char, "in_bind_handle"),
   38219             :                 .get = py_drsuapi_DsGetMemberships_in_get_bind_handle,
   38220             :                 .set = py_drsuapi_DsGetMemberships_in_set_bind_handle,
   38221             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   38222             :         },
   38223             :         {
   38224             :                 .name = discard_const_p(char, "in_level"),
   38225             :                 .get = py_drsuapi_DsGetMemberships_in_get_level,
   38226             :                 .set = py_drsuapi_DsGetMemberships_in_set_level,
   38227             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38228             :         },
   38229             :         {
   38230             :                 .name = discard_const_p(char, "in_req"),
   38231             :                 .get = py_drsuapi_DsGetMemberships_in_get_req,
   38232             :                 .set = py_drsuapi_DsGetMemberships_in_set_req,
   38233             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMembershipsRequest")
   38234             :         },
   38235             :         {
   38236             :                 .name = discard_const_p(char, "out_level_out"),
   38237             :                 .get = py_drsuapi_DsGetMemberships_out_get_level_out,
   38238             :                 .set = py_drsuapi_DsGetMemberships_out_set_level_out,
   38239             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38240             :         },
   38241             :         {
   38242             :                 .name = discard_const_p(char, "out_ctr"),
   38243             :                 .get = py_drsuapi_DsGetMemberships_out_get_ctr,
   38244             :                 .set = py_drsuapi_DsGetMemberships_out_set_ctr,
   38245             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMembershipsCtr")
   38246             :         },
   38247             :         {
   38248             :                 .name = discard_const_p(char, "result"),
   38249             :                 .get = py_drsuapi_DsGetMemberships_get_result,
   38250             :                 .set = py_drsuapi_DsGetMemberships_set_result,
   38251             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   38252             :         },
   38253             :         { .name = NULL }
   38254             : };
   38255             : 
   38256           0 : static PyObject *py_drsuapi_DsGetMemberships_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   38257             : {
   38258           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsGetMemberships, type);
   38259           0 :         struct drsuapi_DsGetMemberships *_self = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(self);
   38260           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   38261           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   38262           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsRequest);
   38263           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   38264           0 :         _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsCtr);
   38265           0 :         return self;
   38266             : }
   38267             : 
   38268           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   38269             : {
   38270             : 
   38271             : 
   38272           0 :         return PyLong_FromLong(9);
   38273             : }
   38274             : 
   38275           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   38276             : {
   38277           0 :         const struct ndr_interface_call *call = NULL;
   38278           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38279           0 :         PyObject *ret = NULL;
   38280           0 :         struct ndr_push *push = NULL;
   38281           0 :         DATA_BLOB blob;
   38282           0 :         enum ndr_err_code err;
   38283             : 
   38284           0 :         if (ndr_table_drsuapi.num_calls < 10) {
   38285           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships_ndr_pack");
   38286           0 :                 return NULL;
   38287             :         }
   38288           0 :         call = &ndr_table_drsuapi.calls[9];
   38289             : 
   38290           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   38291           0 :         if (push == NULL) {
   38292           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38293           0 :                 return NULL;
   38294             :         }
   38295             : 
   38296           0 :         push->flags |= ndr_push_flags;
   38297             : 
   38298           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   38299           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38300           0 :                 TALLOC_FREE(push);
   38301           0 :                 PyErr_SetNdrError(err);
   38302           0 :                 return NULL;
   38303             :         }
   38304           0 :         blob = ndr_push_blob(push);
   38305           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   38306           0 :         TALLOC_FREE(push);
   38307           0 :         return ret;
   38308             : }
   38309             : 
   38310           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38311             : {
   38312           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38313           0 :         PyObject *bigendian_obj = NULL;
   38314           0 :         PyObject *ndr64_obj = NULL;
   38315           0 :         libndr_flags ndr_push_flags = 0;
   38316             : 
   38317           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   38318             :                 discard_const_p(char *, kwnames),
   38319             :                 &bigendian_obj,
   38320             :                 &ndr64_obj)) {
   38321           0 :                 return NULL;
   38322             :         }
   38323             : 
   38324           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38325           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38326             :         }
   38327           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38328           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38329             :         }
   38330             : 
   38331           0 :         return py_drsuapi_DsGetMemberships_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   38332             : }
   38333             : 
   38334           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38335             : {
   38336           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38337           0 :         PyObject *bigendian_obj = NULL;
   38338           0 :         PyObject *ndr64_obj = NULL;
   38339           0 :         libndr_flags ndr_push_flags = 0;
   38340             : 
   38341           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   38342             :                 discard_const_p(char *, kwnames),
   38343             :                 &bigendian_obj,
   38344             :                 &ndr64_obj)) {
   38345           0 :                 return NULL;
   38346             :         }
   38347             : 
   38348           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38349           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38350             :         }
   38351           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38352           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38353             :         }
   38354             : 
   38355           0 :         return py_drsuapi_DsGetMemberships_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   38356             : }
   38357             : 
   38358           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   38359             : {
   38360           0 :         const struct ndr_interface_call *call = NULL;
   38361           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38362           0 :         struct ndr_pull *pull = NULL;
   38363           0 :         enum ndr_err_code err;
   38364             : 
   38365           0 :         if (ndr_table_drsuapi.num_calls < 10) {
   38366           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships_ndr_unpack");
   38367           0 :                 return NULL;
   38368             :         }
   38369           0 :         call = &ndr_table_drsuapi.calls[9];
   38370             : 
   38371           0 :         pull = ndr_pull_init_blob(blob, object);
   38372           0 :         if (pull == NULL) {
   38373           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38374           0 :                 return NULL;
   38375             :         }
   38376             : 
   38377           0 :         pull->flags |= ndr_pull_flags;
   38378             : 
   38379           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   38380           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38381           0 :                 TALLOC_FREE(pull);
   38382           0 :                 PyErr_SetNdrError(err);
   38383           0 :                 return NULL;
   38384             :         }
   38385           0 :         if (!allow_remaining) {
   38386           0 :                 uint32_t highest_ofs;
   38387             : 
   38388           0 :                 if (pull->offset > pull->relative_highest_offset) {
   38389           0 :                         highest_ofs = pull->offset;
   38390             :                 } else {
   38391           0 :                         highest_ofs = pull->relative_highest_offset;
   38392             :                 }
   38393           0 :                 if (highest_ofs < pull->data_size) {
   38394           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   38395             :                                 "not all bytes consumed ofs[%u] size[%u]",
   38396             :                                 highest_ofs, pull->data_size);
   38397           0 :                         TALLOC_FREE(pull);
   38398           0 :                         PyErr_SetNdrError(err);
   38399           0 :                         return NULL;
   38400             :                 }
   38401             :         }
   38402             : 
   38403           0 :         TALLOC_FREE(pull);
   38404           0 :         Py_RETURN_NONE;
   38405             : }
   38406             : 
   38407           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38408             : {
   38409           0 :         DATA_BLOB blob;
   38410           0 :         Py_ssize_t blob_length = 0;
   38411           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38412           0 :         PyObject *bigendian_obj = NULL;
   38413           0 :         PyObject *ndr64_obj = NULL;
   38414           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38415           0 :         PyObject *allow_remaining_obj = NULL;
   38416           0 :         bool allow_remaining = false;
   38417             : 
   38418           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   38419             :                 discard_const_p(char *, kwnames),
   38420             :                 &blob.data, &blob_length,
   38421             :                 &bigendian_obj,
   38422             :                 &ndr64_obj,
   38423             :                 &allow_remaining_obj)) {
   38424           0 :                 return NULL;
   38425             :         }
   38426           0 :         blob.length = blob_length;
   38427             : 
   38428           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38429           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38430             :         }
   38431           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38432           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38433             :         }
   38434             : 
   38435           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38436           0 :                 allow_remaining = true;
   38437             :         }
   38438             : 
   38439           0 :         return py_drsuapi_DsGetMemberships_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   38440             : }
   38441             : 
   38442           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38443             : {
   38444           0 :         DATA_BLOB blob;
   38445           0 :         Py_ssize_t blob_length = 0;
   38446           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   38447           0 :         PyObject *bigendian_obj = NULL;
   38448           0 :         PyObject *ndr64_obj = NULL;
   38449           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   38450           0 :         PyObject *allow_remaining_obj = NULL;
   38451           0 :         bool allow_remaining = false;
   38452             : 
   38453           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   38454             :                 discard_const_p(char *, kwnames),
   38455             :                 &blob.data, &blob_length,
   38456             :                 &bigendian_obj,
   38457             :                 &ndr64_obj,
   38458             :                 &allow_remaining_obj)) {
   38459           0 :                 return NULL;
   38460             :         }
   38461           0 :         blob.length = blob_length;
   38462             : 
   38463           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38464           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   38465             :         }
   38466           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38467           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   38468             :         }
   38469             : 
   38470           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   38471           0 :                 allow_remaining = true;
   38472             :         }
   38473             : 
   38474           0 :         return py_drsuapi_DsGetMemberships_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   38475             : }
   38476             : 
   38477           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   38478             : {
   38479           0 :         const struct ndr_interface_call *call = NULL;
   38480           0 :         struct drsuapi_DsGetMemberships *object = pytalloc_get_ptr(py_obj);
   38481           0 :         PyObject *ret;
   38482           0 :         char *retstr;
   38483             : 
   38484           0 :         if (ndr_table_drsuapi.num_calls < 10) {
   38485           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships_ndr_print");
   38486           0 :                 return NULL;
   38487             :         }
   38488           0 :         call = &ndr_table_drsuapi.calls[9];
   38489             : 
   38490           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   38491           0 :         ret = PyUnicode_FromString(retstr);
   38492           0 :         TALLOC_FREE(retstr);
   38493             : 
   38494           0 :         return ret;
   38495             : }
   38496             : 
   38497           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38498             : {
   38499           0 :         return py_drsuapi_DsGetMemberships_ndr_print(py_obj, "drsuapi_DsGetMemberships_in", NDR_IN);
   38500             : }
   38501             : 
   38502           0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   38503             : {
   38504           0 :         return py_drsuapi_DsGetMemberships_ndr_print(py_obj, "drsuapi_DsGetMemberships_out", NDR_OUT);
   38505             : }
   38506             : 
   38507             : static PyMethodDef py_drsuapi_DsGetMemberships_methods[] = {
   38508             :         { "opnum", (PyCFunction)py_drsuapi_DsGetMemberships_ndr_opnum, METH_NOARGS|METH_CLASS,
   38509             :                 "drsuapi.DsGetMemberships.opnum() -> 9 (0x09) " },
   38510             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   38511             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   38512             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   38513             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   38514             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   38515             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   38516             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   38517             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   38518             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetMemberships_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   38519             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetMemberships_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   38520             :         { NULL, NULL, 0, NULL }
   38521             : };
   38522             : 
   38523             : 
   38524             : static PyTypeObject drsuapi_DsGetMemberships_Type = {
   38525             :         PyVarObject_HEAD_INIT(NULL, 0)
   38526             :         .tp_name = "drsuapi.DsGetMemberships",
   38527             :         .tp_getset = py_drsuapi_DsGetMemberships_getsetters,
   38528             :         .tp_methods = py_drsuapi_DsGetMemberships_methods,
   38529             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   38530             :         .tp_new = py_drsuapi_DsGetMemberships_new,
   38531             : };
   38532             : 
   38533           0 : static bool pack_py_drsuapi_DsGetMemberships_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetMemberships *r)
   38534             : {
   38535           0 :         PyObject *py_bind_handle;
   38536           0 :         PyObject *py_level;
   38537           0 :         PyObject *py_req;
   38538           0 :         const char *kwnames[] = {
   38539             :                 "bind_handle", "level", "req", NULL
   38540             :         };
   38541             : 
   38542           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetMemberships", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   38543           0 :                 return false;
   38544             :         }
   38545             : 
   38546           0 :         if (py_bind_handle == NULL) {
   38547           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   38548           0 :                 return false;
   38549             :         }
   38550           0 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   38551           0 :         if (r->in.bind_handle == NULL) {
   38552           0 :                 PyErr_NoMemory();
   38553           0 :                 return false;
   38554             :         }
   38555           0 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   38556           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   38557           0 :                 PyErr_NoMemory();
   38558           0 :                 return false;
   38559             :         }
   38560           0 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   38561           0 :         if (py_level == NULL) {
   38562           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   38563           0 :                 return false;
   38564             :         }
   38565             :         {
   38566           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   38567           0 :                 if (PyLong_Check(py_level)) {
   38568           0 :                         unsigned long long test_var;
   38569           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   38570           0 :                         if (PyErr_Occurred() != NULL) {
   38571           0 :                                 return false;
   38572             :                         }
   38573           0 :                         if (test_var > uint_max) {
   38574           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38575             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38576           0 :                                 return false;
   38577             :                         }
   38578           0 :                         r->in.level = test_var;
   38579             :                 } else {
   38580           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38581             :                           PyLong_Type.tp_name);
   38582           0 :                         return false;
   38583             :                 }
   38584             :         }
   38585           0 :         if (py_req == NULL) {
   38586           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   38587           0 :                 return false;
   38588             :         }
   38589           0 :         r->in.req = talloc_ptrtype(r, r->in.req);
   38590           0 :         if (r->in.req == NULL) {
   38591           0 :                 PyErr_NoMemory();
   38592           0 :                 return false;
   38593             :         }
   38594             :         {
   38595           0 :                 union drsuapi_DsGetMembershipsRequest *req_switch_1;
   38596           0 :                 req_switch_1 = (union drsuapi_DsGetMembershipsRequest *)pyrpc_export_union(&drsuapi_DsGetMembershipsRequest_Type, r, r->in.level, py_req, "union drsuapi_DsGetMembershipsRequest");
   38597           0 :                 if (req_switch_1 == NULL) {
   38598           0 :                         return false;
   38599             :                 }
   38600           0 :                 r->in.req = req_switch_1;
   38601             :         }
   38602           0 :         return true;
   38603             : }
   38604             : 
   38605           0 : static PyObject *unpack_py_drsuapi_DsGetMemberships_args_out(struct drsuapi_DsGetMemberships *r)
   38606             : {
   38607           0 :         PyObject *result;
   38608           0 :         PyObject *py_level_out;
   38609           0 :         PyObject *py_ctr;
   38610           0 :         result = PyTuple_New(2);
   38611           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   38612           0 :         PyTuple_SetItem(result, 0, py_level_out);
   38613           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetMembershipsCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsGetMembershipsCtr");
   38614           0 :         if (py_ctr == NULL) {
   38615           0 :                 return NULL;
   38616             :         }
   38617           0 :         PyTuple_SetItem(result, 1, py_ctr);
   38618           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   38619           0 :                 PyErr_SetWERROR(r->out.result);
   38620           0 :                 return NULL;
   38621             :         }
   38622             : 
   38623           0 :         return result;
   38624             : }
   38625             : 
   38626             : 
   38627           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_in_get_bind_handle(PyObject *obj, void *closure)
   38628             : {
   38629           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(obj);
   38630           0 :         PyObject *py_bind_handle;
   38631           0 :         if (object->in.bind_handle == NULL) {
   38632           0 :                 Py_RETURN_NONE;
   38633             :         }
   38634           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   38635           0 :         return py_bind_handle;
   38636             : }
   38637             : 
   38638           0 : static int py_drsuapi_DsGetNT4ChangeLog_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   38639             : {
   38640           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   38641           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   38642           0 :         if (value == NULL) {
   38643           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   38644           0 :                 return -1;
   38645             :         }
   38646           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   38647           0 :         if (object->in.bind_handle == NULL) {
   38648           0 :                 PyErr_NoMemory();
   38649           0 :                 return -1;
   38650             :         }
   38651           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   38652           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   38653           0 :                 PyErr_NoMemory();
   38654           0 :                 return -1;
   38655             :         }
   38656           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   38657           0 :         return 0;
   38658             : }
   38659             : 
   38660           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_in_get_level(PyObject *obj, void *closure)
   38661             : {
   38662           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(obj);
   38663           0 :         PyObject *py_level;
   38664           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   38665           0 :         return py_level;
   38666             : }
   38667             : 
   38668           0 : static int py_drsuapi_DsGetNT4ChangeLog_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   38669             : {
   38670           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   38671           0 :         if (value == NULL) {
   38672           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   38673           0 :                 return -1;
   38674             :         }
   38675             :         {
   38676           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   38677           0 :                 if (PyLong_Check(value)) {
   38678           0 :                         unsigned long long test_var;
   38679           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38680           0 :                         if (PyErr_Occurred() != NULL) {
   38681           0 :                                 return -1;
   38682             :                         }
   38683           0 :                         if (test_var > uint_max) {
   38684           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38685             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38686           0 :                                 return -1;
   38687             :                         }
   38688           0 :                         object->in.level = test_var;
   38689             :                 } else {
   38690           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38691             :                           PyLong_Type.tp_name);
   38692           0 :                         return -1;
   38693             :                 }
   38694             :         }
   38695           0 :         return 0;
   38696             : }
   38697             : 
   38698           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_in_get_req(PyObject *obj, void *closure)
   38699             : {
   38700           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(obj);
   38701           0 :         PyObject *py_req;
   38702           0 :         if (object->in.req == NULL) {
   38703           0 :                 Py_RETURN_NONE;
   38704             :         }
   38705           0 :         py_req = pyrpc_import_union(&drsuapi_DsGetNT4ChangeLogRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetNT4ChangeLogRequest");
   38706           0 :         if (py_req == NULL) {
   38707           0 :                 return NULL;
   38708             :         }
   38709           0 :         return py_req;
   38710             : }
   38711             : 
   38712           0 : static int py_drsuapi_DsGetNT4ChangeLog_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   38713             : {
   38714           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   38715           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   38716           0 :         if (value == NULL) {
   38717           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   38718           0 :                 return -1;
   38719             :         }
   38720           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   38721           0 :         if (object->in.req == NULL) {
   38722           0 :                 PyErr_NoMemory();
   38723           0 :                 return -1;
   38724             :         }
   38725             :         {
   38726           0 :                 union drsuapi_DsGetNT4ChangeLogRequest *req_switch_1;
   38727           0 :                 req_switch_1 = (union drsuapi_DsGetNT4ChangeLogRequest *)pyrpc_export_union(&drsuapi_DsGetNT4ChangeLogRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsGetNT4ChangeLogRequest");
   38728           0 :                 if (req_switch_1 == NULL) {
   38729           0 :                         return -1;
   38730             :                 }
   38731           0 :                 object->in.req = req_switch_1;
   38732             :         }
   38733           0 :         return 0;
   38734             : }
   38735             : 
   38736           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_out_get_level_out(PyObject *obj, void *closure)
   38737             : {
   38738           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(obj);
   38739           0 :         PyObject *py_level_out;
   38740           0 :         if (object->out.level_out == NULL) {
   38741           0 :                 Py_RETURN_NONE;
   38742             :         }
   38743           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   38744           0 :         return py_level_out;
   38745             : }
   38746             : 
   38747           0 : static int py_drsuapi_DsGetNT4ChangeLog_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   38748             : {
   38749           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   38750           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   38751           0 :         if (value == NULL) {
   38752           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   38753           0 :                 return -1;
   38754             :         }
   38755           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   38756           0 :         if (object->out.level_out == NULL) {
   38757           0 :                 PyErr_NoMemory();
   38758           0 :                 return -1;
   38759             :         }
   38760             :         {
   38761           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   38762           0 :                 if (PyLong_Check(value)) {
   38763           0 :                         unsigned long long test_var;
   38764           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   38765           0 :                         if (PyErr_Occurred() != NULL) {
   38766           0 :                                 return -1;
   38767             :                         }
   38768           0 :                         if (test_var > uint_max) {
   38769           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   38770             :                                   PyLong_Type.tp_name, uint_max, test_var);
   38771           0 :                                 return -1;
   38772             :                         }
   38773           0 :                         *object->out.level_out = test_var;
   38774             :                 } else {
   38775           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   38776             :                           PyLong_Type.tp_name);
   38777           0 :                         return -1;
   38778             :                 }
   38779             :         }
   38780           0 :         return 0;
   38781             : }
   38782             : 
   38783           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_out_get_info(PyObject *obj, void *closure)
   38784             : {
   38785           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(obj);
   38786           0 :         PyObject *py_info;
   38787           0 :         if (object->out.info == NULL) {
   38788           0 :                 Py_RETURN_NONE;
   38789             :         }
   38790           0 :         py_info = pyrpc_import_union(&drsuapi_DsGetNT4ChangeLogInfo_Type, object->out.info, *object->out.level_out, object->out.info, "union drsuapi_DsGetNT4ChangeLogInfo");
   38791           0 :         if (py_info == NULL) {
   38792           0 :                 return NULL;
   38793             :         }
   38794           0 :         return py_info;
   38795             : }
   38796             : 
   38797           0 : static int py_drsuapi_DsGetNT4ChangeLog_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   38798             : {
   38799           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   38800           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   38801           0 :         if (value == NULL) {
   38802           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   38803           0 :                 return -1;
   38804             :         }
   38805           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   38806           0 :         if (object->out.info == NULL) {
   38807           0 :                 PyErr_NoMemory();
   38808           0 :                 return -1;
   38809             :         }
   38810             :         {
   38811           0 :                 union drsuapi_DsGetNT4ChangeLogInfo *info_switch_1;
   38812           0 :                 info_switch_1 = (union drsuapi_DsGetNT4ChangeLogInfo *)pyrpc_export_union(&drsuapi_DsGetNT4ChangeLogInfo_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsGetNT4ChangeLogInfo");
   38813           0 :                 if (info_switch_1 == NULL) {
   38814           0 :                         return -1;
   38815             :                 }
   38816           0 :                 object->out.info = info_switch_1;
   38817             :         }
   38818           0 :         return 0;
   38819             : }
   38820             : 
   38821           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_get_result(PyObject *obj, void *closure)
   38822             : {
   38823           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(obj);
   38824           0 :         PyObject *py_result;
   38825           0 :         py_result = PyErr_FromWERROR(object->out.result);
   38826           0 :         return py_result;
   38827             : }
   38828             : 
   38829           0 : static int py_drsuapi_DsGetNT4ChangeLog_set_result(PyObject *py_obj, PyObject *value, void *closure)
   38830             : {
   38831           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   38832           0 :         if (value == NULL) {
   38833           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   38834           0 :                 return -1;
   38835             :         }
   38836           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   38837           0 :         return 0;
   38838             : }
   38839             : 
   38840             : static PyGetSetDef py_drsuapi_DsGetNT4ChangeLog_getsetters[] = {
   38841             :         {
   38842             :                 .name = discard_const_p(char, "in_bind_handle"),
   38843             :                 .get = py_drsuapi_DsGetNT4ChangeLog_in_get_bind_handle,
   38844             :                 .set = py_drsuapi_DsGetNT4ChangeLog_in_set_bind_handle,
   38845             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   38846             :         },
   38847             :         {
   38848             :                 .name = discard_const_p(char, "in_level"),
   38849             :                 .get = py_drsuapi_DsGetNT4ChangeLog_in_get_level,
   38850             :                 .set = py_drsuapi_DsGetNT4ChangeLog_in_set_level,
   38851             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38852             :         },
   38853             :         {
   38854             :                 .name = discard_const_p(char, "in_req"),
   38855             :                 .get = py_drsuapi_DsGetNT4ChangeLog_in_get_req,
   38856             :                 .set = py_drsuapi_DsGetNT4ChangeLog_in_set_req,
   38857             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNT4ChangeLogRequest")
   38858             :         },
   38859             :         {
   38860             :                 .name = discard_const_p(char, "out_level_out"),
   38861             :                 .get = py_drsuapi_DsGetNT4ChangeLog_out_get_level_out,
   38862             :                 .set = py_drsuapi_DsGetNT4ChangeLog_out_set_level_out,
   38863             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   38864             :         },
   38865             :         {
   38866             :                 .name = discard_const_p(char, "out_info"),
   38867             :                 .get = py_drsuapi_DsGetNT4ChangeLog_out_get_info,
   38868             :                 .set = py_drsuapi_DsGetNT4ChangeLog_out_set_info,
   38869             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNT4ChangeLogInfo")
   38870             :         },
   38871             :         {
   38872             :                 .name = discard_const_p(char, "result"),
   38873             :                 .get = py_drsuapi_DsGetNT4ChangeLog_get_result,
   38874             :                 .set = py_drsuapi_DsGetNT4ChangeLog_set_result,
   38875             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   38876             :         },
   38877             :         { .name = NULL }
   38878             : };
   38879             : 
   38880           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   38881             : {
   38882           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsGetNT4ChangeLog, type);
   38883           0 :         struct drsuapi_DsGetNT4ChangeLog *_self = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(self);
   38884           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   38885           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   38886           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogRequest);
   38887           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   38888           0 :         _self->out.info = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogInfo);
   38889           0 :         return self;
   38890             : }
   38891             : 
   38892           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   38893             : {
   38894             : 
   38895             : 
   38896           0 :         return PyLong_FromLong(11);
   38897             : }
   38898             : 
   38899           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   38900             : {
   38901           0 :         const struct ndr_interface_call *call = NULL;
   38902           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   38903           0 :         PyObject *ret = NULL;
   38904           0 :         struct ndr_push *push = NULL;
   38905           0 :         DATA_BLOB blob;
   38906           0 :         enum ndr_err_code err;
   38907             : 
   38908           0 :         if (ndr_table_drsuapi.num_calls < 12) {
   38909           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNT4ChangeLog_ndr_pack");
   38910           0 :                 return NULL;
   38911             :         }
   38912           0 :         call = &ndr_table_drsuapi.calls[11];
   38913             : 
   38914           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   38915           0 :         if (push == NULL) {
   38916           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38917           0 :                 return NULL;
   38918             :         }
   38919             : 
   38920           0 :         push->flags |= ndr_push_flags;
   38921             : 
   38922           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   38923           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   38924           0 :                 TALLOC_FREE(push);
   38925           0 :                 PyErr_SetNdrError(err);
   38926           0 :                 return NULL;
   38927             :         }
   38928           0 :         blob = ndr_push_blob(push);
   38929           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   38930           0 :         TALLOC_FREE(push);
   38931           0 :         return ret;
   38932             : }
   38933             : 
   38934           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38935             : {
   38936           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38937           0 :         PyObject *bigendian_obj = NULL;
   38938           0 :         PyObject *ndr64_obj = NULL;
   38939           0 :         libndr_flags ndr_push_flags = 0;
   38940             : 
   38941           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   38942             :                 discard_const_p(char *, kwnames),
   38943             :                 &bigendian_obj,
   38944             :                 &ndr64_obj)) {
   38945           0 :                 return NULL;
   38946             :         }
   38947             : 
   38948           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38949           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38950             :         }
   38951           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38952           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38953             :         }
   38954             : 
   38955           0 :         return py_drsuapi_DsGetNT4ChangeLog_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   38956             : }
   38957             : 
   38958           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   38959             : {
   38960           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   38961           0 :         PyObject *bigendian_obj = NULL;
   38962           0 :         PyObject *ndr64_obj = NULL;
   38963           0 :         libndr_flags ndr_push_flags = 0;
   38964             : 
   38965           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   38966             :                 discard_const_p(char *, kwnames),
   38967             :                 &bigendian_obj,
   38968             :                 &ndr64_obj)) {
   38969           0 :                 return NULL;
   38970             :         }
   38971             : 
   38972           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   38973           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   38974             :         }
   38975           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   38976           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   38977             :         }
   38978             : 
   38979           0 :         return py_drsuapi_DsGetNT4ChangeLog_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   38980             : }
   38981             : 
   38982           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   38983             : {
   38984           0 :         const struct ndr_interface_call *call = NULL;
   38985           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   38986           0 :         struct ndr_pull *pull = NULL;
   38987           0 :         enum ndr_err_code err;
   38988             : 
   38989           0 :         if (ndr_table_drsuapi.num_calls < 12) {
   38990           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNT4ChangeLog_ndr_unpack");
   38991           0 :                 return NULL;
   38992             :         }
   38993           0 :         call = &ndr_table_drsuapi.calls[11];
   38994             : 
   38995           0 :         pull = ndr_pull_init_blob(blob, object);
   38996           0 :         if (pull == NULL) {
   38997           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   38998           0 :                 return NULL;
   38999             :         }
   39000             : 
   39001           0 :         pull->flags |= ndr_pull_flags;
   39002             : 
   39003           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   39004           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39005           0 :                 TALLOC_FREE(pull);
   39006           0 :                 PyErr_SetNdrError(err);
   39007           0 :                 return NULL;
   39008             :         }
   39009           0 :         if (!allow_remaining) {
   39010           0 :                 uint32_t highest_ofs;
   39011             : 
   39012           0 :                 if (pull->offset > pull->relative_highest_offset) {
   39013           0 :                         highest_ofs = pull->offset;
   39014             :                 } else {
   39015           0 :                         highest_ofs = pull->relative_highest_offset;
   39016             :                 }
   39017           0 :                 if (highest_ofs < pull->data_size) {
   39018           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   39019             :                                 "not all bytes consumed ofs[%u] size[%u]",
   39020             :                                 highest_ofs, pull->data_size);
   39021           0 :                         TALLOC_FREE(pull);
   39022           0 :                         PyErr_SetNdrError(err);
   39023           0 :                         return NULL;
   39024             :                 }
   39025             :         }
   39026             : 
   39027           0 :         TALLOC_FREE(pull);
   39028           0 :         Py_RETURN_NONE;
   39029             : }
   39030             : 
   39031           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39032             : {
   39033           0 :         DATA_BLOB blob;
   39034           0 :         Py_ssize_t blob_length = 0;
   39035           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39036           0 :         PyObject *bigendian_obj = NULL;
   39037           0 :         PyObject *ndr64_obj = NULL;
   39038           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39039           0 :         PyObject *allow_remaining_obj = NULL;
   39040           0 :         bool allow_remaining = false;
   39041             : 
   39042           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   39043             :                 discard_const_p(char *, kwnames),
   39044             :                 &blob.data, &blob_length,
   39045             :                 &bigendian_obj,
   39046             :                 &ndr64_obj,
   39047             :                 &allow_remaining_obj)) {
   39048           0 :                 return NULL;
   39049             :         }
   39050           0 :         blob.length = blob_length;
   39051             : 
   39052           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39053           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39054             :         }
   39055           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39056           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39057             :         }
   39058             : 
   39059           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39060           0 :                 allow_remaining = true;
   39061             :         }
   39062             : 
   39063           0 :         return py_drsuapi_DsGetNT4ChangeLog_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   39064             : }
   39065             : 
   39066           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39067             : {
   39068           0 :         DATA_BLOB blob;
   39069           0 :         Py_ssize_t blob_length = 0;
   39070           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39071           0 :         PyObject *bigendian_obj = NULL;
   39072           0 :         PyObject *ndr64_obj = NULL;
   39073           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39074           0 :         PyObject *allow_remaining_obj = NULL;
   39075           0 :         bool allow_remaining = false;
   39076             : 
   39077           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   39078             :                 discard_const_p(char *, kwnames),
   39079             :                 &blob.data, &blob_length,
   39080             :                 &bigendian_obj,
   39081             :                 &ndr64_obj,
   39082             :                 &allow_remaining_obj)) {
   39083           0 :                 return NULL;
   39084             :         }
   39085           0 :         blob.length = blob_length;
   39086             : 
   39087           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39088           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39089             :         }
   39090           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39091           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39092             :         }
   39093             : 
   39094           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39095           0 :                 allow_remaining = true;
   39096             :         }
   39097             : 
   39098           0 :         return py_drsuapi_DsGetNT4ChangeLog_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   39099             : }
   39100             : 
   39101           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   39102             : {
   39103           0 :         const struct ndr_interface_call *call = NULL;
   39104           0 :         struct drsuapi_DsGetNT4ChangeLog *object = pytalloc_get_ptr(py_obj);
   39105           0 :         PyObject *ret;
   39106           0 :         char *retstr;
   39107             : 
   39108           0 :         if (ndr_table_drsuapi.num_calls < 12) {
   39109           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNT4ChangeLog_ndr_print");
   39110           0 :                 return NULL;
   39111             :         }
   39112           0 :         call = &ndr_table_drsuapi.calls[11];
   39113             : 
   39114           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   39115           0 :         ret = PyUnicode_FromString(retstr);
   39116           0 :         TALLOC_FREE(retstr);
   39117             : 
   39118           0 :         return ret;
   39119             : }
   39120             : 
   39121           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39122             : {
   39123           0 :         return py_drsuapi_DsGetNT4ChangeLog_ndr_print(py_obj, "drsuapi_DsGetNT4ChangeLog_in", NDR_IN);
   39124             : }
   39125             : 
   39126           0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39127             : {
   39128           0 :         return py_drsuapi_DsGetNT4ChangeLog_ndr_print(py_obj, "drsuapi_DsGetNT4ChangeLog_out", NDR_OUT);
   39129             : }
   39130             : 
   39131             : static PyMethodDef py_drsuapi_DsGetNT4ChangeLog_methods[] = {
   39132             :         { "opnum", (PyCFunction)py_drsuapi_DsGetNT4ChangeLog_ndr_opnum, METH_NOARGS|METH_CLASS,
   39133             :                 "drsuapi.DsGetNT4ChangeLog.opnum() -> 11 (0x0b) " },
   39134             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLog_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   39135             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   39136             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLog_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   39137             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   39138             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLog_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   39139             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   39140             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLog_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   39141             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   39142             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetNT4ChangeLog_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   39143             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetNT4ChangeLog_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   39144             :         { NULL, NULL, 0, NULL }
   39145             : };
   39146             : 
   39147             : 
   39148             : static PyTypeObject drsuapi_DsGetNT4ChangeLog_Type = {
   39149             :         PyVarObject_HEAD_INIT(NULL, 0)
   39150             :         .tp_name = "drsuapi.DsGetNT4ChangeLog",
   39151             :         .tp_getset = py_drsuapi_DsGetNT4ChangeLog_getsetters,
   39152             :         .tp_methods = py_drsuapi_DsGetNT4ChangeLog_methods,
   39153             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   39154             :         .tp_new = py_drsuapi_DsGetNT4ChangeLog_new,
   39155             : };
   39156             : 
   39157           0 : static bool pack_py_drsuapi_DsGetNT4ChangeLog_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetNT4ChangeLog *r)
   39158             : {
   39159           0 :         PyObject *py_bind_handle;
   39160           0 :         PyObject *py_level;
   39161           0 :         PyObject *py_req;
   39162           0 :         const char *kwnames[] = {
   39163             :                 "bind_handle", "level", "req", NULL
   39164             :         };
   39165             : 
   39166           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetNT4ChangeLog", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   39167           0 :                 return false;
   39168             :         }
   39169             : 
   39170           0 :         if (py_bind_handle == NULL) {
   39171           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   39172           0 :                 return false;
   39173             :         }
   39174           0 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   39175           0 :         if (r->in.bind_handle == NULL) {
   39176           0 :                 PyErr_NoMemory();
   39177           0 :                 return false;
   39178             :         }
   39179           0 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   39180           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   39181           0 :                 PyErr_NoMemory();
   39182           0 :                 return false;
   39183             :         }
   39184           0 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   39185           0 :         if (py_level == NULL) {
   39186           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   39187           0 :                 return false;
   39188             :         }
   39189             :         {
   39190           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   39191           0 :                 if (PyLong_Check(py_level)) {
   39192           0 :                         unsigned long long test_var;
   39193           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   39194           0 :                         if (PyErr_Occurred() != NULL) {
   39195           0 :                                 return false;
   39196             :                         }
   39197           0 :                         if (test_var > uint_max) {
   39198           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39199             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39200           0 :                                 return false;
   39201             :                         }
   39202           0 :                         r->in.level = test_var;
   39203             :                 } else {
   39204           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39205             :                           PyLong_Type.tp_name);
   39206           0 :                         return false;
   39207             :                 }
   39208             :         }
   39209           0 :         if (py_req == NULL) {
   39210           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   39211           0 :                 return false;
   39212             :         }
   39213           0 :         r->in.req = talloc_ptrtype(r, r->in.req);
   39214           0 :         if (r->in.req == NULL) {
   39215           0 :                 PyErr_NoMemory();
   39216           0 :                 return false;
   39217             :         }
   39218             :         {
   39219           0 :                 union drsuapi_DsGetNT4ChangeLogRequest *req_switch_1;
   39220           0 :                 req_switch_1 = (union drsuapi_DsGetNT4ChangeLogRequest *)pyrpc_export_union(&drsuapi_DsGetNT4ChangeLogRequest_Type, r, r->in.level, py_req, "union drsuapi_DsGetNT4ChangeLogRequest");
   39221           0 :                 if (req_switch_1 == NULL) {
   39222           0 :                         return false;
   39223             :                 }
   39224           0 :                 r->in.req = req_switch_1;
   39225             :         }
   39226           0 :         return true;
   39227             : }
   39228             : 
   39229           0 : static PyObject *unpack_py_drsuapi_DsGetNT4ChangeLog_args_out(struct drsuapi_DsGetNT4ChangeLog *r)
   39230             : {
   39231           0 :         PyObject *result;
   39232           0 :         PyObject *py_level_out;
   39233           0 :         PyObject *py_info;
   39234           0 :         result = PyTuple_New(2);
   39235           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   39236           0 :         PyTuple_SetItem(result, 0, py_level_out);
   39237           0 :         py_info = pyrpc_import_union(&drsuapi_DsGetNT4ChangeLogInfo_Type, r->out.info, *r->out.level_out, r->out.info, "union drsuapi_DsGetNT4ChangeLogInfo");
   39238           0 :         if (py_info == NULL) {
   39239           0 :                 return NULL;
   39240             :         }
   39241           0 :         PyTuple_SetItem(result, 1, py_info);
   39242           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   39243           0 :                 PyErr_SetWERROR(r->out.result);
   39244           0 :                 return NULL;
   39245             :         }
   39246             : 
   39247           0 :         return result;
   39248             : }
   39249             : 
   39250             : 
   39251           0 : static PyObject *py_drsuapi_DsCrackNames_in_get_bind_handle(PyObject *obj, void *closure)
   39252             : {
   39253           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(obj);
   39254           0 :         PyObject *py_bind_handle;
   39255           0 :         if (object->in.bind_handle == NULL) {
   39256           0 :                 Py_RETURN_NONE;
   39257             :         }
   39258           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   39259           0 :         return py_bind_handle;
   39260             : }
   39261             : 
   39262           0 : static int py_drsuapi_DsCrackNames_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   39263             : {
   39264           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39265           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   39266           0 :         if (value == NULL) {
   39267           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   39268           0 :                 return -1;
   39269             :         }
   39270           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   39271           0 :         if (object->in.bind_handle == NULL) {
   39272           0 :                 PyErr_NoMemory();
   39273           0 :                 return -1;
   39274             :         }
   39275           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   39276           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39277           0 :                 PyErr_NoMemory();
   39278           0 :                 return -1;
   39279             :         }
   39280           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   39281           0 :         return 0;
   39282             : }
   39283             : 
   39284           0 : static PyObject *py_drsuapi_DsCrackNames_in_get_level(PyObject *obj, void *closure)
   39285             : {
   39286           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(obj);
   39287           0 :         PyObject *py_level;
   39288           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   39289           0 :         return py_level;
   39290             : }
   39291             : 
   39292           0 : static int py_drsuapi_DsCrackNames_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   39293             : {
   39294           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39295           0 :         if (value == NULL) {
   39296           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   39297           0 :                 return -1;
   39298             :         }
   39299             :         {
   39300           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   39301           0 :                 if (PyLong_Check(value)) {
   39302           0 :                         unsigned long long test_var;
   39303           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39304           0 :                         if (PyErr_Occurred() != NULL) {
   39305           0 :                                 return -1;
   39306             :                         }
   39307           0 :                         if (test_var > uint_max) {
   39308           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39309             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39310           0 :                                 return -1;
   39311             :                         }
   39312           0 :                         object->in.level = test_var;
   39313             :                 } else {
   39314           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39315             :                           PyLong_Type.tp_name);
   39316           0 :                         return -1;
   39317             :                 }
   39318             :         }
   39319           0 :         return 0;
   39320             : }
   39321             : 
   39322           0 : static PyObject *py_drsuapi_DsCrackNames_in_get_req(PyObject *obj, void *closure)
   39323             : {
   39324           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(obj);
   39325           0 :         PyObject *py_req;
   39326           0 :         if (object->in.req == NULL) {
   39327           0 :                 Py_RETURN_NONE;
   39328             :         }
   39329           0 :         py_req = pyrpc_import_union(&drsuapi_DsNameRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsNameRequest");
   39330           0 :         if (py_req == NULL) {
   39331           0 :                 return NULL;
   39332             :         }
   39333           0 :         return py_req;
   39334             : }
   39335             : 
   39336           0 : static int py_drsuapi_DsCrackNames_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   39337             : {
   39338           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39339           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   39340           0 :         if (value == NULL) {
   39341           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   39342           0 :                 return -1;
   39343             :         }
   39344           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   39345           0 :         if (object->in.req == NULL) {
   39346           0 :                 PyErr_NoMemory();
   39347           0 :                 return -1;
   39348             :         }
   39349             :         {
   39350           0 :                 union drsuapi_DsNameRequest *req_switch_1;
   39351           0 :                 req_switch_1 = (union drsuapi_DsNameRequest *)pyrpc_export_union(&drsuapi_DsNameRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsNameRequest");
   39352           0 :                 if (req_switch_1 == NULL) {
   39353           0 :                         return -1;
   39354             :                 }
   39355           0 :                 object->in.req = req_switch_1;
   39356             :         }
   39357           0 :         return 0;
   39358             : }
   39359             : 
   39360           0 : static PyObject *py_drsuapi_DsCrackNames_out_get_level_out(PyObject *obj, void *closure)
   39361             : {
   39362           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(obj);
   39363           0 :         PyObject *py_level_out;
   39364           0 :         if (object->out.level_out == NULL) {
   39365           0 :                 Py_RETURN_NONE;
   39366             :         }
   39367           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   39368           0 :         return py_level_out;
   39369             : }
   39370             : 
   39371           0 : static int py_drsuapi_DsCrackNames_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   39372             : {
   39373           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39374           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   39375           0 :         if (value == NULL) {
   39376           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   39377           0 :                 return -1;
   39378             :         }
   39379           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   39380           0 :         if (object->out.level_out == NULL) {
   39381           0 :                 PyErr_NoMemory();
   39382           0 :                 return -1;
   39383             :         }
   39384             :         {
   39385           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   39386           0 :                 if (PyLong_Check(value)) {
   39387           0 :                         unsigned long long test_var;
   39388           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39389           0 :                         if (PyErr_Occurred() != NULL) {
   39390           0 :                                 return -1;
   39391             :                         }
   39392           0 :                         if (test_var > uint_max) {
   39393           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39394             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39395           0 :                                 return -1;
   39396             :                         }
   39397           0 :                         *object->out.level_out = test_var;
   39398             :                 } else {
   39399           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39400             :                           PyLong_Type.tp_name);
   39401           0 :                         return -1;
   39402             :                 }
   39403             :         }
   39404           0 :         return 0;
   39405             : }
   39406             : 
   39407           0 : static PyObject *py_drsuapi_DsCrackNames_out_get_ctr(PyObject *obj, void *closure)
   39408             : {
   39409           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(obj);
   39410           0 :         PyObject *py_ctr;
   39411           0 :         if (object->out.ctr == NULL) {
   39412           0 :                 Py_RETURN_NONE;
   39413             :         }
   39414           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsNameCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsNameCtr");
   39415           0 :         if (py_ctr == NULL) {
   39416           0 :                 return NULL;
   39417             :         }
   39418           0 :         return py_ctr;
   39419             : }
   39420             : 
   39421           0 : static int py_drsuapi_DsCrackNames_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   39422             : {
   39423           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39424           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   39425           0 :         if (value == NULL) {
   39426           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   39427           0 :                 return -1;
   39428             :         }
   39429           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   39430           0 :         if (object->out.ctr == NULL) {
   39431           0 :                 PyErr_NoMemory();
   39432           0 :                 return -1;
   39433             :         }
   39434             :         {
   39435           0 :                 union drsuapi_DsNameCtr *ctr_switch_1;
   39436           0 :                 ctr_switch_1 = (union drsuapi_DsNameCtr *)pyrpc_export_union(&drsuapi_DsNameCtr_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsNameCtr");
   39437           0 :                 if (ctr_switch_1 == NULL) {
   39438           0 :                         return -1;
   39439             :                 }
   39440           0 :                 object->out.ctr = ctr_switch_1;
   39441             :         }
   39442           0 :         return 0;
   39443             : }
   39444             : 
   39445           0 : static PyObject *py_drsuapi_DsCrackNames_get_result(PyObject *obj, void *closure)
   39446             : {
   39447           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(obj);
   39448           0 :         PyObject *py_result;
   39449           0 :         py_result = PyErr_FromWERROR(object->out.result);
   39450           0 :         return py_result;
   39451             : }
   39452             : 
   39453           0 : static int py_drsuapi_DsCrackNames_set_result(PyObject *py_obj, PyObject *value, void *closure)
   39454             : {
   39455           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39456           0 :         if (value == NULL) {
   39457           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   39458           0 :                 return -1;
   39459             :         }
   39460           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   39461           0 :         return 0;
   39462             : }
   39463             : 
   39464             : static PyGetSetDef py_drsuapi_DsCrackNames_getsetters[] = {
   39465             :         {
   39466             :                 .name = discard_const_p(char, "in_bind_handle"),
   39467             :                 .get = py_drsuapi_DsCrackNames_in_get_bind_handle,
   39468             :                 .set = py_drsuapi_DsCrackNames_in_set_bind_handle,
   39469             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   39470             :         },
   39471             :         {
   39472             :                 .name = discard_const_p(char, "in_level"),
   39473             :                 .get = py_drsuapi_DsCrackNames_in_get_level,
   39474             :                 .set = py_drsuapi_DsCrackNames_in_set_level,
   39475             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39476             :         },
   39477             :         {
   39478             :                 .name = discard_const_p(char, "in_req"),
   39479             :                 .get = py_drsuapi_DsCrackNames_in_get_req,
   39480             :                 .set = py_drsuapi_DsCrackNames_in_set_req,
   39481             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameRequest")
   39482             :         },
   39483             :         {
   39484             :                 .name = discard_const_p(char, "out_level_out"),
   39485             :                 .get = py_drsuapi_DsCrackNames_out_get_level_out,
   39486             :                 .set = py_drsuapi_DsCrackNames_out_set_level_out,
   39487             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   39488             :         },
   39489             :         {
   39490             :                 .name = discard_const_p(char, "out_ctr"),
   39491             :                 .get = py_drsuapi_DsCrackNames_out_get_ctr,
   39492             :                 .set = py_drsuapi_DsCrackNames_out_set_ctr,
   39493             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameCtr")
   39494             :         },
   39495             :         {
   39496             :                 .name = discard_const_p(char, "result"),
   39497             :                 .get = py_drsuapi_DsCrackNames_get_result,
   39498             :                 .set = py_drsuapi_DsCrackNames_set_result,
   39499             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   39500             :         },
   39501             :         { .name = NULL }
   39502             : };
   39503             : 
   39504           0 : static PyObject *py_drsuapi_DsCrackNames_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   39505             : {
   39506           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsCrackNames, type);
   39507           0 :         struct drsuapi_DsCrackNames *_self = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(self);
   39508           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   39509           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   39510           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsNameRequest);
   39511           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   39512           0 :         _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsNameCtr);
   39513           0 :         return self;
   39514             : }
   39515             : 
   39516           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   39517             : {
   39518             : 
   39519             : 
   39520           0 :         return PyLong_FromLong(12);
   39521             : }
   39522             : 
   39523           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   39524             : {
   39525           0 :         const struct ndr_interface_call *call = NULL;
   39526           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39527           0 :         PyObject *ret = NULL;
   39528           0 :         struct ndr_push *push = NULL;
   39529           0 :         DATA_BLOB blob;
   39530           0 :         enum ndr_err_code err;
   39531             : 
   39532           0 :         if (ndr_table_drsuapi.num_calls < 13) {
   39533           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsCrackNames_ndr_pack");
   39534           0 :                 return NULL;
   39535             :         }
   39536           0 :         call = &ndr_table_drsuapi.calls[12];
   39537             : 
   39538           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   39539           0 :         if (push == NULL) {
   39540           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39541           0 :                 return NULL;
   39542             :         }
   39543             : 
   39544           0 :         push->flags |= ndr_push_flags;
   39545             : 
   39546           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   39547           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39548           0 :                 TALLOC_FREE(push);
   39549           0 :                 PyErr_SetNdrError(err);
   39550           0 :                 return NULL;
   39551             :         }
   39552           0 :         blob = ndr_push_blob(push);
   39553           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   39554           0 :         TALLOC_FREE(push);
   39555           0 :         return ret;
   39556             : }
   39557             : 
   39558           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39559             : {
   39560           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39561           0 :         PyObject *bigendian_obj = NULL;
   39562           0 :         PyObject *ndr64_obj = NULL;
   39563           0 :         libndr_flags ndr_push_flags = 0;
   39564             : 
   39565           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   39566             :                 discard_const_p(char *, kwnames),
   39567             :                 &bigendian_obj,
   39568             :                 &ndr64_obj)) {
   39569           0 :                 return NULL;
   39570             :         }
   39571             : 
   39572           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39573           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39574             :         }
   39575           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39576           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39577             :         }
   39578             : 
   39579           0 :         return py_drsuapi_DsCrackNames_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   39580             : }
   39581             : 
   39582           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39583             : {
   39584           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   39585           0 :         PyObject *bigendian_obj = NULL;
   39586           0 :         PyObject *ndr64_obj = NULL;
   39587           0 :         libndr_flags ndr_push_flags = 0;
   39588             : 
   39589           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   39590             :                 discard_const_p(char *, kwnames),
   39591             :                 &bigendian_obj,
   39592             :                 &ndr64_obj)) {
   39593           0 :                 return NULL;
   39594             :         }
   39595             : 
   39596           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39597           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   39598             :         }
   39599           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39600           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   39601             :         }
   39602             : 
   39603           0 :         return py_drsuapi_DsCrackNames_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   39604             : }
   39605             : 
   39606           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   39607             : {
   39608           0 :         const struct ndr_interface_call *call = NULL;
   39609           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39610           0 :         struct ndr_pull *pull = NULL;
   39611           0 :         enum ndr_err_code err;
   39612             : 
   39613           0 :         if (ndr_table_drsuapi.num_calls < 13) {
   39614           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsCrackNames_ndr_unpack");
   39615           0 :                 return NULL;
   39616             :         }
   39617           0 :         call = &ndr_table_drsuapi.calls[12];
   39618             : 
   39619           0 :         pull = ndr_pull_init_blob(blob, object);
   39620           0 :         if (pull == NULL) {
   39621           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   39622           0 :                 return NULL;
   39623             :         }
   39624             : 
   39625           0 :         pull->flags |= ndr_pull_flags;
   39626             : 
   39627           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   39628           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   39629           0 :                 TALLOC_FREE(pull);
   39630           0 :                 PyErr_SetNdrError(err);
   39631           0 :                 return NULL;
   39632             :         }
   39633           0 :         if (!allow_remaining) {
   39634           0 :                 uint32_t highest_ofs;
   39635             : 
   39636           0 :                 if (pull->offset > pull->relative_highest_offset) {
   39637           0 :                         highest_ofs = pull->offset;
   39638             :                 } else {
   39639           0 :                         highest_ofs = pull->relative_highest_offset;
   39640             :                 }
   39641           0 :                 if (highest_ofs < pull->data_size) {
   39642           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   39643             :                                 "not all bytes consumed ofs[%u] size[%u]",
   39644             :                                 highest_ofs, pull->data_size);
   39645           0 :                         TALLOC_FREE(pull);
   39646           0 :                         PyErr_SetNdrError(err);
   39647           0 :                         return NULL;
   39648             :                 }
   39649             :         }
   39650             : 
   39651           0 :         TALLOC_FREE(pull);
   39652           0 :         Py_RETURN_NONE;
   39653             : }
   39654             : 
   39655           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39656             : {
   39657           0 :         DATA_BLOB blob;
   39658           0 :         Py_ssize_t blob_length = 0;
   39659           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39660           0 :         PyObject *bigendian_obj = NULL;
   39661           0 :         PyObject *ndr64_obj = NULL;
   39662           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39663           0 :         PyObject *allow_remaining_obj = NULL;
   39664           0 :         bool allow_remaining = false;
   39665             : 
   39666           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   39667             :                 discard_const_p(char *, kwnames),
   39668             :                 &blob.data, &blob_length,
   39669             :                 &bigendian_obj,
   39670             :                 &ndr64_obj,
   39671             :                 &allow_remaining_obj)) {
   39672           0 :                 return NULL;
   39673             :         }
   39674           0 :         blob.length = blob_length;
   39675             : 
   39676           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39677           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39678             :         }
   39679           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39680           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39681             :         }
   39682             : 
   39683           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39684           0 :                 allow_remaining = true;
   39685             :         }
   39686             : 
   39687           0 :         return py_drsuapi_DsCrackNames_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   39688             : }
   39689             : 
   39690           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   39691             : {
   39692           0 :         DATA_BLOB blob;
   39693           0 :         Py_ssize_t blob_length = 0;
   39694           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   39695           0 :         PyObject *bigendian_obj = NULL;
   39696           0 :         PyObject *ndr64_obj = NULL;
   39697           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   39698           0 :         PyObject *allow_remaining_obj = NULL;
   39699           0 :         bool allow_remaining = false;
   39700             : 
   39701           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   39702             :                 discard_const_p(char *, kwnames),
   39703             :                 &blob.data, &blob_length,
   39704             :                 &bigendian_obj,
   39705             :                 &ndr64_obj,
   39706             :                 &allow_remaining_obj)) {
   39707           0 :                 return NULL;
   39708             :         }
   39709           0 :         blob.length = blob_length;
   39710             : 
   39711           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   39712           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   39713             :         }
   39714           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   39715           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   39716             :         }
   39717             : 
   39718           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   39719           0 :                 allow_remaining = true;
   39720             :         }
   39721             : 
   39722           0 :         return py_drsuapi_DsCrackNames_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   39723             : }
   39724             : 
   39725           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   39726             : {
   39727           0 :         const struct ndr_interface_call *call = NULL;
   39728           0 :         struct drsuapi_DsCrackNames *object = pytalloc_get_ptr(py_obj);
   39729           0 :         PyObject *ret;
   39730           0 :         char *retstr;
   39731             : 
   39732           0 :         if (ndr_table_drsuapi.num_calls < 13) {
   39733           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsCrackNames_ndr_print");
   39734           0 :                 return NULL;
   39735             :         }
   39736           0 :         call = &ndr_table_drsuapi.calls[12];
   39737             : 
   39738           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   39739           0 :         ret = PyUnicode_FromString(retstr);
   39740           0 :         TALLOC_FREE(retstr);
   39741             : 
   39742           0 :         return ret;
   39743             : }
   39744             : 
   39745           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39746             : {
   39747           0 :         return py_drsuapi_DsCrackNames_ndr_print(py_obj, "drsuapi_DsCrackNames_in", NDR_IN);
   39748             : }
   39749             : 
   39750           0 : static PyObject *py_drsuapi_DsCrackNames_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   39751             : {
   39752           0 :         return py_drsuapi_DsCrackNames_ndr_print(py_obj, "drsuapi_DsCrackNames_out", NDR_OUT);
   39753             : }
   39754             : 
   39755             : static PyMethodDef py_drsuapi_DsCrackNames_methods[] = {
   39756             :         { "opnum", (PyCFunction)py_drsuapi_DsCrackNames_ndr_opnum, METH_NOARGS|METH_CLASS,
   39757             :                 "drsuapi.DsCrackNames.opnum() -> 12 (0x0c) " },
   39758             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsCrackNames_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   39759             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   39760             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsCrackNames_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   39761             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   39762             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsCrackNames_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   39763             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   39764             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsCrackNames_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   39765             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   39766             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsCrackNames_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   39767             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsCrackNames_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   39768             :         { NULL, NULL, 0, NULL }
   39769             : };
   39770             : 
   39771             : 
   39772             : static PyTypeObject drsuapi_DsCrackNames_Type = {
   39773             :         PyVarObject_HEAD_INIT(NULL, 0)
   39774             :         .tp_name = "drsuapi.DsCrackNames",
   39775             :         .tp_getset = py_drsuapi_DsCrackNames_getsetters,
   39776             :         .tp_methods = py_drsuapi_DsCrackNames_methods,
   39777             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   39778             :         .tp_new = py_drsuapi_DsCrackNames_new,
   39779             : };
   39780             : 
   39781          24 : static bool pack_py_drsuapi_DsCrackNames_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsCrackNames *r)
   39782             : {
   39783           0 :         PyObject *py_bind_handle;
   39784           0 :         PyObject *py_level;
   39785           0 :         PyObject *py_req;
   39786          24 :         const char *kwnames[] = {
   39787             :                 "bind_handle", "level", "req", NULL
   39788             :         };
   39789             : 
   39790          24 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsCrackNames", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   39791           0 :                 return false;
   39792             :         }
   39793             : 
   39794          24 :         if (py_bind_handle == NULL) {
   39795           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   39796           0 :                 return false;
   39797             :         }
   39798          24 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   39799          24 :         if (r->in.bind_handle == NULL) {
   39800           0 :                 PyErr_NoMemory();
   39801           0 :                 return false;
   39802             :         }
   39803          24 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   39804          24 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   39805           0 :                 PyErr_NoMemory();
   39806           0 :                 return false;
   39807             :         }
   39808          24 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   39809          24 :         if (py_level == NULL) {
   39810           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   39811           0 :                 return false;
   39812             :         }
   39813             :         {
   39814          24 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   39815          24 :                 if (PyLong_Check(py_level)) {
   39816           0 :                         unsigned long long test_var;
   39817          24 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   39818          24 :                         if (PyErr_Occurred() != NULL) {
   39819           0 :                                 return false;
   39820             :                         }
   39821          24 :                         if (test_var > uint_max) {
   39822           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39823             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39824           0 :                                 return false;
   39825             :                         }
   39826          24 :                         r->in.level = test_var;
   39827             :                 } else {
   39828           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39829             :                           PyLong_Type.tp_name);
   39830           0 :                         return false;
   39831             :                 }
   39832             :         }
   39833          24 :         if (py_req == NULL) {
   39834           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   39835           0 :                 return false;
   39836             :         }
   39837          24 :         r->in.req = talloc_ptrtype(r, r->in.req);
   39838          24 :         if (r->in.req == NULL) {
   39839           0 :                 PyErr_NoMemory();
   39840           0 :                 return false;
   39841             :         }
   39842             :         {
   39843           0 :                 union drsuapi_DsNameRequest *req_switch_1;
   39844          24 :                 req_switch_1 = (union drsuapi_DsNameRequest *)pyrpc_export_union(&drsuapi_DsNameRequest_Type, r, r->in.level, py_req, "union drsuapi_DsNameRequest");
   39845          24 :                 if (req_switch_1 == NULL) {
   39846           0 :                         return false;
   39847             :                 }
   39848          24 :                 r->in.req = req_switch_1;
   39849             :         }
   39850          24 :         return true;
   39851             : }
   39852             : 
   39853          24 : static PyObject *unpack_py_drsuapi_DsCrackNames_args_out(struct drsuapi_DsCrackNames *r)
   39854             : {
   39855           0 :         PyObject *result;
   39856           0 :         PyObject *py_level_out;
   39857           0 :         PyObject *py_ctr;
   39858          24 :         result = PyTuple_New(2);
   39859          24 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   39860          24 :         PyTuple_SetItem(result, 0, py_level_out);
   39861          24 :         py_ctr = pyrpc_import_union(&drsuapi_DsNameCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsNameCtr");
   39862          24 :         if (py_ctr == NULL) {
   39863           0 :                 return NULL;
   39864             :         }
   39865          24 :         PyTuple_SetItem(result, 1, py_ctr);
   39866          24 :         if (!W_ERROR_IS_OK(r->out.result)) {
   39867           0 :                 PyErr_SetWERROR(r->out.result);
   39868           0 :                 return NULL;
   39869             :         }
   39870             : 
   39871          24 :         return result;
   39872             : }
   39873             : 
   39874             : 
   39875           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_in_get_bind_handle(PyObject *obj, void *closure)
   39876             : {
   39877           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(obj);
   39878           0 :         PyObject *py_bind_handle;
   39879           0 :         if (object->in.bind_handle == NULL) {
   39880           0 :                 Py_RETURN_NONE;
   39881             :         }
   39882           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   39883           0 :         return py_bind_handle;
   39884             : }
   39885             : 
   39886           0 : static int py_drsuapi_DsWriteAccountSpn_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   39887             : {
   39888           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   39889           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   39890           0 :         if (value == NULL) {
   39891           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   39892           0 :                 return -1;
   39893             :         }
   39894           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   39895           0 :         if (object->in.bind_handle == NULL) {
   39896           0 :                 PyErr_NoMemory();
   39897           0 :                 return -1;
   39898             :         }
   39899           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   39900           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   39901           0 :                 PyErr_NoMemory();
   39902           0 :                 return -1;
   39903             :         }
   39904           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   39905           0 :         return 0;
   39906             : }
   39907             : 
   39908           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_in_get_level(PyObject *obj, void *closure)
   39909             : {
   39910           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(obj);
   39911           0 :         PyObject *py_level;
   39912           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   39913           0 :         return py_level;
   39914             : }
   39915             : 
   39916           0 : static int py_drsuapi_DsWriteAccountSpn_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   39917             : {
   39918           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   39919           0 :         if (value == NULL) {
   39920           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   39921           0 :                 return -1;
   39922             :         }
   39923             :         {
   39924           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   39925           0 :                 if (PyLong_Check(value)) {
   39926           0 :                         unsigned long long test_var;
   39927           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   39928           0 :                         if (PyErr_Occurred() != NULL) {
   39929           0 :                                 return -1;
   39930             :                         }
   39931           0 :                         if (test_var > uint_max) {
   39932           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   39933             :                                   PyLong_Type.tp_name, uint_max, test_var);
   39934           0 :                                 return -1;
   39935             :                         }
   39936           0 :                         object->in.level = test_var;
   39937             :                 } else {
   39938           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   39939             :                           PyLong_Type.tp_name);
   39940           0 :                         return -1;
   39941             :                 }
   39942             :         }
   39943           0 :         return 0;
   39944             : }
   39945             : 
   39946           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_in_get_req(PyObject *obj, void *closure)
   39947             : {
   39948           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(obj);
   39949           0 :         PyObject *py_req;
   39950           0 :         if (object->in.req == NULL) {
   39951           0 :                 Py_RETURN_NONE;
   39952             :         }
   39953           0 :         py_req = pyrpc_import_union(&drsuapi_DsWriteAccountSpnRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsWriteAccountSpnRequest");
   39954           0 :         if (py_req == NULL) {
   39955           0 :                 return NULL;
   39956             :         }
   39957           0 :         return py_req;
   39958             : }
   39959             : 
   39960           0 : static int py_drsuapi_DsWriteAccountSpn_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   39961             : {
   39962           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   39963           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   39964           0 :         if (value == NULL) {
   39965           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   39966           0 :                 return -1;
   39967             :         }
   39968           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   39969           0 :         if (object->in.req == NULL) {
   39970           0 :                 PyErr_NoMemory();
   39971           0 :                 return -1;
   39972             :         }
   39973             :         {
   39974           0 :                 union drsuapi_DsWriteAccountSpnRequest *req_switch_1;
   39975           0 :                 req_switch_1 = (union drsuapi_DsWriteAccountSpnRequest *)pyrpc_export_union(&drsuapi_DsWriteAccountSpnRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsWriteAccountSpnRequest");
   39976           0 :                 if (req_switch_1 == NULL) {
   39977           0 :                         return -1;
   39978             :                 }
   39979           0 :                 object->in.req = req_switch_1;
   39980             :         }
   39981           0 :         return 0;
   39982             : }
   39983             : 
   39984           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_out_get_level_out(PyObject *obj, void *closure)
   39985             : {
   39986           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(obj);
   39987           0 :         PyObject *py_level_out;
   39988           0 :         if (object->out.level_out == NULL) {
   39989           0 :                 Py_RETURN_NONE;
   39990             :         }
   39991           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   39992           0 :         return py_level_out;
   39993             : }
   39994             : 
   39995           0 : static int py_drsuapi_DsWriteAccountSpn_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   39996             : {
   39997           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   39998           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   39999           0 :         if (value == NULL) {
   40000           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   40001           0 :                 return -1;
   40002             :         }
   40003           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   40004           0 :         if (object->out.level_out == NULL) {
   40005           0 :                 PyErr_NoMemory();
   40006           0 :                 return -1;
   40007             :         }
   40008             :         {
   40009           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   40010           0 :                 if (PyLong_Check(value)) {
   40011           0 :                         unsigned long long test_var;
   40012           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40013           0 :                         if (PyErr_Occurred() != NULL) {
   40014           0 :                                 return -1;
   40015             :                         }
   40016           0 :                         if (test_var > uint_max) {
   40017           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40018             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40019           0 :                                 return -1;
   40020             :                         }
   40021           0 :                         *object->out.level_out = test_var;
   40022             :                 } else {
   40023           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40024             :                           PyLong_Type.tp_name);
   40025           0 :                         return -1;
   40026             :                 }
   40027             :         }
   40028           0 :         return 0;
   40029             : }
   40030             : 
   40031           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_out_get_res(PyObject *obj, void *closure)
   40032             : {
   40033           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(obj);
   40034           0 :         PyObject *py_res;
   40035           0 :         if (object->out.res == NULL) {
   40036           0 :                 Py_RETURN_NONE;
   40037             :         }
   40038           0 :         py_res = pyrpc_import_union(&drsuapi_DsWriteAccountSpnResult_Type, object->out.res, *object->out.level_out, object->out.res, "union drsuapi_DsWriteAccountSpnResult");
   40039           0 :         if (py_res == NULL) {
   40040           0 :                 return NULL;
   40041             :         }
   40042           0 :         return py_res;
   40043             : }
   40044             : 
   40045           0 : static int py_drsuapi_DsWriteAccountSpn_out_set_res(PyObject *py_obj, PyObject *value, void *closure)
   40046             : {
   40047           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   40048           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.res));
   40049           0 :         if (value == NULL) {
   40050           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.res");
   40051           0 :                 return -1;
   40052             :         }
   40053           0 :         object->out.res = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.res);
   40054           0 :         if (object->out.res == NULL) {
   40055           0 :                 PyErr_NoMemory();
   40056           0 :                 return -1;
   40057             :         }
   40058             :         {
   40059           0 :                 union drsuapi_DsWriteAccountSpnResult *res_switch_1;
   40060           0 :                 res_switch_1 = (union drsuapi_DsWriteAccountSpnResult *)pyrpc_export_union(&drsuapi_DsWriteAccountSpnResult_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsWriteAccountSpnResult");
   40061           0 :                 if (res_switch_1 == NULL) {
   40062           0 :                         return -1;
   40063             :                 }
   40064           0 :                 object->out.res = res_switch_1;
   40065             :         }
   40066           0 :         return 0;
   40067             : }
   40068             : 
   40069           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_get_result(PyObject *obj, void *closure)
   40070             : {
   40071           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(obj);
   40072           0 :         PyObject *py_result;
   40073           0 :         py_result = PyErr_FromWERROR(object->out.result);
   40074           0 :         return py_result;
   40075             : }
   40076             : 
   40077           0 : static int py_drsuapi_DsWriteAccountSpn_set_result(PyObject *py_obj, PyObject *value, void *closure)
   40078             : {
   40079           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   40080           0 :         if (value == NULL) {
   40081           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   40082           0 :                 return -1;
   40083             :         }
   40084           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   40085           0 :         return 0;
   40086             : }
   40087             : 
   40088             : static PyGetSetDef py_drsuapi_DsWriteAccountSpn_getsetters[] = {
   40089             :         {
   40090             :                 .name = discard_const_p(char, "in_bind_handle"),
   40091             :                 .get = py_drsuapi_DsWriteAccountSpn_in_get_bind_handle,
   40092             :                 .set = py_drsuapi_DsWriteAccountSpn_in_set_bind_handle,
   40093             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   40094             :         },
   40095             :         {
   40096             :                 .name = discard_const_p(char, "in_level"),
   40097             :                 .get = py_drsuapi_DsWriteAccountSpn_in_get_level,
   40098             :                 .set = py_drsuapi_DsWriteAccountSpn_in_set_level,
   40099             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40100             :         },
   40101             :         {
   40102             :                 .name = discard_const_p(char, "in_req"),
   40103             :                 .get = py_drsuapi_DsWriteAccountSpn_in_get_req,
   40104             :                 .set = py_drsuapi_DsWriteAccountSpn_in_set_req,
   40105             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsWriteAccountSpnRequest")
   40106             :         },
   40107             :         {
   40108             :                 .name = discard_const_p(char, "out_level_out"),
   40109             :                 .get = py_drsuapi_DsWriteAccountSpn_out_get_level_out,
   40110             :                 .set = py_drsuapi_DsWriteAccountSpn_out_set_level_out,
   40111             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40112             :         },
   40113             :         {
   40114             :                 .name = discard_const_p(char, "out_res"),
   40115             :                 .get = py_drsuapi_DsWriteAccountSpn_out_get_res,
   40116             :                 .set = py_drsuapi_DsWriteAccountSpn_out_set_res,
   40117             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsWriteAccountSpnResult")
   40118             :         },
   40119             :         {
   40120             :                 .name = discard_const_p(char, "result"),
   40121             :                 .get = py_drsuapi_DsWriteAccountSpn_get_result,
   40122             :                 .set = py_drsuapi_DsWriteAccountSpn_set_result,
   40123             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   40124             :         },
   40125             :         { .name = NULL }
   40126             : };
   40127             : 
   40128           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   40129             : {
   40130           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsWriteAccountSpn, type);
   40131           0 :         struct drsuapi_DsWriteAccountSpn *_self = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(self);
   40132           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   40133           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   40134           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnRequest);
   40135           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   40136           0 :         _self->out.res = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnResult);
   40137           0 :         return self;
   40138             : }
   40139             : 
   40140           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   40141             : {
   40142             : 
   40143             : 
   40144           0 :         return PyLong_FromLong(13);
   40145             : }
   40146             : 
   40147           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   40148             : {
   40149           0 :         const struct ndr_interface_call *call = NULL;
   40150           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   40151           0 :         PyObject *ret = NULL;
   40152           0 :         struct ndr_push *push = NULL;
   40153           0 :         DATA_BLOB blob;
   40154           0 :         enum ndr_err_code err;
   40155             : 
   40156           0 :         if (ndr_table_drsuapi.num_calls < 14) {
   40157           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsWriteAccountSpn_ndr_pack");
   40158           0 :                 return NULL;
   40159             :         }
   40160           0 :         call = &ndr_table_drsuapi.calls[13];
   40161             : 
   40162           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   40163           0 :         if (push == NULL) {
   40164           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40165           0 :                 return NULL;
   40166             :         }
   40167             : 
   40168           0 :         push->flags |= ndr_push_flags;
   40169             : 
   40170           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   40171           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40172           0 :                 TALLOC_FREE(push);
   40173           0 :                 PyErr_SetNdrError(err);
   40174           0 :                 return NULL;
   40175             :         }
   40176           0 :         blob = ndr_push_blob(push);
   40177           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   40178           0 :         TALLOC_FREE(push);
   40179           0 :         return ret;
   40180             : }
   40181             : 
   40182           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40183             : {
   40184           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40185           0 :         PyObject *bigendian_obj = NULL;
   40186           0 :         PyObject *ndr64_obj = NULL;
   40187           0 :         libndr_flags ndr_push_flags = 0;
   40188             : 
   40189           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   40190             :                 discard_const_p(char *, kwnames),
   40191             :                 &bigendian_obj,
   40192             :                 &ndr64_obj)) {
   40193           0 :                 return NULL;
   40194             :         }
   40195             : 
   40196           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40197           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40198             :         }
   40199           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40200           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40201             :         }
   40202             : 
   40203           0 :         return py_drsuapi_DsWriteAccountSpn_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   40204             : }
   40205             : 
   40206           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40207             : {
   40208           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40209           0 :         PyObject *bigendian_obj = NULL;
   40210           0 :         PyObject *ndr64_obj = NULL;
   40211           0 :         libndr_flags ndr_push_flags = 0;
   40212             : 
   40213           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   40214             :                 discard_const_p(char *, kwnames),
   40215             :                 &bigendian_obj,
   40216             :                 &ndr64_obj)) {
   40217           0 :                 return NULL;
   40218             :         }
   40219             : 
   40220           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40221           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40222             :         }
   40223           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40224           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40225             :         }
   40226             : 
   40227           0 :         return py_drsuapi_DsWriteAccountSpn_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   40228             : }
   40229             : 
   40230           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   40231             : {
   40232           0 :         const struct ndr_interface_call *call = NULL;
   40233           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   40234           0 :         struct ndr_pull *pull = NULL;
   40235           0 :         enum ndr_err_code err;
   40236             : 
   40237           0 :         if (ndr_table_drsuapi.num_calls < 14) {
   40238           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsWriteAccountSpn_ndr_unpack");
   40239           0 :                 return NULL;
   40240             :         }
   40241           0 :         call = &ndr_table_drsuapi.calls[13];
   40242             : 
   40243           0 :         pull = ndr_pull_init_blob(blob, object);
   40244           0 :         if (pull == NULL) {
   40245           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40246           0 :                 return NULL;
   40247             :         }
   40248             : 
   40249           0 :         pull->flags |= ndr_pull_flags;
   40250             : 
   40251           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   40252           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40253           0 :                 TALLOC_FREE(pull);
   40254           0 :                 PyErr_SetNdrError(err);
   40255           0 :                 return NULL;
   40256             :         }
   40257           0 :         if (!allow_remaining) {
   40258           0 :                 uint32_t highest_ofs;
   40259             : 
   40260           0 :                 if (pull->offset > pull->relative_highest_offset) {
   40261           0 :                         highest_ofs = pull->offset;
   40262             :                 } else {
   40263           0 :                         highest_ofs = pull->relative_highest_offset;
   40264             :                 }
   40265           0 :                 if (highest_ofs < pull->data_size) {
   40266           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   40267             :                                 "not all bytes consumed ofs[%u] size[%u]",
   40268             :                                 highest_ofs, pull->data_size);
   40269           0 :                         TALLOC_FREE(pull);
   40270           0 :                         PyErr_SetNdrError(err);
   40271           0 :                         return NULL;
   40272             :                 }
   40273             :         }
   40274             : 
   40275           0 :         TALLOC_FREE(pull);
   40276           0 :         Py_RETURN_NONE;
   40277             : }
   40278             : 
   40279           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40280             : {
   40281           0 :         DATA_BLOB blob;
   40282           0 :         Py_ssize_t blob_length = 0;
   40283           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40284           0 :         PyObject *bigendian_obj = NULL;
   40285           0 :         PyObject *ndr64_obj = NULL;
   40286           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40287           0 :         PyObject *allow_remaining_obj = NULL;
   40288           0 :         bool allow_remaining = false;
   40289             : 
   40290           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   40291             :                 discard_const_p(char *, kwnames),
   40292             :                 &blob.data, &blob_length,
   40293             :                 &bigendian_obj,
   40294             :                 &ndr64_obj,
   40295             :                 &allow_remaining_obj)) {
   40296           0 :                 return NULL;
   40297             :         }
   40298           0 :         blob.length = blob_length;
   40299             : 
   40300           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40301           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40302             :         }
   40303           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40304           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40305             :         }
   40306             : 
   40307           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40308           0 :                 allow_remaining = true;
   40309             :         }
   40310             : 
   40311           0 :         return py_drsuapi_DsWriteAccountSpn_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   40312             : }
   40313             : 
   40314           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40315             : {
   40316           0 :         DATA_BLOB blob;
   40317           0 :         Py_ssize_t blob_length = 0;
   40318           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40319           0 :         PyObject *bigendian_obj = NULL;
   40320           0 :         PyObject *ndr64_obj = NULL;
   40321           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40322           0 :         PyObject *allow_remaining_obj = NULL;
   40323           0 :         bool allow_remaining = false;
   40324             : 
   40325           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   40326             :                 discard_const_p(char *, kwnames),
   40327             :                 &blob.data, &blob_length,
   40328             :                 &bigendian_obj,
   40329             :                 &ndr64_obj,
   40330             :                 &allow_remaining_obj)) {
   40331           0 :                 return NULL;
   40332             :         }
   40333           0 :         blob.length = blob_length;
   40334             : 
   40335           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40336           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40337             :         }
   40338           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40339           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40340             :         }
   40341             : 
   40342           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40343           0 :                 allow_remaining = true;
   40344             :         }
   40345             : 
   40346           0 :         return py_drsuapi_DsWriteAccountSpn_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   40347             : }
   40348             : 
   40349           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   40350             : {
   40351           0 :         const struct ndr_interface_call *call = NULL;
   40352           0 :         struct drsuapi_DsWriteAccountSpn *object = pytalloc_get_ptr(py_obj);
   40353           0 :         PyObject *ret;
   40354           0 :         char *retstr;
   40355             : 
   40356           0 :         if (ndr_table_drsuapi.num_calls < 14) {
   40357           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsWriteAccountSpn_ndr_print");
   40358           0 :                 return NULL;
   40359             :         }
   40360           0 :         call = &ndr_table_drsuapi.calls[13];
   40361             : 
   40362           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   40363           0 :         ret = PyUnicode_FromString(retstr);
   40364           0 :         TALLOC_FREE(retstr);
   40365             : 
   40366           0 :         return ret;
   40367             : }
   40368             : 
   40369           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40370             : {
   40371           0 :         return py_drsuapi_DsWriteAccountSpn_ndr_print(py_obj, "drsuapi_DsWriteAccountSpn_in", NDR_IN);
   40372             : }
   40373             : 
   40374           0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40375             : {
   40376           0 :         return py_drsuapi_DsWriteAccountSpn_ndr_print(py_obj, "drsuapi_DsWriteAccountSpn_out", NDR_OUT);
   40377             : }
   40378             : 
   40379             : static PyMethodDef py_drsuapi_DsWriteAccountSpn_methods[] = {
   40380             :         { "opnum", (PyCFunction)py_drsuapi_DsWriteAccountSpn_ndr_opnum, METH_NOARGS|METH_CLASS,
   40381             :                 "drsuapi.DsWriteAccountSpn.opnum() -> 13 (0x0d) " },
   40382             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpn_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   40383             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   40384             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpn_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   40385             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   40386             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpn_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   40387             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   40388             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpn_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   40389             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   40390             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsWriteAccountSpn_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   40391             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsWriteAccountSpn_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   40392             :         { NULL, NULL, 0, NULL }
   40393             : };
   40394             : 
   40395             : 
   40396             : static PyTypeObject drsuapi_DsWriteAccountSpn_Type = {
   40397             :         PyVarObject_HEAD_INIT(NULL, 0)
   40398             :         .tp_name = "drsuapi.DsWriteAccountSpn",
   40399             :         .tp_getset = py_drsuapi_DsWriteAccountSpn_getsetters,
   40400             :         .tp_methods = py_drsuapi_DsWriteAccountSpn_methods,
   40401             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   40402             :         .tp_new = py_drsuapi_DsWriteAccountSpn_new,
   40403             : };
   40404             : 
   40405           2 : static bool pack_py_drsuapi_DsWriteAccountSpn_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsWriteAccountSpn *r)
   40406             : {
   40407           0 :         PyObject *py_bind_handle;
   40408           0 :         PyObject *py_level;
   40409           0 :         PyObject *py_req;
   40410           2 :         const char *kwnames[] = {
   40411             :                 "bind_handle", "level", "req", NULL
   40412             :         };
   40413             : 
   40414           2 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsWriteAccountSpn", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   40415           0 :                 return false;
   40416             :         }
   40417             : 
   40418           2 :         if (py_bind_handle == NULL) {
   40419           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   40420           0 :                 return false;
   40421             :         }
   40422           2 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   40423           2 :         if (r->in.bind_handle == NULL) {
   40424           0 :                 PyErr_NoMemory();
   40425           0 :                 return false;
   40426             :         }
   40427           2 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   40428           2 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   40429           0 :                 PyErr_NoMemory();
   40430           0 :                 return false;
   40431             :         }
   40432           2 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   40433           2 :         if (py_level == NULL) {
   40434           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   40435           0 :                 return false;
   40436             :         }
   40437             :         {
   40438           2 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   40439           2 :                 if (PyLong_Check(py_level)) {
   40440           0 :                         unsigned long long test_var;
   40441           2 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   40442           2 :                         if (PyErr_Occurred() != NULL) {
   40443           0 :                                 return false;
   40444             :                         }
   40445           2 :                         if (test_var > uint_max) {
   40446           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40447             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40448           0 :                                 return false;
   40449             :                         }
   40450           2 :                         r->in.level = test_var;
   40451             :                 } else {
   40452           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40453             :                           PyLong_Type.tp_name);
   40454           0 :                         return false;
   40455             :                 }
   40456             :         }
   40457           2 :         if (py_req == NULL) {
   40458           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   40459           0 :                 return false;
   40460             :         }
   40461           2 :         r->in.req = talloc_ptrtype(r, r->in.req);
   40462           2 :         if (r->in.req == NULL) {
   40463           0 :                 PyErr_NoMemory();
   40464           0 :                 return false;
   40465             :         }
   40466             :         {
   40467           0 :                 union drsuapi_DsWriteAccountSpnRequest *req_switch_1;
   40468           2 :                 req_switch_1 = (union drsuapi_DsWriteAccountSpnRequest *)pyrpc_export_union(&drsuapi_DsWriteAccountSpnRequest_Type, r, r->in.level, py_req, "union drsuapi_DsWriteAccountSpnRequest");
   40469           2 :                 if (req_switch_1 == NULL) {
   40470           0 :                         return false;
   40471             :                 }
   40472           2 :                 r->in.req = req_switch_1;
   40473             :         }
   40474           2 :         return true;
   40475             : }
   40476             : 
   40477           2 : static PyObject *unpack_py_drsuapi_DsWriteAccountSpn_args_out(struct drsuapi_DsWriteAccountSpn *r)
   40478             : {
   40479           0 :         PyObject *result;
   40480           0 :         PyObject *py_level_out;
   40481           0 :         PyObject *py_res;
   40482           2 :         result = PyTuple_New(2);
   40483           2 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   40484           2 :         PyTuple_SetItem(result, 0, py_level_out);
   40485           2 :         py_res = pyrpc_import_union(&drsuapi_DsWriteAccountSpnResult_Type, r->out.res, *r->out.level_out, r->out.res, "union drsuapi_DsWriteAccountSpnResult");
   40486           2 :         if (py_res == NULL) {
   40487           0 :                 return NULL;
   40488             :         }
   40489           2 :         PyTuple_SetItem(result, 1, py_res);
   40490           2 :         if (!W_ERROR_IS_OK(r->out.result)) {
   40491           0 :                 PyErr_SetWERROR(r->out.result);
   40492           0 :                 return NULL;
   40493             :         }
   40494             : 
   40495           2 :         return result;
   40496             : }
   40497             : 
   40498             : 
   40499           0 : static PyObject *py_drsuapi_DsRemoveDSServer_in_get_bind_handle(PyObject *obj, void *closure)
   40500             : {
   40501           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(obj);
   40502           0 :         PyObject *py_bind_handle;
   40503           0 :         if (object->in.bind_handle == NULL) {
   40504           0 :                 Py_RETURN_NONE;
   40505             :         }
   40506           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   40507           0 :         return py_bind_handle;
   40508             : }
   40509             : 
   40510           0 : static int py_drsuapi_DsRemoveDSServer_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   40511             : {
   40512           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40513           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   40514           0 :         if (value == NULL) {
   40515           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   40516           0 :                 return -1;
   40517             :         }
   40518           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   40519           0 :         if (object->in.bind_handle == NULL) {
   40520           0 :                 PyErr_NoMemory();
   40521           0 :                 return -1;
   40522             :         }
   40523           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   40524           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   40525           0 :                 PyErr_NoMemory();
   40526           0 :                 return -1;
   40527             :         }
   40528           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   40529           0 :         return 0;
   40530             : }
   40531             : 
   40532           0 : static PyObject *py_drsuapi_DsRemoveDSServer_in_get_level(PyObject *obj, void *closure)
   40533             : {
   40534           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(obj);
   40535           0 :         PyObject *py_level;
   40536           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   40537           0 :         return py_level;
   40538             : }
   40539             : 
   40540           0 : static int py_drsuapi_DsRemoveDSServer_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   40541             : {
   40542           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40543           0 :         if (value == NULL) {
   40544           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   40545           0 :                 return -1;
   40546             :         }
   40547             :         {
   40548           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   40549           0 :                 if (PyLong_Check(value)) {
   40550           0 :                         unsigned long long test_var;
   40551           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40552           0 :                         if (PyErr_Occurred() != NULL) {
   40553           0 :                                 return -1;
   40554             :                         }
   40555           0 :                         if (test_var > uint_max) {
   40556           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40557             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40558           0 :                                 return -1;
   40559             :                         }
   40560           0 :                         object->in.level = test_var;
   40561             :                 } else {
   40562           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40563             :                           PyLong_Type.tp_name);
   40564           0 :                         return -1;
   40565             :                 }
   40566             :         }
   40567           0 :         return 0;
   40568             : }
   40569             : 
   40570           0 : static PyObject *py_drsuapi_DsRemoveDSServer_in_get_req(PyObject *obj, void *closure)
   40571             : {
   40572           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(obj);
   40573           0 :         PyObject *py_req;
   40574           0 :         if (object->in.req == NULL) {
   40575           0 :                 Py_RETURN_NONE;
   40576             :         }
   40577           0 :         py_req = pyrpc_import_union(&drsuapi_DsRemoveDSServerRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsRemoveDSServerRequest");
   40578           0 :         if (py_req == NULL) {
   40579           0 :                 return NULL;
   40580             :         }
   40581           0 :         return py_req;
   40582             : }
   40583             : 
   40584           0 : static int py_drsuapi_DsRemoveDSServer_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   40585             : {
   40586           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40587           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   40588           0 :         if (value == NULL) {
   40589           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   40590           0 :                 return -1;
   40591             :         }
   40592           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   40593           0 :         if (object->in.req == NULL) {
   40594           0 :                 PyErr_NoMemory();
   40595           0 :                 return -1;
   40596             :         }
   40597             :         {
   40598           0 :                 union drsuapi_DsRemoveDSServerRequest *req_switch_1;
   40599           0 :                 req_switch_1 = (union drsuapi_DsRemoveDSServerRequest *)pyrpc_export_union(&drsuapi_DsRemoveDSServerRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsRemoveDSServerRequest");
   40600           0 :                 if (req_switch_1 == NULL) {
   40601           0 :                         return -1;
   40602             :                 }
   40603           0 :                 object->in.req = req_switch_1;
   40604             :         }
   40605           0 :         return 0;
   40606             : }
   40607             : 
   40608           0 : static PyObject *py_drsuapi_DsRemoveDSServer_out_get_level_out(PyObject *obj, void *closure)
   40609             : {
   40610           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(obj);
   40611           0 :         PyObject *py_level_out;
   40612           0 :         if (object->out.level_out == NULL) {
   40613           0 :                 Py_RETURN_NONE;
   40614             :         }
   40615           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   40616           0 :         return py_level_out;
   40617             : }
   40618             : 
   40619           0 : static int py_drsuapi_DsRemoveDSServer_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   40620             : {
   40621           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40622           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   40623           0 :         if (value == NULL) {
   40624           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   40625           0 :                 return -1;
   40626             :         }
   40627           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   40628           0 :         if (object->out.level_out == NULL) {
   40629           0 :                 PyErr_NoMemory();
   40630           0 :                 return -1;
   40631             :         }
   40632             :         {
   40633           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   40634           0 :                 if (PyLong_Check(value)) {
   40635           0 :                         unsigned long long test_var;
   40636           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   40637           0 :                         if (PyErr_Occurred() != NULL) {
   40638           0 :                                 return -1;
   40639             :                         }
   40640           0 :                         if (test_var > uint_max) {
   40641           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   40642             :                                   PyLong_Type.tp_name, uint_max, test_var);
   40643           0 :                                 return -1;
   40644             :                         }
   40645           0 :                         *object->out.level_out = test_var;
   40646             :                 } else {
   40647           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   40648             :                           PyLong_Type.tp_name);
   40649           0 :                         return -1;
   40650             :                 }
   40651             :         }
   40652           0 :         return 0;
   40653             : }
   40654             : 
   40655           0 : static PyObject *py_drsuapi_DsRemoveDSServer_out_get_res(PyObject *obj, void *closure)
   40656             : {
   40657           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(obj);
   40658           0 :         PyObject *py_res;
   40659           0 :         if (object->out.res == NULL) {
   40660           0 :                 Py_RETURN_NONE;
   40661             :         }
   40662           0 :         py_res = pyrpc_import_union(&drsuapi_DsRemoveDSServerResult_Type, object->out.res, *object->out.level_out, object->out.res, "union drsuapi_DsRemoveDSServerResult");
   40663           0 :         if (py_res == NULL) {
   40664           0 :                 return NULL;
   40665             :         }
   40666           0 :         return py_res;
   40667             : }
   40668             : 
   40669           0 : static int py_drsuapi_DsRemoveDSServer_out_set_res(PyObject *py_obj, PyObject *value, void *closure)
   40670             : {
   40671           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40672           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.res));
   40673           0 :         if (value == NULL) {
   40674           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.res");
   40675           0 :                 return -1;
   40676             :         }
   40677           0 :         object->out.res = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.res);
   40678           0 :         if (object->out.res == NULL) {
   40679           0 :                 PyErr_NoMemory();
   40680           0 :                 return -1;
   40681             :         }
   40682             :         {
   40683           0 :                 union drsuapi_DsRemoveDSServerResult *res_switch_1;
   40684           0 :                 res_switch_1 = (union drsuapi_DsRemoveDSServerResult *)pyrpc_export_union(&drsuapi_DsRemoveDSServerResult_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsRemoveDSServerResult");
   40685           0 :                 if (res_switch_1 == NULL) {
   40686           0 :                         return -1;
   40687             :                 }
   40688           0 :                 object->out.res = res_switch_1;
   40689             :         }
   40690           0 :         return 0;
   40691             : }
   40692             : 
   40693           0 : static PyObject *py_drsuapi_DsRemoveDSServer_get_result(PyObject *obj, void *closure)
   40694             : {
   40695           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(obj);
   40696           0 :         PyObject *py_result;
   40697           0 :         py_result = PyErr_FromWERROR(object->out.result);
   40698           0 :         return py_result;
   40699             : }
   40700             : 
   40701           0 : static int py_drsuapi_DsRemoveDSServer_set_result(PyObject *py_obj, PyObject *value, void *closure)
   40702             : {
   40703           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40704           0 :         if (value == NULL) {
   40705           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   40706           0 :                 return -1;
   40707             :         }
   40708           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   40709           0 :         return 0;
   40710             : }
   40711             : 
   40712             : static PyGetSetDef py_drsuapi_DsRemoveDSServer_getsetters[] = {
   40713             :         {
   40714             :                 .name = discard_const_p(char, "in_bind_handle"),
   40715             :                 .get = py_drsuapi_DsRemoveDSServer_in_get_bind_handle,
   40716             :                 .set = py_drsuapi_DsRemoveDSServer_in_set_bind_handle,
   40717             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   40718             :         },
   40719             :         {
   40720             :                 .name = discard_const_p(char, "in_level"),
   40721             :                 .get = py_drsuapi_DsRemoveDSServer_in_get_level,
   40722             :                 .set = py_drsuapi_DsRemoveDSServer_in_set_level,
   40723             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40724             :         },
   40725             :         {
   40726             :                 .name = discard_const_p(char, "in_req"),
   40727             :                 .get = py_drsuapi_DsRemoveDSServer_in_get_req,
   40728             :                 .set = py_drsuapi_DsRemoveDSServer_in_set_req,
   40729             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsRemoveDSServerRequest")
   40730             :         },
   40731             :         {
   40732             :                 .name = discard_const_p(char, "out_level_out"),
   40733             :                 .get = py_drsuapi_DsRemoveDSServer_out_get_level_out,
   40734             :                 .set = py_drsuapi_DsRemoveDSServer_out_set_level_out,
   40735             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   40736             :         },
   40737             :         {
   40738             :                 .name = discard_const_p(char, "out_res"),
   40739             :                 .get = py_drsuapi_DsRemoveDSServer_out_get_res,
   40740             :                 .set = py_drsuapi_DsRemoveDSServer_out_set_res,
   40741             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsRemoveDSServerResult")
   40742             :         },
   40743             :         {
   40744             :                 .name = discard_const_p(char, "result"),
   40745             :                 .get = py_drsuapi_DsRemoveDSServer_get_result,
   40746             :                 .set = py_drsuapi_DsRemoveDSServer_set_result,
   40747             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   40748             :         },
   40749             :         { .name = NULL }
   40750             : };
   40751             : 
   40752           0 : static PyObject *py_drsuapi_DsRemoveDSServer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   40753             : {
   40754           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsRemoveDSServer, type);
   40755           0 :         struct drsuapi_DsRemoveDSServer *_self = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(self);
   40756           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   40757           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   40758           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerRequest);
   40759           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   40760           0 :         _self->out.res = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerResult);
   40761           0 :         return self;
   40762             : }
   40763             : 
   40764           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   40765             : {
   40766             : 
   40767             : 
   40768           0 :         return PyLong_FromLong(14);
   40769             : }
   40770             : 
   40771           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   40772             : {
   40773           0 :         const struct ndr_interface_call *call = NULL;
   40774           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40775           0 :         PyObject *ret = NULL;
   40776           0 :         struct ndr_push *push = NULL;
   40777           0 :         DATA_BLOB blob;
   40778           0 :         enum ndr_err_code err;
   40779             : 
   40780           0 :         if (ndr_table_drsuapi.num_calls < 15) {
   40781           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsRemoveDSServer_ndr_pack");
   40782           0 :                 return NULL;
   40783             :         }
   40784           0 :         call = &ndr_table_drsuapi.calls[14];
   40785             : 
   40786           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   40787           0 :         if (push == NULL) {
   40788           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40789           0 :                 return NULL;
   40790             :         }
   40791             : 
   40792           0 :         push->flags |= ndr_push_flags;
   40793             : 
   40794           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   40795           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40796           0 :                 TALLOC_FREE(push);
   40797           0 :                 PyErr_SetNdrError(err);
   40798           0 :                 return NULL;
   40799             :         }
   40800           0 :         blob = ndr_push_blob(push);
   40801           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   40802           0 :         TALLOC_FREE(push);
   40803           0 :         return ret;
   40804             : }
   40805             : 
   40806           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40807             : {
   40808           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40809           0 :         PyObject *bigendian_obj = NULL;
   40810           0 :         PyObject *ndr64_obj = NULL;
   40811           0 :         libndr_flags ndr_push_flags = 0;
   40812             : 
   40813           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   40814             :                 discard_const_p(char *, kwnames),
   40815             :                 &bigendian_obj,
   40816             :                 &ndr64_obj)) {
   40817           0 :                 return NULL;
   40818             :         }
   40819             : 
   40820           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40821           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40822             :         }
   40823           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40824           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40825             :         }
   40826             : 
   40827           0 :         return py_drsuapi_DsRemoveDSServer_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   40828             : }
   40829             : 
   40830           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40831             : {
   40832           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   40833           0 :         PyObject *bigendian_obj = NULL;
   40834           0 :         PyObject *ndr64_obj = NULL;
   40835           0 :         libndr_flags ndr_push_flags = 0;
   40836             : 
   40837           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   40838             :                 discard_const_p(char *, kwnames),
   40839             :                 &bigendian_obj,
   40840             :                 &ndr64_obj)) {
   40841           0 :                 return NULL;
   40842             :         }
   40843             : 
   40844           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40845           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   40846             :         }
   40847           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40848           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   40849             :         }
   40850             : 
   40851           0 :         return py_drsuapi_DsRemoveDSServer_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   40852             : }
   40853             : 
   40854           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   40855             : {
   40856           0 :         const struct ndr_interface_call *call = NULL;
   40857           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40858           0 :         struct ndr_pull *pull = NULL;
   40859           0 :         enum ndr_err_code err;
   40860             : 
   40861           0 :         if (ndr_table_drsuapi.num_calls < 15) {
   40862           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsRemoveDSServer_ndr_unpack");
   40863           0 :                 return NULL;
   40864             :         }
   40865           0 :         call = &ndr_table_drsuapi.calls[14];
   40866             : 
   40867           0 :         pull = ndr_pull_init_blob(blob, object);
   40868           0 :         if (pull == NULL) {
   40869           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   40870           0 :                 return NULL;
   40871             :         }
   40872             : 
   40873           0 :         pull->flags |= ndr_pull_flags;
   40874             : 
   40875           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   40876           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   40877           0 :                 TALLOC_FREE(pull);
   40878           0 :                 PyErr_SetNdrError(err);
   40879           0 :                 return NULL;
   40880             :         }
   40881           0 :         if (!allow_remaining) {
   40882           0 :                 uint32_t highest_ofs;
   40883             : 
   40884           0 :                 if (pull->offset > pull->relative_highest_offset) {
   40885           0 :                         highest_ofs = pull->offset;
   40886             :                 } else {
   40887           0 :                         highest_ofs = pull->relative_highest_offset;
   40888             :                 }
   40889           0 :                 if (highest_ofs < pull->data_size) {
   40890           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   40891             :                                 "not all bytes consumed ofs[%u] size[%u]",
   40892             :                                 highest_ofs, pull->data_size);
   40893           0 :                         TALLOC_FREE(pull);
   40894           0 :                         PyErr_SetNdrError(err);
   40895           0 :                         return NULL;
   40896             :                 }
   40897             :         }
   40898             : 
   40899           0 :         TALLOC_FREE(pull);
   40900           0 :         Py_RETURN_NONE;
   40901             : }
   40902             : 
   40903           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40904             : {
   40905           0 :         DATA_BLOB blob;
   40906           0 :         Py_ssize_t blob_length = 0;
   40907           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40908           0 :         PyObject *bigendian_obj = NULL;
   40909           0 :         PyObject *ndr64_obj = NULL;
   40910           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40911           0 :         PyObject *allow_remaining_obj = NULL;
   40912           0 :         bool allow_remaining = false;
   40913             : 
   40914           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   40915             :                 discard_const_p(char *, kwnames),
   40916             :                 &blob.data, &blob_length,
   40917             :                 &bigendian_obj,
   40918             :                 &ndr64_obj,
   40919             :                 &allow_remaining_obj)) {
   40920           0 :                 return NULL;
   40921             :         }
   40922           0 :         blob.length = blob_length;
   40923             : 
   40924           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40925           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40926             :         }
   40927           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40928           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40929             :         }
   40930             : 
   40931           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40932           0 :                 allow_remaining = true;
   40933             :         }
   40934             : 
   40935           0 :         return py_drsuapi_DsRemoveDSServer_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   40936             : }
   40937             : 
   40938           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   40939             : {
   40940           0 :         DATA_BLOB blob;
   40941           0 :         Py_ssize_t blob_length = 0;
   40942           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   40943           0 :         PyObject *bigendian_obj = NULL;
   40944           0 :         PyObject *ndr64_obj = NULL;
   40945           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   40946           0 :         PyObject *allow_remaining_obj = NULL;
   40947           0 :         bool allow_remaining = false;
   40948             : 
   40949           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   40950             :                 discard_const_p(char *, kwnames),
   40951             :                 &blob.data, &blob_length,
   40952             :                 &bigendian_obj,
   40953             :                 &ndr64_obj,
   40954             :                 &allow_remaining_obj)) {
   40955           0 :                 return NULL;
   40956             :         }
   40957           0 :         blob.length = blob_length;
   40958             : 
   40959           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   40960           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   40961             :         }
   40962           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   40963           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   40964             :         }
   40965             : 
   40966           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   40967           0 :                 allow_remaining = true;
   40968             :         }
   40969             : 
   40970           0 :         return py_drsuapi_DsRemoveDSServer_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   40971             : }
   40972             : 
   40973           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   40974             : {
   40975           0 :         const struct ndr_interface_call *call = NULL;
   40976           0 :         struct drsuapi_DsRemoveDSServer *object = pytalloc_get_ptr(py_obj);
   40977           0 :         PyObject *ret;
   40978           0 :         char *retstr;
   40979             : 
   40980           0 :         if (ndr_table_drsuapi.num_calls < 15) {
   40981           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsRemoveDSServer_ndr_print");
   40982           0 :                 return NULL;
   40983             :         }
   40984           0 :         call = &ndr_table_drsuapi.calls[14];
   40985             : 
   40986           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   40987           0 :         ret = PyUnicode_FromString(retstr);
   40988           0 :         TALLOC_FREE(retstr);
   40989             : 
   40990           0 :         return ret;
   40991             : }
   40992             : 
   40993           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40994             : {
   40995           0 :         return py_drsuapi_DsRemoveDSServer_ndr_print(py_obj, "drsuapi_DsRemoveDSServer_in", NDR_IN);
   40996             : }
   40997             : 
   40998           0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   40999             : {
   41000           0 :         return py_drsuapi_DsRemoveDSServer_ndr_print(py_obj, "drsuapi_DsRemoveDSServer_out", NDR_OUT);
   41001             : }
   41002             : 
   41003             : static PyMethodDef py_drsuapi_DsRemoveDSServer_methods[] = {
   41004             :         { "opnum", (PyCFunction)py_drsuapi_DsRemoveDSServer_ndr_opnum, METH_NOARGS|METH_CLASS,
   41005             :                 "drsuapi.DsRemoveDSServer.opnum() -> 14 (0x0e) " },
   41006             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServer_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   41007             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   41008             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServer_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   41009             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   41010             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServer_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   41011             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   41012             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServer_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   41013             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   41014             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsRemoveDSServer_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   41015             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsRemoveDSServer_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   41016             :         { NULL, NULL, 0, NULL }
   41017             : };
   41018             : 
   41019             : 
   41020             : static PyTypeObject drsuapi_DsRemoveDSServer_Type = {
   41021             :         PyVarObject_HEAD_INIT(NULL, 0)
   41022             :         .tp_name = "drsuapi.DsRemoveDSServer",
   41023             :         .tp_getset = py_drsuapi_DsRemoveDSServer_getsetters,
   41024             :         .tp_methods = py_drsuapi_DsRemoveDSServer_methods,
   41025             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   41026             :         .tp_new = py_drsuapi_DsRemoveDSServer_new,
   41027             : };
   41028             : 
   41029           3 : static bool pack_py_drsuapi_DsRemoveDSServer_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsRemoveDSServer *r)
   41030             : {
   41031           0 :         PyObject *py_bind_handle;
   41032           0 :         PyObject *py_level;
   41033           0 :         PyObject *py_req;
   41034           3 :         const char *kwnames[] = {
   41035             :                 "bind_handle", "level", "req", NULL
   41036             :         };
   41037             : 
   41038           3 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsRemoveDSServer", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   41039           0 :                 return false;
   41040             :         }
   41041             : 
   41042           3 :         if (py_bind_handle == NULL) {
   41043           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   41044           0 :                 return false;
   41045             :         }
   41046           3 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   41047           3 :         if (r->in.bind_handle == NULL) {
   41048           0 :                 PyErr_NoMemory();
   41049           0 :                 return false;
   41050             :         }
   41051           3 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   41052           3 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   41053           0 :                 PyErr_NoMemory();
   41054           0 :                 return false;
   41055             :         }
   41056           3 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   41057           3 :         if (py_level == NULL) {
   41058           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   41059           0 :                 return false;
   41060             :         }
   41061             :         {
   41062           3 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   41063           3 :                 if (PyLong_Check(py_level)) {
   41064           0 :                         unsigned long long test_var;
   41065           3 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   41066           3 :                         if (PyErr_Occurred() != NULL) {
   41067           0 :                                 return false;
   41068             :                         }
   41069           3 :                         if (test_var > uint_max) {
   41070           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41071             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41072           0 :                                 return false;
   41073             :                         }
   41074           3 :                         r->in.level = test_var;
   41075             :                 } else {
   41076           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41077             :                           PyLong_Type.tp_name);
   41078           0 :                         return false;
   41079             :                 }
   41080             :         }
   41081           3 :         if (py_req == NULL) {
   41082           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   41083           0 :                 return false;
   41084             :         }
   41085           3 :         r->in.req = talloc_ptrtype(r, r->in.req);
   41086           3 :         if (r->in.req == NULL) {
   41087           0 :                 PyErr_NoMemory();
   41088           0 :                 return false;
   41089             :         }
   41090             :         {
   41091           0 :                 union drsuapi_DsRemoveDSServerRequest *req_switch_1;
   41092           3 :                 req_switch_1 = (union drsuapi_DsRemoveDSServerRequest *)pyrpc_export_union(&drsuapi_DsRemoveDSServerRequest_Type, r, r->in.level, py_req, "union drsuapi_DsRemoveDSServerRequest");
   41093           3 :                 if (req_switch_1 == NULL) {
   41094           0 :                         return false;
   41095             :                 }
   41096           3 :                 r->in.req = req_switch_1;
   41097             :         }
   41098           3 :         return true;
   41099             : }
   41100             : 
   41101           3 : static PyObject *unpack_py_drsuapi_DsRemoveDSServer_args_out(struct drsuapi_DsRemoveDSServer *r)
   41102             : {
   41103           0 :         PyObject *result;
   41104           0 :         PyObject *py_level_out;
   41105           0 :         PyObject *py_res;
   41106           3 :         result = PyTuple_New(2);
   41107           3 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   41108           3 :         PyTuple_SetItem(result, 0, py_level_out);
   41109           3 :         py_res = pyrpc_import_union(&drsuapi_DsRemoveDSServerResult_Type, r->out.res, *r->out.level_out, r->out.res, "union drsuapi_DsRemoveDSServerResult");
   41110           3 :         if (py_res == NULL) {
   41111           0 :                 return NULL;
   41112             :         }
   41113           3 :         PyTuple_SetItem(result, 1, py_res);
   41114           3 :         if (!W_ERROR_IS_OK(r->out.result)) {
   41115           0 :                 PyErr_SetWERROR(r->out.result);
   41116           0 :                 return NULL;
   41117             :         }
   41118             : 
   41119           3 :         return result;
   41120             : }
   41121             : 
   41122             : 
   41123           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_in_get_bind_handle(PyObject *obj, void *closure)
   41124             : {
   41125           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(obj);
   41126           0 :         PyObject *py_bind_handle;
   41127           0 :         if (object->in.bind_handle == NULL) {
   41128           0 :                 Py_RETURN_NONE;
   41129             :         }
   41130           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   41131           0 :         return py_bind_handle;
   41132             : }
   41133             : 
   41134           0 : static int py_drsuapi_DsGetDomainControllerInfo_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   41135             : {
   41136           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41137           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   41138           0 :         if (value == NULL) {
   41139           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   41140           0 :                 return -1;
   41141             :         }
   41142           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   41143           0 :         if (object->in.bind_handle == NULL) {
   41144           0 :                 PyErr_NoMemory();
   41145           0 :                 return -1;
   41146             :         }
   41147           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   41148           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41149           0 :                 PyErr_NoMemory();
   41150           0 :                 return -1;
   41151             :         }
   41152           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   41153           0 :         return 0;
   41154             : }
   41155             : 
   41156           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_in_get_level(PyObject *obj, void *closure)
   41157             : {
   41158           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(obj);
   41159           0 :         PyObject *py_level;
   41160           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   41161           0 :         return py_level;
   41162             : }
   41163             : 
   41164           0 : static int py_drsuapi_DsGetDomainControllerInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   41165             : {
   41166           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41167           0 :         if (value == NULL) {
   41168           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   41169           0 :                 return -1;
   41170             :         }
   41171             :         {
   41172           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   41173           0 :                 if (PyLong_Check(value)) {
   41174           0 :                         unsigned long long test_var;
   41175           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41176           0 :                         if (PyErr_Occurred() != NULL) {
   41177           0 :                                 return -1;
   41178             :                         }
   41179           0 :                         if (test_var > uint_max) {
   41180           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41181             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41182           0 :                                 return -1;
   41183             :                         }
   41184           0 :                         object->in.level = test_var;
   41185             :                 } else {
   41186           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41187             :                           PyLong_Type.tp_name);
   41188           0 :                         return -1;
   41189             :                 }
   41190             :         }
   41191           0 :         return 0;
   41192             : }
   41193             : 
   41194           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_in_get_req(PyObject *obj, void *closure)
   41195             : {
   41196           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(obj);
   41197           0 :         PyObject *py_req;
   41198           0 :         if (object->in.req == NULL) {
   41199           0 :                 Py_RETURN_NONE;
   41200             :         }
   41201           0 :         py_req = pyrpc_import_union(&drsuapi_DsGetDCInfoRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetDCInfoRequest");
   41202           0 :         if (py_req == NULL) {
   41203           0 :                 return NULL;
   41204             :         }
   41205           0 :         return py_req;
   41206             : }
   41207             : 
   41208           0 : static int py_drsuapi_DsGetDomainControllerInfo_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   41209             : {
   41210           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41211           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   41212           0 :         if (value == NULL) {
   41213           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   41214           0 :                 return -1;
   41215             :         }
   41216           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   41217           0 :         if (object->in.req == NULL) {
   41218           0 :                 PyErr_NoMemory();
   41219           0 :                 return -1;
   41220             :         }
   41221             :         {
   41222           0 :                 union drsuapi_DsGetDCInfoRequest *req_switch_1;
   41223           0 :                 req_switch_1 = (union drsuapi_DsGetDCInfoRequest *)pyrpc_export_union(&drsuapi_DsGetDCInfoRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsGetDCInfoRequest");
   41224           0 :                 if (req_switch_1 == NULL) {
   41225           0 :                         return -1;
   41226             :                 }
   41227           0 :                 object->in.req = req_switch_1;
   41228             :         }
   41229           0 :         return 0;
   41230             : }
   41231             : 
   41232           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_out_get_level_out(PyObject *obj, void *closure)
   41233             : {
   41234           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(obj);
   41235           0 :         PyObject *py_level_out;
   41236           0 :         if (object->out.level_out == NULL) {
   41237           0 :                 Py_RETURN_NONE;
   41238             :         }
   41239           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   41240           0 :         return py_level_out;
   41241             : }
   41242             : 
   41243           0 : static int py_drsuapi_DsGetDomainControllerInfo_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   41244             : {
   41245           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41246           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   41247           0 :         if (value == NULL) {
   41248           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   41249           0 :                 return -1;
   41250             :         }
   41251           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   41252           0 :         if (object->out.level_out == NULL) {
   41253           0 :                 PyErr_NoMemory();
   41254           0 :                 return -1;
   41255             :         }
   41256             :         {
   41257           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   41258           0 :                 if (PyLong_Check(value)) {
   41259           0 :                         unsigned long long test_var;
   41260           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41261           0 :                         if (PyErr_Occurred() != NULL) {
   41262           0 :                                 return -1;
   41263             :                         }
   41264           0 :                         if (test_var > uint_max) {
   41265           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41266             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41267           0 :                                 return -1;
   41268             :                         }
   41269           0 :                         *object->out.level_out = test_var;
   41270             :                 } else {
   41271           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41272             :                           PyLong_Type.tp_name);
   41273           0 :                         return -1;
   41274             :                 }
   41275             :         }
   41276           0 :         return 0;
   41277             : }
   41278             : 
   41279           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_out_get_ctr(PyObject *obj, void *closure)
   41280             : {
   41281           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(obj);
   41282           0 :         PyObject *py_ctr;
   41283           0 :         if (object->out.ctr == NULL) {
   41284           0 :                 Py_RETURN_NONE;
   41285             :         }
   41286           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetDCInfoCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsGetDCInfoCtr");
   41287           0 :         if (py_ctr == NULL) {
   41288           0 :                 return NULL;
   41289             :         }
   41290           0 :         return py_ctr;
   41291             : }
   41292             : 
   41293           0 : static int py_drsuapi_DsGetDomainControllerInfo_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   41294             : {
   41295           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41296           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   41297           0 :         if (value == NULL) {
   41298           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   41299           0 :                 return -1;
   41300             :         }
   41301           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   41302           0 :         if (object->out.ctr == NULL) {
   41303           0 :                 PyErr_NoMemory();
   41304           0 :                 return -1;
   41305             :         }
   41306             :         {
   41307           0 :                 union drsuapi_DsGetDCInfoCtr *ctr_switch_1;
   41308           0 :                 ctr_switch_1 = (union drsuapi_DsGetDCInfoCtr *)pyrpc_export_union(&drsuapi_DsGetDCInfoCtr_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsGetDCInfoCtr");
   41309           0 :                 if (ctr_switch_1 == NULL) {
   41310           0 :                         return -1;
   41311             :                 }
   41312           0 :                 object->out.ctr = ctr_switch_1;
   41313             :         }
   41314           0 :         return 0;
   41315             : }
   41316             : 
   41317           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_get_result(PyObject *obj, void *closure)
   41318             : {
   41319           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(obj);
   41320           0 :         PyObject *py_result;
   41321           0 :         py_result = PyErr_FromWERROR(object->out.result);
   41322           0 :         return py_result;
   41323             : }
   41324             : 
   41325           0 : static int py_drsuapi_DsGetDomainControllerInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41326             : {
   41327           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41328           0 :         if (value == NULL) {
   41329           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   41330           0 :                 return -1;
   41331             :         }
   41332           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   41333           0 :         return 0;
   41334             : }
   41335             : 
   41336             : static PyGetSetDef py_drsuapi_DsGetDomainControllerInfo_getsetters[] = {
   41337             :         {
   41338             :                 .name = discard_const_p(char, "in_bind_handle"),
   41339             :                 .get = py_drsuapi_DsGetDomainControllerInfo_in_get_bind_handle,
   41340             :                 .set = py_drsuapi_DsGetDomainControllerInfo_in_set_bind_handle,
   41341             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   41342             :         },
   41343             :         {
   41344             :                 .name = discard_const_p(char, "in_level"),
   41345             :                 .get = py_drsuapi_DsGetDomainControllerInfo_in_get_level,
   41346             :                 .set = py_drsuapi_DsGetDomainControllerInfo_in_set_level,
   41347             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41348             :         },
   41349             :         {
   41350             :                 .name = discard_const_p(char, "in_req"),
   41351             :                 .get = py_drsuapi_DsGetDomainControllerInfo_in_get_req,
   41352             :                 .set = py_drsuapi_DsGetDomainControllerInfo_in_set_req,
   41353             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfoRequest")
   41354             :         },
   41355             :         {
   41356             :                 .name = discard_const_p(char, "out_level_out"),
   41357             :                 .get = py_drsuapi_DsGetDomainControllerInfo_out_get_level_out,
   41358             :                 .set = py_drsuapi_DsGetDomainControllerInfo_out_set_level_out,
   41359             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfoCtrLevels")
   41360             :         },
   41361             :         {
   41362             :                 .name = discard_const_p(char, "out_ctr"),
   41363             :                 .get = py_drsuapi_DsGetDomainControllerInfo_out_get_ctr,
   41364             :                 .set = py_drsuapi_DsGetDomainControllerInfo_out_set_ctr,
   41365             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfoCtr")
   41366             :         },
   41367             :         {
   41368             :                 .name = discard_const_p(char, "result"),
   41369             :                 .get = py_drsuapi_DsGetDomainControllerInfo_get_result,
   41370             :                 .set = py_drsuapi_DsGetDomainControllerInfo_set_result,
   41371             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   41372             :         },
   41373             :         { .name = NULL }
   41374             : };
   41375             : 
   41376           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   41377             : {
   41378           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsGetDomainControllerInfo, type);
   41379           0 :         struct drsuapi_DsGetDomainControllerInfo *_self = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(self);
   41380           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   41381           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   41382           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoRequest);
   41383           0 :         _self->out.level_out = talloc_zero(mem_ctx, enum drsuapi_DsGetDCInfoCtrLevels);
   41384           0 :         _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoCtr);
   41385           0 :         return self;
   41386             : }
   41387             : 
   41388           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   41389             : {
   41390             : 
   41391             : 
   41392           0 :         return PyLong_FromLong(16);
   41393             : }
   41394             : 
   41395           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   41396             : {
   41397           0 :         const struct ndr_interface_call *call = NULL;
   41398           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41399           0 :         PyObject *ret = NULL;
   41400           0 :         struct ndr_push *push = NULL;
   41401           0 :         DATA_BLOB blob;
   41402           0 :         enum ndr_err_code err;
   41403             : 
   41404           0 :         if (ndr_table_drsuapi.num_calls < 17) {
   41405           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetDomainControllerInfo_ndr_pack");
   41406           0 :                 return NULL;
   41407             :         }
   41408           0 :         call = &ndr_table_drsuapi.calls[16];
   41409             : 
   41410           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   41411           0 :         if (push == NULL) {
   41412           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41413           0 :                 return NULL;
   41414             :         }
   41415             : 
   41416           0 :         push->flags |= ndr_push_flags;
   41417             : 
   41418           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   41419           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41420           0 :                 TALLOC_FREE(push);
   41421           0 :                 PyErr_SetNdrError(err);
   41422           0 :                 return NULL;
   41423             :         }
   41424           0 :         blob = ndr_push_blob(push);
   41425           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   41426           0 :         TALLOC_FREE(push);
   41427           0 :         return ret;
   41428             : }
   41429             : 
   41430           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41431             : {
   41432           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41433           0 :         PyObject *bigendian_obj = NULL;
   41434           0 :         PyObject *ndr64_obj = NULL;
   41435           0 :         libndr_flags ndr_push_flags = 0;
   41436             : 
   41437           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   41438             :                 discard_const_p(char *, kwnames),
   41439             :                 &bigendian_obj,
   41440             :                 &ndr64_obj)) {
   41441           0 :                 return NULL;
   41442             :         }
   41443             : 
   41444           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41445           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41446             :         }
   41447           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41448           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41449             :         }
   41450             : 
   41451           0 :         return py_drsuapi_DsGetDomainControllerInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   41452             : }
   41453             : 
   41454           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41455             : {
   41456           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   41457           0 :         PyObject *bigendian_obj = NULL;
   41458           0 :         PyObject *ndr64_obj = NULL;
   41459           0 :         libndr_flags ndr_push_flags = 0;
   41460             : 
   41461           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   41462             :                 discard_const_p(char *, kwnames),
   41463             :                 &bigendian_obj,
   41464             :                 &ndr64_obj)) {
   41465           0 :                 return NULL;
   41466             :         }
   41467             : 
   41468           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41469           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   41470             :         }
   41471           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41472           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   41473             :         }
   41474             : 
   41475           0 :         return py_drsuapi_DsGetDomainControllerInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   41476             : }
   41477             : 
   41478           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   41479             : {
   41480           0 :         const struct ndr_interface_call *call = NULL;
   41481           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41482           0 :         struct ndr_pull *pull = NULL;
   41483           0 :         enum ndr_err_code err;
   41484             : 
   41485           0 :         if (ndr_table_drsuapi.num_calls < 17) {
   41486           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetDomainControllerInfo_ndr_unpack");
   41487           0 :                 return NULL;
   41488             :         }
   41489           0 :         call = &ndr_table_drsuapi.calls[16];
   41490             : 
   41491           0 :         pull = ndr_pull_init_blob(blob, object);
   41492           0 :         if (pull == NULL) {
   41493           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   41494           0 :                 return NULL;
   41495             :         }
   41496             : 
   41497           0 :         pull->flags |= ndr_pull_flags;
   41498             : 
   41499           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   41500           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   41501           0 :                 TALLOC_FREE(pull);
   41502           0 :                 PyErr_SetNdrError(err);
   41503           0 :                 return NULL;
   41504             :         }
   41505           0 :         if (!allow_remaining) {
   41506           0 :                 uint32_t highest_ofs;
   41507             : 
   41508           0 :                 if (pull->offset > pull->relative_highest_offset) {
   41509           0 :                         highest_ofs = pull->offset;
   41510             :                 } else {
   41511           0 :                         highest_ofs = pull->relative_highest_offset;
   41512             :                 }
   41513           0 :                 if (highest_ofs < pull->data_size) {
   41514           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   41515             :                                 "not all bytes consumed ofs[%u] size[%u]",
   41516             :                                 highest_ofs, pull->data_size);
   41517           0 :                         TALLOC_FREE(pull);
   41518           0 :                         PyErr_SetNdrError(err);
   41519           0 :                         return NULL;
   41520             :                 }
   41521             :         }
   41522             : 
   41523           0 :         TALLOC_FREE(pull);
   41524           0 :         Py_RETURN_NONE;
   41525             : }
   41526             : 
   41527           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41528             : {
   41529           0 :         DATA_BLOB blob;
   41530           0 :         Py_ssize_t blob_length = 0;
   41531           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41532           0 :         PyObject *bigendian_obj = NULL;
   41533           0 :         PyObject *ndr64_obj = NULL;
   41534           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41535           0 :         PyObject *allow_remaining_obj = NULL;
   41536           0 :         bool allow_remaining = false;
   41537             : 
   41538           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   41539             :                 discard_const_p(char *, kwnames),
   41540             :                 &blob.data, &blob_length,
   41541             :                 &bigendian_obj,
   41542             :                 &ndr64_obj,
   41543             :                 &allow_remaining_obj)) {
   41544           0 :                 return NULL;
   41545             :         }
   41546           0 :         blob.length = blob_length;
   41547             : 
   41548           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41549           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41550             :         }
   41551           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41552           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41553             :         }
   41554             : 
   41555           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41556           0 :                 allow_remaining = true;
   41557             :         }
   41558             : 
   41559           0 :         return py_drsuapi_DsGetDomainControllerInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   41560             : }
   41561             : 
   41562           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   41563             : {
   41564           0 :         DATA_BLOB blob;
   41565           0 :         Py_ssize_t blob_length = 0;
   41566           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   41567           0 :         PyObject *bigendian_obj = NULL;
   41568           0 :         PyObject *ndr64_obj = NULL;
   41569           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   41570           0 :         PyObject *allow_remaining_obj = NULL;
   41571           0 :         bool allow_remaining = false;
   41572             : 
   41573           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   41574             :                 discard_const_p(char *, kwnames),
   41575             :                 &blob.data, &blob_length,
   41576             :                 &bigendian_obj,
   41577             :                 &ndr64_obj,
   41578             :                 &allow_remaining_obj)) {
   41579           0 :                 return NULL;
   41580             :         }
   41581           0 :         blob.length = blob_length;
   41582             : 
   41583           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   41584           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   41585             :         }
   41586           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   41587           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   41588             :         }
   41589             : 
   41590           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   41591           0 :                 allow_remaining = true;
   41592             :         }
   41593             : 
   41594           0 :         return py_drsuapi_DsGetDomainControllerInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   41595             : }
   41596             : 
   41597           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   41598             : {
   41599           0 :         const struct ndr_interface_call *call = NULL;
   41600           0 :         struct drsuapi_DsGetDomainControllerInfo *object = pytalloc_get_ptr(py_obj);
   41601           0 :         PyObject *ret;
   41602           0 :         char *retstr;
   41603             : 
   41604           0 :         if (ndr_table_drsuapi.num_calls < 17) {
   41605           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetDomainControllerInfo_ndr_print");
   41606           0 :                 return NULL;
   41607             :         }
   41608           0 :         call = &ndr_table_drsuapi.calls[16];
   41609             : 
   41610           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   41611           0 :         ret = PyUnicode_FromString(retstr);
   41612           0 :         TALLOC_FREE(retstr);
   41613             : 
   41614           0 :         return ret;
   41615             : }
   41616             : 
   41617           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41618             : {
   41619           0 :         return py_drsuapi_DsGetDomainControllerInfo_ndr_print(py_obj, "drsuapi_DsGetDomainControllerInfo_in", NDR_IN);
   41620             : }
   41621             : 
   41622           0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   41623             : {
   41624           0 :         return py_drsuapi_DsGetDomainControllerInfo_ndr_print(py_obj, "drsuapi_DsGetDomainControllerInfo_out", NDR_OUT);
   41625             : }
   41626             : 
   41627             : static PyMethodDef py_drsuapi_DsGetDomainControllerInfo_methods[] = {
   41628             :         { "opnum", (PyCFunction)py_drsuapi_DsGetDomainControllerInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   41629             :                 "drsuapi.DsGetDomainControllerInfo.opnum() -> 16 (0x10) " },
   41630             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDomainControllerInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   41631             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   41632             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDomainControllerInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   41633             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   41634             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDomainControllerInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   41635             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   41636             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDomainControllerInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   41637             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   41638             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetDomainControllerInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   41639             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetDomainControllerInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   41640             :         { NULL, NULL, 0, NULL }
   41641             : };
   41642             : 
   41643             : 
   41644             : static PyTypeObject drsuapi_DsGetDomainControllerInfo_Type = {
   41645             :         PyVarObject_HEAD_INIT(NULL, 0)
   41646             :         .tp_name = "drsuapi.DsGetDomainControllerInfo",
   41647             :         .tp_getset = py_drsuapi_DsGetDomainControllerInfo_getsetters,
   41648             :         .tp_methods = py_drsuapi_DsGetDomainControllerInfo_methods,
   41649             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   41650             :         .tp_new = py_drsuapi_DsGetDomainControllerInfo_new,
   41651             : };
   41652             : 
   41653           0 : static bool pack_py_drsuapi_DsGetDomainControllerInfo_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetDomainControllerInfo *r)
   41654             : {
   41655           0 :         PyObject *py_bind_handle;
   41656           0 :         PyObject *py_level;
   41657           0 :         PyObject *py_req;
   41658           0 :         const char *kwnames[] = {
   41659             :                 "bind_handle", "level", "req", NULL
   41660             :         };
   41661             : 
   41662           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetDomainControllerInfo", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   41663           0 :                 return false;
   41664             :         }
   41665             : 
   41666           0 :         if (py_bind_handle == NULL) {
   41667           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   41668           0 :                 return false;
   41669             :         }
   41670           0 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   41671           0 :         if (r->in.bind_handle == NULL) {
   41672           0 :                 PyErr_NoMemory();
   41673           0 :                 return false;
   41674             :         }
   41675           0 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   41676           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   41677           0 :                 PyErr_NoMemory();
   41678           0 :                 return false;
   41679             :         }
   41680           0 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   41681           0 :         if (py_level == NULL) {
   41682           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   41683           0 :                 return false;
   41684             :         }
   41685             :         {
   41686           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   41687           0 :                 if (PyLong_Check(py_level)) {
   41688           0 :                         unsigned long long test_var;
   41689           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   41690           0 :                         if (PyErr_Occurred() != NULL) {
   41691           0 :                                 return false;
   41692             :                         }
   41693           0 :                         if (test_var > uint_max) {
   41694           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41695             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41696           0 :                                 return false;
   41697             :                         }
   41698           0 :                         r->in.level = test_var;
   41699             :                 } else {
   41700           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41701             :                           PyLong_Type.tp_name);
   41702           0 :                         return false;
   41703             :                 }
   41704             :         }
   41705           0 :         if (py_req == NULL) {
   41706           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   41707           0 :                 return false;
   41708             :         }
   41709           0 :         r->in.req = talloc_ptrtype(r, r->in.req);
   41710           0 :         if (r->in.req == NULL) {
   41711           0 :                 PyErr_NoMemory();
   41712           0 :                 return false;
   41713             :         }
   41714             :         {
   41715           0 :                 union drsuapi_DsGetDCInfoRequest *req_switch_1;
   41716           0 :                 req_switch_1 = (union drsuapi_DsGetDCInfoRequest *)pyrpc_export_union(&drsuapi_DsGetDCInfoRequest_Type, r, r->in.level, py_req, "union drsuapi_DsGetDCInfoRequest");
   41717           0 :                 if (req_switch_1 == NULL) {
   41718           0 :                         return false;
   41719             :                 }
   41720           0 :                 r->in.req = req_switch_1;
   41721             :         }
   41722           0 :         return true;
   41723             : }
   41724             : 
   41725           0 : static PyObject *unpack_py_drsuapi_DsGetDomainControllerInfo_args_out(struct drsuapi_DsGetDomainControllerInfo *r)
   41726             : {
   41727           0 :         PyObject *result;
   41728           0 :         PyObject *py_level_out;
   41729           0 :         PyObject *py_ctr;
   41730           0 :         result = PyTuple_New(2);
   41731           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   41732           0 :         PyTuple_SetItem(result, 0, py_level_out);
   41733           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetDCInfoCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsGetDCInfoCtr");
   41734           0 :         if (py_ctr == NULL) {
   41735           0 :                 return NULL;
   41736             :         }
   41737           0 :         PyTuple_SetItem(result, 1, py_ctr);
   41738           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   41739           0 :                 PyErr_SetWERROR(r->out.result);
   41740           0 :                 return NULL;
   41741             :         }
   41742             : 
   41743           0 :         return result;
   41744             : }
   41745             : 
   41746             : 
   41747           0 : static PyObject *py_drsuapi_DsAddEntry_in_get_bind_handle(PyObject *obj, void *closure)
   41748             : {
   41749           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(obj);
   41750           0 :         PyObject *py_bind_handle;
   41751           0 :         if (object->in.bind_handle == NULL) {
   41752           0 :                 Py_RETURN_NONE;
   41753             :         }
   41754           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   41755           0 :         return py_bind_handle;
   41756             : }
   41757             : 
   41758           0 : static int py_drsuapi_DsAddEntry_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   41759             : {
   41760           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   41761           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   41762           0 :         if (value == NULL) {
   41763           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   41764           0 :                 return -1;
   41765             :         }
   41766           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   41767           0 :         if (object->in.bind_handle == NULL) {
   41768           0 :                 PyErr_NoMemory();
   41769           0 :                 return -1;
   41770             :         }
   41771           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   41772           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   41773           0 :                 PyErr_NoMemory();
   41774           0 :                 return -1;
   41775             :         }
   41776           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   41777           0 :         return 0;
   41778             : }
   41779             : 
   41780           0 : static PyObject *py_drsuapi_DsAddEntry_in_get_level(PyObject *obj, void *closure)
   41781             : {
   41782           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(obj);
   41783           0 :         PyObject *py_level;
   41784           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   41785           0 :         return py_level;
   41786             : }
   41787             : 
   41788           0 : static int py_drsuapi_DsAddEntry_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   41789             : {
   41790           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   41791           0 :         if (value == NULL) {
   41792           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   41793           0 :                 return -1;
   41794             :         }
   41795             :         {
   41796           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   41797           0 :                 if (PyLong_Check(value)) {
   41798           0 :                         unsigned long long test_var;
   41799           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41800           0 :                         if (PyErr_Occurred() != NULL) {
   41801           0 :                                 return -1;
   41802             :                         }
   41803           0 :                         if (test_var > uint_max) {
   41804           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41805             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41806           0 :                                 return -1;
   41807             :                         }
   41808           0 :                         object->in.level = test_var;
   41809             :                 } else {
   41810           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41811             :                           PyLong_Type.tp_name);
   41812           0 :                         return -1;
   41813             :                 }
   41814             :         }
   41815           0 :         return 0;
   41816             : }
   41817             : 
   41818           0 : static PyObject *py_drsuapi_DsAddEntry_in_get_req(PyObject *obj, void *closure)
   41819             : {
   41820           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(obj);
   41821           0 :         PyObject *py_req;
   41822           0 :         if (object->in.req == NULL) {
   41823           0 :                 Py_RETURN_NONE;
   41824             :         }
   41825           0 :         py_req = pyrpc_import_union(&drsuapi_DsAddEntryRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsAddEntryRequest");
   41826           0 :         if (py_req == NULL) {
   41827           0 :                 return NULL;
   41828             :         }
   41829           0 :         return py_req;
   41830             : }
   41831             : 
   41832           0 : static int py_drsuapi_DsAddEntry_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   41833             : {
   41834           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   41835           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   41836           0 :         if (value == NULL) {
   41837           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   41838           0 :                 return -1;
   41839             :         }
   41840           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   41841           0 :         if (object->in.req == NULL) {
   41842           0 :                 PyErr_NoMemory();
   41843           0 :                 return -1;
   41844             :         }
   41845             :         {
   41846           0 :                 union drsuapi_DsAddEntryRequest *req_switch_1;
   41847           0 :                 req_switch_1 = (union drsuapi_DsAddEntryRequest *)pyrpc_export_union(&drsuapi_DsAddEntryRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsAddEntryRequest");
   41848           0 :                 if (req_switch_1 == NULL) {
   41849           0 :                         return -1;
   41850             :                 }
   41851           0 :                 object->in.req = req_switch_1;
   41852             :         }
   41853           0 :         return 0;
   41854             : }
   41855             : 
   41856           0 : static PyObject *py_drsuapi_DsAddEntry_out_get_level_out(PyObject *obj, void *closure)
   41857             : {
   41858           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(obj);
   41859           0 :         PyObject *py_level_out;
   41860           0 :         if (object->out.level_out == NULL) {
   41861           0 :                 Py_RETURN_NONE;
   41862             :         }
   41863           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   41864           0 :         return py_level_out;
   41865             : }
   41866             : 
   41867           0 : static int py_drsuapi_DsAddEntry_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   41868             : {
   41869           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   41870           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   41871           0 :         if (value == NULL) {
   41872           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   41873           0 :                 return -1;
   41874             :         }
   41875           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   41876           0 :         if (object->out.level_out == NULL) {
   41877           0 :                 PyErr_NoMemory();
   41878           0 :                 return -1;
   41879             :         }
   41880             :         {
   41881           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   41882           0 :                 if (PyLong_Check(value)) {
   41883           0 :                         unsigned long long test_var;
   41884           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   41885           0 :                         if (PyErr_Occurred() != NULL) {
   41886           0 :                                 return -1;
   41887             :                         }
   41888           0 :                         if (test_var > uint_max) {
   41889           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   41890             :                                   PyLong_Type.tp_name, uint_max, test_var);
   41891           0 :                                 return -1;
   41892             :                         }
   41893           0 :                         *object->out.level_out = test_var;
   41894             :                 } else {
   41895           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   41896             :                           PyLong_Type.tp_name);
   41897           0 :                         return -1;
   41898             :                 }
   41899             :         }
   41900           0 :         return 0;
   41901             : }
   41902             : 
   41903           0 : static PyObject *py_drsuapi_DsAddEntry_out_get_ctr(PyObject *obj, void *closure)
   41904             : {
   41905           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(obj);
   41906           0 :         PyObject *py_ctr;
   41907           0 :         if (object->out.ctr == NULL) {
   41908           0 :                 Py_RETURN_NONE;
   41909             :         }
   41910           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsAddEntryCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsAddEntryCtr");
   41911           0 :         if (py_ctr == NULL) {
   41912           0 :                 return NULL;
   41913             :         }
   41914           0 :         return py_ctr;
   41915             : }
   41916             : 
   41917           0 : static int py_drsuapi_DsAddEntry_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   41918             : {
   41919           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   41920           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   41921           0 :         if (value == NULL) {
   41922           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   41923           0 :                 return -1;
   41924             :         }
   41925           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   41926           0 :         if (object->out.ctr == NULL) {
   41927           0 :                 PyErr_NoMemory();
   41928           0 :                 return -1;
   41929             :         }
   41930             :         {
   41931           0 :                 union drsuapi_DsAddEntryCtr *ctr_switch_1;
   41932           0 :                 ctr_switch_1 = (union drsuapi_DsAddEntryCtr *)pyrpc_export_union(&drsuapi_DsAddEntryCtr_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsAddEntryCtr");
   41933           0 :                 if (ctr_switch_1 == NULL) {
   41934           0 :                         return -1;
   41935             :                 }
   41936           0 :                 object->out.ctr = ctr_switch_1;
   41937             :         }
   41938           0 :         return 0;
   41939             : }
   41940             : 
   41941           0 : static PyObject *py_drsuapi_DsAddEntry_get_result(PyObject *obj, void *closure)
   41942             : {
   41943           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(obj);
   41944           0 :         PyObject *py_result;
   41945           0 :         py_result = PyErr_FromWERROR(object->out.result);
   41946           0 :         return py_result;
   41947             : }
   41948             : 
   41949           0 : static int py_drsuapi_DsAddEntry_set_result(PyObject *py_obj, PyObject *value, void *closure)
   41950             : {
   41951           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   41952           0 :         if (value == NULL) {
   41953           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   41954           0 :                 return -1;
   41955             :         }
   41956           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   41957           0 :         return 0;
   41958             : }
   41959             : 
   41960             : static PyGetSetDef py_drsuapi_DsAddEntry_getsetters[] = {
   41961             :         {
   41962             :                 .name = discard_const_p(char, "in_bind_handle"),
   41963             :                 .get = py_drsuapi_DsAddEntry_in_get_bind_handle,
   41964             :                 .set = py_drsuapi_DsAddEntry_in_set_bind_handle,
   41965             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   41966             :         },
   41967             :         {
   41968             :                 .name = discard_const_p(char, "in_level"),
   41969             :                 .get = py_drsuapi_DsAddEntry_in_get_level,
   41970             :                 .set = py_drsuapi_DsAddEntry_in_set_level,
   41971             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41972             :         },
   41973             :         {
   41974             :                 .name = discard_const_p(char, "in_req"),
   41975             :                 .get = py_drsuapi_DsAddEntry_in_get_req,
   41976             :                 .set = py_drsuapi_DsAddEntry_in_set_req,
   41977             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntryRequest")
   41978             :         },
   41979             :         {
   41980             :                 .name = discard_const_p(char, "out_level_out"),
   41981             :                 .get = py_drsuapi_DsAddEntry_out_get_level_out,
   41982             :                 .set = py_drsuapi_DsAddEntry_out_set_level_out,
   41983             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   41984             :         },
   41985             :         {
   41986             :                 .name = discard_const_p(char, "out_ctr"),
   41987             :                 .get = py_drsuapi_DsAddEntry_out_get_ctr,
   41988             :                 .set = py_drsuapi_DsAddEntry_out_set_ctr,
   41989             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntryCtr")
   41990             :         },
   41991             :         {
   41992             :                 .name = discard_const_p(char, "result"),
   41993             :                 .get = py_drsuapi_DsAddEntry_get_result,
   41994             :                 .set = py_drsuapi_DsAddEntry_set_result,
   41995             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   41996             :         },
   41997             :         { .name = NULL }
   41998             : };
   41999             : 
   42000           0 : static PyObject *py_drsuapi_DsAddEntry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42001             : {
   42002           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsAddEntry, type);
   42003           0 :         struct drsuapi_DsAddEntry *_self = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(self);
   42004           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42005           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   42006           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsAddEntryRequest);
   42007           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   42008           0 :         _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsAddEntryCtr);
   42009           0 :         return self;
   42010             : }
   42011             : 
   42012           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42013             : {
   42014             : 
   42015             : 
   42016           0 :         return PyLong_FromLong(17);
   42017             : }
   42018             : 
   42019           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   42020             : {
   42021           0 :         const struct ndr_interface_call *call = NULL;
   42022           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   42023           0 :         PyObject *ret = NULL;
   42024           0 :         struct ndr_push *push = NULL;
   42025           0 :         DATA_BLOB blob;
   42026           0 :         enum ndr_err_code err;
   42027             : 
   42028           0 :         if (ndr_table_drsuapi.num_calls < 18) {
   42029           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsAddEntry_ndr_pack");
   42030           0 :                 return NULL;
   42031             :         }
   42032           0 :         call = &ndr_table_drsuapi.calls[17];
   42033             : 
   42034           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42035           0 :         if (push == NULL) {
   42036           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42037           0 :                 return NULL;
   42038             :         }
   42039             : 
   42040           0 :         push->flags |= ndr_push_flags;
   42041             : 
   42042           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42043           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42044           0 :                 TALLOC_FREE(push);
   42045           0 :                 PyErr_SetNdrError(err);
   42046           0 :                 return NULL;
   42047             :         }
   42048           0 :         blob = ndr_push_blob(push);
   42049           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42050           0 :         TALLOC_FREE(push);
   42051           0 :         return ret;
   42052             : }
   42053             : 
   42054           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42055             : {
   42056           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42057           0 :         PyObject *bigendian_obj = NULL;
   42058           0 :         PyObject *ndr64_obj = NULL;
   42059           0 :         libndr_flags ndr_push_flags = 0;
   42060             : 
   42061           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42062             :                 discard_const_p(char *, kwnames),
   42063             :                 &bigendian_obj,
   42064             :                 &ndr64_obj)) {
   42065           0 :                 return NULL;
   42066             :         }
   42067             : 
   42068           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42069           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42070             :         }
   42071           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42072           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42073             :         }
   42074             : 
   42075           0 :         return py_drsuapi_DsAddEntry_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42076             : }
   42077             : 
   42078           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42079             : {
   42080           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42081           0 :         PyObject *bigendian_obj = NULL;
   42082           0 :         PyObject *ndr64_obj = NULL;
   42083           0 :         libndr_flags ndr_push_flags = 0;
   42084             : 
   42085           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42086             :                 discard_const_p(char *, kwnames),
   42087             :                 &bigendian_obj,
   42088             :                 &ndr64_obj)) {
   42089           0 :                 return NULL;
   42090             :         }
   42091             : 
   42092           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42093           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42094             :         }
   42095           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42096           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42097             :         }
   42098             : 
   42099           0 :         return py_drsuapi_DsAddEntry_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42100             : }
   42101             : 
   42102           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   42103             : {
   42104           0 :         const struct ndr_interface_call *call = NULL;
   42105           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   42106           0 :         struct ndr_pull *pull = NULL;
   42107           0 :         enum ndr_err_code err;
   42108             : 
   42109           0 :         if (ndr_table_drsuapi.num_calls < 18) {
   42110           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsAddEntry_ndr_unpack");
   42111           0 :                 return NULL;
   42112             :         }
   42113           0 :         call = &ndr_table_drsuapi.calls[17];
   42114             : 
   42115           0 :         pull = ndr_pull_init_blob(blob, object);
   42116           0 :         if (pull == NULL) {
   42117           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42118           0 :                 return NULL;
   42119             :         }
   42120             : 
   42121           0 :         pull->flags |= ndr_pull_flags;
   42122             : 
   42123           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42124           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42125           0 :                 TALLOC_FREE(pull);
   42126           0 :                 PyErr_SetNdrError(err);
   42127           0 :                 return NULL;
   42128             :         }
   42129           0 :         if (!allow_remaining) {
   42130           0 :                 uint32_t highest_ofs;
   42131             : 
   42132           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42133           0 :                         highest_ofs = pull->offset;
   42134             :                 } else {
   42135           0 :                         highest_ofs = pull->relative_highest_offset;
   42136             :                 }
   42137           0 :                 if (highest_ofs < pull->data_size) {
   42138           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42139             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42140             :                                 highest_ofs, pull->data_size);
   42141           0 :                         TALLOC_FREE(pull);
   42142           0 :                         PyErr_SetNdrError(err);
   42143           0 :                         return NULL;
   42144             :                 }
   42145             :         }
   42146             : 
   42147           0 :         TALLOC_FREE(pull);
   42148           0 :         Py_RETURN_NONE;
   42149             : }
   42150             : 
   42151           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42152             : {
   42153           0 :         DATA_BLOB blob;
   42154           0 :         Py_ssize_t blob_length = 0;
   42155           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42156           0 :         PyObject *bigendian_obj = NULL;
   42157           0 :         PyObject *ndr64_obj = NULL;
   42158           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42159           0 :         PyObject *allow_remaining_obj = NULL;
   42160           0 :         bool allow_remaining = false;
   42161             : 
   42162           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42163             :                 discard_const_p(char *, kwnames),
   42164             :                 &blob.data, &blob_length,
   42165             :                 &bigendian_obj,
   42166             :                 &ndr64_obj,
   42167             :                 &allow_remaining_obj)) {
   42168           0 :                 return NULL;
   42169             :         }
   42170           0 :         blob.length = blob_length;
   42171             : 
   42172           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42173           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42174             :         }
   42175           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42176           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42177             :         }
   42178             : 
   42179           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42180           0 :                 allow_remaining = true;
   42181             :         }
   42182             : 
   42183           0 :         return py_drsuapi_DsAddEntry_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42184             : }
   42185             : 
   42186           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42187             : {
   42188           0 :         DATA_BLOB blob;
   42189           0 :         Py_ssize_t blob_length = 0;
   42190           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42191           0 :         PyObject *bigendian_obj = NULL;
   42192           0 :         PyObject *ndr64_obj = NULL;
   42193           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42194           0 :         PyObject *allow_remaining_obj = NULL;
   42195           0 :         bool allow_remaining = false;
   42196             : 
   42197           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42198             :                 discard_const_p(char *, kwnames),
   42199             :                 &blob.data, &blob_length,
   42200             :                 &bigendian_obj,
   42201             :                 &ndr64_obj,
   42202             :                 &allow_remaining_obj)) {
   42203           0 :                 return NULL;
   42204             :         }
   42205           0 :         blob.length = blob_length;
   42206             : 
   42207           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42208           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42209             :         }
   42210           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42211           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42212             :         }
   42213             : 
   42214           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42215           0 :                 allow_remaining = true;
   42216             :         }
   42217             : 
   42218           0 :         return py_drsuapi_DsAddEntry_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42219             : }
   42220             : 
   42221           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   42222             : {
   42223           0 :         const struct ndr_interface_call *call = NULL;
   42224           0 :         struct drsuapi_DsAddEntry *object = pytalloc_get_ptr(py_obj);
   42225           0 :         PyObject *ret;
   42226           0 :         char *retstr;
   42227             : 
   42228           0 :         if (ndr_table_drsuapi.num_calls < 18) {
   42229           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsAddEntry_ndr_print");
   42230           0 :                 return NULL;
   42231             :         }
   42232           0 :         call = &ndr_table_drsuapi.calls[17];
   42233             : 
   42234           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42235           0 :         ret = PyUnicode_FromString(retstr);
   42236           0 :         TALLOC_FREE(retstr);
   42237             : 
   42238           0 :         return ret;
   42239             : }
   42240             : 
   42241           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42242             : {
   42243           0 :         return py_drsuapi_DsAddEntry_ndr_print(py_obj, "drsuapi_DsAddEntry_in", NDR_IN);
   42244             : }
   42245             : 
   42246           0 : static PyObject *py_drsuapi_DsAddEntry_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42247             : {
   42248           0 :         return py_drsuapi_DsAddEntry_ndr_print(py_obj, "drsuapi_DsAddEntry_out", NDR_OUT);
   42249             : }
   42250             : 
   42251             : static PyMethodDef py_drsuapi_DsAddEntry_methods[] = {
   42252             :         { "opnum", (PyCFunction)py_drsuapi_DsAddEntry_ndr_opnum, METH_NOARGS|METH_CLASS,
   42253             :                 "drsuapi.DsAddEntry.opnum() -> 17 (0x11) " },
   42254             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42255             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42256             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42257             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42258             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42259             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42260             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42261             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42262             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsAddEntry_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42263             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsAddEntry_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42264             :         { NULL, NULL, 0, NULL }
   42265             : };
   42266             : 
   42267             : 
   42268             : static PyTypeObject drsuapi_DsAddEntry_Type = {
   42269             :         PyVarObject_HEAD_INIT(NULL, 0)
   42270             :         .tp_name = "drsuapi.DsAddEntry",
   42271             :         .tp_getset = py_drsuapi_DsAddEntry_getsetters,
   42272             :         .tp_methods = py_drsuapi_DsAddEntry_methods,
   42273             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42274             :         .tp_new = py_drsuapi_DsAddEntry_new,
   42275             : };
   42276             : 
   42277          90 : static bool pack_py_drsuapi_DsAddEntry_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsAddEntry *r)
   42278             : {
   42279           0 :         PyObject *py_bind_handle;
   42280           0 :         PyObject *py_level;
   42281           0 :         PyObject *py_req;
   42282          90 :         const char *kwnames[] = {
   42283             :                 "bind_handle", "level", "req", NULL
   42284             :         };
   42285             : 
   42286          90 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsAddEntry", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   42287           0 :                 return false;
   42288             :         }
   42289             : 
   42290          90 :         if (py_bind_handle == NULL) {
   42291           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   42292           0 :                 return false;
   42293             :         }
   42294          90 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   42295          90 :         if (r->in.bind_handle == NULL) {
   42296           0 :                 PyErr_NoMemory();
   42297           0 :                 return false;
   42298             :         }
   42299          90 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   42300          90 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   42301           0 :                 PyErr_NoMemory();
   42302           0 :                 return false;
   42303             :         }
   42304          90 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   42305          90 :         if (py_level == NULL) {
   42306           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   42307           0 :                 return false;
   42308             :         }
   42309             :         {
   42310          90 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   42311          90 :                 if (PyLong_Check(py_level)) {
   42312           0 :                         unsigned long long test_var;
   42313          90 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   42314          90 :                         if (PyErr_Occurred() != NULL) {
   42315           0 :                                 return false;
   42316             :                         }
   42317          90 :                         if (test_var > uint_max) {
   42318           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42319             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42320           0 :                                 return false;
   42321             :                         }
   42322          90 :                         r->in.level = test_var;
   42323             :                 } else {
   42324           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42325             :                           PyLong_Type.tp_name);
   42326           0 :                         return false;
   42327             :                 }
   42328             :         }
   42329          90 :         if (py_req == NULL) {
   42330           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   42331           0 :                 return false;
   42332             :         }
   42333          90 :         r->in.req = talloc_ptrtype(r, r->in.req);
   42334          90 :         if (r->in.req == NULL) {
   42335           0 :                 PyErr_NoMemory();
   42336           0 :                 return false;
   42337             :         }
   42338             :         {
   42339           0 :                 union drsuapi_DsAddEntryRequest *req_switch_1;
   42340          90 :                 req_switch_1 = (union drsuapi_DsAddEntryRequest *)pyrpc_export_union(&drsuapi_DsAddEntryRequest_Type, r, r->in.level, py_req, "union drsuapi_DsAddEntryRequest");
   42341          90 :                 if (req_switch_1 == NULL) {
   42342           0 :                         return false;
   42343             :                 }
   42344          90 :                 r->in.req = req_switch_1;
   42345             :         }
   42346          90 :         return true;
   42347             : }
   42348             : 
   42349          90 : static PyObject *unpack_py_drsuapi_DsAddEntry_args_out(struct drsuapi_DsAddEntry *r)
   42350             : {
   42351           0 :         PyObject *result;
   42352           0 :         PyObject *py_level_out;
   42353           0 :         PyObject *py_ctr;
   42354          90 :         result = PyTuple_New(2);
   42355          90 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   42356          90 :         PyTuple_SetItem(result, 0, py_level_out);
   42357          90 :         py_ctr = pyrpc_import_union(&drsuapi_DsAddEntryCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsAddEntryCtr");
   42358          90 :         if (py_ctr == NULL) {
   42359           0 :                 return NULL;
   42360             :         }
   42361          90 :         PyTuple_SetItem(result, 1, py_ctr);
   42362          90 :         if (!W_ERROR_IS_OK(r->out.result)) {
   42363           0 :                 PyErr_SetWERROR(r->out.result);
   42364           0 :                 return NULL;
   42365             :         }
   42366             : 
   42367          90 :         return result;
   42368             : }
   42369             : 
   42370             : 
   42371           0 : static PyObject *py_drsuapi_DsExecuteKCC_in_get_bind_handle(PyObject *obj, void *closure)
   42372             : {
   42373           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(obj);
   42374           0 :         PyObject *py_bind_handle;
   42375           0 :         if (object->in.bind_handle == NULL) {
   42376           0 :                 Py_RETURN_NONE;
   42377             :         }
   42378           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   42379           0 :         return py_bind_handle;
   42380             : }
   42381             : 
   42382           0 : static int py_drsuapi_DsExecuteKCC_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   42383             : {
   42384           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(py_obj);
   42385           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   42386           0 :         if (value == NULL) {
   42387           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   42388           0 :                 return -1;
   42389             :         }
   42390           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   42391           0 :         if (object->in.bind_handle == NULL) {
   42392           0 :                 PyErr_NoMemory();
   42393           0 :                 return -1;
   42394             :         }
   42395           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   42396           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42397           0 :                 PyErr_NoMemory();
   42398           0 :                 return -1;
   42399             :         }
   42400           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   42401           0 :         return 0;
   42402             : }
   42403             : 
   42404           0 : static PyObject *py_drsuapi_DsExecuteKCC_in_get_level(PyObject *obj, void *closure)
   42405             : {
   42406           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(obj);
   42407           0 :         PyObject *py_level;
   42408           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   42409           0 :         return py_level;
   42410             : }
   42411             : 
   42412           0 : static int py_drsuapi_DsExecuteKCC_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   42413             : {
   42414           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(py_obj);
   42415           0 :         if (value == NULL) {
   42416           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   42417           0 :                 return -1;
   42418             :         }
   42419             :         {
   42420           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   42421           0 :                 if (PyLong_Check(value)) {
   42422           0 :                         unsigned long long test_var;
   42423           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   42424           0 :                         if (PyErr_Occurred() != NULL) {
   42425           0 :                                 return -1;
   42426             :                         }
   42427           0 :                         if (test_var > uint_max) {
   42428           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42429             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42430           0 :                                 return -1;
   42431             :                         }
   42432           0 :                         object->in.level = test_var;
   42433             :                 } else {
   42434           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42435             :                           PyLong_Type.tp_name);
   42436           0 :                         return -1;
   42437             :                 }
   42438             :         }
   42439           0 :         return 0;
   42440             : }
   42441             : 
   42442           0 : static PyObject *py_drsuapi_DsExecuteKCC_in_get_req(PyObject *obj, void *closure)
   42443             : {
   42444           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(obj);
   42445           0 :         PyObject *py_req;
   42446           0 :         if (object->in.req == NULL) {
   42447           0 :                 Py_RETURN_NONE;
   42448             :         }
   42449           0 :         py_req = pyrpc_import_union(&drsuapi_DsExecuteKCCRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsExecuteKCCRequest");
   42450           0 :         if (py_req == NULL) {
   42451           0 :                 return NULL;
   42452             :         }
   42453           0 :         return py_req;
   42454             : }
   42455             : 
   42456           0 : static int py_drsuapi_DsExecuteKCC_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   42457             : {
   42458           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(py_obj);
   42459           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   42460           0 :         if (value == NULL) {
   42461           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   42462           0 :                 return -1;
   42463             :         }
   42464           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   42465           0 :         if (object->in.req == NULL) {
   42466           0 :                 PyErr_NoMemory();
   42467           0 :                 return -1;
   42468             :         }
   42469             :         {
   42470           0 :                 union drsuapi_DsExecuteKCCRequest *req_switch_1;
   42471           0 :                 req_switch_1 = (union drsuapi_DsExecuteKCCRequest *)pyrpc_export_union(&drsuapi_DsExecuteKCCRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsExecuteKCCRequest");
   42472           0 :                 if (req_switch_1 == NULL) {
   42473           0 :                         return -1;
   42474             :                 }
   42475           0 :                 object->in.req = req_switch_1;
   42476             :         }
   42477           0 :         return 0;
   42478             : }
   42479             : 
   42480           0 : static PyObject *py_drsuapi_DsExecuteKCC_get_result(PyObject *obj, void *closure)
   42481             : {
   42482           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(obj);
   42483           0 :         PyObject *py_result;
   42484           0 :         py_result = PyErr_FromWERROR(object->out.result);
   42485           0 :         return py_result;
   42486             : }
   42487             : 
   42488           0 : static int py_drsuapi_DsExecuteKCC_set_result(PyObject *py_obj, PyObject *value, void *closure)
   42489             : {
   42490           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(py_obj);
   42491           0 :         if (value == NULL) {
   42492           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   42493           0 :                 return -1;
   42494             :         }
   42495           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   42496           0 :         return 0;
   42497             : }
   42498             : 
   42499             : static PyGetSetDef py_drsuapi_DsExecuteKCC_getsetters[] = {
   42500             :         {
   42501             :                 .name = discard_const_p(char, "in_bind_handle"),
   42502             :                 .get = py_drsuapi_DsExecuteKCC_in_get_bind_handle,
   42503             :                 .set = py_drsuapi_DsExecuteKCC_in_set_bind_handle,
   42504             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   42505             :         },
   42506             :         {
   42507             :                 .name = discard_const_p(char, "in_level"),
   42508             :                 .get = py_drsuapi_DsExecuteKCC_in_get_level,
   42509             :                 .set = py_drsuapi_DsExecuteKCC_in_set_level,
   42510             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   42511             :         },
   42512             :         {
   42513             :                 .name = discard_const_p(char, "in_req"),
   42514             :                 .get = py_drsuapi_DsExecuteKCC_in_get_req,
   42515             :                 .set = py_drsuapi_DsExecuteKCC_in_set_req,
   42516             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExecuteKCCRequest")
   42517             :         },
   42518             :         {
   42519             :                 .name = discard_const_p(char, "result"),
   42520             :                 .get = py_drsuapi_DsExecuteKCC_get_result,
   42521             :                 .set = py_drsuapi_DsExecuteKCC_set_result,
   42522             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   42523             :         },
   42524             :         { .name = NULL }
   42525             : };
   42526             : 
   42527           0 : static PyObject *py_drsuapi_DsExecuteKCC_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   42528             : {
   42529           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsExecuteKCC, type);
   42530           0 :         struct drsuapi_DsExecuteKCC *_self = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(self);
   42531           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   42532           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   42533           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsExecuteKCCRequest);
   42534           0 :         return self;
   42535             : }
   42536             : 
   42537           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   42538             : {
   42539             : 
   42540             : 
   42541           0 :         return PyLong_FromLong(18);
   42542             : }
   42543             : 
   42544           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   42545             : {
   42546           0 :         const struct ndr_interface_call *call = NULL;
   42547           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(py_obj);
   42548           0 :         PyObject *ret = NULL;
   42549           0 :         struct ndr_push *push = NULL;
   42550           0 :         DATA_BLOB blob;
   42551           0 :         enum ndr_err_code err;
   42552             : 
   42553           0 :         if (ndr_table_drsuapi.num_calls < 19) {
   42554           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsExecuteKCC_ndr_pack");
   42555           0 :                 return NULL;
   42556             :         }
   42557           0 :         call = &ndr_table_drsuapi.calls[18];
   42558             : 
   42559           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   42560           0 :         if (push == NULL) {
   42561           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42562           0 :                 return NULL;
   42563             :         }
   42564             : 
   42565           0 :         push->flags |= ndr_push_flags;
   42566             : 
   42567           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   42568           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42569           0 :                 TALLOC_FREE(push);
   42570           0 :                 PyErr_SetNdrError(err);
   42571           0 :                 return NULL;
   42572             :         }
   42573           0 :         blob = ndr_push_blob(push);
   42574           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   42575           0 :         TALLOC_FREE(push);
   42576           0 :         return ret;
   42577             : }
   42578             : 
   42579           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42580             : {
   42581           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42582           0 :         PyObject *bigendian_obj = NULL;
   42583           0 :         PyObject *ndr64_obj = NULL;
   42584           0 :         libndr_flags ndr_push_flags = 0;
   42585             : 
   42586           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   42587             :                 discard_const_p(char *, kwnames),
   42588             :                 &bigendian_obj,
   42589             :                 &ndr64_obj)) {
   42590           0 :                 return NULL;
   42591             :         }
   42592             : 
   42593           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42594           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42595             :         }
   42596           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42597           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42598             :         }
   42599             : 
   42600           0 :         return py_drsuapi_DsExecuteKCC_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   42601             : }
   42602             : 
   42603           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42604             : {
   42605           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   42606           0 :         PyObject *bigendian_obj = NULL;
   42607           0 :         PyObject *ndr64_obj = NULL;
   42608           0 :         libndr_flags ndr_push_flags = 0;
   42609             : 
   42610           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   42611             :                 discard_const_p(char *, kwnames),
   42612             :                 &bigendian_obj,
   42613             :                 &ndr64_obj)) {
   42614           0 :                 return NULL;
   42615             :         }
   42616             : 
   42617           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42618           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   42619             :         }
   42620           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42621           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   42622             :         }
   42623             : 
   42624           0 :         return py_drsuapi_DsExecuteKCC_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   42625             : }
   42626             : 
   42627           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   42628             : {
   42629           0 :         const struct ndr_interface_call *call = NULL;
   42630           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(py_obj);
   42631           0 :         struct ndr_pull *pull = NULL;
   42632           0 :         enum ndr_err_code err;
   42633             : 
   42634           0 :         if (ndr_table_drsuapi.num_calls < 19) {
   42635           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsExecuteKCC_ndr_unpack");
   42636           0 :                 return NULL;
   42637             :         }
   42638           0 :         call = &ndr_table_drsuapi.calls[18];
   42639             : 
   42640           0 :         pull = ndr_pull_init_blob(blob, object);
   42641           0 :         if (pull == NULL) {
   42642           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   42643           0 :                 return NULL;
   42644             :         }
   42645             : 
   42646           0 :         pull->flags |= ndr_pull_flags;
   42647             : 
   42648           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   42649           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   42650           0 :                 TALLOC_FREE(pull);
   42651           0 :                 PyErr_SetNdrError(err);
   42652           0 :                 return NULL;
   42653             :         }
   42654           0 :         if (!allow_remaining) {
   42655           0 :                 uint32_t highest_ofs;
   42656             : 
   42657           0 :                 if (pull->offset > pull->relative_highest_offset) {
   42658           0 :                         highest_ofs = pull->offset;
   42659             :                 } else {
   42660           0 :                         highest_ofs = pull->relative_highest_offset;
   42661             :                 }
   42662           0 :                 if (highest_ofs < pull->data_size) {
   42663           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   42664             :                                 "not all bytes consumed ofs[%u] size[%u]",
   42665             :                                 highest_ofs, pull->data_size);
   42666           0 :                         TALLOC_FREE(pull);
   42667           0 :                         PyErr_SetNdrError(err);
   42668           0 :                         return NULL;
   42669             :                 }
   42670             :         }
   42671             : 
   42672           0 :         TALLOC_FREE(pull);
   42673           0 :         Py_RETURN_NONE;
   42674             : }
   42675             : 
   42676           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42677             : {
   42678           0 :         DATA_BLOB blob;
   42679           0 :         Py_ssize_t blob_length = 0;
   42680           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42681           0 :         PyObject *bigendian_obj = NULL;
   42682           0 :         PyObject *ndr64_obj = NULL;
   42683           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42684           0 :         PyObject *allow_remaining_obj = NULL;
   42685           0 :         bool allow_remaining = false;
   42686             : 
   42687           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   42688             :                 discard_const_p(char *, kwnames),
   42689             :                 &blob.data, &blob_length,
   42690             :                 &bigendian_obj,
   42691             :                 &ndr64_obj,
   42692             :                 &allow_remaining_obj)) {
   42693           0 :                 return NULL;
   42694             :         }
   42695           0 :         blob.length = blob_length;
   42696             : 
   42697           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42698           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42699             :         }
   42700           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42701           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42702             :         }
   42703             : 
   42704           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42705           0 :                 allow_remaining = true;
   42706             :         }
   42707             : 
   42708           0 :         return py_drsuapi_DsExecuteKCC_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   42709             : }
   42710             : 
   42711           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   42712             : {
   42713           0 :         DATA_BLOB blob;
   42714           0 :         Py_ssize_t blob_length = 0;
   42715           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   42716           0 :         PyObject *bigendian_obj = NULL;
   42717           0 :         PyObject *ndr64_obj = NULL;
   42718           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   42719           0 :         PyObject *allow_remaining_obj = NULL;
   42720           0 :         bool allow_remaining = false;
   42721             : 
   42722           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   42723             :                 discard_const_p(char *, kwnames),
   42724             :                 &blob.data, &blob_length,
   42725             :                 &bigendian_obj,
   42726             :                 &ndr64_obj,
   42727             :                 &allow_remaining_obj)) {
   42728           0 :                 return NULL;
   42729             :         }
   42730           0 :         blob.length = blob_length;
   42731             : 
   42732           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   42733           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   42734             :         }
   42735           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   42736           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   42737             :         }
   42738             : 
   42739           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   42740           0 :                 allow_remaining = true;
   42741             :         }
   42742             : 
   42743           0 :         return py_drsuapi_DsExecuteKCC_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   42744             : }
   42745             : 
   42746           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   42747             : {
   42748           0 :         const struct ndr_interface_call *call = NULL;
   42749           0 :         struct drsuapi_DsExecuteKCC *object = pytalloc_get_ptr(py_obj);
   42750           0 :         PyObject *ret;
   42751           0 :         char *retstr;
   42752             : 
   42753           0 :         if (ndr_table_drsuapi.num_calls < 19) {
   42754           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsExecuteKCC_ndr_print");
   42755           0 :                 return NULL;
   42756             :         }
   42757           0 :         call = &ndr_table_drsuapi.calls[18];
   42758             : 
   42759           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   42760           0 :         ret = PyUnicode_FromString(retstr);
   42761           0 :         TALLOC_FREE(retstr);
   42762             : 
   42763           0 :         return ret;
   42764             : }
   42765             : 
   42766           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42767             : {
   42768           0 :         return py_drsuapi_DsExecuteKCC_ndr_print(py_obj, "drsuapi_DsExecuteKCC_in", NDR_IN);
   42769             : }
   42770             : 
   42771           0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   42772             : {
   42773           0 :         return py_drsuapi_DsExecuteKCC_ndr_print(py_obj, "drsuapi_DsExecuteKCC_out", NDR_OUT);
   42774             : }
   42775             : 
   42776             : static PyMethodDef py_drsuapi_DsExecuteKCC_methods[] = {
   42777             :         { "opnum", (PyCFunction)py_drsuapi_DsExecuteKCC_ndr_opnum, METH_NOARGS|METH_CLASS,
   42778             :                 "drsuapi.DsExecuteKCC.opnum() -> 18 (0x12) " },
   42779             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCC_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   42780             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   42781             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCC_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   42782             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   42783             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCC_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   42784             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   42785             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCC_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   42786             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   42787             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsExecuteKCC_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   42788             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsExecuteKCC_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   42789             :         { NULL, NULL, 0, NULL }
   42790             : };
   42791             : 
   42792             : 
   42793             : static PyTypeObject drsuapi_DsExecuteKCC_Type = {
   42794             :         PyVarObject_HEAD_INIT(NULL, 0)
   42795             :         .tp_name = "drsuapi.DsExecuteKCC",
   42796             :         .tp_getset = py_drsuapi_DsExecuteKCC_getsetters,
   42797             :         .tp_methods = py_drsuapi_DsExecuteKCC_methods,
   42798             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   42799             :         .tp_new = py_drsuapi_DsExecuteKCC_new,
   42800             : };
   42801             : 
   42802           2 : static bool pack_py_drsuapi_DsExecuteKCC_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsExecuteKCC *r)
   42803             : {
   42804           0 :         PyObject *py_bind_handle;
   42805           0 :         PyObject *py_level;
   42806           0 :         PyObject *py_req;
   42807           2 :         const char *kwnames[] = {
   42808             :                 "bind_handle", "level", "req", NULL
   42809             :         };
   42810             : 
   42811           2 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsExecuteKCC", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   42812           0 :                 return false;
   42813             :         }
   42814             : 
   42815           2 :         if (py_bind_handle == NULL) {
   42816           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   42817           0 :                 return false;
   42818             :         }
   42819           2 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   42820           2 :         if (r->in.bind_handle == NULL) {
   42821           0 :                 PyErr_NoMemory();
   42822           0 :                 return false;
   42823             :         }
   42824           2 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   42825           2 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   42826           0 :                 PyErr_NoMemory();
   42827           0 :                 return false;
   42828             :         }
   42829           2 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   42830           2 :         if (py_level == NULL) {
   42831           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   42832           0 :                 return false;
   42833             :         }
   42834             :         {
   42835           2 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   42836           2 :                 if (PyLong_Check(py_level)) {
   42837           0 :                         unsigned long long test_var;
   42838           2 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   42839           2 :                         if (PyErr_Occurred() != NULL) {
   42840           0 :                                 return false;
   42841             :                         }
   42842           2 :                         if (test_var > uint_max) {
   42843           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42844             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42845           0 :                                 return false;
   42846             :                         }
   42847           2 :                         r->in.level = test_var;
   42848             :                 } else {
   42849           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42850             :                           PyLong_Type.tp_name);
   42851           0 :                         return false;
   42852             :                 }
   42853             :         }
   42854           2 :         if (py_req == NULL) {
   42855           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   42856           0 :                 return false;
   42857             :         }
   42858           2 :         r->in.req = talloc_ptrtype(r, r->in.req);
   42859           2 :         if (r->in.req == NULL) {
   42860           0 :                 PyErr_NoMemory();
   42861           0 :                 return false;
   42862             :         }
   42863             :         {
   42864           0 :                 union drsuapi_DsExecuteKCCRequest *req_switch_1;
   42865           2 :                 req_switch_1 = (union drsuapi_DsExecuteKCCRequest *)pyrpc_export_union(&drsuapi_DsExecuteKCCRequest_Type, r, r->in.level, py_req, "union drsuapi_DsExecuteKCCRequest");
   42866           2 :                 if (req_switch_1 == NULL) {
   42867           0 :                         return false;
   42868             :                 }
   42869           2 :                 r->in.req = req_switch_1;
   42870             :         }
   42871           2 :         return true;
   42872             : }
   42873             : 
   42874           2 : static PyObject *unpack_py_drsuapi_DsExecuteKCC_args_out(struct drsuapi_DsExecuteKCC *r)
   42875             : {
   42876           0 :         PyObject *result;
   42877           2 :         result = Py_None;
   42878           2 :         Py_INCREF(result);
   42879           2 :         if (!W_ERROR_IS_OK(r->out.result)) {
   42880           0 :                 PyErr_SetWERROR(r->out.result);
   42881           0 :                 return NULL;
   42882             :         }
   42883             : 
   42884           2 :         return result;
   42885             : }
   42886             : 
   42887             : 
   42888           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_in_get_bind_handle(PyObject *obj, void *closure)
   42889             : {
   42890           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(obj);
   42891           0 :         PyObject *py_bind_handle;
   42892           0 :         if (object->in.bind_handle == NULL) {
   42893           0 :                 Py_RETURN_NONE;
   42894             :         }
   42895           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   42896           0 :         return py_bind_handle;
   42897             : }
   42898             : 
   42899           0 : static int py_drsuapi_DsReplicaGetInfo_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   42900             : {
   42901           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   42902           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   42903           0 :         if (value == NULL) {
   42904           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   42905           0 :                 return -1;
   42906             :         }
   42907           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   42908           0 :         if (object->in.bind_handle == NULL) {
   42909           0 :                 PyErr_NoMemory();
   42910           0 :                 return -1;
   42911             :         }
   42912           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   42913           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   42914           0 :                 PyErr_NoMemory();
   42915           0 :                 return -1;
   42916             :         }
   42917           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   42918           0 :         return 0;
   42919             : }
   42920             : 
   42921           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_in_get_level(PyObject *obj, void *closure)
   42922             : {
   42923           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(obj);
   42924           0 :         PyObject *py_level;
   42925           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   42926           0 :         return py_level;
   42927             : }
   42928             : 
   42929           0 : static int py_drsuapi_DsReplicaGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   42930             : {
   42931           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   42932           0 :         if (value == NULL) {
   42933           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   42934           0 :                 return -1;
   42935             :         }
   42936             :         {
   42937           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   42938           0 :                 if (PyLong_Check(value)) {
   42939           0 :                         unsigned long long test_var;
   42940           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   42941           0 :                         if (PyErr_Occurred() != NULL) {
   42942           0 :                                 return -1;
   42943             :                         }
   42944           0 :                         if (test_var > uint_max) {
   42945           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   42946             :                                   PyLong_Type.tp_name, uint_max, test_var);
   42947           0 :                                 return -1;
   42948             :                         }
   42949           0 :                         object->in.level = test_var;
   42950             :                 } else {
   42951           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   42952             :                           PyLong_Type.tp_name);
   42953           0 :                         return -1;
   42954             :                 }
   42955             :         }
   42956           0 :         return 0;
   42957             : }
   42958             : 
   42959           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_in_get_req(PyObject *obj, void *closure)
   42960             : {
   42961           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(obj);
   42962           0 :         PyObject *py_req;
   42963           0 :         if (object->in.req == NULL) {
   42964           0 :                 Py_RETURN_NONE;
   42965             :         }
   42966           0 :         py_req = pyrpc_import_union(&drsuapi_DsReplicaGetInfoRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsReplicaGetInfoRequest");
   42967           0 :         if (py_req == NULL) {
   42968           0 :                 return NULL;
   42969             :         }
   42970           0 :         return py_req;
   42971             : }
   42972             : 
   42973           0 : static int py_drsuapi_DsReplicaGetInfo_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   42974             : {
   42975           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   42976           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   42977           0 :         if (value == NULL) {
   42978           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   42979           0 :                 return -1;
   42980             :         }
   42981           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   42982           0 :         if (object->in.req == NULL) {
   42983           0 :                 PyErr_NoMemory();
   42984           0 :                 return -1;
   42985             :         }
   42986             :         {
   42987           0 :                 union drsuapi_DsReplicaGetInfoRequest *req_switch_1;
   42988           0 :                 req_switch_1 = (union drsuapi_DsReplicaGetInfoRequest *)pyrpc_export_union(&drsuapi_DsReplicaGetInfoRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsReplicaGetInfoRequest");
   42989           0 :                 if (req_switch_1 == NULL) {
   42990           0 :                         return -1;
   42991             :                 }
   42992           0 :                 object->in.req = req_switch_1;
   42993             :         }
   42994           0 :         return 0;
   42995             : }
   42996             : 
   42997           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_out_get_info_type(PyObject *obj, void *closure)
   42998             : {
   42999           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(obj);
   43000           0 :         PyObject *py_info_type;
   43001           0 :         if (object->out.info_type == NULL) {
   43002           0 :                 Py_RETURN_NONE;
   43003             :         }
   43004           0 :         py_info_type = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.info_type));
   43005           0 :         return py_info_type;
   43006             : }
   43007             : 
   43008           0 : static int py_drsuapi_DsReplicaGetInfo_out_set_info_type(PyObject *py_obj, PyObject *value, void *closure)
   43009             : {
   43010           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   43011           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_type));
   43012           0 :         if (value == NULL) {
   43013           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_type");
   43014           0 :                 return -1;
   43015             :         }
   43016           0 :         object->out.info_type = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_type);
   43017           0 :         if (object->out.info_type == NULL) {
   43018           0 :                 PyErr_NoMemory();
   43019           0 :                 return -1;
   43020             :         }
   43021             :         {
   43022           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.info_type));
   43023           0 :                 if (PyLong_Check(value)) {
   43024           0 :                         unsigned long long test_var;
   43025           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43026           0 :                         if (PyErr_Occurred() != NULL) {
   43027           0 :                                 return -1;
   43028             :                         }
   43029           0 :                         if (test_var > uint_max) {
   43030           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43031             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43032           0 :                                 return -1;
   43033             :                         }
   43034           0 :                         *object->out.info_type = test_var;
   43035             :                 } else {
   43036           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43037             :                           PyLong_Type.tp_name);
   43038           0 :                         return -1;
   43039             :                 }
   43040             :         }
   43041           0 :         return 0;
   43042             : }
   43043             : 
   43044           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_out_get_info(PyObject *obj, void *closure)
   43045             : {
   43046           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(obj);
   43047           0 :         PyObject *py_info;
   43048           0 :         if (object->out.info == NULL) {
   43049           0 :                 Py_RETURN_NONE;
   43050             :         }
   43051           0 :         py_info = pyrpc_import_union(&drsuapi_DsReplicaInfo_Type, object->out.info, *object->out.info_type, object->out.info, "union drsuapi_DsReplicaInfo");
   43052           0 :         if (py_info == NULL) {
   43053           0 :                 return NULL;
   43054             :         }
   43055           0 :         return py_info;
   43056             : }
   43057             : 
   43058           0 : static int py_drsuapi_DsReplicaGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
   43059             : {
   43060           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   43061           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
   43062           0 :         if (value == NULL) {
   43063           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
   43064           0 :                 return -1;
   43065             :         }
   43066           0 :         object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
   43067           0 :         if (object->out.info == NULL) {
   43068           0 :                 PyErr_NoMemory();
   43069           0 :                 return -1;
   43070             :         }
   43071             :         {
   43072           0 :                 union drsuapi_DsReplicaInfo *info_switch_1;
   43073           0 :                 info_switch_1 = (union drsuapi_DsReplicaInfo *)pyrpc_export_union(&drsuapi_DsReplicaInfo_Type, pytalloc_get_mem_ctx(py_obj), *object->out.info_type, value, "union drsuapi_DsReplicaInfo");
   43074           0 :                 if (info_switch_1 == NULL) {
   43075           0 :                         return -1;
   43076             :                 }
   43077           0 :                 object->out.info = info_switch_1;
   43078             :         }
   43079           0 :         return 0;
   43080             : }
   43081             : 
   43082           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_get_result(PyObject *obj, void *closure)
   43083             : {
   43084           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(obj);
   43085           0 :         PyObject *py_result;
   43086           0 :         py_result = PyErr_FromWERROR(object->out.result);
   43087           0 :         return py_result;
   43088             : }
   43089             : 
   43090           0 : static int py_drsuapi_DsReplicaGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43091             : {
   43092           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   43093           0 :         if (value == NULL) {
   43094           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   43095           0 :                 return -1;
   43096             :         }
   43097           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   43098           0 :         return 0;
   43099             : }
   43100             : 
   43101             : static PyGetSetDef py_drsuapi_DsReplicaGetInfo_getsetters[] = {
   43102             :         {
   43103             :                 .name = discard_const_p(char, "in_bind_handle"),
   43104             :                 .get = py_drsuapi_DsReplicaGetInfo_in_get_bind_handle,
   43105             :                 .set = py_drsuapi_DsReplicaGetInfo_in_set_bind_handle,
   43106             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   43107             :         },
   43108             :         {
   43109             :                 .name = discard_const_p(char, "in_level"),
   43110             :                 .get = py_drsuapi_DsReplicaGetInfo_in_get_level,
   43111             :                 .set = py_drsuapi_DsReplicaGetInfo_in_set_level,
   43112             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaGetInfoLevel")
   43113             :         },
   43114             :         {
   43115             :                 .name = discard_const_p(char, "in_req"),
   43116             :                 .get = py_drsuapi_DsReplicaGetInfo_in_get_req,
   43117             :                 .set = py_drsuapi_DsReplicaGetInfo_in_set_req,
   43118             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaGetInfoRequest")
   43119             :         },
   43120             :         {
   43121             :                 .name = discard_const_p(char, "out_info_type"),
   43122             :                 .get = py_drsuapi_DsReplicaGetInfo_out_get_info_type,
   43123             :                 .set = py_drsuapi_DsReplicaGetInfo_out_set_info_type,
   43124             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaInfoType")
   43125             :         },
   43126             :         {
   43127             :                 .name = discard_const_p(char, "out_info"),
   43128             :                 .get = py_drsuapi_DsReplicaGetInfo_out_get_info,
   43129             :                 .set = py_drsuapi_DsReplicaGetInfo_out_set_info,
   43130             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaInfo")
   43131             :         },
   43132             :         {
   43133             :                 .name = discard_const_p(char, "result"),
   43134             :                 .get = py_drsuapi_DsReplicaGetInfo_get_result,
   43135             :                 .set = py_drsuapi_DsReplicaGetInfo_set_result,
   43136             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   43137             :         },
   43138             :         { .name = NULL }
   43139             : };
   43140             : 
   43141           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43142             : {
   43143           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsReplicaGetInfo, type);
   43144           0 :         struct drsuapi_DsReplicaGetInfo *_self = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(self);
   43145           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   43146           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   43147           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsReplicaGetInfoRequest);
   43148           0 :         _self->out.info_type = talloc_zero(mem_ctx, enum drsuapi_DsReplicaInfoType);
   43149           0 :         _self->out.info = talloc_zero(mem_ctx, union drsuapi_DsReplicaInfo);
   43150           0 :         return self;
   43151             : }
   43152             : 
   43153           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43154             : {
   43155             : 
   43156             : 
   43157           0 :         return PyLong_FromLong(19);
   43158             : }
   43159             : 
   43160           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   43161             : {
   43162           0 :         const struct ndr_interface_call *call = NULL;
   43163           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   43164           0 :         PyObject *ret = NULL;
   43165           0 :         struct ndr_push *push = NULL;
   43166           0 :         DATA_BLOB blob;
   43167           0 :         enum ndr_err_code err;
   43168             : 
   43169           0 :         if (ndr_table_drsuapi.num_calls < 20) {
   43170           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaGetInfo_ndr_pack");
   43171           0 :                 return NULL;
   43172             :         }
   43173           0 :         call = &ndr_table_drsuapi.calls[19];
   43174             : 
   43175           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43176           0 :         if (push == NULL) {
   43177           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43178           0 :                 return NULL;
   43179             :         }
   43180             : 
   43181           0 :         push->flags |= ndr_push_flags;
   43182             : 
   43183           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43184           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43185           0 :                 TALLOC_FREE(push);
   43186           0 :                 PyErr_SetNdrError(err);
   43187           0 :                 return NULL;
   43188             :         }
   43189           0 :         blob = ndr_push_blob(push);
   43190           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43191           0 :         TALLOC_FREE(push);
   43192           0 :         return ret;
   43193             : }
   43194             : 
   43195           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43196             : {
   43197           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43198           0 :         PyObject *bigendian_obj = NULL;
   43199           0 :         PyObject *ndr64_obj = NULL;
   43200           0 :         libndr_flags ndr_push_flags = 0;
   43201             : 
   43202           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   43203             :                 discard_const_p(char *, kwnames),
   43204             :                 &bigendian_obj,
   43205             :                 &ndr64_obj)) {
   43206           0 :                 return NULL;
   43207             :         }
   43208             : 
   43209           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43210           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43211             :         }
   43212           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43213           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43214             :         }
   43215             : 
   43216           0 :         return py_drsuapi_DsReplicaGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   43217             : }
   43218             : 
   43219           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43220             : {
   43221           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43222           0 :         PyObject *bigendian_obj = NULL;
   43223           0 :         PyObject *ndr64_obj = NULL;
   43224           0 :         libndr_flags ndr_push_flags = 0;
   43225             : 
   43226           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   43227             :                 discard_const_p(char *, kwnames),
   43228             :                 &bigendian_obj,
   43229             :                 &ndr64_obj)) {
   43230           0 :                 return NULL;
   43231             :         }
   43232             : 
   43233           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43234           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43235             :         }
   43236           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43237           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43238             :         }
   43239             : 
   43240           0 :         return py_drsuapi_DsReplicaGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   43241             : }
   43242             : 
   43243           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   43244             : {
   43245           0 :         const struct ndr_interface_call *call = NULL;
   43246           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   43247           0 :         struct ndr_pull *pull = NULL;
   43248           0 :         enum ndr_err_code err;
   43249             : 
   43250           0 :         if (ndr_table_drsuapi.num_calls < 20) {
   43251           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaGetInfo_ndr_unpack");
   43252           0 :                 return NULL;
   43253             :         }
   43254           0 :         call = &ndr_table_drsuapi.calls[19];
   43255             : 
   43256           0 :         pull = ndr_pull_init_blob(blob, object);
   43257           0 :         if (pull == NULL) {
   43258           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43259           0 :                 return NULL;
   43260             :         }
   43261             : 
   43262           0 :         pull->flags |= ndr_pull_flags;
   43263             : 
   43264           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   43265           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43266           0 :                 TALLOC_FREE(pull);
   43267           0 :                 PyErr_SetNdrError(err);
   43268           0 :                 return NULL;
   43269             :         }
   43270           0 :         if (!allow_remaining) {
   43271           0 :                 uint32_t highest_ofs;
   43272             : 
   43273           0 :                 if (pull->offset > pull->relative_highest_offset) {
   43274           0 :                         highest_ofs = pull->offset;
   43275             :                 } else {
   43276           0 :                         highest_ofs = pull->relative_highest_offset;
   43277             :                 }
   43278           0 :                 if (highest_ofs < pull->data_size) {
   43279           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   43280             :                                 "not all bytes consumed ofs[%u] size[%u]",
   43281             :                                 highest_ofs, pull->data_size);
   43282           0 :                         TALLOC_FREE(pull);
   43283           0 :                         PyErr_SetNdrError(err);
   43284           0 :                         return NULL;
   43285             :                 }
   43286             :         }
   43287             : 
   43288           0 :         TALLOC_FREE(pull);
   43289           0 :         Py_RETURN_NONE;
   43290             : }
   43291             : 
   43292           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43293             : {
   43294           0 :         DATA_BLOB blob;
   43295           0 :         Py_ssize_t blob_length = 0;
   43296           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43297           0 :         PyObject *bigendian_obj = NULL;
   43298           0 :         PyObject *ndr64_obj = NULL;
   43299           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43300           0 :         PyObject *allow_remaining_obj = NULL;
   43301           0 :         bool allow_remaining = false;
   43302             : 
   43303           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43304             :                 discard_const_p(char *, kwnames),
   43305             :                 &blob.data, &blob_length,
   43306             :                 &bigendian_obj,
   43307             :                 &ndr64_obj,
   43308             :                 &allow_remaining_obj)) {
   43309           0 :                 return NULL;
   43310             :         }
   43311           0 :         blob.length = blob_length;
   43312             : 
   43313           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43314           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43315             :         }
   43316           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43317           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43318             :         }
   43319             : 
   43320           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43321           0 :                 allow_remaining = true;
   43322             :         }
   43323             : 
   43324           0 :         return py_drsuapi_DsReplicaGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43325             : }
   43326             : 
   43327           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43328             : {
   43329           0 :         DATA_BLOB blob;
   43330           0 :         Py_ssize_t blob_length = 0;
   43331           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43332           0 :         PyObject *bigendian_obj = NULL;
   43333           0 :         PyObject *ndr64_obj = NULL;
   43334           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43335           0 :         PyObject *allow_remaining_obj = NULL;
   43336           0 :         bool allow_remaining = false;
   43337             : 
   43338           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43339             :                 discard_const_p(char *, kwnames),
   43340             :                 &blob.data, &blob_length,
   43341             :                 &bigendian_obj,
   43342             :                 &ndr64_obj,
   43343             :                 &allow_remaining_obj)) {
   43344           0 :                 return NULL;
   43345             :         }
   43346           0 :         blob.length = blob_length;
   43347             : 
   43348           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43349           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43350             :         }
   43351           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43352           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43353             :         }
   43354             : 
   43355           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43356           0 :                 allow_remaining = true;
   43357             :         }
   43358             : 
   43359           0 :         return py_drsuapi_DsReplicaGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43360             : }
   43361             : 
   43362           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   43363             : {
   43364           0 :         const struct ndr_interface_call *call = NULL;
   43365           0 :         struct drsuapi_DsReplicaGetInfo *object = pytalloc_get_ptr(py_obj);
   43366           0 :         PyObject *ret;
   43367           0 :         char *retstr;
   43368             : 
   43369           0 :         if (ndr_table_drsuapi.num_calls < 20) {
   43370           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaGetInfo_ndr_print");
   43371           0 :                 return NULL;
   43372             :         }
   43373           0 :         call = &ndr_table_drsuapi.calls[19];
   43374             : 
   43375           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   43376           0 :         ret = PyUnicode_FromString(retstr);
   43377           0 :         TALLOC_FREE(retstr);
   43378             : 
   43379           0 :         return ret;
   43380             : }
   43381             : 
   43382           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43383             : {
   43384           0 :         return py_drsuapi_DsReplicaGetInfo_ndr_print(py_obj, "drsuapi_DsReplicaGetInfo_in", NDR_IN);
   43385             : }
   43386             : 
   43387           0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   43388             : {
   43389           0 :         return py_drsuapi_DsReplicaGetInfo_ndr_print(py_obj, "drsuapi_DsReplicaGetInfo_out", NDR_OUT);
   43390             : }
   43391             : 
   43392             : static PyMethodDef py_drsuapi_DsReplicaGetInfo_methods[] = {
   43393             :         { "opnum", (PyCFunction)py_drsuapi_DsReplicaGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
   43394             :                 "drsuapi.DsReplicaGetInfo.opnum() -> 19 (0x13) " },
   43395             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   43396             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   43397             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   43398             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   43399             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   43400             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   43401             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   43402             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   43403             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   43404             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   43405             :         { NULL, NULL, 0, NULL }
   43406             : };
   43407             : 
   43408             : 
   43409             : static PyTypeObject drsuapi_DsReplicaGetInfo_Type = {
   43410             :         PyVarObject_HEAD_INIT(NULL, 0)
   43411             :         .tp_name = "drsuapi.DsReplicaGetInfo",
   43412             :         .tp_getset = py_drsuapi_DsReplicaGetInfo_getsetters,
   43413             :         .tp_methods = py_drsuapi_DsReplicaGetInfo_methods,
   43414             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   43415             :         .tp_new = py_drsuapi_DsReplicaGetInfo_new,
   43416             : };
   43417             : 
   43418          10 : static bool pack_py_drsuapi_DsReplicaGetInfo_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaGetInfo *r)
   43419             : {
   43420           0 :         PyObject *py_bind_handle;
   43421           0 :         PyObject *py_level;
   43422           0 :         PyObject *py_req;
   43423          10 :         const char *kwnames[] = {
   43424             :                 "bind_handle", "level", "req", NULL
   43425             :         };
   43426             : 
   43427          10 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaGetInfo", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   43428           0 :                 return false;
   43429             :         }
   43430             : 
   43431          10 :         if (py_bind_handle == NULL) {
   43432           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   43433           0 :                 return false;
   43434             :         }
   43435          10 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   43436          10 :         if (r->in.bind_handle == NULL) {
   43437           0 :                 PyErr_NoMemory();
   43438           0 :                 return false;
   43439             :         }
   43440          10 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   43441          10 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   43442           0 :                 PyErr_NoMemory();
   43443           0 :                 return false;
   43444             :         }
   43445          10 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   43446          10 :         if (py_level == NULL) {
   43447           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   43448           0 :                 return false;
   43449             :         }
   43450             :         {
   43451          10 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   43452          10 :                 if (PyLong_Check(py_level)) {
   43453           0 :                         unsigned long long test_var;
   43454          10 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   43455          10 :                         if (PyErr_Occurred() != NULL) {
   43456           0 :                                 return false;
   43457             :                         }
   43458          10 :                         if (test_var > uint_max) {
   43459           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43460             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43461           0 :                                 return false;
   43462             :                         }
   43463          10 :                         r->in.level = test_var;
   43464             :                 } else {
   43465           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43466             :                           PyLong_Type.tp_name);
   43467           0 :                         return false;
   43468             :                 }
   43469             :         }
   43470          10 :         if (py_req == NULL) {
   43471           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   43472           0 :                 return false;
   43473             :         }
   43474          10 :         r->in.req = talloc_ptrtype(r, r->in.req);
   43475          10 :         if (r->in.req == NULL) {
   43476           0 :                 PyErr_NoMemory();
   43477           0 :                 return false;
   43478             :         }
   43479             :         {
   43480           0 :                 union drsuapi_DsReplicaGetInfoRequest *req_switch_1;
   43481          10 :                 req_switch_1 = (union drsuapi_DsReplicaGetInfoRequest *)pyrpc_export_union(&drsuapi_DsReplicaGetInfoRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaGetInfoRequest");
   43482          10 :                 if (req_switch_1 == NULL) {
   43483           0 :                         return false;
   43484             :                 }
   43485          10 :                 r->in.req = req_switch_1;
   43486             :         }
   43487          10 :         return true;
   43488             : }
   43489             : 
   43490          10 : static PyObject *unpack_py_drsuapi_DsReplicaGetInfo_args_out(struct drsuapi_DsReplicaGetInfo *r)
   43491             : {
   43492           0 :         PyObject *result;
   43493           0 :         PyObject *py_info_type;
   43494           0 :         PyObject *py_info;
   43495          10 :         result = PyTuple_New(2);
   43496          10 :         py_info_type = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.info_type));
   43497          10 :         PyTuple_SetItem(result, 0, py_info_type);
   43498          10 :         py_info = pyrpc_import_union(&drsuapi_DsReplicaInfo_Type, r->out.info, *r->out.info_type, r->out.info, "union drsuapi_DsReplicaInfo");
   43499          10 :         if (py_info == NULL) {
   43500           0 :                 return NULL;
   43501             :         }
   43502          10 :         PyTuple_SetItem(result, 1, py_info);
   43503          10 :         if (!W_ERROR_IS_OK(r->out.result)) {
   43504           0 :                 PyErr_SetWERROR(r->out.result);
   43505           0 :                 return NULL;
   43506             :         }
   43507             : 
   43508          10 :         return result;
   43509             : }
   43510             : 
   43511             : 
   43512           0 : static PyObject *py_drsuapi_DsGetMemberships2_in_get_bind_handle(PyObject *obj, void *closure)
   43513             : {
   43514           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(obj);
   43515           0 :         PyObject *py_bind_handle;
   43516           0 :         if (object->in.bind_handle == NULL) {
   43517           0 :                 Py_RETURN_NONE;
   43518             :         }
   43519           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   43520           0 :         return py_bind_handle;
   43521             : }
   43522             : 
   43523           0 : static int py_drsuapi_DsGetMemberships2_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   43524             : {
   43525           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43526           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   43527           0 :         if (value == NULL) {
   43528           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   43529           0 :                 return -1;
   43530             :         }
   43531           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   43532           0 :         if (object->in.bind_handle == NULL) {
   43533           0 :                 PyErr_NoMemory();
   43534           0 :                 return -1;
   43535             :         }
   43536           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   43537           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   43538           0 :                 PyErr_NoMemory();
   43539           0 :                 return -1;
   43540             :         }
   43541           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   43542           0 :         return 0;
   43543             : }
   43544             : 
   43545           0 : static PyObject *py_drsuapi_DsGetMemberships2_in_get_level(PyObject *obj, void *closure)
   43546             : {
   43547           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(obj);
   43548           0 :         PyObject *py_level;
   43549           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   43550           0 :         return py_level;
   43551             : }
   43552             : 
   43553           0 : static int py_drsuapi_DsGetMemberships2_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   43554             : {
   43555           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43556           0 :         if (value == NULL) {
   43557           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   43558           0 :                 return -1;
   43559             :         }
   43560             :         {
   43561           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   43562           0 :                 if (PyLong_Check(value)) {
   43563           0 :                         unsigned long long test_var;
   43564           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43565           0 :                         if (PyErr_Occurred() != NULL) {
   43566           0 :                                 return -1;
   43567             :                         }
   43568           0 :                         if (test_var > uint_max) {
   43569           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43570             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43571           0 :                                 return -1;
   43572             :                         }
   43573           0 :                         object->in.level = test_var;
   43574             :                 } else {
   43575           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43576             :                           PyLong_Type.tp_name);
   43577           0 :                         return -1;
   43578             :                 }
   43579             :         }
   43580           0 :         return 0;
   43581             : }
   43582             : 
   43583           0 : static PyObject *py_drsuapi_DsGetMemberships2_in_get_req(PyObject *obj, void *closure)
   43584             : {
   43585           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(obj);
   43586           0 :         PyObject *py_req;
   43587           0 :         if (object->in.req == NULL) {
   43588           0 :                 Py_RETURN_NONE;
   43589             :         }
   43590           0 :         py_req = pyrpc_import_union(&drsuapi_DsGetMemberships2Request_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetMemberships2Request");
   43591           0 :         if (py_req == NULL) {
   43592           0 :                 return NULL;
   43593             :         }
   43594           0 :         return py_req;
   43595             : }
   43596             : 
   43597           0 : static int py_drsuapi_DsGetMemberships2_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   43598             : {
   43599           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43600           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   43601           0 :         if (value == NULL) {
   43602           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   43603           0 :                 return -1;
   43604             :         }
   43605           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   43606           0 :         if (object->in.req == NULL) {
   43607           0 :                 PyErr_NoMemory();
   43608           0 :                 return -1;
   43609             :         }
   43610             :         {
   43611           0 :                 union drsuapi_DsGetMemberships2Request *req_switch_1;
   43612           0 :                 req_switch_1 = (union drsuapi_DsGetMemberships2Request *)pyrpc_export_union(&drsuapi_DsGetMemberships2Request_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_DsGetMemberships2Request");
   43613           0 :                 if (req_switch_1 == NULL) {
   43614           0 :                         return -1;
   43615             :                 }
   43616           0 :                 object->in.req = req_switch_1;
   43617             :         }
   43618           0 :         return 0;
   43619             : }
   43620             : 
   43621           0 : static PyObject *py_drsuapi_DsGetMemberships2_out_get_level_out(PyObject *obj, void *closure)
   43622             : {
   43623           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(obj);
   43624           0 :         PyObject *py_level_out;
   43625           0 :         if (object->out.level_out == NULL) {
   43626           0 :                 Py_RETURN_NONE;
   43627             :         }
   43628           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   43629           0 :         return py_level_out;
   43630             : }
   43631             : 
   43632           0 : static int py_drsuapi_DsGetMemberships2_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   43633             : {
   43634           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43635           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   43636           0 :         if (value == NULL) {
   43637           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   43638           0 :                 return -1;
   43639             :         }
   43640           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   43641           0 :         if (object->out.level_out == NULL) {
   43642           0 :                 PyErr_NoMemory();
   43643           0 :                 return -1;
   43644             :         }
   43645             :         {
   43646           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   43647           0 :                 if (PyLong_Check(value)) {
   43648           0 :                         unsigned long long test_var;
   43649           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   43650           0 :                         if (PyErr_Occurred() != NULL) {
   43651           0 :                                 return -1;
   43652             :                         }
   43653           0 :                         if (test_var > uint_max) {
   43654           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   43655             :                                   PyLong_Type.tp_name, uint_max, test_var);
   43656           0 :                                 return -1;
   43657             :                         }
   43658           0 :                         *object->out.level_out = test_var;
   43659             :                 } else {
   43660           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   43661             :                           PyLong_Type.tp_name);
   43662           0 :                         return -1;
   43663             :                 }
   43664             :         }
   43665           0 :         return 0;
   43666             : }
   43667             : 
   43668           0 : static PyObject *py_drsuapi_DsGetMemberships2_out_get_ctr(PyObject *obj, void *closure)
   43669             : {
   43670           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(obj);
   43671           0 :         PyObject *py_ctr;
   43672           0 :         if (object->out.ctr == NULL) {
   43673           0 :                 Py_RETURN_NONE;
   43674             :         }
   43675           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetMemberships2Ctr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsGetMemberships2Ctr");
   43676           0 :         if (py_ctr == NULL) {
   43677           0 :                 return NULL;
   43678             :         }
   43679           0 :         return py_ctr;
   43680             : }
   43681             : 
   43682           0 : static int py_drsuapi_DsGetMemberships2_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   43683             : {
   43684           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43685           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   43686           0 :         if (value == NULL) {
   43687           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   43688           0 :                 return -1;
   43689             :         }
   43690           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   43691           0 :         if (object->out.ctr == NULL) {
   43692           0 :                 PyErr_NoMemory();
   43693           0 :                 return -1;
   43694             :         }
   43695             :         {
   43696           0 :                 union drsuapi_DsGetMemberships2Ctr *ctr_switch_1;
   43697           0 :                 ctr_switch_1 = (union drsuapi_DsGetMemberships2Ctr *)pyrpc_export_union(&drsuapi_DsGetMemberships2Ctr_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_DsGetMemberships2Ctr");
   43698           0 :                 if (ctr_switch_1 == NULL) {
   43699           0 :                         return -1;
   43700             :                 }
   43701           0 :                 object->out.ctr = ctr_switch_1;
   43702             :         }
   43703           0 :         return 0;
   43704             : }
   43705             : 
   43706           0 : static PyObject *py_drsuapi_DsGetMemberships2_get_result(PyObject *obj, void *closure)
   43707             : {
   43708           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(obj);
   43709           0 :         PyObject *py_result;
   43710           0 :         py_result = PyErr_FromWERROR(object->out.result);
   43711           0 :         return py_result;
   43712             : }
   43713             : 
   43714           0 : static int py_drsuapi_DsGetMemberships2_set_result(PyObject *py_obj, PyObject *value, void *closure)
   43715             : {
   43716           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43717           0 :         if (value == NULL) {
   43718           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   43719           0 :                 return -1;
   43720             :         }
   43721           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   43722           0 :         return 0;
   43723             : }
   43724             : 
   43725             : static PyGetSetDef py_drsuapi_DsGetMemberships2_getsetters[] = {
   43726             :         {
   43727             :                 .name = discard_const_p(char, "in_bind_handle"),
   43728             :                 .get = py_drsuapi_DsGetMemberships2_in_get_bind_handle,
   43729             :                 .set = py_drsuapi_DsGetMemberships2_in_set_bind_handle,
   43730             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   43731             :         },
   43732             :         {
   43733             :                 .name = discard_const_p(char, "in_level"),
   43734             :                 .get = py_drsuapi_DsGetMemberships2_in_get_level,
   43735             :                 .set = py_drsuapi_DsGetMemberships2_in_set_level,
   43736             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   43737             :         },
   43738             :         {
   43739             :                 .name = discard_const_p(char, "in_req"),
   43740             :                 .get = py_drsuapi_DsGetMemberships2_in_get_req,
   43741             :                 .set = py_drsuapi_DsGetMemberships2_in_set_req,
   43742             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMemberships2Request")
   43743             :         },
   43744             :         {
   43745             :                 .name = discard_const_p(char, "out_level_out"),
   43746             :                 .get = py_drsuapi_DsGetMemberships2_out_get_level_out,
   43747             :                 .set = py_drsuapi_DsGetMemberships2_out_set_level_out,
   43748             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   43749             :         },
   43750             :         {
   43751             :                 .name = discard_const_p(char, "out_ctr"),
   43752             :                 .get = py_drsuapi_DsGetMemberships2_out_get_ctr,
   43753             :                 .set = py_drsuapi_DsGetMemberships2_out_set_ctr,
   43754             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMemberships2Ctr")
   43755             :         },
   43756             :         {
   43757             :                 .name = discard_const_p(char, "result"),
   43758             :                 .get = py_drsuapi_DsGetMemberships2_get_result,
   43759             :                 .set = py_drsuapi_DsGetMemberships2_set_result,
   43760             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   43761             :         },
   43762             :         { .name = NULL }
   43763             : };
   43764             : 
   43765           0 : static PyObject *py_drsuapi_DsGetMemberships2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   43766             : {
   43767           0 :         PyObject *self = pytalloc_new(struct drsuapi_DsGetMemberships2, type);
   43768           0 :         struct drsuapi_DsGetMemberships2 *_self = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(self);
   43769           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   43770           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   43771           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Request);
   43772           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   43773           0 :         _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Ctr);
   43774           0 :         return self;
   43775             : }
   43776             : 
   43777           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   43778             : {
   43779             : 
   43780             : 
   43781           0 :         return PyLong_FromLong(21);
   43782             : }
   43783             : 
   43784           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   43785             : {
   43786           0 :         const struct ndr_interface_call *call = NULL;
   43787           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43788           0 :         PyObject *ret = NULL;
   43789           0 :         struct ndr_push *push = NULL;
   43790           0 :         DATA_BLOB blob;
   43791           0 :         enum ndr_err_code err;
   43792             : 
   43793           0 :         if (ndr_table_drsuapi.num_calls < 22) {
   43794           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships2_ndr_pack");
   43795           0 :                 return NULL;
   43796             :         }
   43797           0 :         call = &ndr_table_drsuapi.calls[21];
   43798             : 
   43799           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   43800           0 :         if (push == NULL) {
   43801           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43802           0 :                 return NULL;
   43803             :         }
   43804             : 
   43805           0 :         push->flags |= ndr_push_flags;
   43806             : 
   43807           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   43808           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43809           0 :                 TALLOC_FREE(push);
   43810           0 :                 PyErr_SetNdrError(err);
   43811           0 :                 return NULL;
   43812             :         }
   43813           0 :         blob = ndr_push_blob(push);
   43814           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   43815           0 :         TALLOC_FREE(push);
   43816           0 :         return ret;
   43817             : }
   43818             : 
   43819           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43820             : {
   43821           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43822           0 :         PyObject *bigendian_obj = NULL;
   43823           0 :         PyObject *ndr64_obj = NULL;
   43824           0 :         libndr_flags ndr_push_flags = 0;
   43825             : 
   43826           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   43827             :                 discard_const_p(char *, kwnames),
   43828             :                 &bigendian_obj,
   43829             :                 &ndr64_obj)) {
   43830           0 :                 return NULL;
   43831             :         }
   43832             : 
   43833           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43834           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43835             :         }
   43836           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43837           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43838             :         }
   43839             : 
   43840           0 :         return py_drsuapi_DsGetMemberships2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   43841             : }
   43842             : 
   43843           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43844             : {
   43845           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   43846           0 :         PyObject *bigendian_obj = NULL;
   43847           0 :         PyObject *ndr64_obj = NULL;
   43848           0 :         libndr_flags ndr_push_flags = 0;
   43849             : 
   43850           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   43851             :                 discard_const_p(char *, kwnames),
   43852             :                 &bigendian_obj,
   43853             :                 &ndr64_obj)) {
   43854           0 :                 return NULL;
   43855             :         }
   43856             : 
   43857           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43858           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   43859             :         }
   43860           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43861           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   43862             :         }
   43863             : 
   43864           0 :         return py_drsuapi_DsGetMemberships2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   43865             : }
   43866             : 
   43867           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   43868             : {
   43869           0 :         const struct ndr_interface_call *call = NULL;
   43870           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43871           0 :         struct ndr_pull *pull = NULL;
   43872           0 :         enum ndr_err_code err;
   43873             : 
   43874           0 :         if (ndr_table_drsuapi.num_calls < 22) {
   43875           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships2_ndr_unpack");
   43876           0 :                 return NULL;
   43877             :         }
   43878           0 :         call = &ndr_table_drsuapi.calls[21];
   43879             : 
   43880           0 :         pull = ndr_pull_init_blob(blob, object);
   43881           0 :         if (pull == NULL) {
   43882           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   43883           0 :                 return NULL;
   43884             :         }
   43885             : 
   43886           0 :         pull->flags |= ndr_pull_flags;
   43887             : 
   43888           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   43889           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   43890           0 :                 TALLOC_FREE(pull);
   43891           0 :                 PyErr_SetNdrError(err);
   43892           0 :                 return NULL;
   43893             :         }
   43894           0 :         if (!allow_remaining) {
   43895           0 :                 uint32_t highest_ofs;
   43896             : 
   43897           0 :                 if (pull->offset > pull->relative_highest_offset) {
   43898           0 :                         highest_ofs = pull->offset;
   43899             :                 } else {
   43900           0 :                         highest_ofs = pull->relative_highest_offset;
   43901             :                 }
   43902           0 :                 if (highest_ofs < pull->data_size) {
   43903           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   43904             :                                 "not all bytes consumed ofs[%u] size[%u]",
   43905             :                                 highest_ofs, pull->data_size);
   43906           0 :                         TALLOC_FREE(pull);
   43907           0 :                         PyErr_SetNdrError(err);
   43908           0 :                         return NULL;
   43909             :                 }
   43910             :         }
   43911             : 
   43912           0 :         TALLOC_FREE(pull);
   43913           0 :         Py_RETURN_NONE;
   43914             : }
   43915             : 
   43916           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43917             : {
   43918           0 :         DATA_BLOB blob;
   43919           0 :         Py_ssize_t blob_length = 0;
   43920           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43921           0 :         PyObject *bigendian_obj = NULL;
   43922           0 :         PyObject *ndr64_obj = NULL;
   43923           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43924           0 :         PyObject *allow_remaining_obj = NULL;
   43925           0 :         bool allow_remaining = false;
   43926             : 
   43927           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   43928             :                 discard_const_p(char *, kwnames),
   43929             :                 &blob.data, &blob_length,
   43930             :                 &bigendian_obj,
   43931             :                 &ndr64_obj,
   43932             :                 &allow_remaining_obj)) {
   43933           0 :                 return NULL;
   43934             :         }
   43935           0 :         blob.length = blob_length;
   43936             : 
   43937           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43938           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43939             :         }
   43940           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43941           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43942             :         }
   43943             : 
   43944           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43945           0 :                 allow_remaining = true;
   43946             :         }
   43947             : 
   43948           0 :         return py_drsuapi_DsGetMemberships2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   43949             : }
   43950             : 
   43951           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   43952             : {
   43953           0 :         DATA_BLOB blob;
   43954           0 :         Py_ssize_t blob_length = 0;
   43955           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   43956           0 :         PyObject *bigendian_obj = NULL;
   43957           0 :         PyObject *ndr64_obj = NULL;
   43958           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   43959           0 :         PyObject *allow_remaining_obj = NULL;
   43960           0 :         bool allow_remaining = false;
   43961             : 
   43962           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   43963             :                 discard_const_p(char *, kwnames),
   43964             :                 &blob.data, &blob_length,
   43965             :                 &bigendian_obj,
   43966             :                 &ndr64_obj,
   43967             :                 &allow_remaining_obj)) {
   43968           0 :                 return NULL;
   43969             :         }
   43970           0 :         blob.length = blob_length;
   43971             : 
   43972           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   43973           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   43974             :         }
   43975           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   43976           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   43977             :         }
   43978             : 
   43979           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   43980           0 :                 allow_remaining = true;
   43981             :         }
   43982             : 
   43983           0 :         return py_drsuapi_DsGetMemberships2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   43984             : }
   43985             : 
   43986           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   43987             : {
   43988           0 :         const struct ndr_interface_call *call = NULL;
   43989           0 :         struct drsuapi_DsGetMemberships2 *object = pytalloc_get_ptr(py_obj);
   43990           0 :         PyObject *ret;
   43991           0 :         char *retstr;
   43992             : 
   43993           0 :         if (ndr_table_drsuapi.num_calls < 22) {
   43994           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships2_ndr_print");
   43995           0 :                 return NULL;
   43996             :         }
   43997           0 :         call = &ndr_table_drsuapi.calls[21];
   43998             : 
   43999           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44000           0 :         ret = PyUnicode_FromString(retstr);
   44001           0 :         TALLOC_FREE(retstr);
   44002             : 
   44003           0 :         return ret;
   44004             : }
   44005             : 
   44006           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44007             : {
   44008           0 :         return py_drsuapi_DsGetMemberships2_ndr_print(py_obj, "drsuapi_DsGetMemberships2_in", NDR_IN);
   44009             : }
   44010             : 
   44011           0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44012             : {
   44013           0 :         return py_drsuapi_DsGetMemberships2_ndr_print(py_obj, "drsuapi_DsGetMemberships2_out", NDR_OUT);
   44014             : }
   44015             : 
   44016             : static PyMethodDef py_drsuapi_DsGetMemberships2_methods[] = {
   44017             :         { "opnum", (PyCFunction)py_drsuapi_DsGetMemberships2_ndr_opnum, METH_NOARGS|METH_CLASS,
   44018             :                 "drsuapi.DsGetMemberships2.opnum() -> 21 (0x15) " },
   44019             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44020             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44021             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44022             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44023             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44024             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44025             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44026             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44027             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetMemberships2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44028             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetMemberships2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44029             :         { NULL, NULL, 0, NULL }
   44030             : };
   44031             : 
   44032             : 
   44033             : static PyTypeObject drsuapi_DsGetMemberships2_Type = {
   44034             :         PyVarObject_HEAD_INIT(NULL, 0)
   44035             :         .tp_name = "drsuapi.DsGetMemberships2",
   44036             :         .tp_getset = py_drsuapi_DsGetMemberships2_getsetters,
   44037             :         .tp_methods = py_drsuapi_DsGetMemberships2_methods,
   44038             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44039             :         .tp_new = py_drsuapi_DsGetMemberships2_new,
   44040             : };
   44041             : 
   44042           0 : static bool pack_py_drsuapi_DsGetMemberships2_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetMemberships2 *r)
   44043             : {
   44044           0 :         PyObject *py_bind_handle;
   44045           0 :         PyObject *py_level;
   44046           0 :         PyObject *py_req;
   44047           0 :         const char *kwnames[] = {
   44048             :                 "bind_handle", "level", "req", NULL
   44049             :         };
   44050             : 
   44051           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetMemberships2", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   44052           0 :                 return false;
   44053             :         }
   44054             : 
   44055           0 :         if (py_bind_handle == NULL) {
   44056           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   44057           0 :                 return false;
   44058             :         }
   44059           0 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   44060           0 :         if (r->in.bind_handle == NULL) {
   44061           0 :                 PyErr_NoMemory();
   44062           0 :                 return false;
   44063             :         }
   44064           0 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   44065           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   44066           0 :                 PyErr_NoMemory();
   44067           0 :                 return false;
   44068             :         }
   44069           0 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   44070           0 :         if (py_level == NULL) {
   44071           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   44072           0 :                 return false;
   44073             :         }
   44074             :         {
   44075           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   44076           0 :                 if (PyLong_Check(py_level)) {
   44077           0 :                         unsigned long long test_var;
   44078           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   44079           0 :                         if (PyErr_Occurred() != NULL) {
   44080           0 :                                 return false;
   44081             :                         }
   44082           0 :                         if (test_var > uint_max) {
   44083           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44084             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44085           0 :                                 return false;
   44086             :                         }
   44087           0 :                         r->in.level = test_var;
   44088             :                 } else {
   44089           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44090             :                           PyLong_Type.tp_name);
   44091           0 :                         return false;
   44092             :                 }
   44093             :         }
   44094           0 :         if (py_req == NULL) {
   44095           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   44096           0 :                 return false;
   44097             :         }
   44098           0 :         r->in.req = talloc_ptrtype(r, r->in.req);
   44099           0 :         if (r->in.req == NULL) {
   44100           0 :                 PyErr_NoMemory();
   44101           0 :                 return false;
   44102             :         }
   44103             :         {
   44104           0 :                 union drsuapi_DsGetMemberships2Request *req_switch_1;
   44105           0 :                 req_switch_1 = (union drsuapi_DsGetMemberships2Request *)pyrpc_export_union(&drsuapi_DsGetMemberships2Request_Type, r, r->in.level, py_req, "union drsuapi_DsGetMemberships2Request");
   44106           0 :                 if (req_switch_1 == NULL) {
   44107           0 :                         return false;
   44108             :                 }
   44109           0 :                 r->in.req = req_switch_1;
   44110             :         }
   44111           0 :         return true;
   44112             : }
   44113             : 
   44114           0 : static PyObject *unpack_py_drsuapi_DsGetMemberships2_args_out(struct drsuapi_DsGetMemberships2 *r)
   44115             : {
   44116           0 :         PyObject *result;
   44117           0 :         PyObject *py_level_out;
   44118           0 :         PyObject *py_ctr;
   44119           0 :         result = PyTuple_New(2);
   44120           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   44121           0 :         PyTuple_SetItem(result, 0, py_level_out);
   44122           0 :         py_ctr = pyrpc_import_union(&drsuapi_DsGetMemberships2Ctr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsGetMemberships2Ctr");
   44123           0 :         if (py_ctr == NULL) {
   44124           0 :                 return NULL;
   44125             :         }
   44126           0 :         PyTuple_SetItem(result, 1, py_ctr);
   44127           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   44128           0 :                 PyErr_SetWERROR(r->out.result);
   44129           0 :                 return NULL;
   44130             :         }
   44131             : 
   44132           0 :         return result;
   44133             : }
   44134             : 
   44135             : 
   44136           0 : static PyObject *py_drsuapi_QuerySitesByCost_in_get_bind_handle(PyObject *obj, void *closure)
   44137             : {
   44138           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(obj);
   44139           0 :         PyObject *py_bind_handle;
   44140           0 :         if (object->in.bind_handle == NULL) {
   44141           0 :                 Py_RETURN_NONE;
   44142             :         }
   44143           0 :         py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
   44144           0 :         return py_bind_handle;
   44145             : }
   44146             : 
   44147           0 : static int py_drsuapi_QuerySitesByCost_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
   44148             : {
   44149           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44150           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
   44151           0 :         if (value == NULL) {
   44152           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
   44153           0 :                 return -1;
   44154             :         }
   44155           0 :         object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
   44156           0 :         if (object->in.bind_handle == NULL) {
   44157           0 :                 PyErr_NoMemory();
   44158           0 :                 return -1;
   44159             :         }
   44160           0 :         PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
   44161           0 :         if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
   44162           0 :                 PyErr_NoMemory();
   44163           0 :                 return -1;
   44164             :         }
   44165           0 :         object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
   44166           0 :         return 0;
   44167             : }
   44168             : 
   44169           0 : static PyObject *py_drsuapi_QuerySitesByCost_in_get_level(PyObject *obj, void *closure)
   44170             : {
   44171           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(obj);
   44172           0 :         PyObject *py_level;
   44173           0 :         py_level = PyLong_FromUnsignedLongLong((uint32_t)(object->in.level));
   44174           0 :         return py_level;
   44175             : }
   44176             : 
   44177           0 : static int py_drsuapi_QuerySitesByCost_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
   44178             : {
   44179           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44180           0 :         if (value == NULL) {
   44181           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
   44182           0 :                 return -1;
   44183             :         }
   44184             :         {
   44185           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
   44186           0 :                 if (PyLong_Check(value)) {
   44187           0 :                         unsigned long long test_var;
   44188           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44189           0 :                         if (PyErr_Occurred() != NULL) {
   44190           0 :                                 return -1;
   44191             :                         }
   44192           0 :                         if (test_var > uint_max) {
   44193           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44194             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44195           0 :                                 return -1;
   44196             :                         }
   44197           0 :                         object->in.level = test_var;
   44198             :                 } else {
   44199           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44200             :                           PyLong_Type.tp_name);
   44201           0 :                         return -1;
   44202             :                 }
   44203             :         }
   44204           0 :         return 0;
   44205             : }
   44206             : 
   44207           0 : static PyObject *py_drsuapi_QuerySitesByCost_in_get_req(PyObject *obj, void *closure)
   44208             : {
   44209           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(obj);
   44210           0 :         PyObject *py_req;
   44211           0 :         if (object->in.req == NULL) {
   44212           0 :                 Py_RETURN_NONE;
   44213             :         }
   44214           0 :         py_req = pyrpc_import_union(&drsuapi_QuerySitesByCostRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_QuerySitesByCostRequest");
   44215           0 :         if (py_req == NULL) {
   44216           0 :                 return NULL;
   44217             :         }
   44218           0 :         return py_req;
   44219             : }
   44220             : 
   44221           0 : static int py_drsuapi_QuerySitesByCost_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
   44222             : {
   44223           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44224           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
   44225           0 :         if (value == NULL) {
   44226           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
   44227           0 :                 return -1;
   44228             :         }
   44229           0 :         object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
   44230           0 :         if (object->in.req == NULL) {
   44231           0 :                 PyErr_NoMemory();
   44232           0 :                 return -1;
   44233             :         }
   44234             :         {
   44235           0 :                 union drsuapi_QuerySitesByCostRequest *req_switch_1;
   44236           0 :                 req_switch_1 = (union drsuapi_QuerySitesByCostRequest *)pyrpc_export_union(&drsuapi_QuerySitesByCostRequest_Type, pytalloc_get_mem_ctx(py_obj), object->in.level, value, "union drsuapi_QuerySitesByCostRequest");
   44237           0 :                 if (req_switch_1 == NULL) {
   44238           0 :                         return -1;
   44239             :                 }
   44240           0 :                 object->in.req = req_switch_1;
   44241             :         }
   44242           0 :         return 0;
   44243             : }
   44244             : 
   44245           0 : static PyObject *py_drsuapi_QuerySitesByCost_out_get_level_out(PyObject *obj, void *closure)
   44246             : {
   44247           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(obj);
   44248           0 :         PyObject *py_level_out;
   44249           0 :         if (object->out.level_out == NULL) {
   44250           0 :                 Py_RETURN_NONE;
   44251             :         }
   44252           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*object->out.level_out));
   44253           0 :         return py_level_out;
   44254             : }
   44255             : 
   44256           0 : static int py_drsuapi_QuerySitesByCost_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
   44257             : {
   44258           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44259           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
   44260           0 :         if (value == NULL) {
   44261           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
   44262           0 :                 return -1;
   44263             :         }
   44264           0 :         object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
   44265           0 :         if (object->out.level_out == NULL) {
   44266           0 :                 PyErr_NoMemory();
   44267           0 :                 return -1;
   44268             :         }
   44269             :         {
   44270           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
   44271           0 :                 if (PyLong_Check(value)) {
   44272           0 :                         unsigned long long test_var;
   44273           0 :                         test_var = PyLong_AsUnsignedLongLong(value);
   44274           0 :                         if (PyErr_Occurred() != NULL) {
   44275           0 :                                 return -1;
   44276             :                         }
   44277           0 :                         if (test_var > uint_max) {
   44278           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44279             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44280           0 :                                 return -1;
   44281             :                         }
   44282           0 :                         *object->out.level_out = test_var;
   44283             :                 } else {
   44284           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44285             :                           PyLong_Type.tp_name);
   44286           0 :                         return -1;
   44287             :                 }
   44288             :         }
   44289           0 :         return 0;
   44290             : }
   44291             : 
   44292           0 : static PyObject *py_drsuapi_QuerySitesByCost_out_get_ctr(PyObject *obj, void *closure)
   44293             : {
   44294           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(obj);
   44295           0 :         PyObject *py_ctr;
   44296           0 :         if (object->out.ctr == NULL) {
   44297           0 :                 Py_RETURN_NONE;
   44298             :         }
   44299           0 :         py_ctr = pyrpc_import_union(&drsuapi_QuerySitesByCostCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_QuerySitesByCostCtr");
   44300           0 :         if (py_ctr == NULL) {
   44301           0 :                 return NULL;
   44302             :         }
   44303           0 :         return py_ctr;
   44304             : }
   44305             : 
   44306           0 : static int py_drsuapi_QuerySitesByCost_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
   44307             : {
   44308           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44309           0 :         talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
   44310           0 :         if (value == NULL) {
   44311           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
   44312           0 :                 return -1;
   44313             :         }
   44314           0 :         object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
   44315           0 :         if (object->out.ctr == NULL) {
   44316           0 :                 PyErr_NoMemory();
   44317           0 :                 return -1;
   44318             :         }
   44319             :         {
   44320           0 :                 union drsuapi_QuerySitesByCostCtr *ctr_switch_1;
   44321           0 :                 ctr_switch_1 = (union drsuapi_QuerySitesByCostCtr *)pyrpc_export_union(&drsuapi_QuerySitesByCostCtr_Type, pytalloc_get_mem_ctx(py_obj), *object->out.level_out, value, "union drsuapi_QuerySitesByCostCtr");
   44322           0 :                 if (ctr_switch_1 == NULL) {
   44323           0 :                         return -1;
   44324             :                 }
   44325           0 :                 object->out.ctr = ctr_switch_1;
   44326             :         }
   44327           0 :         return 0;
   44328             : }
   44329             : 
   44330           0 : static PyObject *py_drsuapi_QuerySitesByCost_get_result(PyObject *obj, void *closure)
   44331             : {
   44332           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(obj);
   44333           0 :         PyObject *py_result;
   44334           0 :         py_result = PyErr_FromWERROR(object->out.result);
   44335           0 :         return py_result;
   44336             : }
   44337             : 
   44338           0 : static int py_drsuapi_QuerySitesByCost_set_result(PyObject *py_obj, PyObject *value, void *closure)
   44339             : {
   44340           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44341           0 :         if (value == NULL) {
   44342           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
   44343           0 :                 return -1;
   44344             :         }
   44345           0 :         object->out.result = W_ERROR(PyLong_AsLong(value));
   44346           0 :         return 0;
   44347             : }
   44348             : 
   44349             : static PyGetSetDef py_drsuapi_QuerySitesByCost_getsetters[] = {
   44350             :         {
   44351             :                 .name = discard_const_p(char, "in_bind_handle"),
   44352             :                 .get = py_drsuapi_QuerySitesByCost_in_get_bind_handle,
   44353             :                 .set = py_drsuapi_QuerySitesByCost_in_set_bind_handle,
   44354             :                 .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
   44355             :         },
   44356             :         {
   44357             :                 .name = discard_const_p(char, "in_level"),
   44358             :                 .get = py_drsuapi_QuerySitesByCost_in_get_level,
   44359             :                 .set = py_drsuapi_QuerySitesByCost_in_set_level,
   44360             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   44361             :         },
   44362             :         {
   44363             :                 .name = discard_const_p(char, "in_req"),
   44364             :                 .get = py_drsuapi_QuerySitesByCost_in_get_req,
   44365             :                 .set = py_drsuapi_QuerySitesByCost_in_set_req,
   44366             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_QuerySitesByCostRequest")
   44367             :         },
   44368             :         {
   44369             :                 .name = discard_const_p(char, "out_level_out"),
   44370             :                 .get = py_drsuapi_QuerySitesByCost_out_get_level_out,
   44371             :                 .set = py_drsuapi_QuerySitesByCost_out_set_level_out,
   44372             :                 .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
   44373             :         },
   44374             :         {
   44375             :                 .name = discard_const_p(char, "out_ctr"),
   44376             :                 .get = py_drsuapi_QuerySitesByCost_out_get_ctr,
   44377             :                 .set = py_drsuapi_QuerySitesByCost_out_set_ctr,
   44378             :                 .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_QuerySitesByCostCtr")
   44379             :         },
   44380             :         {
   44381             :                 .name = discard_const_p(char, "result"),
   44382             :                 .get = py_drsuapi_QuerySitesByCost_get_result,
   44383             :                 .set = py_drsuapi_QuerySitesByCost_set_result,
   44384             :                 .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
   44385             :         },
   44386             :         { .name = NULL }
   44387             : };
   44388             : 
   44389           0 : static PyObject *py_drsuapi_QuerySitesByCost_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44390             : {
   44391           0 :         PyObject *self = pytalloc_new(struct drsuapi_QuerySitesByCost, type);
   44392           0 :         struct drsuapi_QuerySitesByCost *_self = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(self);
   44393           0 :         TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
   44394           0 :         _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
   44395           0 :         _self->in.req = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostRequest);
   44396           0 :         _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
   44397           0 :         _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostCtr);
   44398           0 :         return self;
   44399             : }
   44400             : 
   44401           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
   44402             : {
   44403             : 
   44404             : 
   44405           0 :         return PyLong_FromLong(24);
   44406             : }
   44407             : 
   44408           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
   44409             : {
   44410           0 :         const struct ndr_interface_call *call = NULL;
   44411           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44412           0 :         PyObject *ret = NULL;
   44413           0 :         struct ndr_push *push = NULL;
   44414           0 :         DATA_BLOB blob;
   44415           0 :         enum ndr_err_code err;
   44416             : 
   44417           0 :         if (ndr_table_drsuapi.num_calls < 25) {
   44418           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_QuerySitesByCost_ndr_pack");
   44419           0 :                 return NULL;
   44420             :         }
   44421           0 :         call = &ndr_table_drsuapi.calls[24];
   44422             : 
   44423           0 :         push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
   44424           0 :         if (push == NULL) {
   44425           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44426           0 :                 return NULL;
   44427             :         }
   44428             : 
   44429           0 :         push->flags |= ndr_push_flags;
   44430             : 
   44431           0 :         err = call->ndr_push(push, ndr_inout_flags, object);
   44432           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44433           0 :                 TALLOC_FREE(push);
   44434           0 :                 PyErr_SetNdrError(err);
   44435           0 :                 return NULL;
   44436             :         }
   44437           0 :         blob = ndr_push_blob(push);
   44438           0 :         ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
   44439           0 :         TALLOC_FREE(push);
   44440           0 :         return ret;
   44441             : }
   44442             : 
   44443           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44444             : {
   44445           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44446           0 :         PyObject *bigendian_obj = NULL;
   44447           0 :         PyObject *ndr64_obj = NULL;
   44448           0 :         libndr_flags ndr_push_flags = 0;
   44449             : 
   44450           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
   44451             :                 discard_const_p(char *, kwnames),
   44452             :                 &bigendian_obj,
   44453             :                 &ndr64_obj)) {
   44454           0 :                 return NULL;
   44455             :         }
   44456             : 
   44457           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44458           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44459             :         }
   44460           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44461           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44462             :         }
   44463             : 
   44464           0 :         return py_drsuapi_QuerySitesByCost_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
   44465             : }
   44466             : 
   44467           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44468             : {
   44469           0 :         const char * const kwnames[] = { "bigendian", "ndr64", NULL };
   44470           0 :         PyObject *bigendian_obj = NULL;
   44471           0 :         PyObject *ndr64_obj = NULL;
   44472           0 :         libndr_flags ndr_push_flags = 0;
   44473             : 
   44474           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
   44475             :                 discard_const_p(char *, kwnames),
   44476             :                 &bigendian_obj,
   44477             :                 &ndr64_obj)) {
   44478           0 :                 return NULL;
   44479             :         }
   44480             : 
   44481           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44482           0 :                 ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
   44483             :         }
   44484           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44485           0 :                 ndr_push_flags |= LIBNDR_FLAG_NDR64;
   44486             :         }
   44487             : 
   44488           0 :         return py_drsuapi_QuerySitesByCost_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
   44489             : }
   44490             : 
   44491           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
   44492             : {
   44493           0 :         const struct ndr_interface_call *call = NULL;
   44494           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44495           0 :         struct ndr_pull *pull = NULL;
   44496           0 :         enum ndr_err_code err;
   44497             : 
   44498           0 :         if (ndr_table_drsuapi.num_calls < 25) {
   44499           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_QuerySitesByCost_ndr_unpack");
   44500           0 :                 return NULL;
   44501             :         }
   44502           0 :         call = &ndr_table_drsuapi.calls[24];
   44503             : 
   44504           0 :         pull = ndr_pull_init_blob(blob, object);
   44505           0 :         if (pull == NULL) {
   44506           0 :                 PyErr_SetNdrError(NDR_ERR_ALLOC);
   44507           0 :                 return NULL;
   44508             :         }
   44509             : 
   44510           0 :         pull->flags |= ndr_pull_flags;
   44511             : 
   44512           0 :         err = call->ndr_pull(pull, ndr_inout_flags, object);
   44513           0 :         if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
   44514           0 :                 TALLOC_FREE(pull);
   44515           0 :                 PyErr_SetNdrError(err);
   44516           0 :                 return NULL;
   44517             :         }
   44518           0 :         if (!allow_remaining) {
   44519           0 :                 uint32_t highest_ofs;
   44520             : 
   44521           0 :                 if (pull->offset > pull->relative_highest_offset) {
   44522           0 :                         highest_ofs = pull->offset;
   44523             :                 } else {
   44524           0 :                         highest_ofs = pull->relative_highest_offset;
   44525             :                 }
   44526           0 :                 if (highest_ofs < pull->data_size) {
   44527           0 :                         err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
   44528             :                                 "not all bytes consumed ofs[%u] size[%u]",
   44529             :                                 highest_ofs, pull->data_size);
   44530           0 :                         TALLOC_FREE(pull);
   44531           0 :                         PyErr_SetNdrError(err);
   44532           0 :                         return NULL;
   44533             :                 }
   44534             :         }
   44535             : 
   44536           0 :         TALLOC_FREE(pull);
   44537           0 :         Py_RETURN_NONE;
   44538             : }
   44539             : 
   44540           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44541             : {
   44542           0 :         DATA_BLOB blob;
   44543           0 :         Py_ssize_t blob_length = 0;
   44544           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44545           0 :         PyObject *bigendian_obj = NULL;
   44546           0 :         PyObject *ndr64_obj = NULL;
   44547           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44548           0 :         PyObject *allow_remaining_obj = NULL;
   44549           0 :         bool allow_remaining = false;
   44550             : 
   44551           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
   44552             :                 discard_const_p(char *, kwnames),
   44553             :                 &blob.data, &blob_length,
   44554             :                 &bigendian_obj,
   44555             :                 &ndr64_obj,
   44556             :                 &allow_remaining_obj)) {
   44557           0 :                 return NULL;
   44558             :         }
   44559           0 :         blob.length = blob_length;
   44560             : 
   44561           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44562           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44563             :         }
   44564           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44565           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44566             :         }
   44567             : 
   44568           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44569           0 :                 allow_remaining = true;
   44570             :         }
   44571             : 
   44572           0 :         return py_drsuapi_QuerySitesByCost_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
   44573             : }
   44574             : 
   44575           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
   44576             : {
   44577           0 :         DATA_BLOB blob;
   44578           0 :         Py_ssize_t blob_length = 0;
   44579           0 :         const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
   44580           0 :         PyObject *bigendian_obj = NULL;
   44581           0 :         PyObject *ndr64_obj = NULL;
   44582           0 :         libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
   44583           0 :         PyObject *allow_remaining_obj = NULL;
   44584           0 :         bool allow_remaining = false;
   44585             : 
   44586           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
   44587             :                 discard_const_p(char *, kwnames),
   44588             :                 &blob.data, &blob_length,
   44589             :                 &bigendian_obj,
   44590             :                 &ndr64_obj,
   44591             :                 &allow_remaining_obj)) {
   44592           0 :                 return NULL;
   44593             :         }
   44594           0 :         blob.length = blob_length;
   44595             : 
   44596           0 :         if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
   44597           0 :                 ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
   44598             :         }
   44599           0 :         if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
   44600           0 :                 ndr_pull_flags |= LIBNDR_FLAG_NDR64;
   44601             :         }
   44602             : 
   44603           0 :         if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
   44604           0 :                 allow_remaining = true;
   44605             :         }
   44606             : 
   44607           0 :         return py_drsuapi_QuerySitesByCost_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
   44608             : }
   44609             : 
   44610           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
   44611             : {
   44612           0 :         const struct ndr_interface_call *call = NULL;
   44613           0 :         struct drsuapi_QuerySitesByCost *object = pytalloc_get_ptr(py_obj);
   44614           0 :         PyObject *ret;
   44615           0 :         char *retstr;
   44616             : 
   44617           0 :         if (ndr_table_drsuapi.num_calls < 25) {
   44618           0 :                 PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_QuerySitesByCost_ndr_print");
   44619           0 :                 return NULL;
   44620             :         }
   44621           0 :         call = &ndr_table_drsuapi.calls[24];
   44622             : 
   44623           0 :         retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
   44624           0 :         ret = PyUnicode_FromString(retstr);
   44625           0 :         TALLOC_FREE(retstr);
   44626             : 
   44627           0 :         return ret;
   44628             : }
   44629             : 
   44630           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44631             : {
   44632           0 :         return py_drsuapi_QuerySitesByCost_ndr_print(py_obj, "drsuapi_QuerySitesByCost_in", NDR_IN);
   44633             : }
   44634             : 
   44635           0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
   44636             : {
   44637           0 :         return py_drsuapi_QuerySitesByCost_ndr_print(py_obj, "drsuapi_QuerySitesByCost_out", NDR_OUT);
   44638             : }
   44639             : 
   44640             : static PyMethodDef py_drsuapi_QuerySitesByCost_methods[] = {
   44641             :         { "opnum", (PyCFunction)py_drsuapi_QuerySitesByCost_ndr_opnum, METH_NOARGS|METH_CLASS,
   44642             :                 "drsuapi.QuerySitesByCost.opnum() -> 24 (0x18) " },
   44643             :         { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCost_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
   44644             :                 "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
   44645             :         { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCost_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
   44646             :                 "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
   44647             :         { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCost_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
   44648             :                 "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
   44649             :         { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCost_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
   44650             :                 "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
   44651             :         { "__ndr_print_in__", (PyCFunction)py_drsuapi_QuerySitesByCost_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
   44652             :         { "__ndr_print_out__", (PyCFunction)py_drsuapi_QuerySitesByCost_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
   44653             :         { NULL, NULL, 0, NULL }
   44654             : };
   44655             : 
   44656             : 
   44657             : static PyTypeObject drsuapi_QuerySitesByCost_Type = {
   44658             :         PyVarObject_HEAD_INIT(NULL, 0)
   44659             :         .tp_name = "drsuapi.QuerySitesByCost",
   44660             :         .tp_getset = py_drsuapi_QuerySitesByCost_getsetters,
   44661             :         .tp_methods = py_drsuapi_QuerySitesByCost_methods,
   44662             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44663             :         .tp_new = py_drsuapi_QuerySitesByCost_new,
   44664             : };
   44665             : 
   44666           0 : static bool pack_py_drsuapi_QuerySitesByCost_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_QuerySitesByCost *r)
   44667             : {
   44668           0 :         PyObject *py_bind_handle;
   44669           0 :         PyObject *py_level;
   44670           0 :         PyObject *py_req;
   44671           0 :         const char *kwnames[] = {
   44672             :                 "bind_handle", "level", "req", NULL
   44673             :         };
   44674             : 
   44675           0 :         if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_QuerySitesByCost", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
   44676           0 :                 return false;
   44677             :         }
   44678             : 
   44679           0 :         if (py_bind_handle == NULL) {
   44680           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
   44681           0 :                 return false;
   44682             :         }
   44683           0 :         r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
   44684           0 :         if (r->in.bind_handle == NULL) {
   44685           0 :                 PyErr_NoMemory();
   44686           0 :                 return false;
   44687             :         }
   44688           0 :         PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
   44689           0 :         if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
   44690           0 :                 PyErr_NoMemory();
   44691           0 :                 return false;
   44692             :         }
   44693           0 :         r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
   44694           0 :         if (py_level == NULL) {
   44695           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
   44696           0 :                 return false;
   44697             :         }
   44698             :         {
   44699           0 :                 const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
   44700           0 :                 if (PyLong_Check(py_level)) {
   44701           0 :                         unsigned long long test_var;
   44702           0 :                         test_var = PyLong_AsUnsignedLongLong(py_level);
   44703           0 :                         if (PyErr_Occurred() != NULL) {
   44704           0 :                                 return false;
   44705             :                         }
   44706           0 :                         if (test_var > uint_max) {
   44707           0 :                                 PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
   44708             :                                   PyLong_Type.tp_name, uint_max, test_var);
   44709           0 :                                 return false;
   44710             :                         }
   44711           0 :                         r->in.level = test_var;
   44712             :                 } else {
   44713           0 :                         PyErr_Format(PyExc_TypeError, "Expected type %s",
   44714             :                           PyLong_Type.tp_name);
   44715           0 :                         return false;
   44716             :                 }
   44717             :         }
   44718           0 :         if (py_req == NULL) {
   44719           0 :                 PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
   44720           0 :                 return false;
   44721             :         }
   44722           0 :         r->in.req = talloc_ptrtype(r, r->in.req);
   44723           0 :         if (r->in.req == NULL) {
   44724           0 :                 PyErr_NoMemory();
   44725           0 :                 return false;
   44726             :         }
   44727             :         {
   44728           0 :                 union drsuapi_QuerySitesByCostRequest *req_switch_1;
   44729           0 :                 req_switch_1 = (union drsuapi_QuerySitesByCostRequest *)pyrpc_export_union(&drsuapi_QuerySitesByCostRequest_Type, r, r->in.level, py_req, "union drsuapi_QuerySitesByCostRequest");
   44730           0 :                 if (req_switch_1 == NULL) {
   44731           0 :                         return false;
   44732             :                 }
   44733           0 :                 r->in.req = req_switch_1;
   44734             :         }
   44735           0 :         return true;
   44736             : }
   44737             : 
   44738           0 : static PyObject *unpack_py_drsuapi_QuerySitesByCost_args_out(struct drsuapi_QuerySitesByCost *r)
   44739             : {
   44740           0 :         PyObject *result;
   44741           0 :         PyObject *py_level_out;
   44742           0 :         PyObject *py_ctr;
   44743           0 :         result = PyTuple_New(2);
   44744           0 :         py_level_out = PyLong_FromUnsignedLongLong((uint32_t)(*r->out.level_out));
   44745           0 :         PyTuple_SetItem(result, 0, py_level_out);
   44746           0 :         py_ctr = pyrpc_import_union(&drsuapi_QuerySitesByCostCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_QuerySitesByCostCtr");
   44747           0 :         if (py_ctr == NULL) {
   44748           0 :                 return NULL;
   44749             :         }
   44750           0 :         PyTuple_SetItem(result, 1, py_ctr);
   44751           0 :         if (!W_ERROR_IS_OK(r->out.result)) {
   44752           0 :                 PyErr_SetWERROR(r->out.result);
   44753           0 :                 return NULL;
   44754             :         }
   44755             : 
   44756           0 :         return result;
   44757             : }
   44758             : 
   44759             : const struct PyNdrRpcMethodDef py_ndr_drsuapi_methods[] = {
   44760             :         { "DsBind", "S.DsBind(bind_guid, bind_info) -> (bind_info, bind_handle)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsBind_r, (py_data_pack_fn)pack_py_drsuapi_DsBind_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsBind_args_out, 0, &ndr_table_drsuapi },
   44761             :         { "DsUnbind", "S.DsUnbind(bind_handle) -> bind_handle", (py_dcerpc_call_fn)dcerpc_drsuapi_DsUnbind_r, (py_data_pack_fn)pack_py_drsuapi_DsUnbind_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsUnbind_args_out, 1, &ndr_table_drsuapi },
   44762             :         { "DsReplicaSync", "S.DsReplicaSync(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaSync_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaSync_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaSync_args_out, 2, &ndr_table_drsuapi },
   44763             :         { "DsGetNCChanges", "S.DsGetNCChanges(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetNCChanges_r, (py_data_pack_fn)pack_py_drsuapi_DsGetNCChanges_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetNCChanges_args_out, 3, &ndr_table_drsuapi },
   44764             :         { "DsReplicaUpdateRefs", "S.DsReplicaUpdateRefs(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaUpdateRefs_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaUpdateRefs_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaUpdateRefs_args_out, 4, &ndr_table_drsuapi },
   44765             :         { "DsReplicaAdd", "S.DsReplicaAdd(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaAdd_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaAdd_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaAdd_args_out, 5, &ndr_table_drsuapi },
   44766             :         { "DsReplicaDel", "S.DsReplicaDel(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaDel_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaDel_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaDel_args_out, 6, &ndr_table_drsuapi },
   44767             :         { "DsReplicaMod", "S.DsReplicaMod(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaMod_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaMod_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaMod_args_out, 7, &ndr_table_drsuapi },
   44768             :         { "DsGetMemberships", "S.DsGetMemberships(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetMemberships_r, (py_data_pack_fn)pack_py_drsuapi_DsGetMemberships_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetMemberships_args_out, 9, &ndr_table_drsuapi },
   44769             :         { "DsGetNT4ChangeLog", "S.DsGetNT4ChangeLog(bind_handle, level, req) -> (level_out, info)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetNT4ChangeLog_r, (py_data_pack_fn)pack_py_drsuapi_DsGetNT4ChangeLog_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetNT4ChangeLog_args_out, 11, &ndr_table_drsuapi },
   44770             :         { "DsCrackNames", "S.DsCrackNames(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsCrackNames_r, (py_data_pack_fn)pack_py_drsuapi_DsCrackNames_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsCrackNames_args_out, 12, &ndr_table_drsuapi },
   44771             :         { "DsWriteAccountSpn", "S.DsWriteAccountSpn(bind_handle, level, req) -> (level_out, res)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsWriteAccountSpn_r, (py_data_pack_fn)pack_py_drsuapi_DsWriteAccountSpn_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsWriteAccountSpn_args_out, 13, &ndr_table_drsuapi },
   44772             :         { "DsRemoveDSServer", "S.DsRemoveDSServer(bind_handle, level, req) -> (level_out, res)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsRemoveDSServer_r, (py_data_pack_fn)pack_py_drsuapi_DsRemoveDSServer_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsRemoveDSServer_args_out, 14, &ndr_table_drsuapi },
   44773             :         { "DsGetDomainControllerInfo", "S.DsGetDomainControllerInfo(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetDomainControllerInfo_r, (py_data_pack_fn)pack_py_drsuapi_DsGetDomainControllerInfo_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetDomainControllerInfo_args_out, 16, &ndr_table_drsuapi },
   44774             :         { "DsAddEntry", "S.DsAddEntry(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsAddEntry_r, (py_data_pack_fn)pack_py_drsuapi_DsAddEntry_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsAddEntry_args_out, 17, &ndr_table_drsuapi },
   44775             :         { "DsExecuteKCC", "S.DsExecuteKCC(bind_handle, level, req) -> None", (py_dcerpc_call_fn)dcerpc_drsuapi_DsExecuteKCC_r, (py_data_pack_fn)pack_py_drsuapi_DsExecuteKCC_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsExecuteKCC_args_out, 18, &ndr_table_drsuapi },
   44776             :         { "DsReplicaGetInfo", "S.DsReplicaGetInfo(bind_handle, level, req) -> (info_type, info)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsReplicaGetInfo_r, (py_data_pack_fn)pack_py_drsuapi_DsReplicaGetInfo_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsReplicaGetInfo_args_out, 19, &ndr_table_drsuapi },
   44777             :         { "DsGetMemberships2", "S.DsGetMemberships2(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_DsGetMemberships2_r, (py_data_pack_fn)pack_py_drsuapi_DsGetMemberships2_args_in, (py_data_unpack_fn)unpack_py_drsuapi_DsGetMemberships2_args_out, 21, &ndr_table_drsuapi },
   44778             :         { "QuerySitesByCost", "S.QuerySitesByCost(bind_handle, level, req) -> (level_out, ctr)", (py_dcerpc_call_fn)dcerpc_drsuapi_QuerySitesByCost_r, (py_data_pack_fn)pack_py_drsuapi_QuerySitesByCost_args_in, (py_data_unpack_fn)unpack_py_drsuapi_QuerySitesByCost_args_out, 24, &ndr_table_drsuapi },
   44779             :         {0}
   44780             : };
   44781             : 
   44782        1612 : static PyObject *interface_drsuapi_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44783             : {
   44784        1612 :         return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_drsuapi);
   44785             : }
   44786             : 
   44787             : #define PY_DOC_DRSUAPI "Active Directory Replication"
   44788             : static PyTypeObject drsuapi_InterfaceType = {
   44789             :         PyVarObject_HEAD_INIT(NULL, 0)
   44790             :         .tp_name = "drsuapi.drsuapi",
   44791             :         .tp_basicsize = sizeof(dcerpc_InterfaceObject),
   44792             :         .tp_doc = "drsuapi(binding, lp_ctx=None, credentials=None) -> connection\n"
   44793             : "\n"
   44794             : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
   44795             : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
   44796             : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_DRSUAPI,
   44797             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44798             :         .tp_new = interface_drsuapi_new,
   44799             : };
   44800             : 
   44801           0 : static PyObject *syntax_drsuapi_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
   44802             : {
   44803           0 :         return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_drsuapi.syntax_id);
   44804             : }
   44805             : 
   44806             : #define PY_DOC_DRSUAPI_SYNTAX "Active Directory Replication"
   44807             : static PyTypeObject drsuapi_SyntaxType = {
   44808             :         PyVarObject_HEAD_INIT(NULL, 0)
   44809             :         .tp_name = "drsuapi.drsuapi_abstract_syntax",
   44810             :         .tp_doc = "drsuapi_abstract_syntax()\n"PY_DOC_DRSUAPI_SYNTAX,
   44811             :         .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
   44812             :         .tp_new = syntax_drsuapi_new,
   44813             : };
   44814             : 
   44815             : static PyMethodDef drsuapi_methods[] = {
   44816             :         { NULL, NULL, 0, NULL }
   44817             : };
   44818             : 
   44819             : static struct PyModuleDef moduledef = {
   44820             :         PyModuleDef_HEAD_INIT,
   44821             :         .m_name = "drsuapi",
   44822             :         .m_doc = "drsuapi DCE/RPC",
   44823             :         .m_size = -1,
   44824             :         .m_methods = drsuapi_methods,
   44825             : };
   44826        7484 : MODULE_INIT_FUNC(drsuapi)
   44827             : {
   44828        7484 :         PyObject *m = NULL;
   44829        7484 :         PyObject *dep_samba_dcerpc_security = NULL;
   44830        7484 :         PyObject *dep_samba_dcerpc_misc = NULL;
   44831        7484 :         PyObject *dep_samba_dcerpc_lsa = NULL;
   44832        7484 :         PyObject *dep_samba_dcerpc_samr = NULL;
   44833        7484 :         PyObject *dep_talloc = NULL;
   44834        7484 :         PyObject *dep_samba_dcerpc_base = NULL;
   44835             : 
   44836        7484 :         dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
   44837        7484 :         if (dep_samba_dcerpc_security == NULL)
   44838           0 :                 goto out;
   44839             : 
   44840        7484 :         dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
   44841        7484 :         if (dep_samba_dcerpc_misc == NULL)
   44842           0 :                 goto out;
   44843             : 
   44844        7484 :         dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
   44845        7484 :         if (dep_samba_dcerpc_lsa == NULL)
   44846           0 :                 goto out;
   44847             : 
   44848        7484 :         dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
   44849        7484 :         if (dep_samba_dcerpc_samr == NULL)
   44850           0 :                 goto out;
   44851             : 
   44852        7484 :         dep_talloc = PyImport_ImportModule("talloc");
   44853        7484 :         if (dep_talloc == NULL)
   44854           0 :                 goto out;
   44855             : 
   44856        7484 :         dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
   44857        7484 :         if (dep_samba_dcerpc_base == NULL)
   44858           0 :                 goto out;
   44859             : 
   44860        7484 :         GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
   44861        7484 :         if (GUID_Type == NULL)
   44862           0 :                 goto out;
   44863             : 
   44864        7484 :         BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
   44865        7484 :         if (BaseObject_Type == NULL)
   44866           0 :                 goto out;
   44867             : 
   44868        7484 :         dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
   44869        7484 :         if (dom_sid_Type == NULL)
   44870           0 :                 goto out;
   44871             : 
   44872        7484 :         lsa_String_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "String");
   44873        7484 :         if (lsa_String_Type == NULL)
   44874           0 :                 goto out;
   44875             : 
   44876        7484 :         policy_handle_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "policy_handle");
   44877        7484 :         if (policy_handle_Type == NULL)
   44878           0 :                 goto out;
   44879             : 
   44880        7484 :         ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
   44881        7484 :         if (ClientConnection_Type == NULL)
   44882           0 :                 goto out;
   44883             : 
   44884        7484 :         ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
   44885        7484 :         if (ndr_syntax_id_Type == NULL)
   44886           0 :                 goto out;
   44887             : 
   44888        7484 :         drsuapi_DsBindInfo24_Type.tp_base = BaseObject_Type;
   44889        7484 :         drsuapi_DsBindInfo24_Type.tp_basicsize = pytalloc_BaseObject_size();
   44890             : 
   44891        7484 :         drsuapi_DsBindInfo28_Type.tp_base = BaseObject_Type;
   44892        7484 :         drsuapi_DsBindInfo28_Type.tp_basicsize = pytalloc_BaseObject_size();
   44893             : 
   44894        7484 :         drsuapi_DsBindInfo32_Type.tp_base = BaseObject_Type;
   44895        7484 :         drsuapi_DsBindInfo32_Type.tp_basicsize = pytalloc_BaseObject_size();
   44896             : 
   44897        7484 :         drsuapi_DsBindInfo48_Type.tp_base = BaseObject_Type;
   44898        7484 :         drsuapi_DsBindInfo48_Type.tp_basicsize = pytalloc_BaseObject_size();
   44899             : 
   44900        7484 :         drsuapi_DsBindInfo52_Type.tp_base = BaseObject_Type;
   44901        7484 :         drsuapi_DsBindInfo52_Type.tp_basicsize = pytalloc_BaseObject_size();
   44902             : 
   44903        7484 :         drsuapi_DsBindInfoFallBack_Type.tp_base = BaseObject_Type;
   44904        7484 :         drsuapi_DsBindInfoFallBack_Type.tp_basicsize = pytalloc_BaseObject_size();
   44905             : 
   44906        7484 :         drsuapi_DsBindInfo_Type.tp_base = BaseObject_Type;
   44907        7484 :         drsuapi_DsBindInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   44908             : 
   44909        7484 :         drsuapi_DsBindInfoCtr_Type.tp_base = BaseObject_Type;
   44910        7484 :         drsuapi_DsBindInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   44911             : 
   44912        7484 :         drsuapi_DsReplicaObjectIdentifier_Type.tp_base = BaseObject_Type;
   44913        7484 :         drsuapi_DsReplicaObjectIdentifier_Type.tp_basicsize = pytalloc_BaseObject_size();
   44914             : 
   44915        7484 :         drsuapi_DsReplicaSyncRequest1_Type.tp_base = BaseObject_Type;
   44916        7484 :         drsuapi_DsReplicaSyncRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   44917             : 
   44918        7484 :         drsuapi_DsReplicaSyncRequest_Type.tp_base = BaseObject_Type;
   44919        7484 :         drsuapi_DsReplicaSyncRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   44920             : 
   44921        7484 :         drsuapi_DsReplicaHighWaterMark_Type.tp_base = BaseObject_Type;
   44922        7484 :         drsuapi_DsReplicaHighWaterMark_Type.tp_basicsize = pytalloc_BaseObject_size();
   44923             : 
   44924        7484 :         drsuapi_DsReplicaCursor_Type.tp_base = BaseObject_Type;
   44925        7484 :         drsuapi_DsReplicaCursor_Type.tp_basicsize = pytalloc_BaseObject_size();
   44926             : 
   44927        7484 :         drsuapi_DsReplicaCursorCtrEx_Type.tp_base = BaseObject_Type;
   44928        7484 :         drsuapi_DsReplicaCursorCtrEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   44929             : 
   44930        7484 :         drsuapi_DsGetNCChangesRequest5_Type.tp_base = BaseObject_Type;
   44931        7484 :         drsuapi_DsGetNCChangesRequest5_Type.tp_basicsize = pytalloc_BaseObject_size();
   44932             : 
   44933        7484 :         drsuapi_DsReplicaOID_Type.tp_base = BaseObject_Type;
   44934        7484 :         drsuapi_DsReplicaOID_Type.tp_basicsize = pytalloc_BaseObject_size();
   44935             : 
   44936        7484 :         drsuapi_DsReplicaOIDMapping_Type.tp_base = BaseObject_Type;
   44937        7484 :         drsuapi_DsReplicaOIDMapping_Type.tp_basicsize = pytalloc_BaseObject_size();
   44938             : 
   44939        7484 :         drsuapi_DsReplicaOIDMapping_Ctr_Type.tp_base = BaseObject_Type;
   44940        7484 :         drsuapi_DsReplicaOIDMapping_Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   44941             : 
   44942        7484 :         drsuapi_DsPartialAttributeSet_Type.tp_base = BaseObject_Type;
   44943        7484 :         drsuapi_DsPartialAttributeSet_Type.tp_basicsize = pytalloc_BaseObject_size();
   44944             : 
   44945        7484 :         drsuapi_DsGetNCChangesRequest8_Type.tp_base = BaseObject_Type;
   44946        7484 :         drsuapi_DsGetNCChangesRequest8_Type.tp_basicsize = pytalloc_BaseObject_size();
   44947             : 
   44948        7484 :         drsuapi_DsGetNCChangesRequest10_Type.tp_base = BaseObject_Type;
   44949        7484 :         drsuapi_DsGetNCChangesRequest10_Type.tp_basicsize = pytalloc_BaseObject_size();
   44950             : 
   44951        7484 :         drsuapi_DsGetNCChangesRequest_Type.tp_base = BaseObject_Type;
   44952        7484 :         drsuapi_DsGetNCChangesRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   44953             : 
   44954        7484 :         drsuapi_DsReplicaCursor2_Type.tp_base = BaseObject_Type;
   44955        7484 :         drsuapi_DsReplicaCursor2_Type.tp_basicsize = pytalloc_BaseObject_size();
   44956             : 
   44957        7484 :         drsuapi_DsReplicaCursor2CtrEx_Type.tp_base = BaseObject_Type;
   44958        7484 :         drsuapi_DsReplicaCursor2CtrEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   44959             : 
   44960        7484 :         drsuapi_DsAttributeValue_Type.tp_base = BaseObject_Type;
   44961        7484 :         drsuapi_DsAttributeValue_Type.tp_basicsize = pytalloc_BaseObject_size();
   44962             : 
   44963        7484 :         drsuapi_DsAttributeValueCtr_Type.tp_base = BaseObject_Type;
   44964        7484 :         drsuapi_DsAttributeValueCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   44965             : 
   44966        7484 :         drsuapi_DsReplicaObjectIdentifier3_Type.tp_base = BaseObject_Type;
   44967        7484 :         drsuapi_DsReplicaObjectIdentifier3_Type.tp_basicsize = pytalloc_BaseObject_size();
   44968             : 
   44969        7484 :         drsuapi_DsReplicaObjectIdentifier3Binary_Type.tp_base = BaseObject_Type;
   44970        7484 :         drsuapi_DsReplicaObjectIdentifier3Binary_Type.tp_basicsize = pytalloc_BaseObject_size();
   44971             : 
   44972        7484 :         drsuapi_DsReplicaAttribute_Type.tp_base = BaseObject_Type;
   44973        7484 :         drsuapi_DsReplicaAttribute_Type.tp_basicsize = pytalloc_BaseObject_size();
   44974             : 
   44975        7484 :         drsuapi_DsReplicaAttributeCtr_Type.tp_base = BaseObject_Type;
   44976        7484 :         drsuapi_DsReplicaAttributeCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   44977             : 
   44978        7484 :         drsuapi_DsReplicaObject_Type.tp_base = BaseObject_Type;
   44979        7484 :         drsuapi_DsReplicaObject_Type.tp_basicsize = pytalloc_BaseObject_size();
   44980             : 
   44981        7484 :         drsuapi_DsReplicaMetaData_Type.tp_base = BaseObject_Type;
   44982        7484 :         drsuapi_DsReplicaMetaData_Type.tp_basicsize = pytalloc_BaseObject_size();
   44983             : 
   44984        7484 :         drsuapi_DsReplicaMetaDataCtr_Type.tp_base = BaseObject_Type;
   44985        7484 :         drsuapi_DsReplicaMetaDataCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   44986             : 
   44987        7484 :         drsuapi_DsReplicaObjectListItemEx_Type.tp_base = BaseObject_Type;
   44988        7484 :         drsuapi_DsReplicaObjectListItemEx_Type.tp_basicsize = pytalloc_BaseObject_size();
   44989             : 
   44990        7484 :         drsuapi_DsGetNCChangesCtr1_Type.tp_base = BaseObject_Type;
   44991        7484 :         drsuapi_DsGetNCChangesCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   44992             : 
   44993        7484 :         drsuapi_DsReplicaLinkedAttribute_Type.tp_base = BaseObject_Type;
   44994        7484 :         drsuapi_DsReplicaLinkedAttribute_Type.tp_basicsize = pytalloc_BaseObject_size();
   44995             : 
   44996        7484 :         drsuapi_DsGetNCChangesCtr6_Type.tp_base = BaseObject_Type;
   44997        7484 :         drsuapi_DsGetNCChangesCtr6_Type.tp_basicsize = pytalloc_BaseObject_size();
   44998             : 
   44999        7484 :         drsuapi_DsGetNCChangesCtr1TS_Type.tp_base = BaseObject_Type;
   45000        7484 :         drsuapi_DsGetNCChangesCtr1TS_Type.tp_basicsize = pytalloc_BaseObject_size();
   45001             : 
   45002        7484 :         drsuapi_DsGetNCChangesCtr6TS_Type.tp_base = BaseObject_Type;
   45003        7484 :         drsuapi_DsGetNCChangesCtr6TS_Type.tp_basicsize = pytalloc_BaseObject_size();
   45004             : 
   45005        7484 :         drsuapi_DsGetNCChangesMSZIPCtr1_Type.tp_base = BaseObject_Type;
   45006        7484 :         drsuapi_DsGetNCChangesMSZIPCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45007             : 
   45008        7484 :         drsuapi_DsGetNCChangesMSZIPCtr6_Type.tp_base = BaseObject_Type;
   45009        7484 :         drsuapi_DsGetNCChangesMSZIPCtr6_Type.tp_basicsize = pytalloc_BaseObject_size();
   45010             : 
   45011        7484 :         drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type.tp_base = BaseObject_Type;
   45012        7484 :         drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45013             : 
   45014        7484 :         drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type.tp_base = BaseObject_Type;
   45015        7484 :         drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type.tp_basicsize = pytalloc_BaseObject_size();
   45016             : 
   45017        7484 :         drsuapi_DsGetNCChangesCompressedCtr_Type.tp_base = BaseObject_Type;
   45018        7484 :         drsuapi_DsGetNCChangesCompressedCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45019             : 
   45020        7484 :         drsuapi_DsGetNCChangesCtr2_Type.tp_base = BaseObject_Type;
   45021        7484 :         drsuapi_DsGetNCChangesCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45022             : 
   45023        7484 :         drsuapi_DsGetNCChangesCtr7_Type.tp_base = BaseObject_Type;
   45024        7484 :         drsuapi_DsGetNCChangesCtr7_Type.tp_basicsize = pytalloc_BaseObject_size();
   45025             : 
   45026        7484 :         drsuapi_DsGetNCChangesCtr_Type.tp_base = BaseObject_Type;
   45027        7484 :         drsuapi_DsGetNCChangesCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45028             : 
   45029        7484 :         drsuapi_DsReplicaUpdateRefsRequest1_Type.tp_base = BaseObject_Type;
   45030        7484 :         drsuapi_DsReplicaUpdateRefsRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45031             : 
   45032        7484 :         drsuapi_DsReplicaUpdateRefsRequest_Type.tp_base = BaseObject_Type;
   45033        7484 :         drsuapi_DsReplicaUpdateRefsRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45034             : 
   45035        7484 :         drsuapi_DsReplicaAddRequest1_Type.tp_base = BaseObject_Type;
   45036        7484 :         drsuapi_DsReplicaAddRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45037             : 
   45038        7484 :         drsuapi_DsReplicaAddRequest2_Type.tp_base = BaseObject_Type;
   45039        7484 :         drsuapi_DsReplicaAddRequest2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45040             : 
   45041        7484 :         drsuapi_DsReplicaAddRequest_Type.tp_base = BaseObject_Type;
   45042        7484 :         drsuapi_DsReplicaAddRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45043             : 
   45044        7484 :         drsuapi_DsReplicaDelRequest1_Type.tp_base = BaseObject_Type;
   45045        7484 :         drsuapi_DsReplicaDelRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45046             : 
   45047        7484 :         drsuapi_DsReplicaDelRequest_Type.tp_base = BaseObject_Type;
   45048        7484 :         drsuapi_DsReplicaDelRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45049             : 
   45050        7484 :         drsuapi_DsReplicaModRequest1_Type.tp_base = BaseObject_Type;
   45051        7484 :         drsuapi_DsReplicaModRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45052             : 
   45053        7484 :         drsuapi_DsReplicaModRequest_Type.tp_base = BaseObject_Type;
   45054        7484 :         drsuapi_DsReplicaModRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45055             : 
   45056        7484 :         drsuapi_DsGetMembershipsCtr1_Type.tp_base = BaseObject_Type;
   45057        7484 :         drsuapi_DsGetMembershipsCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45058             : 
   45059        7484 :         drsuapi_DsGetMembershipsCtr_Type.tp_base = BaseObject_Type;
   45060        7484 :         drsuapi_DsGetMembershipsCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45061             : 
   45062        7484 :         drsuapi_DsGetMembershipsRequest1_Type.tp_base = BaseObject_Type;
   45063        7484 :         drsuapi_DsGetMembershipsRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45064             : 
   45065        7484 :         drsuapi_DsGetMembershipsRequest_Type.tp_base = BaseObject_Type;
   45066        7484 :         drsuapi_DsGetMembershipsRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45067             : 
   45068        7484 :         drsuapi_DsGetNT4ChangeLogRequest1_Type.tp_base = BaseObject_Type;
   45069        7484 :         drsuapi_DsGetNT4ChangeLogRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45070             : 
   45071        7484 :         drsuapi_DsGetNT4ChangeLogRequest_Type.tp_base = BaseObject_Type;
   45072        7484 :         drsuapi_DsGetNT4ChangeLogRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45073             : 
   45074        7484 :         drsuapi_DsGetNT4ChangeLogInfo1_Type.tp_base = BaseObject_Type;
   45075        7484 :         drsuapi_DsGetNT4ChangeLogInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45076             : 
   45077        7484 :         drsuapi_DsGetNT4ChangeLogInfo_Type.tp_base = BaseObject_Type;
   45078        7484 :         drsuapi_DsGetNT4ChangeLogInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   45079             : 
   45080        7484 :         drsuapi_DsNameString_Type.tp_base = BaseObject_Type;
   45081        7484 :         drsuapi_DsNameString_Type.tp_basicsize = pytalloc_BaseObject_size();
   45082             : 
   45083        7484 :         drsuapi_DsNameRequest1_Type.tp_base = BaseObject_Type;
   45084        7484 :         drsuapi_DsNameRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45085             : 
   45086        7484 :         drsuapi_DsNameRequest_Type.tp_base = BaseObject_Type;
   45087        7484 :         drsuapi_DsNameRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45088             : 
   45089        7484 :         drsuapi_DsNameInfo1_Type.tp_base = BaseObject_Type;
   45090        7484 :         drsuapi_DsNameInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45091             : 
   45092        7484 :         drsuapi_DsNameCtr1_Type.tp_base = BaseObject_Type;
   45093        7484 :         drsuapi_DsNameCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45094             : 
   45095        7484 :         drsuapi_DsNameCtr_Type.tp_base = BaseObject_Type;
   45096        7484 :         drsuapi_DsNameCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45097             : 
   45098        7484 :         drsuapi_DsWriteAccountSpnRequest1_Type.tp_base = BaseObject_Type;
   45099        7484 :         drsuapi_DsWriteAccountSpnRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45100             : 
   45101        7484 :         drsuapi_DsWriteAccountSpnRequest_Type.tp_base = BaseObject_Type;
   45102        7484 :         drsuapi_DsWriteAccountSpnRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45103             : 
   45104        7484 :         drsuapi_DsWriteAccountSpnResult1_Type.tp_base = BaseObject_Type;
   45105        7484 :         drsuapi_DsWriteAccountSpnResult1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45106             : 
   45107        7484 :         drsuapi_DsWriteAccountSpnResult_Type.tp_base = BaseObject_Type;
   45108        7484 :         drsuapi_DsWriteAccountSpnResult_Type.tp_basicsize = pytalloc_BaseObject_size();
   45109             : 
   45110        7484 :         drsuapi_DsRemoveDSServerRequest1_Type.tp_base = BaseObject_Type;
   45111        7484 :         drsuapi_DsRemoveDSServerRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45112             : 
   45113        7484 :         drsuapi_DsRemoveDSServerRequest_Type.tp_base = BaseObject_Type;
   45114        7484 :         drsuapi_DsRemoveDSServerRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45115             : 
   45116        7484 :         drsuapi_DsRemoveDSServerResult1_Type.tp_base = BaseObject_Type;
   45117        7484 :         drsuapi_DsRemoveDSServerResult1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45118             : 
   45119        7484 :         drsuapi_DsRemoveDSServerResult_Type.tp_base = BaseObject_Type;
   45120        7484 :         drsuapi_DsRemoveDSServerResult_Type.tp_basicsize = pytalloc_BaseObject_size();
   45121             : 
   45122        7484 :         drsuapi_DsGetDCInfoRequest1_Type.tp_base = BaseObject_Type;
   45123        7484 :         drsuapi_DsGetDCInfoRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45124             : 
   45125        7484 :         drsuapi_DsGetDCInfoRequest_Type.tp_base = BaseObject_Type;
   45126        7484 :         drsuapi_DsGetDCInfoRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45127             : 
   45128        7484 :         drsuapi_DsGetDCInfo1_Type.tp_base = BaseObject_Type;
   45129        7484 :         drsuapi_DsGetDCInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45130             : 
   45131        7484 :         drsuapi_DsGetDCInfoCtr1_Type.tp_base = BaseObject_Type;
   45132        7484 :         drsuapi_DsGetDCInfoCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45133             : 
   45134        7484 :         drsuapi_DsGetDCInfo2_Type.tp_base = BaseObject_Type;
   45135        7484 :         drsuapi_DsGetDCInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45136             : 
   45137        7484 :         drsuapi_DsGetDCInfoCtr2_Type.tp_base = BaseObject_Type;
   45138        7484 :         drsuapi_DsGetDCInfoCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45139             : 
   45140        7484 :         drsuapi_DsGetDCInfo3_Type.tp_base = BaseObject_Type;
   45141        7484 :         drsuapi_DsGetDCInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
   45142             : 
   45143        7484 :         drsuapi_DsGetDCInfoCtr3_Type.tp_base = BaseObject_Type;
   45144        7484 :         drsuapi_DsGetDCInfoCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
   45145             : 
   45146        7484 :         drsuapi_DsGetDCConnection01_Type.tp_base = BaseObject_Type;
   45147        7484 :         drsuapi_DsGetDCConnection01_Type.tp_basicsize = pytalloc_BaseObject_size();
   45148             : 
   45149        7484 :         drsuapi_DsGetDCConnectionCtr01_Type.tp_base = BaseObject_Type;
   45150        7484 :         drsuapi_DsGetDCConnectionCtr01_Type.tp_basicsize = pytalloc_BaseObject_size();
   45151             : 
   45152        7484 :         drsuapi_DsGetDCInfoCtr_Type.tp_base = BaseObject_Type;
   45153        7484 :         drsuapi_DsGetDCInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45154             : 
   45155        7484 :         drsuapi_DsReplicaObjectListItem_Type.tp_base = BaseObject_Type;
   45156        7484 :         drsuapi_DsReplicaObjectListItem_Type.tp_basicsize = pytalloc_BaseObject_size();
   45157             : 
   45158        7484 :         drsuapi_DsAddEntryRequest2_Type.tp_base = BaseObject_Type;
   45159        7484 :         drsuapi_DsAddEntryRequest2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45160             : 
   45161        7484 :         drsuapi_SecBuffer_Type.tp_base = BaseObject_Type;
   45162        7484 :         drsuapi_SecBuffer_Type.tp_basicsize = pytalloc_BaseObject_size();
   45163             : 
   45164        7484 :         drsuapi_SecBufferDesc_Type.tp_base = BaseObject_Type;
   45165        7484 :         drsuapi_SecBufferDesc_Type.tp_basicsize = pytalloc_BaseObject_size();
   45166             : 
   45167        7484 :         drsuapi_DsAddEntryRequest3_Type.tp_base = BaseObject_Type;
   45168        7484 :         drsuapi_DsAddEntryRequest3_Type.tp_basicsize = pytalloc_BaseObject_size();
   45169             : 
   45170        7484 :         drsuapi_DsAddEntryRequest_Type.tp_base = BaseObject_Type;
   45171        7484 :         drsuapi_DsAddEntryRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45172             : 
   45173        7484 :         drsuapi_DsAddEntryErrorInfoX_Type.tp_base = BaseObject_Type;
   45174        7484 :         drsuapi_DsAddEntryErrorInfoX_Type.tp_basicsize = pytalloc_BaseObject_size();
   45175             : 
   45176        7484 :         drsuapi_DsAddEntry_AttrErr_V1_Type.tp_base = BaseObject_Type;
   45177        7484 :         drsuapi_DsAddEntry_AttrErr_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45178             : 
   45179        7484 :         drsuapi_DsAddEntry_AttrErrListItem_V1_Type.tp_base = BaseObject_Type;
   45180        7484 :         drsuapi_DsAddEntry_AttrErrListItem_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45181             : 
   45182        7484 :         drsuapi_DsAddEntryErrorInfo_Attr_V1_Type.tp_base = BaseObject_Type;
   45183        7484 :         drsuapi_DsAddEntryErrorInfo_Attr_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45184             : 
   45185        7484 :         drsuapi_DsAddEntryErrorInfo_Name_V1_Type.tp_base = BaseObject_Type;
   45186        7484 :         drsuapi_DsAddEntryErrorInfo_Name_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45187             : 
   45188        7484 :         drsuapi_NameResOp_V1_Type.tp_base = BaseObject_Type;
   45189        7484 :         drsuapi_NameResOp_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45190             : 
   45191        7484 :         drsuapi_DsaAddressListItem_V1_Type.tp_base = BaseObject_Type;
   45192        7484 :         drsuapi_DsaAddressListItem_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45193             : 
   45194        7484 :         drsuapi_DsAddEntry_RefErrListItem_V1_Type.tp_base = BaseObject_Type;
   45195        7484 :         drsuapi_DsAddEntry_RefErrListItem_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45196             : 
   45197        7484 :         drsuapi_DsAddEntryErrorInfo_Referr_V1_Type.tp_base = BaseObject_Type;
   45198        7484 :         drsuapi_DsAddEntryErrorInfo_Referr_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45199             : 
   45200        7484 :         drsuapi_DsAddEntryErrorInfo_Type.tp_base = BaseObject_Type;
   45201        7484 :         drsuapi_DsAddEntryErrorInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   45202             : 
   45203        7484 :         drsuapi_DsAddEntry_ErrData_V1_Type.tp_base = BaseObject_Type;
   45204        7484 :         drsuapi_DsAddEntry_ErrData_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45205             : 
   45206        7484 :         drsuapi_DsAddEntry_ErrData_Type.tp_base = BaseObject_Type;
   45207        7484 :         drsuapi_DsAddEntry_ErrData_Type.tp_basicsize = pytalloc_BaseObject_size();
   45208             : 
   45209        7484 :         drsuapi_DsReplicaObjectIdentifier2_Type.tp_base = BaseObject_Type;
   45210        7484 :         drsuapi_DsReplicaObjectIdentifier2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45211             : 
   45212        7484 :         drsuapi_DsAddEntryCtr2_Type.tp_base = BaseObject_Type;
   45213        7484 :         drsuapi_DsAddEntryCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45214             : 
   45215        7484 :         drsuapi_DsAddEntryCtr3_Type.tp_base = BaseObject_Type;
   45216        7484 :         drsuapi_DsAddEntryCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
   45217             : 
   45218        7484 :         drsuapi_DsAddEntryCtr_Type.tp_base = BaseObject_Type;
   45219        7484 :         drsuapi_DsAddEntryCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45220             : 
   45221        7484 :         drsuapi_DsExecuteKCC1_Type.tp_base = BaseObject_Type;
   45222        7484 :         drsuapi_DsExecuteKCC1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45223             : 
   45224        7484 :         drsuapi_DsExecuteKCCRequest_Type.tp_base = BaseObject_Type;
   45225        7484 :         drsuapi_DsExecuteKCCRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45226             : 
   45227        7484 :         drsuapi_DsReplicaGetInfoRequest1_Type.tp_base = BaseObject_Type;
   45228        7484 :         drsuapi_DsReplicaGetInfoRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45229             : 
   45230        7484 :         drsuapi_DsReplicaGetInfoRequest2_Type.tp_base = BaseObject_Type;
   45231        7484 :         drsuapi_DsReplicaGetInfoRequest2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45232             : 
   45233        7484 :         drsuapi_DsReplicaGetInfoRequest_Type.tp_base = BaseObject_Type;
   45234        7484 :         drsuapi_DsReplicaGetInfoRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45235             : 
   45236        7484 :         drsuapi_DsReplicaNeighbour_Type.tp_base = BaseObject_Type;
   45237        7484 :         drsuapi_DsReplicaNeighbour_Type.tp_basicsize = pytalloc_BaseObject_size();
   45238             : 
   45239        7484 :         drsuapi_DsReplicaNeighbourCtr_Type.tp_base = BaseObject_Type;
   45240        7484 :         drsuapi_DsReplicaNeighbourCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45241             : 
   45242        7484 :         drsuapi_DsReplicaCursorCtr_Type.tp_base = BaseObject_Type;
   45243        7484 :         drsuapi_DsReplicaCursorCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45244             : 
   45245        7484 :         drsuapi_DsReplicaObjMetaData_Type.tp_base = BaseObject_Type;
   45246        7484 :         drsuapi_DsReplicaObjMetaData_Type.tp_basicsize = pytalloc_BaseObject_size();
   45247             : 
   45248        7484 :         drsuapi_DsReplicaObjMetaDataCtr_Type.tp_base = BaseObject_Type;
   45249        7484 :         drsuapi_DsReplicaObjMetaDataCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45250             : 
   45251        7484 :         drsuapi_DsReplicaKccDsaFailure_Type.tp_base = BaseObject_Type;
   45252        7484 :         drsuapi_DsReplicaKccDsaFailure_Type.tp_basicsize = pytalloc_BaseObject_size();
   45253             : 
   45254        7484 :         drsuapi_DsReplicaKccDsaFailuresCtr_Type.tp_base = BaseObject_Type;
   45255        7484 :         drsuapi_DsReplicaKccDsaFailuresCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45256             : 
   45257        7484 :         drsuapi_DsReplicaOp_Type.tp_base = BaseObject_Type;
   45258        7484 :         drsuapi_DsReplicaOp_Type.tp_basicsize = pytalloc_BaseObject_size();
   45259             : 
   45260        7484 :         drsuapi_DsReplicaOpCtr_Type.tp_base = BaseObject_Type;
   45261        7484 :         drsuapi_DsReplicaOpCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45262             : 
   45263        7484 :         drsuapi_DsReplicaAttrValMetaData_Type.tp_base = BaseObject_Type;
   45264        7484 :         drsuapi_DsReplicaAttrValMetaData_Type.tp_basicsize = pytalloc_BaseObject_size();
   45265             : 
   45266        7484 :         drsuapi_DsReplicaAttrValMetaDataCtr_Type.tp_base = BaseObject_Type;
   45267        7484 :         drsuapi_DsReplicaAttrValMetaDataCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45268             : 
   45269        7484 :         drsuapi_DsReplicaCursor2Ctr_Type.tp_base = BaseObject_Type;
   45270        7484 :         drsuapi_DsReplicaCursor2Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45271             : 
   45272        7484 :         drsuapi_DsReplicaCursor3_Type.tp_base = BaseObject_Type;
   45273        7484 :         drsuapi_DsReplicaCursor3_Type.tp_basicsize = pytalloc_BaseObject_size();
   45274             : 
   45275        7484 :         drsuapi_DsReplicaCursor3Ctr_Type.tp_base = BaseObject_Type;
   45276        7484 :         drsuapi_DsReplicaCursor3Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45277             : 
   45278        7484 :         drsuapi_DsReplicaObjMetaData2_Type.tp_base = BaseObject_Type;
   45279        7484 :         drsuapi_DsReplicaObjMetaData2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45280             : 
   45281        7484 :         drsuapi_DsReplicaObjMetaData2Ctr_Type.tp_base = BaseObject_Type;
   45282        7484 :         drsuapi_DsReplicaObjMetaData2Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45283             : 
   45284        7484 :         drsuapi_DsReplicaAttrValMetaData2_Type.tp_base = BaseObject_Type;
   45285        7484 :         drsuapi_DsReplicaAttrValMetaData2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45286             : 
   45287        7484 :         drsuapi_DsReplicaAttrValMetaData2Ctr_Type.tp_base = BaseObject_Type;
   45288        7484 :         drsuapi_DsReplicaAttrValMetaData2Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45289             : 
   45290        7484 :         drsuapi_DsReplicaConnection04_Type.tp_base = BaseObject_Type;
   45291        7484 :         drsuapi_DsReplicaConnection04_Type.tp_basicsize = pytalloc_BaseObject_size();
   45292             : 
   45293        7484 :         drsuapi_DsReplicaConnection04Ctr_Type.tp_base = BaseObject_Type;
   45294        7484 :         drsuapi_DsReplicaConnection04Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45295             : 
   45296        7484 :         drsuapi_DsReplica06_Type.tp_base = BaseObject_Type;
   45297        7484 :         drsuapi_DsReplica06_Type.tp_basicsize = pytalloc_BaseObject_size();
   45298             : 
   45299        7484 :         drsuapi_DsReplica06Ctr_Type.tp_base = BaseObject_Type;
   45300        7484 :         drsuapi_DsReplica06Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45301             : 
   45302        7484 :         drsuapi_DsReplicaInfo_Type.tp_base = BaseObject_Type;
   45303        7484 :         drsuapi_DsReplicaInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   45304             : 
   45305        7484 :         drsuapi_DsGetMemberships2Ctr1_Type.tp_base = BaseObject_Type;
   45306        7484 :         drsuapi_DsGetMemberships2Ctr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45307             : 
   45308        7484 :         drsuapi_DsGetMemberships2Ctr_Type.tp_base = BaseObject_Type;
   45309        7484 :         drsuapi_DsGetMemberships2Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45310             : 
   45311        7484 :         drsuapi_DsGetMemberships2Request1_Type.tp_base = BaseObject_Type;
   45312        7484 :         drsuapi_DsGetMemberships2Request1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45313             : 
   45314        7484 :         drsuapi_DsGetMemberships2Request_Type.tp_base = BaseObject_Type;
   45315        7484 :         drsuapi_DsGetMemberships2Request_Type.tp_basicsize = pytalloc_BaseObject_size();
   45316             : 
   45317        7484 :         drsuapi_DsSiteCostInfo_Type.tp_base = BaseObject_Type;
   45318        7484 :         drsuapi_DsSiteCostInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   45319             : 
   45320        7484 :         drsuapi_QuerySitesByCostCtr1_Type.tp_base = BaseObject_Type;
   45321        7484 :         drsuapi_QuerySitesByCostCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45322             : 
   45323        7484 :         drsuapi_QuerySitesByCostCtr_Type.tp_base = BaseObject_Type;
   45324        7484 :         drsuapi_QuerySitesByCostCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
   45325             : 
   45326        7484 :         drsuapi_QuerySitesByCostRequest1_Type.tp_base = BaseObject_Type;
   45327        7484 :         drsuapi_QuerySitesByCostRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
   45328             : 
   45329        7484 :         drsuapi_QuerySitesByCostRequest_Type.tp_base = BaseObject_Type;
   45330        7484 :         drsuapi_QuerySitesByCostRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
   45331             : 
   45332        7484 :         drsuapi_DsBind_Type.tp_base = BaseObject_Type;
   45333        7484 :         drsuapi_DsBind_Type.tp_basicsize = pytalloc_BaseObject_size();
   45334             : 
   45335        7484 :         drsuapi_DsUnbind_Type.tp_base = BaseObject_Type;
   45336        7484 :         drsuapi_DsUnbind_Type.tp_basicsize = pytalloc_BaseObject_size();
   45337             : 
   45338        7484 :         drsuapi_DsReplicaSync_Type.tp_base = BaseObject_Type;
   45339        7484 :         drsuapi_DsReplicaSync_Type.tp_basicsize = pytalloc_BaseObject_size();
   45340             : 
   45341        7484 :         drsuapi_DsGetNCChanges_Type.tp_base = BaseObject_Type;
   45342        7484 :         drsuapi_DsGetNCChanges_Type.tp_basicsize = pytalloc_BaseObject_size();
   45343             : 
   45344        7484 :         drsuapi_DsReplicaUpdateRefs_Type.tp_base = BaseObject_Type;
   45345        7484 :         drsuapi_DsReplicaUpdateRefs_Type.tp_basicsize = pytalloc_BaseObject_size();
   45346             : 
   45347        7484 :         drsuapi_DsReplicaAdd_Type.tp_base = BaseObject_Type;
   45348        7484 :         drsuapi_DsReplicaAdd_Type.tp_basicsize = pytalloc_BaseObject_size();
   45349             : 
   45350        7484 :         drsuapi_DsReplicaDel_Type.tp_base = BaseObject_Type;
   45351        7484 :         drsuapi_DsReplicaDel_Type.tp_basicsize = pytalloc_BaseObject_size();
   45352             : 
   45353        7484 :         drsuapi_DsReplicaMod_Type.tp_base = BaseObject_Type;
   45354        7484 :         drsuapi_DsReplicaMod_Type.tp_basicsize = pytalloc_BaseObject_size();
   45355             : 
   45356        7484 :         drsuapi_DsGetMemberships_Type.tp_base = BaseObject_Type;
   45357        7484 :         drsuapi_DsGetMemberships_Type.tp_basicsize = pytalloc_BaseObject_size();
   45358             : 
   45359        7484 :         drsuapi_DsGetNT4ChangeLog_Type.tp_base = BaseObject_Type;
   45360        7484 :         drsuapi_DsGetNT4ChangeLog_Type.tp_basicsize = pytalloc_BaseObject_size();
   45361             : 
   45362        7484 :         drsuapi_DsCrackNames_Type.tp_base = BaseObject_Type;
   45363        7484 :         drsuapi_DsCrackNames_Type.tp_basicsize = pytalloc_BaseObject_size();
   45364             : 
   45365        7484 :         drsuapi_DsWriteAccountSpn_Type.tp_base = BaseObject_Type;
   45366        7484 :         drsuapi_DsWriteAccountSpn_Type.tp_basicsize = pytalloc_BaseObject_size();
   45367             : 
   45368        7484 :         drsuapi_DsRemoveDSServer_Type.tp_base = BaseObject_Type;
   45369        7484 :         drsuapi_DsRemoveDSServer_Type.tp_basicsize = pytalloc_BaseObject_size();
   45370             : 
   45371        7484 :         drsuapi_DsGetDomainControllerInfo_Type.tp_base = BaseObject_Type;
   45372        7484 :         drsuapi_DsGetDomainControllerInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   45373             : 
   45374        7484 :         drsuapi_DsAddEntry_Type.tp_base = BaseObject_Type;
   45375        7484 :         drsuapi_DsAddEntry_Type.tp_basicsize = pytalloc_BaseObject_size();
   45376             : 
   45377        7484 :         drsuapi_DsExecuteKCC_Type.tp_base = BaseObject_Type;
   45378        7484 :         drsuapi_DsExecuteKCC_Type.tp_basicsize = pytalloc_BaseObject_size();
   45379             : 
   45380        7484 :         drsuapi_DsReplicaGetInfo_Type.tp_base = BaseObject_Type;
   45381        7484 :         drsuapi_DsReplicaGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
   45382             : 
   45383        7484 :         drsuapi_DsGetMemberships2_Type.tp_base = BaseObject_Type;
   45384        7484 :         drsuapi_DsGetMemberships2_Type.tp_basicsize = pytalloc_BaseObject_size();
   45385             : 
   45386        7484 :         drsuapi_QuerySitesByCost_Type.tp_base = BaseObject_Type;
   45387        7484 :         drsuapi_QuerySitesByCost_Type.tp_basicsize = pytalloc_BaseObject_size();
   45388             : 
   45389        7484 :         drsuapi_InterfaceType.tp_base = ClientConnection_Type;
   45390             : 
   45391        7484 :         drsuapi_SyntaxType.tp_base = ndr_syntax_id_Type;
   45392        7484 :         drsuapi_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
   45393             : 
   45394        7484 :         if (PyType_Ready(&drsuapi_DsBindInfo24_Type) < 0)
   45395           0 :                 goto out;
   45396        7484 :         if (PyType_Ready(&drsuapi_DsBindInfo28_Type) < 0)
   45397           0 :                 goto out;
   45398        7484 :         if (PyType_Ready(&drsuapi_DsBindInfo32_Type) < 0)
   45399           0 :                 goto out;
   45400        7484 :         if (PyType_Ready(&drsuapi_DsBindInfo48_Type) < 0)
   45401           0 :                 goto out;
   45402        7484 :         if (PyType_Ready(&drsuapi_DsBindInfo52_Type) < 0)
   45403           0 :                 goto out;
   45404        7484 :         if (PyType_Ready(&drsuapi_DsBindInfoFallBack_Type) < 0)
   45405           0 :                 goto out;
   45406        7484 :         if (PyType_Ready(&drsuapi_DsBindInfo_Type) < 0)
   45407           0 :                 goto out;
   45408        7484 :         if (PyType_Ready(&drsuapi_DsBindInfoCtr_Type) < 0)
   45409           0 :                 goto out;
   45410        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier_Type) < 0)
   45411           0 :                 goto out;
   45412        7484 :         if (PyType_Ready(&drsuapi_DsReplicaSyncRequest1_Type) < 0)
   45413           0 :                 goto out;
   45414        7484 :         if (PyType_Ready(&drsuapi_DsReplicaSyncRequest_Type) < 0)
   45415           0 :                 goto out;
   45416        7484 :         if (PyType_Ready(&drsuapi_DsReplicaHighWaterMark_Type) < 0)
   45417           0 :                 goto out;
   45418        7484 :         if (PyType_Ready(&drsuapi_DsReplicaCursor_Type) < 0)
   45419           0 :                 goto out;
   45420        7484 :         if (PyType_Ready(&drsuapi_DsReplicaCursorCtrEx_Type) < 0)
   45421           0 :                 goto out;
   45422        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesRequest5_Type) < 0)
   45423           0 :                 goto out;
   45424        7484 :         if (PyType_Ready(&drsuapi_DsReplicaOID_Type) < 0)
   45425           0 :                 goto out;
   45426        7484 :         if (PyType_Ready(&drsuapi_DsReplicaOIDMapping_Type) < 0)
   45427           0 :                 goto out;
   45428        7484 :         if (PyType_Ready(&drsuapi_DsReplicaOIDMapping_Ctr_Type) < 0)
   45429           0 :                 goto out;
   45430        7484 :         if (PyType_Ready(&drsuapi_DsPartialAttributeSet_Type) < 0)
   45431           0 :                 goto out;
   45432        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesRequest8_Type) < 0)
   45433           0 :                 goto out;
   45434        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesRequest10_Type) < 0)
   45435           0 :                 goto out;
   45436        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesRequest_Type) < 0)
   45437           0 :                 goto out;
   45438        7484 :         if (PyType_Ready(&drsuapi_DsReplicaCursor2_Type) < 0)
   45439           0 :                 goto out;
   45440        7484 :         if (PyType_Ready(&drsuapi_DsReplicaCursor2CtrEx_Type) < 0)
   45441           0 :                 goto out;
   45442        7484 :         if (PyType_Ready(&drsuapi_DsAttributeValue_Type) < 0)
   45443           0 :                 goto out;
   45444        7484 :         if (PyType_Ready(&drsuapi_DsAttributeValueCtr_Type) < 0)
   45445           0 :                 goto out;
   45446        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier3_Type) < 0)
   45447           0 :                 goto out;
   45448        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier3Binary_Type) < 0)
   45449           0 :                 goto out;
   45450        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAttribute_Type) < 0)
   45451           0 :                 goto out;
   45452        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAttributeCtr_Type) < 0)
   45453           0 :                 goto out;
   45454        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObject_Type) < 0)
   45455           0 :                 goto out;
   45456        7484 :         if (PyType_Ready(&drsuapi_DsReplicaMetaData_Type) < 0)
   45457           0 :                 goto out;
   45458        7484 :         if (PyType_Ready(&drsuapi_DsReplicaMetaDataCtr_Type) < 0)
   45459           0 :                 goto out;
   45460        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjectListItemEx_Type) < 0)
   45461           0 :                 goto out;
   45462        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesCtr1_Type) < 0)
   45463           0 :                 goto out;
   45464        7484 :         if (PyType_Ready(&drsuapi_DsReplicaLinkedAttribute_Type) < 0)
   45465           0 :                 goto out;
   45466        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesCtr6_Type) < 0)
   45467           0 :                 goto out;
   45468        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesCtr1TS_Type) < 0)
   45469           0 :                 goto out;
   45470        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesCtr6TS_Type) < 0)
   45471           0 :                 goto out;
   45472        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesMSZIPCtr1_Type) < 0)
   45473           0 :                 goto out;
   45474        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesMSZIPCtr6_Type) < 0)
   45475           0 :                 goto out;
   45476        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type) < 0)
   45477           0 :                 goto out;
   45478        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type) < 0)
   45479           0 :                 goto out;
   45480        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesCompressedCtr_Type) < 0)
   45481           0 :                 goto out;
   45482        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesCtr2_Type) < 0)
   45483           0 :                 goto out;
   45484        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesCtr7_Type) < 0)
   45485           0 :                 goto out;
   45486        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChangesCtr_Type) < 0)
   45487           0 :                 goto out;
   45488        7484 :         if (PyType_Ready(&drsuapi_DsReplicaUpdateRefsRequest1_Type) < 0)
   45489           0 :                 goto out;
   45490        7484 :         if (PyType_Ready(&drsuapi_DsReplicaUpdateRefsRequest_Type) < 0)
   45491           0 :                 goto out;
   45492        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAddRequest1_Type) < 0)
   45493           0 :                 goto out;
   45494        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAddRequest2_Type) < 0)
   45495           0 :                 goto out;
   45496        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAddRequest_Type) < 0)
   45497           0 :                 goto out;
   45498        7484 :         if (PyType_Ready(&drsuapi_DsReplicaDelRequest1_Type) < 0)
   45499           0 :                 goto out;
   45500        7484 :         if (PyType_Ready(&drsuapi_DsReplicaDelRequest_Type) < 0)
   45501           0 :                 goto out;
   45502        7484 :         if (PyType_Ready(&drsuapi_DsReplicaModRequest1_Type) < 0)
   45503           0 :                 goto out;
   45504        7484 :         if (PyType_Ready(&drsuapi_DsReplicaModRequest_Type) < 0)
   45505           0 :                 goto out;
   45506        7484 :         if (PyType_Ready(&drsuapi_DsGetMembershipsCtr1_Type) < 0)
   45507           0 :                 goto out;
   45508        7484 :         if (PyType_Ready(&drsuapi_DsGetMembershipsCtr_Type) < 0)
   45509           0 :                 goto out;
   45510        7484 :         if (PyType_Ready(&drsuapi_DsGetMembershipsRequest1_Type) < 0)
   45511           0 :                 goto out;
   45512        7484 :         if (PyType_Ready(&drsuapi_DsGetMembershipsRequest_Type) < 0)
   45513           0 :                 goto out;
   45514        7484 :         if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogRequest1_Type) < 0)
   45515           0 :                 goto out;
   45516        7484 :         if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogRequest_Type) < 0)
   45517           0 :                 goto out;
   45518        7484 :         if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogInfo1_Type) < 0)
   45519           0 :                 goto out;
   45520        7484 :         if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogInfo_Type) < 0)
   45521           0 :                 goto out;
   45522        7484 :         if (PyType_Ready(&drsuapi_DsNameString_Type) < 0)
   45523           0 :                 goto out;
   45524        7484 :         if (PyType_Ready(&drsuapi_DsNameRequest1_Type) < 0)
   45525           0 :                 goto out;
   45526        7484 :         if (PyType_Ready(&drsuapi_DsNameRequest_Type) < 0)
   45527           0 :                 goto out;
   45528        7484 :         if (PyType_Ready(&drsuapi_DsNameInfo1_Type) < 0)
   45529           0 :                 goto out;
   45530        7484 :         if (PyType_Ready(&drsuapi_DsNameCtr1_Type) < 0)
   45531           0 :                 goto out;
   45532        7484 :         if (PyType_Ready(&drsuapi_DsNameCtr_Type) < 0)
   45533           0 :                 goto out;
   45534        7484 :         if (PyType_Ready(&drsuapi_DsWriteAccountSpnRequest1_Type) < 0)
   45535           0 :                 goto out;
   45536        7484 :         if (PyType_Ready(&drsuapi_DsWriteAccountSpnRequest_Type) < 0)
   45537           0 :                 goto out;
   45538        7484 :         if (PyType_Ready(&drsuapi_DsWriteAccountSpnResult1_Type) < 0)
   45539           0 :                 goto out;
   45540        7484 :         if (PyType_Ready(&drsuapi_DsWriteAccountSpnResult_Type) < 0)
   45541           0 :                 goto out;
   45542        7484 :         if (PyType_Ready(&drsuapi_DsRemoveDSServerRequest1_Type) < 0)
   45543           0 :                 goto out;
   45544        7484 :         if (PyType_Ready(&drsuapi_DsRemoveDSServerRequest_Type) < 0)
   45545           0 :                 goto out;
   45546        7484 :         if (PyType_Ready(&drsuapi_DsRemoveDSServerResult1_Type) < 0)
   45547           0 :                 goto out;
   45548        7484 :         if (PyType_Ready(&drsuapi_DsRemoveDSServerResult_Type) < 0)
   45549           0 :                 goto out;
   45550        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfoRequest1_Type) < 0)
   45551           0 :                 goto out;
   45552        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfoRequest_Type) < 0)
   45553           0 :                 goto out;
   45554        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfo1_Type) < 0)
   45555           0 :                 goto out;
   45556        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfoCtr1_Type) < 0)
   45557           0 :                 goto out;
   45558        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfo2_Type) < 0)
   45559           0 :                 goto out;
   45560        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfoCtr2_Type) < 0)
   45561           0 :                 goto out;
   45562        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfo3_Type) < 0)
   45563           0 :                 goto out;
   45564        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfoCtr3_Type) < 0)
   45565           0 :                 goto out;
   45566        7484 :         if (PyType_Ready(&drsuapi_DsGetDCConnection01_Type) < 0)
   45567           0 :                 goto out;
   45568        7484 :         if (PyType_Ready(&drsuapi_DsGetDCConnectionCtr01_Type) < 0)
   45569           0 :                 goto out;
   45570        7484 :         if (PyType_Ready(&drsuapi_DsGetDCInfoCtr_Type) < 0)
   45571           0 :                 goto out;
   45572        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjectListItem_Type) < 0)
   45573           0 :                 goto out;
   45574        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryRequest2_Type) < 0)
   45575           0 :                 goto out;
   45576        7484 :         if (PyType_Ready(&drsuapi_SecBuffer_Type) < 0)
   45577           0 :                 goto out;
   45578        7484 :         if (PyType_Ready(&drsuapi_SecBufferDesc_Type) < 0)
   45579           0 :                 goto out;
   45580        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryRequest3_Type) < 0)
   45581           0 :                 goto out;
   45582        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryRequest_Type) < 0)
   45583           0 :                 goto out;
   45584        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryErrorInfoX_Type) < 0)
   45585           0 :                 goto out;
   45586        7484 :         if (PyType_Ready(&drsuapi_DsAddEntry_AttrErr_V1_Type) < 0)
   45587           0 :                 goto out;
   45588        7484 :         if (PyType_Ready(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type) < 0)
   45589           0 :                 goto out;
   45590        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type) < 0)
   45591           0 :                 goto out;
   45592        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type) < 0)
   45593           0 :                 goto out;
   45594        7484 :         if (PyType_Ready(&drsuapi_NameResOp_V1_Type) < 0)
   45595           0 :                 goto out;
   45596        7484 :         if (PyType_Ready(&drsuapi_DsaAddressListItem_V1_Type) < 0)
   45597           0 :                 goto out;
   45598        7484 :         if (PyType_Ready(&drsuapi_DsAddEntry_RefErrListItem_V1_Type) < 0)
   45599           0 :                 goto out;
   45600        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type) < 0)
   45601           0 :                 goto out;
   45602        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Type) < 0)
   45603           0 :                 goto out;
   45604        7484 :         if (PyType_Ready(&drsuapi_DsAddEntry_ErrData_V1_Type) < 0)
   45605           0 :                 goto out;
   45606        7484 :         if (PyType_Ready(&drsuapi_DsAddEntry_ErrData_Type) < 0)
   45607           0 :                 goto out;
   45608        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier2_Type) < 0)
   45609           0 :                 goto out;
   45610        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryCtr2_Type) < 0)
   45611           0 :                 goto out;
   45612        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryCtr3_Type) < 0)
   45613           0 :                 goto out;
   45614        7484 :         if (PyType_Ready(&drsuapi_DsAddEntryCtr_Type) < 0)
   45615           0 :                 goto out;
   45616        7484 :         if (PyType_Ready(&drsuapi_DsExecuteKCC1_Type) < 0)
   45617           0 :                 goto out;
   45618        7484 :         if (PyType_Ready(&drsuapi_DsExecuteKCCRequest_Type) < 0)
   45619           0 :                 goto out;
   45620        7484 :         if (PyType_Ready(&drsuapi_DsReplicaGetInfoRequest1_Type) < 0)
   45621           0 :                 goto out;
   45622        7484 :         if (PyType_Ready(&drsuapi_DsReplicaGetInfoRequest2_Type) < 0)
   45623           0 :                 goto out;
   45624        7484 :         if (PyType_Ready(&drsuapi_DsReplicaGetInfoRequest_Type) < 0)
   45625           0 :                 goto out;
   45626        7484 :         if (PyType_Ready(&drsuapi_DsReplicaNeighbour_Type) < 0)
   45627           0 :                 goto out;
   45628        7484 :         if (PyType_Ready(&drsuapi_DsReplicaNeighbourCtr_Type) < 0)
   45629           0 :                 goto out;
   45630        7484 :         if (PyType_Ready(&drsuapi_DsReplicaCursorCtr_Type) < 0)
   45631           0 :                 goto out;
   45632        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjMetaData_Type) < 0)
   45633           0 :                 goto out;
   45634        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjMetaDataCtr_Type) < 0)
   45635           0 :                 goto out;
   45636        7484 :         if (PyType_Ready(&drsuapi_DsReplicaKccDsaFailure_Type) < 0)
   45637           0 :                 goto out;
   45638        7484 :         if (PyType_Ready(&drsuapi_DsReplicaKccDsaFailuresCtr_Type) < 0)
   45639           0 :                 goto out;
   45640        7484 :         if (PyType_Ready(&drsuapi_DsReplicaOp_Type) < 0)
   45641           0 :                 goto out;
   45642        7484 :         if (PyType_Ready(&drsuapi_DsReplicaOpCtr_Type) < 0)
   45643           0 :                 goto out;
   45644        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData_Type) < 0)
   45645           0 :                 goto out;
   45646        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaDataCtr_Type) < 0)
   45647           0 :                 goto out;
   45648        7484 :         if (PyType_Ready(&drsuapi_DsReplicaCursor2Ctr_Type) < 0)
   45649           0 :                 goto out;
   45650        7484 :         if (PyType_Ready(&drsuapi_DsReplicaCursor3_Type) < 0)
   45651           0 :                 goto out;
   45652        7484 :         if (PyType_Ready(&drsuapi_DsReplicaCursor3Ctr_Type) < 0)
   45653           0 :                 goto out;
   45654        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjMetaData2_Type) < 0)
   45655           0 :                 goto out;
   45656        7484 :         if (PyType_Ready(&drsuapi_DsReplicaObjMetaData2Ctr_Type) < 0)
   45657           0 :                 goto out;
   45658        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData2_Type) < 0)
   45659           0 :                 goto out;
   45660        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type) < 0)
   45661           0 :                 goto out;
   45662        7484 :         if (PyType_Ready(&drsuapi_DsReplicaConnection04_Type) < 0)
   45663           0 :                 goto out;
   45664        7484 :         if (PyType_Ready(&drsuapi_DsReplicaConnection04Ctr_Type) < 0)
   45665           0 :                 goto out;
   45666        7484 :         if (PyType_Ready(&drsuapi_DsReplica06_Type) < 0)
   45667           0 :                 goto out;
   45668        7484 :         if (PyType_Ready(&drsuapi_DsReplica06Ctr_Type) < 0)
   45669           0 :                 goto out;
   45670        7484 :         if (PyType_Ready(&drsuapi_DsReplicaInfo_Type) < 0)
   45671           0 :                 goto out;
   45672        7484 :         if (PyType_Ready(&drsuapi_DsGetMemberships2Ctr1_Type) < 0)
   45673           0 :                 goto out;
   45674        7484 :         if (PyType_Ready(&drsuapi_DsGetMemberships2Ctr_Type) < 0)
   45675           0 :                 goto out;
   45676        7484 :         if (PyType_Ready(&drsuapi_DsGetMemberships2Request1_Type) < 0)
   45677           0 :                 goto out;
   45678        7484 :         if (PyType_Ready(&drsuapi_DsGetMemberships2Request_Type) < 0)
   45679           0 :                 goto out;
   45680        7484 :         if (PyType_Ready(&drsuapi_DsSiteCostInfo_Type) < 0)
   45681           0 :                 goto out;
   45682        7484 :         if (PyType_Ready(&drsuapi_QuerySitesByCostCtr1_Type) < 0)
   45683           0 :                 goto out;
   45684        7484 :         if (PyType_Ready(&drsuapi_QuerySitesByCostCtr_Type) < 0)
   45685           0 :                 goto out;
   45686        7484 :         if (PyType_Ready(&drsuapi_QuerySitesByCostRequest1_Type) < 0)
   45687           0 :                 goto out;
   45688        7484 :         if (PyType_Ready(&drsuapi_QuerySitesByCostRequest_Type) < 0)
   45689           0 :                 goto out;
   45690        7484 :         if (PyType_Ready(&drsuapi_DsBind_Type) < 0)
   45691           0 :                 goto out;
   45692        7484 :         if (PyType_Ready(&drsuapi_DsUnbind_Type) < 0)
   45693           0 :                 goto out;
   45694        7484 :         if (PyType_Ready(&drsuapi_DsReplicaSync_Type) < 0)
   45695           0 :                 goto out;
   45696        7484 :         if (PyType_Ready(&drsuapi_DsGetNCChanges_Type) < 0)
   45697           0 :                 goto out;
   45698        7484 :         if (PyType_Ready(&drsuapi_DsReplicaUpdateRefs_Type) < 0)
   45699           0 :                 goto out;
   45700        7484 :         if (PyType_Ready(&drsuapi_DsReplicaAdd_Type) < 0)
   45701           0 :                 goto out;
   45702        7484 :         if (PyType_Ready(&drsuapi_DsReplicaDel_Type) < 0)
   45703           0 :                 goto out;
   45704        7484 :         if (PyType_Ready(&drsuapi_DsReplicaMod_Type) < 0)
   45705           0 :                 goto out;
   45706        7484 :         if (PyType_Ready(&drsuapi_DsGetMemberships_Type) < 0)
   45707           0 :                 goto out;
   45708        7484 :         if (PyType_Ready(&drsuapi_DsGetNT4ChangeLog_Type) < 0)
   45709           0 :                 goto out;
   45710        7484 :         if (PyType_Ready(&drsuapi_DsCrackNames_Type) < 0)
   45711           0 :                 goto out;
   45712        7484 :         if (PyType_Ready(&drsuapi_DsWriteAccountSpn_Type) < 0)
   45713           0 :                 goto out;
   45714        7484 :         if (PyType_Ready(&drsuapi_DsRemoveDSServer_Type) < 0)
   45715           0 :                 goto out;
   45716        7484 :         if (PyType_Ready(&drsuapi_DsGetDomainControllerInfo_Type) < 0)
   45717           0 :                 goto out;
   45718        7484 :         if (PyType_Ready(&drsuapi_DsAddEntry_Type) < 0)
   45719           0 :                 goto out;
   45720        7484 :         if (PyType_Ready(&drsuapi_DsExecuteKCC_Type) < 0)
   45721           0 :                 goto out;
   45722        7484 :         if (PyType_Ready(&drsuapi_DsReplicaGetInfo_Type) < 0)
   45723           0 :                 goto out;
   45724        7484 :         if (PyType_Ready(&drsuapi_DsGetMemberships2_Type) < 0)
   45725           0 :                 goto out;
   45726        7484 :         if (PyType_Ready(&drsuapi_QuerySitesByCost_Type) < 0)
   45727           0 :                 goto out;
   45728        7484 :         if (PyType_Ready(&drsuapi_InterfaceType) < 0)
   45729           0 :                 goto out;
   45730        7484 :         if (PyType_Ready(&drsuapi_SyntaxType) < 0)
   45731           0 :                 goto out;
   45732        7484 :         if (!PyInterface_AddNdrRpcMethods(&drsuapi_InterfaceType, py_ndr_drsuapi_methods))
   45733           0 :                 return NULL;
   45734             : 
   45735             : #ifdef PY_DSBINDINFO24_PATCH
   45736             :         PY_DSBINDINFO24_PATCH(&drsuapi_DsBindInfo24_Type);
   45737             : #endif
   45738             : #ifdef PY_DSBINDINFO28_PATCH
   45739             :         PY_DSBINDINFO28_PATCH(&drsuapi_DsBindInfo28_Type);
   45740             : #endif
   45741             : #ifdef PY_DSBINDINFO32_PATCH
   45742             :         PY_DSBINDINFO32_PATCH(&drsuapi_DsBindInfo32_Type);
   45743             : #endif
   45744             : #ifdef PY_DSBINDINFO48_PATCH
   45745             :         PY_DSBINDINFO48_PATCH(&drsuapi_DsBindInfo48_Type);
   45746             : #endif
   45747             : #ifdef PY_DSBINDINFO52_PATCH
   45748             :         PY_DSBINDINFO52_PATCH(&drsuapi_DsBindInfo52_Type);
   45749             : #endif
   45750             : #ifdef PY_DSBINDINFOFALLBACK_PATCH
   45751             :         PY_DSBINDINFOFALLBACK_PATCH(&drsuapi_DsBindInfoFallBack_Type);
   45752             : #endif
   45753             : #ifdef PY_DSBINDINFO_PATCH
   45754             :         PY_DSBINDINFO_PATCH(&drsuapi_DsBindInfo_Type);
   45755             : #endif
   45756             : #ifdef PY_DSBINDINFOCTR_PATCH
   45757             :         PY_DSBINDINFOCTR_PATCH(&drsuapi_DsBindInfoCtr_Type);
   45758             : #endif
   45759             : #ifdef PY_DSREPLICAOBJECTIDENTIFIER_PATCH
   45760             :         PY_DSREPLICAOBJECTIDENTIFIER_PATCH(&drsuapi_DsReplicaObjectIdentifier_Type);
   45761             : #endif
   45762             : #ifdef PY_DSREPLICASYNCREQUEST1_PATCH
   45763             :         PY_DSREPLICASYNCREQUEST1_PATCH(&drsuapi_DsReplicaSyncRequest1_Type);
   45764             : #endif
   45765             : #ifdef PY_DSREPLICASYNCREQUEST_PATCH
   45766             :         PY_DSREPLICASYNCREQUEST_PATCH(&drsuapi_DsReplicaSyncRequest_Type);
   45767             : #endif
   45768             : #ifdef PY_DSREPLICAHIGHWATERMARK_PATCH
   45769             :         PY_DSREPLICAHIGHWATERMARK_PATCH(&drsuapi_DsReplicaHighWaterMark_Type);
   45770             : #endif
   45771             : #ifdef PY_DSREPLICACURSOR_PATCH
   45772             :         PY_DSREPLICACURSOR_PATCH(&drsuapi_DsReplicaCursor_Type);
   45773             : #endif
   45774             : #ifdef PY_DSREPLICACURSORCTREX_PATCH
   45775             :         PY_DSREPLICACURSORCTREX_PATCH(&drsuapi_DsReplicaCursorCtrEx_Type);
   45776             : #endif
   45777             : #ifdef PY_DSGETNCCHANGESREQUEST5_PATCH
   45778             :         PY_DSGETNCCHANGESREQUEST5_PATCH(&drsuapi_DsGetNCChangesRequest5_Type);
   45779             : #endif
   45780             : #ifdef PY_DSREPLICAOID_PATCH
   45781             :         PY_DSREPLICAOID_PATCH(&drsuapi_DsReplicaOID_Type);
   45782             : #endif
   45783             : #ifdef PY_DSREPLICAOIDMAPPING_PATCH
   45784             :         PY_DSREPLICAOIDMAPPING_PATCH(&drsuapi_DsReplicaOIDMapping_Type);
   45785             : #endif
   45786             : #ifdef PY_DSREPLICAOIDMAPPING_CTR_PATCH
   45787             :         PY_DSREPLICAOIDMAPPING_CTR_PATCH(&drsuapi_DsReplicaOIDMapping_Ctr_Type);
   45788             : #endif
   45789             : #ifdef PY_DSPARTIALATTRIBUTESET_PATCH
   45790             :         PY_DSPARTIALATTRIBUTESET_PATCH(&drsuapi_DsPartialAttributeSet_Type);
   45791             : #endif
   45792             : #ifdef PY_DSGETNCCHANGESREQUEST8_PATCH
   45793             :         PY_DSGETNCCHANGESREQUEST8_PATCH(&drsuapi_DsGetNCChangesRequest8_Type);
   45794             : #endif
   45795             : #ifdef PY_DSGETNCCHANGESREQUEST10_PATCH
   45796             :         PY_DSGETNCCHANGESREQUEST10_PATCH(&drsuapi_DsGetNCChangesRequest10_Type);
   45797             : #endif
   45798             : #ifdef PY_DSGETNCCHANGESREQUEST_PATCH
   45799             :         PY_DSGETNCCHANGESREQUEST_PATCH(&drsuapi_DsGetNCChangesRequest_Type);
   45800             : #endif
   45801             : #ifdef PY_DSREPLICACURSOR2_PATCH
   45802             :         PY_DSREPLICACURSOR2_PATCH(&drsuapi_DsReplicaCursor2_Type);
   45803             : #endif
   45804             : #ifdef PY_DSREPLICACURSOR2CTREX_PATCH
   45805             :         PY_DSREPLICACURSOR2CTREX_PATCH(&drsuapi_DsReplicaCursor2CtrEx_Type);
   45806             : #endif
   45807             : #ifdef PY_DSATTRIBUTEVALUE_PATCH
   45808             :         PY_DSATTRIBUTEVALUE_PATCH(&drsuapi_DsAttributeValue_Type);
   45809             : #endif
   45810             : #ifdef PY_DSATTRIBUTEVALUECTR_PATCH
   45811             :         PY_DSATTRIBUTEVALUECTR_PATCH(&drsuapi_DsAttributeValueCtr_Type);
   45812             : #endif
   45813             : #ifdef PY_DSREPLICAOBJECTIDENTIFIER3_PATCH
   45814             :         PY_DSREPLICAOBJECTIDENTIFIER3_PATCH(&drsuapi_DsReplicaObjectIdentifier3_Type);
   45815             : #endif
   45816             : #ifdef PY_DSREPLICAOBJECTIDENTIFIER3BINARY_PATCH
   45817             :         PY_DSREPLICAOBJECTIDENTIFIER3BINARY_PATCH(&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
   45818             : #endif
   45819             : #ifdef PY_DSREPLICAATTRIBUTE_PATCH
   45820             :         PY_DSREPLICAATTRIBUTE_PATCH(&drsuapi_DsReplicaAttribute_Type);
   45821             : #endif
   45822             : #ifdef PY_DSREPLICAATTRIBUTECTR_PATCH
   45823             :         PY_DSREPLICAATTRIBUTECTR_PATCH(&drsuapi_DsReplicaAttributeCtr_Type);
   45824             : #endif
   45825             : #ifdef PY_DSREPLICAOBJECT_PATCH
   45826             :         PY_DSREPLICAOBJECT_PATCH(&drsuapi_DsReplicaObject_Type);
   45827             : #endif
   45828             : #ifdef PY_DSREPLICAMETADATA_PATCH
   45829             :         PY_DSREPLICAMETADATA_PATCH(&drsuapi_DsReplicaMetaData_Type);
   45830             : #endif
   45831             : #ifdef PY_DSREPLICAMETADATACTR_PATCH
   45832             :         PY_DSREPLICAMETADATACTR_PATCH(&drsuapi_DsReplicaMetaDataCtr_Type);
   45833             : #endif
   45834             : #ifdef PY_DSREPLICAOBJECTLISTITEMEX_PATCH
   45835             :         PY_DSREPLICAOBJECTLISTITEMEX_PATCH(&drsuapi_DsReplicaObjectListItemEx_Type);
   45836             : #endif
   45837             : #ifdef PY_DSGETNCCHANGESCTR1_PATCH
   45838             :         PY_DSGETNCCHANGESCTR1_PATCH(&drsuapi_DsGetNCChangesCtr1_Type);
   45839             : #endif
   45840             : #ifdef PY_DSREPLICALINKEDATTRIBUTE_PATCH
   45841             :         PY_DSREPLICALINKEDATTRIBUTE_PATCH(&drsuapi_DsReplicaLinkedAttribute_Type);
   45842             : #endif
   45843             : #ifdef PY_DSGETNCCHANGESCTR6_PATCH
   45844             :         PY_DSGETNCCHANGESCTR6_PATCH(&drsuapi_DsGetNCChangesCtr6_Type);
   45845             : #endif
   45846             : #ifdef PY_DSGETNCCHANGESCTR1TS_PATCH
   45847             :         PY_DSGETNCCHANGESCTR1TS_PATCH(&drsuapi_DsGetNCChangesCtr1TS_Type);
   45848             : #endif
   45849             : #ifdef PY_DSGETNCCHANGESCTR6TS_PATCH
   45850             :         PY_DSGETNCCHANGESCTR6TS_PATCH(&drsuapi_DsGetNCChangesCtr6TS_Type);
   45851             : #endif
   45852             : #ifdef PY_DSGETNCCHANGESMSZIPCTR1_PATCH
   45853             :         PY_DSGETNCCHANGESMSZIPCTR1_PATCH(&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
   45854             : #endif
   45855             : #ifdef PY_DSGETNCCHANGESMSZIPCTR6_PATCH
   45856             :         PY_DSGETNCCHANGESMSZIPCTR6_PATCH(&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
   45857             : #endif
   45858             : #ifdef PY_DSGETNCCHANGESWIN2K3_LZ77_DIRECT2CTR1_PATCH
   45859             :         PY_DSGETNCCHANGESWIN2K3_LZ77_DIRECT2CTR1_PATCH(&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type);
   45860             : #endif
   45861             : #ifdef PY_DSGETNCCHANGESWIN2K3_LZ77_DIRECT2CTR6_PATCH
   45862             :         PY_DSGETNCCHANGESWIN2K3_LZ77_DIRECT2CTR6_PATCH(&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type);
   45863             : #endif
   45864             : #ifdef PY_DSGETNCCHANGESCOMPRESSEDCTR_PATCH
   45865             :         PY_DSGETNCCHANGESCOMPRESSEDCTR_PATCH(&drsuapi_DsGetNCChangesCompressedCtr_Type);
   45866             : #endif
   45867             : #ifdef PY_DSGETNCCHANGESCTR2_PATCH
   45868             :         PY_DSGETNCCHANGESCTR2_PATCH(&drsuapi_DsGetNCChangesCtr2_Type);
   45869             : #endif
   45870             : #ifdef PY_DSGETNCCHANGESCTR7_PATCH
   45871             :         PY_DSGETNCCHANGESCTR7_PATCH(&drsuapi_DsGetNCChangesCtr7_Type);
   45872             : #endif
   45873             : #ifdef PY_DSGETNCCHANGESCTR_PATCH
   45874             :         PY_DSGETNCCHANGESCTR_PATCH(&drsuapi_DsGetNCChangesCtr_Type);
   45875             : #endif
   45876             : #ifdef PY_DSREPLICAUPDATEREFSREQUEST1_PATCH
   45877             :         PY_DSREPLICAUPDATEREFSREQUEST1_PATCH(&drsuapi_DsReplicaUpdateRefsRequest1_Type);
   45878             : #endif
   45879             : #ifdef PY_DSREPLICAUPDATEREFSREQUEST_PATCH
   45880             :         PY_DSREPLICAUPDATEREFSREQUEST_PATCH(&drsuapi_DsReplicaUpdateRefsRequest_Type);
   45881             : #endif
   45882             : #ifdef PY_DSREPLICAADDREQUEST1_PATCH
   45883             :         PY_DSREPLICAADDREQUEST1_PATCH(&drsuapi_DsReplicaAddRequest1_Type);
   45884             : #endif
   45885             : #ifdef PY_DSREPLICAADDREQUEST2_PATCH
   45886             :         PY_DSREPLICAADDREQUEST2_PATCH(&drsuapi_DsReplicaAddRequest2_Type);
   45887             : #endif
   45888             : #ifdef PY_DSREPLICAADDREQUEST_PATCH
   45889             :         PY_DSREPLICAADDREQUEST_PATCH(&drsuapi_DsReplicaAddRequest_Type);
   45890             : #endif
   45891             : #ifdef PY_DSREPLICADELREQUEST1_PATCH
   45892             :         PY_DSREPLICADELREQUEST1_PATCH(&drsuapi_DsReplicaDelRequest1_Type);
   45893             : #endif
   45894             : #ifdef PY_DSREPLICADELREQUEST_PATCH
   45895             :         PY_DSREPLICADELREQUEST_PATCH(&drsuapi_DsReplicaDelRequest_Type);
   45896             : #endif
   45897             : #ifdef PY_DSREPLICAMODREQUEST1_PATCH
   45898             :         PY_DSREPLICAMODREQUEST1_PATCH(&drsuapi_DsReplicaModRequest1_Type);
   45899             : #endif
   45900             : #ifdef PY_DSREPLICAMODREQUEST_PATCH
   45901             :         PY_DSREPLICAMODREQUEST_PATCH(&drsuapi_DsReplicaModRequest_Type);
   45902             : #endif
   45903             : #ifdef PY_DSGETMEMBERSHIPSCTR1_PATCH
   45904             :         PY_DSGETMEMBERSHIPSCTR1_PATCH(&drsuapi_DsGetMembershipsCtr1_Type);
   45905             : #endif
   45906             : #ifdef PY_DSGETMEMBERSHIPSCTR_PATCH
   45907             :         PY_DSGETMEMBERSHIPSCTR_PATCH(&drsuapi_DsGetMembershipsCtr_Type);
   45908             : #endif
   45909             : #ifdef PY_DSGETMEMBERSHIPSREQUEST1_PATCH
   45910             :         PY_DSGETMEMBERSHIPSREQUEST1_PATCH(&drsuapi_DsGetMembershipsRequest1_Type);
   45911             : #endif
   45912             : #ifdef PY_DSGETMEMBERSHIPSREQUEST_PATCH
   45913             :         PY_DSGETMEMBERSHIPSREQUEST_PATCH(&drsuapi_DsGetMembershipsRequest_Type);
   45914             : #endif
   45915             : #ifdef PY_DSGETNT4CHANGELOGREQUEST1_PATCH
   45916             :         PY_DSGETNT4CHANGELOGREQUEST1_PATCH(&drsuapi_DsGetNT4ChangeLogRequest1_Type);
   45917             : #endif
   45918             : #ifdef PY_DSGETNT4CHANGELOGREQUEST_PATCH
   45919             :         PY_DSGETNT4CHANGELOGREQUEST_PATCH(&drsuapi_DsGetNT4ChangeLogRequest_Type);
   45920             : #endif
   45921             : #ifdef PY_DSGETNT4CHANGELOGINFO1_PATCH
   45922             :         PY_DSGETNT4CHANGELOGINFO1_PATCH(&drsuapi_DsGetNT4ChangeLogInfo1_Type);
   45923             : #endif
   45924             : #ifdef PY_DSGETNT4CHANGELOGINFO_PATCH
   45925             :         PY_DSGETNT4CHANGELOGINFO_PATCH(&drsuapi_DsGetNT4ChangeLogInfo_Type);
   45926             : #endif
   45927             : #ifdef PY_DSNAMESTRING_PATCH
   45928             :         PY_DSNAMESTRING_PATCH(&drsuapi_DsNameString_Type);
   45929             : #endif
   45930             : #ifdef PY_DSNAMEREQUEST1_PATCH
   45931             :         PY_DSNAMEREQUEST1_PATCH(&drsuapi_DsNameRequest1_Type);
   45932             : #endif
   45933             : #ifdef PY_DSNAMEREQUEST_PATCH
   45934             :         PY_DSNAMEREQUEST_PATCH(&drsuapi_DsNameRequest_Type);
   45935             : #endif
   45936             : #ifdef PY_DSNAMEINFO1_PATCH
   45937             :         PY_DSNAMEINFO1_PATCH(&drsuapi_DsNameInfo1_Type);
   45938             : #endif
   45939             : #ifdef PY_DSNAMECTR1_PATCH
   45940             :         PY_DSNAMECTR1_PATCH(&drsuapi_DsNameCtr1_Type);
   45941             : #endif
   45942             : #ifdef PY_DSNAMECTR_PATCH
   45943             :         PY_DSNAMECTR_PATCH(&drsuapi_DsNameCtr_Type);
   45944             : #endif
   45945             : #ifdef PY_DSWRITEACCOUNTSPNREQUEST1_PATCH
   45946             :         PY_DSWRITEACCOUNTSPNREQUEST1_PATCH(&drsuapi_DsWriteAccountSpnRequest1_Type);
   45947             : #endif
   45948             : #ifdef PY_DSWRITEACCOUNTSPNREQUEST_PATCH
   45949             :         PY_DSWRITEACCOUNTSPNREQUEST_PATCH(&drsuapi_DsWriteAccountSpnRequest_Type);
   45950             : #endif
   45951             : #ifdef PY_DSWRITEACCOUNTSPNRESULT1_PATCH
   45952             :         PY_DSWRITEACCOUNTSPNRESULT1_PATCH(&drsuapi_DsWriteAccountSpnResult1_Type);
   45953             : #endif
   45954             : #ifdef PY_DSWRITEACCOUNTSPNRESULT_PATCH
   45955             :         PY_DSWRITEACCOUNTSPNRESULT_PATCH(&drsuapi_DsWriteAccountSpnResult_Type);
   45956             : #endif
   45957             : #ifdef PY_DSREMOVEDSSERVERREQUEST1_PATCH
   45958             :         PY_DSREMOVEDSSERVERREQUEST1_PATCH(&drsuapi_DsRemoveDSServerRequest1_Type);
   45959             : #endif
   45960             : #ifdef PY_DSREMOVEDSSERVERREQUEST_PATCH
   45961             :         PY_DSREMOVEDSSERVERREQUEST_PATCH(&drsuapi_DsRemoveDSServerRequest_Type);
   45962             : #endif
   45963             : #ifdef PY_DSREMOVEDSSERVERRESULT1_PATCH
   45964             :         PY_DSREMOVEDSSERVERRESULT1_PATCH(&drsuapi_DsRemoveDSServerResult1_Type);
   45965             : #endif
   45966             : #ifdef PY_DSREMOVEDSSERVERRESULT_PATCH
   45967             :         PY_DSREMOVEDSSERVERRESULT_PATCH(&drsuapi_DsRemoveDSServerResult_Type);
   45968             : #endif
   45969             : #ifdef PY_DSGETDCINFOREQUEST1_PATCH
   45970             :         PY_DSGETDCINFOREQUEST1_PATCH(&drsuapi_DsGetDCInfoRequest1_Type);
   45971             : #endif
   45972             : #ifdef PY_DSGETDCINFOREQUEST_PATCH
   45973             :         PY_DSGETDCINFOREQUEST_PATCH(&drsuapi_DsGetDCInfoRequest_Type);
   45974             : #endif
   45975             : #ifdef PY_DSGETDCINFO1_PATCH
   45976             :         PY_DSGETDCINFO1_PATCH(&drsuapi_DsGetDCInfo1_Type);
   45977             : #endif
   45978             : #ifdef PY_DSGETDCINFOCTR1_PATCH
   45979             :         PY_DSGETDCINFOCTR1_PATCH(&drsuapi_DsGetDCInfoCtr1_Type);
   45980             : #endif
   45981             : #ifdef PY_DSGETDCINFO2_PATCH
   45982             :         PY_DSGETDCINFO2_PATCH(&drsuapi_DsGetDCInfo2_Type);
   45983             : #endif
   45984             : #ifdef PY_DSGETDCINFOCTR2_PATCH
   45985             :         PY_DSGETDCINFOCTR2_PATCH(&drsuapi_DsGetDCInfoCtr2_Type);
   45986             : #endif
   45987             : #ifdef PY_DSGETDCINFO3_PATCH
   45988             :         PY_DSGETDCINFO3_PATCH(&drsuapi_DsGetDCInfo3_Type);
   45989             : #endif
   45990             : #ifdef PY_DSGETDCINFOCTR3_PATCH
   45991             :         PY_DSGETDCINFOCTR3_PATCH(&drsuapi_DsGetDCInfoCtr3_Type);
   45992             : #endif
   45993             : #ifdef PY_DSGETDCCONNECTION01_PATCH
   45994             :         PY_DSGETDCCONNECTION01_PATCH(&drsuapi_DsGetDCConnection01_Type);
   45995             : #endif
   45996             : #ifdef PY_DSGETDCCONNECTIONCTR01_PATCH
   45997             :         PY_DSGETDCCONNECTIONCTR01_PATCH(&drsuapi_DsGetDCConnectionCtr01_Type);
   45998             : #endif
   45999             : #ifdef PY_DSGETDCINFOCTR_PATCH
   46000             :         PY_DSGETDCINFOCTR_PATCH(&drsuapi_DsGetDCInfoCtr_Type);
   46001             : #endif
   46002             : #ifdef PY_DSREPLICAOBJECTLISTITEM_PATCH
   46003             :         PY_DSREPLICAOBJECTLISTITEM_PATCH(&drsuapi_DsReplicaObjectListItem_Type);
   46004             : #endif
   46005             : #ifdef PY_DSADDENTRYREQUEST2_PATCH
   46006             :         PY_DSADDENTRYREQUEST2_PATCH(&drsuapi_DsAddEntryRequest2_Type);
   46007             : #endif
   46008             : #ifdef PY_SECBUFFER_PATCH
   46009             :         PY_SECBUFFER_PATCH(&drsuapi_SecBuffer_Type);
   46010             : #endif
   46011             : #ifdef PY_SECBUFFERDESC_PATCH
   46012             :         PY_SECBUFFERDESC_PATCH(&drsuapi_SecBufferDesc_Type);
   46013             : #endif
   46014             : #ifdef PY_DSADDENTRYREQUEST3_PATCH
   46015             :         PY_DSADDENTRYREQUEST3_PATCH(&drsuapi_DsAddEntryRequest3_Type);
   46016             : #endif
   46017             : #ifdef PY_DSADDENTRYREQUEST_PATCH
   46018             :         PY_DSADDENTRYREQUEST_PATCH(&drsuapi_DsAddEntryRequest_Type);
   46019             : #endif
   46020             : #ifdef PY_DSADDENTRYERRORINFOX_PATCH
   46021             :         PY_DSADDENTRYERRORINFOX_PATCH(&drsuapi_DsAddEntryErrorInfoX_Type);
   46022             : #endif
   46023             : #ifdef PY_DSADDENTRY_ATTRERR_V1_PATCH
   46024             :         PY_DSADDENTRY_ATTRERR_V1_PATCH(&drsuapi_DsAddEntry_AttrErr_V1_Type);
   46025             : #endif
   46026             : #ifdef PY_DSADDENTRY_ATTRERRLISTITEM_V1_PATCH
   46027             :         PY_DSADDENTRY_ATTRERRLISTITEM_V1_PATCH(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
   46028             : #endif
   46029             : #ifdef PY_DSADDENTRYERRORINFO_ATTR_V1_PATCH
   46030             :         PY_DSADDENTRYERRORINFO_ATTR_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
   46031             : #endif
   46032             : #ifdef PY_DSADDENTRYERRORINFO_NAME_V1_PATCH
   46033             :         PY_DSADDENTRYERRORINFO_NAME_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
   46034             : #endif
   46035             : #ifdef PY_NAMERESOP_V1_PATCH
   46036             :         PY_NAMERESOP_V1_PATCH(&drsuapi_NameResOp_V1_Type);
   46037             : #endif
   46038             : #ifdef PY_DSAADDRESSLISTITEM_V1_PATCH
   46039             :         PY_DSAADDRESSLISTITEM_V1_PATCH(&drsuapi_DsaAddressListItem_V1_Type);
   46040             : #endif
   46041             : #ifdef PY_DSADDENTRY_REFERRLISTITEM_V1_PATCH
   46042             :         PY_DSADDENTRY_REFERRLISTITEM_V1_PATCH(&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
   46043             : #endif
   46044             : #ifdef PY_DSADDENTRYERRORINFO_REFERR_V1_PATCH
   46045             :         PY_DSADDENTRYERRORINFO_REFERR_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
   46046             : #endif
   46047             : #ifdef PY_DSADDENTRYERRORINFO_PATCH
   46048             :         PY_DSADDENTRYERRORINFO_PATCH(&drsuapi_DsAddEntryErrorInfo_Type);
   46049             : #endif
   46050             : #ifdef PY_DSADDENTRY_ERRDATA_V1_PATCH
   46051             :         PY_DSADDENTRY_ERRDATA_V1_PATCH(&drsuapi_DsAddEntry_ErrData_V1_Type);
   46052             : #endif
   46053             : #ifdef PY_DSADDENTRY_ERRDATA_PATCH
   46054             :         PY_DSADDENTRY_ERRDATA_PATCH(&drsuapi_DsAddEntry_ErrData_Type);
   46055             : #endif
   46056             : #ifdef PY_DSREPLICAOBJECTIDENTIFIER2_PATCH
   46057             :         PY_DSREPLICAOBJECTIDENTIFIER2_PATCH(&drsuapi_DsReplicaObjectIdentifier2_Type);
   46058             : #endif
   46059             : #ifdef PY_DSADDENTRYCTR2_PATCH
   46060             :         PY_DSADDENTRYCTR2_PATCH(&drsuapi_DsAddEntryCtr2_Type);
   46061             : #endif
   46062             : #ifdef PY_DSADDENTRYCTR3_PATCH
   46063             :         PY_DSADDENTRYCTR3_PATCH(&drsuapi_DsAddEntryCtr3_Type);
   46064             : #endif
   46065             : #ifdef PY_DSADDENTRYCTR_PATCH
   46066             :         PY_DSADDENTRYCTR_PATCH(&drsuapi_DsAddEntryCtr_Type);
   46067             : #endif
   46068             : #ifdef PY_DSEXECUTEKCC1_PATCH
   46069             :         PY_DSEXECUTEKCC1_PATCH(&drsuapi_DsExecuteKCC1_Type);
   46070             : #endif
   46071             : #ifdef PY_DSEXECUTEKCCREQUEST_PATCH
   46072             :         PY_DSEXECUTEKCCREQUEST_PATCH(&drsuapi_DsExecuteKCCRequest_Type);
   46073             : #endif
   46074             : #ifdef PY_DSREPLICAGETINFOREQUEST1_PATCH
   46075             :         PY_DSREPLICAGETINFOREQUEST1_PATCH(&drsuapi_DsReplicaGetInfoRequest1_Type);
   46076             : #endif
   46077             : #ifdef PY_DSREPLICAGETINFOREQUEST2_PATCH
   46078             :         PY_DSREPLICAGETINFOREQUEST2_PATCH(&drsuapi_DsReplicaGetInfoRequest2_Type);
   46079             : #endif
   46080             : #ifdef PY_DSREPLICAGETINFOREQUEST_PATCH
   46081             :         PY_DSREPLICAGETINFOREQUEST_PATCH(&drsuapi_DsReplicaGetInfoRequest_Type);
   46082             : #endif
   46083             : #ifdef PY_DSREPLICANEIGHBOUR_PATCH
   46084             :         PY_DSREPLICANEIGHBOUR_PATCH(&drsuapi_DsReplicaNeighbour_Type);
   46085             : #endif
   46086             : #ifdef PY_DSREPLICANEIGHBOURCTR_PATCH
   46087             :         PY_DSREPLICANEIGHBOURCTR_PATCH(&drsuapi_DsReplicaNeighbourCtr_Type);
   46088             : #endif
   46089             : #ifdef PY_DSREPLICACURSORCTR_PATCH
   46090             :         PY_DSREPLICACURSORCTR_PATCH(&drsuapi_DsReplicaCursorCtr_Type);
   46091             : #endif
   46092             : #ifdef PY_DSREPLICAOBJMETADATA_PATCH
   46093             :         PY_DSREPLICAOBJMETADATA_PATCH(&drsuapi_DsReplicaObjMetaData_Type);
   46094             : #endif
   46095             : #ifdef PY_DSREPLICAOBJMETADATACTR_PATCH
   46096             :         PY_DSREPLICAOBJMETADATACTR_PATCH(&drsuapi_DsReplicaObjMetaDataCtr_Type);
   46097             : #endif
   46098             : #ifdef PY_DSREPLICAKCCDSAFAILURE_PATCH
   46099             :         PY_DSREPLICAKCCDSAFAILURE_PATCH(&drsuapi_DsReplicaKccDsaFailure_Type);
   46100             : #endif
   46101             : #ifdef PY_DSREPLICAKCCDSAFAILURESCTR_PATCH
   46102             :         PY_DSREPLICAKCCDSAFAILURESCTR_PATCH(&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
   46103             : #endif
   46104             : #ifdef PY_DSREPLICAOP_PATCH
   46105             :         PY_DSREPLICAOP_PATCH(&drsuapi_DsReplicaOp_Type);
   46106             : #endif
   46107             : #ifdef PY_DSREPLICAOPCTR_PATCH
   46108             :         PY_DSREPLICAOPCTR_PATCH(&drsuapi_DsReplicaOpCtr_Type);
   46109             : #endif
   46110             : #ifdef PY_DSREPLICAATTRVALMETADATA_PATCH
   46111             :         PY_DSREPLICAATTRVALMETADATA_PATCH(&drsuapi_DsReplicaAttrValMetaData_Type);
   46112             : #endif
   46113             : #ifdef PY_DSREPLICAATTRVALMETADATACTR_PATCH
   46114             :         PY_DSREPLICAATTRVALMETADATACTR_PATCH(&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
   46115             : #endif
   46116             : #ifdef PY_DSREPLICACURSOR2CTR_PATCH
   46117             :         PY_DSREPLICACURSOR2CTR_PATCH(&drsuapi_DsReplicaCursor2Ctr_Type);
   46118             : #endif
   46119             : #ifdef PY_DSREPLICACURSOR3_PATCH
   46120             :         PY_DSREPLICACURSOR3_PATCH(&drsuapi_DsReplicaCursor3_Type);
   46121             : #endif
   46122             : #ifdef PY_DSREPLICACURSOR3CTR_PATCH
   46123             :         PY_DSREPLICACURSOR3CTR_PATCH(&drsuapi_DsReplicaCursor3Ctr_Type);
   46124             : #endif
   46125             : #ifdef PY_DSREPLICAOBJMETADATA2_PATCH
   46126             :         PY_DSREPLICAOBJMETADATA2_PATCH(&drsuapi_DsReplicaObjMetaData2_Type);
   46127             : #endif
   46128             : #ifdef PY_DSREPLICAOBJMETADATA2CTR_PATCH
   46129             :         PY_DSREPLICAOBJMETADATA2CTR_PATCH(&drsuapi_DsReplicaObjMetaData2Ctr_Type);
   46130             : #endif
   46131             : #ifdef PY_DSREPLICAATTRVALMETADATA2_PATCH
   46132             :         PY_DSREPLICAATTRVALMETADATA2_PATCH(&drsuapi_DsReplicaAttrValMetaData2_Type);
   46133             : #endif
   46134             : #ifdef PY_DSREPLICAATTRVALMETADATA2CTR_PATCH
   46135             :         PY_DSREPLICAATTRVALMETADATA2CTR_PATCH(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
   46136             : #endif
   46137             : #ifdef PY_DSREPLICACONNECTION04_PATCH
   46138             :         PY_DSREPLICACONNECTION04_PATCH(&drsuapi_DsReplicaConnection04_Type);
   46139             : #endif
   46140             : #ifdef PY_DSREPLICACONNECTION04CTR_PATCH
   46141             :         PY_DSREPLICACONNECTION04CTR_PATCH(&drsuapi_DsReplicaConnection04Ctr_Type);
   46142             : #endif
   46143             : #ifdef PY_DSREPLICA06_PATCH
   46144             :         PY_DSREPLICA06_PATCH(&drsuapi_DsReplica06_Type);
   46145             : #endif
   46146             : #ifdef PY_DSREPLICA06CTR_PATCH
   46147             :         PY_DSREPLICA06CTR_PATCH(&drsuapi_DsReplica06Ctr_Type);
   46148             : #endif
   46149             : #ifdef PY_DSREPLICAINFO_PATCH
   46150             :         PY_DSREPLICAINFO_PATCH(&drsuapi_DsReplicaInfo_Type);
   46151             : #endif
   46152             : #ifdef PY_DSGETMEMBERSHIPS2CTR1_PATCH
   46153             :         PY_DSGETMEMBERSHIPS2CTR1_PATCH(&drsuapi_DsGetMemberships2Ctr1_Type);
   46154             : #endif
   46155             : #ifdef PY_DSGETMEMBERSHIPS2CTR_PATCH
   46156             :         PY_DSGETMEMBERSHIPS2CTR_PATCH(&drsuapi_DsGetMemberships2Ctr_Type);
   46157             : #endif
   46158             : #ifdef PY_DSGETMEMBERSHIPS2REQUEST1_PATCH
   46159             :         PY_DSGETMEMBERSHIPS2REQUEST1_PATCH(&drsuapi_DsGetMemberships2Request1_Type);
   46160             : #endif
   46161             : #ifdef PY_DSGETMEMBERSHIPS2REQUEST_PATCH
   46162             :         PY_DSGETMEMBERSHIPS2REQUEST_PATCH(&drsuapi_DsGetMemberships2Request_Type);
   46163             : #endif
   46164             : #ifdef PY_DSSITECOSTINFO_PATCH
   46165             :         PY_DSSITECOSTINFO_PATCH(&drsuapi_DsSiteCostInfo_Type);
   46166             : #endif
   46167             : #ifdef PY_QUERYSITESBYCOSTCTR1_PATCH
   46168             :         PY_QUERYSITESBYCOSTCTR1_PATCH(&drsuapi_QuerySitesByCostCtr1_Type);
   46169             : #endif
   46170             : #ifdef PY_QUERYSITESBYCOSTCTR_PATCH
   46171             :         PY_QUERYSITESBYCOSTCTR_PATCH(&drsuapi_QuerySitesByCostCtr_Type);
   46172             : #endif
   46173             : #ifdef PY_QUERYSITESBYCOSTREQUEST1_PATCH
   46174             :         PY_QUERYSITESBYCOSTREQUEST1_PATCH(&drsuapi_QuerySitesByCostRequest1_Type);
   46175             : #endif
   46176             : #ifdef PY_QUERYSITESBYCOSTREQUEST_PATCH
   46177             :         PY_QUERYSITESBYCOSTREQUEST_PATCH(&drsuapi_QuerySitesByCostRequest_Type);
   46178             : #endif
   46179             : #ifdef PY_DSBIND_PATCH
   46180             :         PY_DSBIND_PATCH(&drsuapi_DsBind_Type);
   46181             : #endif
   46182             : #ifdef PY_DSUNBIND_PATCH
   46183             :         PY_DSUNBIND_PATCH(&drsuapi_DsUnbind_Type);
   46184             : #endif
   46185             : #ifdef PY_DSREPLICASYNC_PATCH
   46186             :         PY_DSREPLICASYNC_PATCH(&drsuapi_DsReplicaSync_Type);
   46187             : #endif
   46188             : #ifdef PY_DSGETNCCHANGES_PATCH
   46189             :         PY_DSGETNCCHANGES_PATCH(&drsuapi_DsGetNCChanges_Type);
   46190             : #endif
   46191             : #ifdef PY_DSREPLICAUPDATEREFS_PATCH
   46192             :         PY_DSREPLICAUPDATEREFS_PATCH(&drsuapi_DsReplicaUpdateRefs_Type);
   46193             : #endif
   46194             : #ifdef PY_DSREPLICAADD_PATCH
   46195             :         PY_DSREPLICAADD_PATCH(&drsuapi_DsReplicaAdd_Type);
   46196             : #endif
   46197             : #ifdef PY_DSREPLICADEL_PATCH
   46198             :         PY_DSREPLICADEL_PATCH(&drsuapi_DsReplicaDel_Type);
   46199             : #endif
   46200             : #ifdef PY_DSREPLICAMOD_PATCH
   46201             :         PY_DSREPLICAMOD_PATCH(&drsuapi_DsReplicaMod_Type);
   46202             : #endif
   46203             : #ifdef PY_DSGETMEMBERSHIPS_PATCH
   46204             :         PY_DSGETMEMBERSHIPS_PATCH(&drsuapi_DsGetMemberships_Type);
   46205             : #endif
   46206             : #ifdef PY_DSGETNT4CHANGELOG_PATCH
   46207             :         PY_DSGETNT4CHANGELOG_PATCH(&drsuapi_DsGetNT4ChangeLog_Type);
   46208             : #endif
   46209             : #ifdef PY_DSCRACKNAMES_PATCH
   46210             :         PY_DSCRACKNAMES_PATCH(&drsuapi_DsCrackNames_Type);
   46211             : #endif
   46212             : #ifdef PY_DSWRITEACCOUNTSPN_PATCH
   46213             :         PY_DSWRITEACCOUNTSPN_PATCH(&drsuapi_DsWriteAccountSpn_Type);
   46214             : #endif
   46215             : #ifdef PY_DSREMOVEDSSERVER_PATCH
   46216             :         PY_DSREMOVEDSSERVER_PATCH(&drsuapi_DsRemoveDSServer_Type);
   46217             : #endif
   46218             : #ifdef PY_DSGETDOMAINCONTROLLERINFO_PATCH
   46219             :         PY_DSGETDOMAINCONTROLLERINFO_PATCH(&drsuapi_DsGetDomainControllerInfo_Type);
   46220             : #endif
   46221             : #ifdef PY_DSADDENTRY_PATCH
   46222             :         PY_DSADDENTRY_PATCH(&drsuapi_DsAddEntry_Type);
   46223             : #endif
   46224             : #ifdef PY_DSEXECUTEKCC_PATCH
   46225             :         PY_DSEXECUTEKCC_PATCH(&drsuapi_DsExecuteKCC_Type);
   46226             : #endif
   46227             : #ifdef PY_DSREPLICAGETINFO_PATCH
   46228             :         PY_DSREPLICAGETINFO_PATCH(&drsuapi_DsReplicaGetInfo_Type);
   46229             : #endif
   46230             : #ifdef PY_DSGETMEMBERSHIPS2_PATCH
   46231             :         PY_DSGETMEMBERSHIPS2_PATCH(&drsuapi_DsGetMemberships2_Type);
   46232             : #endif
   46233             : #ifdef PY_QUERYSITESBYCOST_PATCH
   46234             :         PY_QUERYSITESBYCOST_PATCH(&drsuapi_QuerySitesByCost_Type);
   46235             : #endif
   46236             : #ifdef PY_DRSUAPI_PATCH
   46237             :         PY_DRSUAPI_PATCH(&drsuapi_InterfaceType);
   46238             : #endif
   46239             : #ifdef PY_DRSUAPI_ABSTRACT_SYNTAX_PATCH
   46240             :         PY_DRSUAPI_ABSTRACT_SYNTAX_PATCH(&drsuapi_SyntaxType);
   46241             : #endif
   46242             : #ifdef PY_ABSTRACT_SYNTAX_PATCH
   46243             :         PY_ABSTRACT_SYNTAX_PATCH(&drsuapi_SyntaxType);
   46244             : #endif
   46245             : 
   46246        7484 :         m = PyModule_Create(&moduledef);
   46247        7484 :         if (m == NULL)
   46248           0 :                 goto out;
   46249             : 
   46250        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID", PyUnicode_FromString("e24d201a-4fd6-11d1-a3da-0000f875ae0d"));
   46251        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID_W2K", PyUnicode_FromString("6abec3d1-3054-41c8-a362-5a0c5b7d5d71"));
   46252        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID_W2K3", PyUnicode_FromString("6afab99c-6e26-464a-975f-f58f105218bc"));
   46253        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR", PyLong_FromUnsignedLongLong(0x1));
   46254        7484 :         PyModule_AddObject(m, "DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID", PyUnicode_FromString("E3514235-4B06-11D1-AB04-00C04FC2DCD2"));
   46255        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_ASYNC_OP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_ASYNC_OP)));
   46256        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_GETCHG_CHECK", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_GETCHG_CHECK)));
   46257        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_NOTIFICATION", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_UPDATE_NOTIFICATION)));
   46258        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_ADD_REF", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_ADD_REF)));
   46259        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_ALL", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_SYNC_ALL)));
   46260        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_DEL_REF", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_DEL_REF)));
   46261        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_WRIT_REP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_WRIT_REP)));
   46262        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_INIT_SYNC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_INIT_SYNC)));
   46263        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_PER_SYNC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_PER_SYNC)));
   46264        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_MAIL_REP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_MAIL_REP)));
   46265        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_ASYNC_REP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_ASYNC_REP)));
   46266        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_IGNORE_ERROR", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_IGNORE_ERROR)));
   46267        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_TWOWAY_SYNC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_TWOWAY_SYNC)));
   46268        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_CRITICAL_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_CRITICAL_ONLY)));
   46269        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_GET_ANC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_GET_ANC)));
   46270        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_GET_NC_SIZE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_GET_NC_SIZE)));
   46271        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_LOCAL_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_LOCAL_ONLY)));
   46272        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_NONGC_RO_REP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_NONGC_RO_REP)));
   46273        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_BYNAME", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_SYNC_BYNAME)));
   46274        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_REF_OK", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_REF_OK)));
   46275        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_NOW", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_FULL_SYNC_NOW)));
   46276        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_NO_SOURCE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_NO_SOURCE)));
   46277        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS)));
   46278        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_PACKET", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_FULL_SYNC_PACKET)));
   46279        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_REQUEUE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_SYNC_REQUEUE)));
   46280        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_URGENT", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_SYNC_URGENT)));
   46281        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_REF_GCSPN", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_REF_GCSPN)));
   46282        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_NO_DISCARD", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_NO_DISCARD)));
   46283        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_NEVER_SYNCED", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_NEVER_SYNCED)));
   46284        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING)));
   46285        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_INIT_SYNC_NOW", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_INIT_SYNC_NOW)));
   46286        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_PREEMPTED", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_PREEMPTED)));
   46287        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_FORCED", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_SYNC_FORCED)));
   46288        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_DISABLE_AUTO_SYNC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_DISABLE_AUTO_SYNC)));
   46289        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_DISABLE_PERIODIC_SYNC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_DISABLE_PERIODIC_SYNC)));
   46290        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_USE_COMPRESSION", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_USE_COMPRESSION)));
   46291        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_NEVER_NOTIFY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_NEVER_NOTIFY)));
   46292        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_PAS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_SYNC_PAS)));
   46293        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP)));
   46294        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_GET_TGT", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_GET_TGT)));
   46295        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_FLAGS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_UPDATE_FLAGS)));
   46296        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_ADDRESS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_UPDATE_ADDRESS)));
   46297        7484 :         PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_SCHEDULE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DRS_UPDATE_SCHEDULE)));
   46298        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_BASE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_BASE)));
   46299        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION)));
   46300        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI)));
   46301        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2)));
   46302        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS)));
   46303        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1)));
   46304        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION)));
   46305        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY)));
   46306        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE)));
   46307        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2)));
   46308        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION)));
   46309        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2)));
   46310        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD)));
   46311        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND)));
   46312        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO)));
   46313        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION)));
   46314        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01)));
   46315        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP)));
   46316        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY)));
   46317        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3)));
   46318        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5)));
   46319        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2)));
   46320        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6)));
   46321        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS)));
   46322        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8)));
   46323        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5)));
   46324        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6)));
   46325        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3)));
   46326        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7)));
   46327        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT)));
   46328        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS)));
   46329        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10)));
   46330        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2)));
   46331        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3)));
   46332        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADAM", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_ADAM)));
   46333        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2)));
   46334        7484 :         PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN)));
   46335        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_NONE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_NONE)));
   46336        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_REQ_ROLE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_FSMO_REQ_ROLE)));
   46337        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_RID_ALLOC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_FSMO_RID_ALLOC)));
   46338        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_RID_REQ_ROLE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_FSMO_RID_REQ_ROLE)));
   46339        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_REQ_PDC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_FSMO_REQ_PDC)));
   46340        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_ABANDON_ROLE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_FSMO_ABANDON_ROLE)));
   46341        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_REPL_OBJ", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_REPL_OBJ)));
   46342        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_REPL_SECRET", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_REPL_SECRET)));
   46343        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_NONE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_NONE)));
   46344        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_SUCCESS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_SUCCESS)));
   46345        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UNKNOWN_OP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_UNKNOWN_OP)));
   46346        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER)));
   46347        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UPDATE_ERR", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_UPDATE_ERR)));
   46348        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_EXCEPTION", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_EXCEPTION)));
   46349        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UNKNOWN_CALLER", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_UNKNOWN_CALLER)));
   46350        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_RID_ALLOC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_RID_ALLOC)));
   46351        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED)));
   46352        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FMSO_PENDING_OP", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_FMSO_PENDING_OP)));
   46353        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_MISMATCH", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_MISMATCH)));
   46354        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_COULDNT_CONTACT", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_COULDNT_CONTACT)));
   46355        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES)));
   46356        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_DIR_ERROR", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_DIR_ERROR)));
   46357        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS)));
   46358        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_ACCESS_DENIED", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_ACCESS_DENIED)));
   46359        7484 :         PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_PARAM_ERROR", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_EXOP_ERR_PARAM_ERROR)));
   46360        7484 :         PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_top", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_OBJECTCLASS_top)));
   46361        7484 :         PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_classSchema", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_OBJECTCLASS_classSchema)));
   46362        7484 :         PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_attributeSchema", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_OBJECTCLASS_attributeSchema)));
   46363        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_objectClass", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_objectClass)));
   46364        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_cn", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_cn)));
   46365        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_ou", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_ou)));
   46366        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_description", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_description)));
   46367        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_member", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_member)));
   46368        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_distinguishedName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_distinguishedName)));
   46369        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_instanceType", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_instanceType)));
   46370        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_whenCreated", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_whenCreated)));
   46371        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_possSuperiors", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_possSuperiors)));
   46372        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_displayName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_displayName)));
   46373        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_hasMasterNCs", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_hasMasterNCs)));
   46374        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_nCName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_nCName)));
   46375        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_subClassOf", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_subClassOf)));
   46376        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_governsID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_governsID)));
   46377        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_mustContain", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_mustContain)));
   46378        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_mayContain", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_mayContain)));
   46379        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_rDNAttId", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_rDNAttId)));
   46380        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_attributeID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_attributeID)));
   46381        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_attributeSyntax", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_attributeSyntax)));
   46382        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_isSingleValued", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_isSingleValued)));
   46383        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_rangeLower", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_rangeLower)));
   46384        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_rangeUpper", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_rangeUpper)));
   46385        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_dMDLocation", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_dMDLocation)));
   46386        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_isDeleted", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_isDeleted)));
   46387        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_objectVersion", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_objectVersion)));
   46388        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_invocationId", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_invocationId)));
   46389        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_showInAdvancedViewOnly", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_showInAdvancedViewOnly)));
   46390        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_adminDisplayName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_adminDisplayName)));
   46391        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_adminDescription", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_adminDescription)));
   46392        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_oMSyntax", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_oMSyntax)));
   46393        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_ntSecurityDescriptor", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_ntSecurityDescriptor)));
   46394        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_searchFlags", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_searchFlags)));
   46395        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_auxiliaryClass", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_auxiliaryClass)));
   46396        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_lDAPDisplayName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_lDAPDisplayName)));
   46397        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_name", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_name)));
   46398        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_objectGUID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_objectGUID)));
   46399        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_replPropertyMetaData", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_replPropertyMetaData)));
   46400        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_userAccountControl", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_userAccountControl)));
   46401        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_badPwdCount", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_badPwdCount)));
   46402        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_codePage", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_codePage)));
   46403        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_countryCode", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_countryCode)));
   46404        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_currentValue", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_currentValue)));
   46405        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_homeDirectory", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_homeDirectory)));
   46406        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_homeDrive", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_homeDrive)));
   46407        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_lastLogoff", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_lastLogoff)));
   46408        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_lastLogon", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_lastLogon)));
   46409        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_dBCSPwd", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_dBCSPwd)));
   46410        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_scriptPath", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_scriptPath)));
   46411        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_logonHours", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_logonHours)));
   46412        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_userWorkstations", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_userWorkstations)));
   46413        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_unicodePwd", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_unicodePwd)));
   46414        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_ntPwdHistory", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_ntPwdHistory)));
   46415        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_pwdLastSet", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_pwdLastSet)));
   46416        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_primaryGroupID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_primaryGroupID)));
   46417        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_priorValue", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_priorValue)));
   46418        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_supplementalCredentials", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_supplementalCredentials)));
   46419        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_trustAuthIncoming", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_trustAuthIncoming)));
   46420        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_trustDirection", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_trustDirection)));
   46421        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_trustPartner", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_trustPartner)));
   46422        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_trustPosixOffset", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_trustPosixOffset)));
   46423        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_trustAuthOutgoing", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_trustAuthOutgoing)));
   46424        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_trustType", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_trustType)));
   46425        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_userParameters", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_userParameters)));
   46426        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_profilePath", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_profilePath)));
   46427        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_operatorCount", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_operatorCount)));
   46428        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_objectSid", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_objectSid)));
   46429        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_schemaIDGUID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_schemaIDGUID)));
   46430        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_adminCount", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_adminCount)));
   46431        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_comment", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_comment)));
   46432        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_accountExpires", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_accountExpires)));
   46433        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_lmPwdHistory", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_lmPwdHistory)));
   46434        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_logonCount", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_logonCount)));
   46435        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_systemPossSuperiors", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_systemPossSuperiors)));
   46436        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_systemMayContain", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_systemMayContain)));
   46437        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_systemMustContain", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_systemMustContain)));
   46438        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_systemAuxiliaryClass", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_systemAuxiliaryClass)));
   46439        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_sAMAccountName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_sAMAccountName)));
   46440        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_sAMAccountType", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_sAMAccountType)));
   46441        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_options", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_options)));
   46442        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_fSMORoleOwner", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_fSMORoleOwner)));
   46443        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_systemFlags", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_systemFlags)));
   46444        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_trustAttributes", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_trustAttributes)));
   46445        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_trustParent", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_trustParent)));
   46446        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_flatName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_flatName)));
   46447        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_serverReference", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_serverReference)));
   46448        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_serverReferenceBL", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_serverReferenceBL)));
   46449        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_nonSecurityMember", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_nonSecurityMember)));
   46450        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_initialAuthIncoming", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_initialAuthIncoming)));
   46451        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_initialAuthOutgoing", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_initialAuthOutgoing)));
   46452        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_wellKnownObjects", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_wellKnownObjects)));
   46453        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_dNSHostName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_dNSHostName)));
   46454        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_isMemberOfPartialAttributeSet", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_isMemberOfPartialAttributeSet)));
   46455        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_managedBy", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_managedBy)));
   46456        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_userPrincipalName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_userPrincipalName)));
   46457        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_groupType", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_groupType)));
   46458        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_servicePrincipalName", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_servicePrincipalName)));
   46459        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_lastKnownParent", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_lastKnownParent)));
   46460        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_objectCategory", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_objectCategory)));
   46461        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_gPLink", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_gPLink)));
   46462        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_transportAddressAttribute", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_transportAddressAttribute)));
   46463        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_schemaInfo", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_schemaInfo)));
   46464        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_Behavior_Version", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_Behavior_Version)));
   46465        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_TrustForestTrustInfo", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_TrustForestTrustInfo)));
   46466        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_KeyVersionNumber", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_KeyVersionNumber)));
   46467        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_NonMembers", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_NonMembers)));
   46468        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_MembersForAzRole", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_MembersForAzRole)));
   46469        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_HasDomainNCs", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_HasDomainNCs)));
   46470        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_hasMasterNCs", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_hasMasterNCs)));
   46471        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_NeverRevealGroup", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_NeverRevealGroup)));
   46472        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_RevealOnDemandGroup", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_RevealOnDemandGroup)));
   46473        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_SupportedEncryptionTypes", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_SupportedEncryptionTypes)));
   46474        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_HostServiceAccount", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_msDS_HostServiceAccount)));
   46475        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_isRecycled", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_isRecycled)));
   46476        7484 :         PyModule_AddObject(m, "DRSUAPI_ATTID_INVALID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_ATTID_INVALID)));
   46477        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER)));
   46478        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC)));
   46479        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY)));
   46480        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE)));
   46481        7484 :         PyModule_AddObject(m, "DRSUAPI_COMPRESSION_TYPE_MSZIP", PyLong_FromLong((uint16_t)(DRSUAPI_COMPRESSION_TYPE_MSZIP)));
   46482        7484 :         PyModule_AddObject(m, "DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2", PyLong_FromLong((uint16_t)(DRSUAPI_COMPRESSION_TYPE_WIN2K3_LZ77_DIRECT2)));
   46483        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS)));
   46484        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS)));
   46485        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS)));
   46486        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2)));
   46487        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS)));
   46488        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS)));
   46489        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2)));
   46490        7484 :         PyModule_AddObject(m, "DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG)));
   46491        7484 :         PyModule_AddObject(m, "DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS)));
   46492        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_OK", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_STATUS_OK)));
   46493        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR)));
   46494        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NOT_FOUND", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_STATUS_NOT_FOUND)));
   46495        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE)));
   46496        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NO_MAPPING", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_STATUS_NO_MAPPING)));
   46497        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY)));
   46498        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING)));
   46499        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL)));
   46500        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_NO_FLAGS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FLAG_NO_FLAGS)));
   46501        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY)));
   46502        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC)));
   46503        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_GCVERIFY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FLAG_GCVERIFY)));
   46504        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL)));
   46505        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UNKNOWN", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_UNKNOWN)));
   46506        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_FQDN_1779", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_FQDN_1779)));
   46507        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT)));
   46508        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_DISPLAY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_DISPLAY)));
   46509        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_GUID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_GUID)));
   46510        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_CANONICAL", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_CANONICAL)));
   46511        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL)));
   46512        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX)));
   46513        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL)));
   46514        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY)));
   46515        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN)));
   46516        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID)));
   46517        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN_EX)));
   46518        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS)));
   46519        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON)));
   46520        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_WITH_DCS_IN_SITE)));
   46521        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME)));
   46522        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME)));
   46523        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_NCS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_NCS)));
   46524        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS)));
   46525        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID)));
   46526        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT_NAME_SANS_DOMAIN)));
   46527        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_ROLES", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_ROLES)));
   46528        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER)));
   46529        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_FOR_DOMAIN_IN_SITE)));
   46530        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE)));
   46531        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE)));
   46532        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SITES", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_NAME_FORMAT_LIST_SITES)));
   46533        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_ADD", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_SPN_OPERATION_ADD)));
   46534        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_REPLACE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_SPN_OPERATION_REPLACE)));
   46535        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_DELETE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_SPN_OPERATION_DELETE)));
   46536        7484 :         PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_1", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DC_INFO_CTR_1)));
   46537        7484 :         PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DC_INFO_CTR_2)));
   46538        7484 :         PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_3", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DC_INFO_CTR_3)));
   46539        7484 :         PyModule_AddObject(m, "DRSUAPI_DC_CONNECTION_CTR_01", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DC_CONNECTION_CTR_01)));
   46540        7484 :         PyModule_AddObject(m, "DRSUAPI_DIRERR_OK", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DIRERR_OK)));
   46541        7484 :         PyModule_AddObject(m, "DRSUAPI_DIRERR_ATTRIBUTE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DIRERR_ATTRIBUTE)));
   46542        7484 :         PyModule_AddObject(m, "DRSUAPI_DIRERR_NAME", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DIRERR_NAME)));
   46543        7484 :         PyModule_AddObject(m, "DRSUAPI_DIRERR_REFERRAL", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DIRERR_REFERRAL)));
   46544        7484 :         PyModule_AddObject(m, "DRSUAPI_DIRERR_SECURITY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DIRERR_SECURITY)));
   46545        7484 :         PyModule_AddObject(m, "DRSUAPI_DIRERR_SERVICE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DIRERR_SERVICE)));
   46546        7484 :         PyModule_AddObject(m, "DRSUAPI_DIRERR_UPDATE", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DIRERR_UPDATE)));
   46547        7484 :         PyModule_AddObject(m, "DRSUAPI_DIRERR_SYSTEM", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DIRERR_SYSTEM)));
   46548        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_EMPTY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_EMPTY)));
   46549        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_DATA", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_DATA)));
   46550        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_TOKEN", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_TOKEN)));
   46551        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_PKG_PARAMS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_PKG_PARAMS)));
   46552        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_MISSING", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_MISSING)));
   46553        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_EXTRA", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_EXTRA)));
   46554        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_STREAM_TRAILER", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_STREAM_TRAILER)));
   46555        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_STREAM_HEADER", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_STREAM_HEADER)));
   46556        7484 :         PyModule_AddObject(m, "DRSUAPI_SECBUFFER_READONLY", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_SECBUFFER_READONLY)));
   46557        7484 :         PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_SUPERIOR", PyLong_FromLong((uint16_t)(DRSUAPI_CH_REFTYPE_SUPERIOR)));
   46558        7484 :         PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_SUBORDINATE", PyLong_FromLong((uint16_t)(DRSUAPI_CH_REFTYPE_SUBORDINATE)));
   46559        7484 :         PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_NSSR", PyLong_FromLong((uint16_t)(DRSUAPI_CH_REFTYPE_NSSR)));
   46560        7484 :         PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_CROSS", PyLong_FromLong((uint16_t)(DRSUAPI_CH_REFTYPE_CROSS)));
   46561        7484 :         PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_BASE_ONLY", PyLong_FromLong((uint16_t)(DRSUAPI_SE_CHOICE_BASE_ONLY)));
   46562        7484 :         PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_IMMED_CHLDRN", PyLong_FromLong((uint16_t)(DRSUAPI_SE_CHOICE_IMMED_CHLDRN)));
   46563        7484 :         PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_WHOLE_SUBTREE", PyLong_FromLong((uint16_t)(DRSUAPI_SE_CHOICE_WHOLE_SUBTREE)));
   46564        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION)));
   46565        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_EXECUTE_KCC_DAMPED", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_EXECUTE_KCC_DAMPED)));
   46566        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_GET_INFO", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_GET_INFO)));
   46567        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_GET_INFO2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_GET_INFO2)));
   46568        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_NEIGHBORS)));
   46569        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_CURSORS)));
   46570        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA)));
   46571        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES)));
   46572        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES)));
   46573        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_PENDING_OPS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_PENDING_OPS)));
   46574        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA)));
   46575        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_CURSORS2)));
   46576        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS3", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_CURSORS3)));
   46577        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2)));
   46578        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2)));
   46579        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_REPSTO", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_REPSTO)));
   46580        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS)));
   46581        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1)));
   46582        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS", PyLong_FromUnsignedLongLong((uint32_t)(DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS)));
   46583        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_SYNC", PyLong_FromLong((uint16_t)(DRSUAPI_DS_REPLICA_OP_TYPE_SYNC)));
   46584        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_ADD", PyLong_FromLong((uint16_t)(DRSUAPI_DS_REPLICA_OP_TYPE_ADD)));
   46585        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_DELETE", PyLong_FromLong((uint16_t)(DRSUAPI_DS_REPLICA_OP_TYPE_DELETE)));
   46586        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY", PyLong_FromLong((uint16_t)(DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY)));
   46587        7484 :         PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS", PyLong_FromLong((uint16_t)(DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS)));
   46588        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo24_Type);
   46589        7484 :         PyModule_AddObject(m, "DsBindInfo24", (PyObject *)(void *)&drsuapi_DsBindInfo24_Type);
   46590        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo28_Type);
   46591        7484 :         PyModule_AddObject(m, "DsBindInfo28", (PyObject *)(void *)&drsuapi_DsBindInfo28_Type);
   46592        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo32_Type);
   46593        7484 :         PyModule_AddObject(m, "DsBindInfo32", (PyObject *)(void *)&drsuapi_DsBindInfo32_Type);
   46594        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo48_Type);
   46595        7484 :         PyModule_AddObject(m, "DsBindInfo48", (PyObject *)(void *)&drsuapi_DsBindInfo48_Type);
   46596        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo52_Type);
   46597        7484 :         PyModule_AddObject(m, "DsBindInfo52", (PyObject *)(void *)&drsuapi_DsBindInfo52_Type);
   46598        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfoFallBack_Type);
   46599        7484 :         PyModule_AddObject(m, "DsBindInfoFallBack", (PyObject *)(void *)&drsuapi_DsBindInfoFallBack_Type);
   46600        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo_Type);
   46601        7484 :         PyModule_AddObject(m, "DsBindInfo", (PyObject *)(void *)&drsuapi_DsBindInfo_Type);
   46602        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfoCtr_Type);
   46603        7484 :         PyModule_AddObject(m, "DsBindInfoCtr", (PyObject *)(void *)&drsuapi_DsBindInfoCtr_Type);
   46604        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier_Type);
   46605        7484 :         PyModule_AddObject(m, "DsReplicaObjectIdentifier", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier_Type);
   46606        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaSyncRequest1_Type);
   46607        7484 :         PyModule_AddObject(m, "DsReplicaSyncRequest1", (PyObject *)(void *)&drsuapi_DsReplicaSyncRequest1_Type);
   46608        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaSyncRequest_Type);
   46609        7484 :         PyModule_AddObject(m, "DsReplicaSyncRequest", (PyObject *)(void *)&drsuapi_DsReplicaSyncRequest_Type);
   46610        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaHighWaterMark_Type);
   46611        7484 :         PyModule_AddObject(m, "DsReplicaHighWaterMark", (PyObject *)(void *)&drsuapi_DsReplicaHighWaterMark_Type);
   46612        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor_Type);
   46613        7484 :         PyModule_AddObject(m, "DsReplicaCursor", (PyObject *)(void *)&drsuapi_DsReplicaCursor_Type);
   46614        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursorCtrEx_Type);
   46615        7484 :         PyModule_AddObject(m, "DsReplicaCursorCtrEx", (PyObject *)(void *)&drsuapi_DsReplicaCursorCtrEx_Type);
   46616        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest5_Type);
   46617        7484 :         PyModule_AddObject(m, "DsGetNCChangesRequest5", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest5_Type);
   46618        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOID_Type);
   46619        7484 :         PyModule_AddObject(m, "DsReplicaOID", (PyObject *)(void *)&drsuapi_DsReplicaOID_Type);
   46620        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Type);
   46621        7484 :         PyModule_AddObject(m, "DsReplicaOIDMapping", (PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Type);
   46622        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Ctr_Type);
   46623        7484 :         PyModule_AddObject(m, "DsReplicaOIDMapping_Ctr", (PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Ctr_Type);
   46624        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsPartialAttributeSet_Type);
   46625        7484 :         PyModule_AddObject(m, "DsPartialAttributeSet", (PyObject *)(void *)&drsuapi_DsPartialAttributeSet_Type);
   46626        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest8_Type);
   46627        7484 :         PyModule_AddObject(m, "DsGetNCChangesRequest8", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest8_Type);
   46628        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest10_Type);
   46629        7484 :         PyModule_AddObject(m, "DsGetNCChangesRequest10", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest10_Type);
   46630        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest_Type);
   46631        7484 :         PyModule_AddObject(m, "DsGetNCChangesRequest", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest_Type);
   46632        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2_Type);
   46633        7484 :         PyModule_AddObject(m, "DsReplicaCursor2", (PyObject *)(void *)&drsuapi_DsReplicaCursor2_Type);
   46634        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2CtrEx_Type);
   46635        7484 :         PyModule_AddObject(m, "DsReplicaCursor2CtrEx", (PyObject *)(void *)&drsuapi_DsReplicaCursor2CtrEx_Type);
   46636        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAttributeValue_Type);
   46637        7484 :         PyModule_AddObject(m, "DsAttributeValue", (PyObject *)(void *)&drsuapi_DsAttributeValue_Type);
   46638        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAttributeValueCtr_Type);
   46639        7484 :         PyModule_AddObject(m, "DsAttributeValueCtr", (PyObject *)(void *)&drsuapi_DsAttributeValueCtr_Type);
   46640        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3_Type);
   46641        7484 :         PyModule_AddObject(m, "DsReplicaObjectIdentifier3", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3_Type);
   46642        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
   46643        7484 :         PyModule_AddObject(m, "DsReplicaObjectIdentifier3Binary", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
   46644        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttribute_Type);
   46645        7484 :         PyModule_AddObject(m, "DsReplicaAttribute", (PyObject *)(void *)&drsuapi_DsReplicaAttribute_Type);
   46646        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttributeCtr_Type);
   46647        7484 :         PyModule_AddObject(m, "DsReplicaAttributeCtr", (PyObject *)(void *)&drsuapi_DsReplicaAttributeCtr_Type);
   46648        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObject_Type);
   46649        7484 :         PyModule_AddObject(m, "DsReplicaObject", (PyObject *)(void *)&drsuapi_DsReplicaObject_Type);
   46650        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaMetaData_Type);
   46651        7484 :         PyModule_AddObject(m, "DsReplicaMetaData", (PyObject *)(void *)&drsuapi_DsReplicaMetaData_Type);
   46652        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaMetaDataCtr_Type);
   46653        7484 :         PyModule_AddObject(m, "DsReplicaMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaMetaDataCtr_Type);
   46654        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectListItemEx_Type);
   46655        7484 :         PyModule_AddObject(m, "DsReplicaObjectListItemEx", (PyObject *)(void *)&drsuapi_DsReplicaObjectListItemEx_Type);
   46656        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1_Type);
   46657        7484 :         PyModule_AddObject(m, "DsGetNCChangesCtr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1_Type);
   46658        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaLinkedAttribute_Type);
   46659        7484 :         PyModule_AddObject(m, "DsReplicaLinkedAttribute", (PyObject *)(void *)&drsuapi_DsReplicaLinkedAttribute_Type);
   46660        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6_Type);
   46661        7484 :         PyModule_AddObject(m, "DsGetNCChangesCtr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6_Type);
   46662        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1TS_Type);
   46663        7484 :         PyModule_AddObject(m, "DsGetNCChangesCtr1TS", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1TS_Type);
   46664        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6TS_Type);
   46665        7484 :         PyModule_AddObject(m, "DsGetNCChangesCtr6TS", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6TS_Type);
   46666        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
   46667        7484 :         PyModule_AddObject(m, "DsGetNCChangesMSZIPCtr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
   46668        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
   46669        7484 :         PyModule_AddObject(m, "DsGetNCChangesMSZIPCtr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
   46670        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type);
   46671        7484 :         PyModule_AddObject(m, "DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr1_Type);
   46672        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type);
   46673        7484 :         PyModule_AddObject(m, "DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesWIN2K3_LZ77_DIRECT2Ctr6_Type);
   46674        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCompressedCtr_Type);
   46675        7484 :         PyModule_AddObject(m, "DsGetNCChangesCompressedCtr", (PyObject *)(void *)&drsuapi_DsGetNCChangesCompressedCtr_Type);
   46676        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr2_Type);
   46677        7484 :         PyModule_AddObject(m, "DsGetNCChangesCtr2", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr2_Type);
   46678        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr7_Type);
   46679        7484 :         PyModule_AddObject(m, "DsGetNCChangesCtr7", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr7_Type);
   46680        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr_Type);
   46681        7484 :         PyModule_AddObject(m, "DsGetNCChangesCtr", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr_Type);
   46682        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest1_Type);
   46683        7484 :         PyModule_AddObject(m, "DsReplicaUpdateRefsRequest1", (PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest1_Type);
   46684        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest_Type);
   46685        7484 :         PyModule_AddObject(m, "DsReplicaUpdateRefsRequest", (PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest_Type);
   46686        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAddRequest1_Type);
   46687        7484 :         PyModule_AddObject(m, "DsReplicaAddRequest1", (PyObject *)(void *)&drsuapi_DsReplicaAddRequest1_Type);
   46688        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAddRequest2_Type);
   46689        7484 :         PyModule_AddObject(m, "DsReplicaAddRequest2", (PyObject *)(void *)&drsuapi_DsReplicaAddRequest2_Type);
   46690        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAddRequest_Type);
   46691        7484 :         PyModule_AddObject(m, "DsReplicaAddRequest", (PyObject *)(void *)&drsuapi_DsReplicaAddRequest_Type);
   46692        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaDelRequest1_Type);
   46693        7484 :         PyModule_AddObject(m, "DsReplicaDelRequest1", (PyObject *)(void *)&drsuapi_DsReplicaDelRequest1_Type);
   46694        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaDelRequest_Type);
   46695        7484 :         PyModule_AddObject(m, "DsReplicaDelRequest", (PyObject *)(void *)&drsuapi_DsReplicaDelRequest_Type);
   46696        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaModRequest1_Type);
   46697        7484 :         PyModule_AddObject(m, "DsReplicaModRequest1", (PyObject *)(void *)&drsuapi_DsReplicaModRequest1_Type);
   46698        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaModRequest_Type);
   46699        7484 :         PyModule_AddObject(m, "DsReplicaModRequest", (PyObject *)(void *)&drsuapi_DsReplicaModRequest_Type);
   46700        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsCtr1_Type);
   46701        7484 :         PyModule_AddObject(m, "DsGetMembershipsCtr1", (PyObject *)(void *)&drsuapi_DsGetMembershipsCtr1_Type);
   46702        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsCtr_Type);
   46703        7484 :         PyModule_AddObject(m, "DsGetMembershipsCtr", (PyObject *)(void *)&drsuapi_DsGetMembershipsCtr_Type);
   46704        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsRequest1_Type);
   46705        7484 :         PyModule_AddObject(m, "DsGetMembershipsRequest1", (PyObject *)(void *)&drsuapi_DsGetMembershipsRequest1_Type);
   46706        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsRequest_Type);
   46707        7484 :         PyModule_AddObject(m, "DsGetMembershipsRequest", (PyObject *)(void *)&drsuapi_DsGetMembershipsRequest_Type);
   46708        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest1_Type);
   46709        7484 :         PyModule_AddObject(m, "DsGetNT4ChangeLogRequest1", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest1_Type);
   46710        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest_Type);
   46711        7484 :         PyModule_AddObject(m, "DsGetNT4ChangeLogRequest", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest_Type);
   46712        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo1_Type);
   46713        7484 :         PyModule_AddObject(m, "DsGetNT4ChangeLogInfo1", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo1_Type);
   46714        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo_Type);
   46715        7484 :         PyModule_AddObject(m, "DsGetNT4ChangeLogInfo", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo_Type);
   46716        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsNameString_Type);
   46717        7484 :         PyModule_AddObject(m, "DsNameString", (PyObject *)(void *)&drsuapi_DsNameString_Type);
   46718        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsNameRequest1_Type);
   46719        7484 :         PyModule_AddObject(m, "DsNameRequest1", (PyObject *)(void *)&drsuapi_DsNameRequest1_Type);
   46720        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsNameRequest_Type);
   46721        7484 :         PyModule_AddObject(m, "DsNameRequest", (PyObject *)(void *)&drsuapi_DsNameRequest_Type);
   46722        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsNameInfo1_Type);
   46723        7484 :         PyModule_AddObject(m, "DsNameInfo1", (PyObject *)(void *)&drsuapi_DsNameInfo1_Type);
   46724        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsNameCtr1_Type);
   46725        7484 :         PyModule_AddObject(m, "DsNameCtr1", (PyObject *)(void *)&drsuapi_DsNameCtr1_Type);
   46726        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsNameCtr_Type);
   46727        7484 :         PyModule_AddObject(m, "DsNameCtr", (PyObject *)(void *)&drsuapi_DsNameCtr_Type);
   46728        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest1_Type);
   46729        7484 :         PyModule_AddObject(m, "DsWriteAccountSpnRequest1", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest1_Type);
   46730        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest_Type);
   46731        7484 :         PyModule_AddObject(m, "DsWriteAccountSpnRequest", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest_Type);
   46732        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult1_Type);
   46733        7484 :         PyModule_AddObject(m, "DsWriteAccountSpnResult1", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult1_Type);
   46734        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult_Type);
   46735        7484 :         PyModule_AddObject(m, "DsWriteAccountSpnResult", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult_Type);
   46736        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest1_Type);
   46737        7484 :         PyModule_AddObject(m, "DsRemoveDSServerRequest1", (PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest1_Type);
   46738        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest_Type);
   46739        7484 :         PyModule_AddObject(m, "DsRemoveDSServerRequest", (PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest_Type);
   46740        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerResult1_Type);
   46741        7484 :         PyModule_AddObject(m, "DsRemoveDSServerResult1", (PyObject *)(void *)&drsuapi_DsRemoveDSServerResult1_Type);
   46742        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerResult_Type);
   46743        7484 :         PyModule_AddObject(m, "DsRemoveDSServerResult", (PyObject *)(void *)&drsuapi_DsRemoveDSServerResult_Type);
   46744        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoRequest1_Type);
   46745        7484 :         PyModule_AddObject(m, "DsGetDCInfoRequest1", (PyObject *)(void *)&drsuapi_DsGetDCInfoRequest1_Type);
   46746        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoRequest_Type);
   46747        7484 :         PyModule_AddObject(m, "DsGetDCInfoRequest", (PyObject *)(void *)&drsuapi_DsGetDCInfoRequest_Type);
   46748        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo1_Type);
   46749        7484 :         PyModule_AddObject(m, "DsGetDCInfo1", (PyObject *)(void *)&drsuapi_DsGetDCInfo1_Type);
   46750        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr1_Type);
   46751        7484 :         PyModule_AddObject(m, "DsGetDCInfoCtr1", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr1_Type);
   46752        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo2_Type);
   46753        7484 :         PyModule_AddObject(m, "DsGetDCInfo2", (PyObject *)(void *)&drsuapi_DsGetDCInfo2_Type);
   46754        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr2_Type);
   46755        7484 :         PyModule_AddObject(m, "DsGetDCInfoCtr2", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr2_Type);
   46756        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo3_Type);
   46757        7484 :         PyModule_AddObject(m, "DsGetDCInfo3", (PyObject *)(void *)&drsuapi_DsGetDCInfo3_Type);
   46758        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr3_Type);
   46759        7484 :         PyModule_AddObject(m, "DsGetDCInfoCtr3", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr3_Type);
   46760        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCConnection01_Type);
   46761        7484 :         PyModule_AddObject(m, "DsGetDCConnection01", (PyObject *)(void *)&drsuapi_DsGetDCConnection01_Type);
   46762        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCConnectionCtr01_Type);
   46763        7484 :         PyModule_AddObject(m, "DsGetDCConnectionCtr01", (PyObject *)(void *)&drsuapi_DsGetDCConnectionCtr01_Type);
   46764        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr_Type);
   46765        7484 :         PyModule_AddObject(m, "DsGetDCInfoCtr", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr_Type);
   46766        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectListItem_Type);
   46767        7484 :         PyModule_AddObject(m, "DsReplicaObjectListItem", (PyObject *)(void *)&drsuapi_DsReplicaObjectListItem_Type);
   46768        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryRequest2_Type);
   46769        7484 :         PyModule_AddObject(m, "DsAddEntryRequest2", (PyObject *)(void *)&drsuapi_DsAddEntryRequest2_Type);
   46770        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_SecBuffer_Type);
   46771        7484 :         PyModule_AddObject(m, "SecBuffer", (PyObject *)(void *)&drsuapi_SecBuffer_Type);
   46772        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_SecBufferDesc_Type);
   46773        7484 :         PyModule_AddObject(m, "SecBufferDesc", (PyObject *)(void *)&drsuapi_SecBufferDesc_Type);
   46774        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryRequest3_Type);
   46775        7484 :         PyModule_AddObject(m, "DsAddEntryRequest3", (PyObject *)(void *)&drsuapi_DsAddEntryRequest3_Type);
   46776        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryRequest_Type);
   46777        7484 :         PyModule_AddObject(m, "DsAddEntryRequest", (PyObject *)(void *)&drsuapi_DsAddEntryRequest_Type);
   46778        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfoX_Type);
   46779        7484 :         PyModule_AddObject(m, "DsAddEntryErrorInfoX", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfoX_Type);
   46780        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_AttrErr_V1_Type);
   46781        7484 :         PyModule_AddObject(m, "DsAddEntry_AttrErr_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_AttrErr_V1_Type);
   46782        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
   46783        7484 :         PyModule_AddObject(m, "DsAddEntry_AttrErrListItem_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
   46784        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
   46785        7484 :         PyModule_AddObject(m, "DsAddEntryErrorInfo_Attr_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
   46786        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
   46787        7484 :         PyModule_AddObject(m, "DsAddEntryErrorInfo_Name_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
   46788        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_NameResOp_V1_Type);
   46789        7484 :         PyModule_AddObject(m, "NameResOp_V1", (PyObject *)(void *)&drsuapi_NameResOp_V1_Type);
   46790        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsaAddressListItem_V1_Type);
   46791        7484 :         PyModule_AddObject(m, "DsaAddressListItem_V1", (PyObject *)(void *)&drsuapi_DsaAddressListItem_V1_Type);
   46792        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
   46793        7484 :         PyModule_AddObject(m, "DsAddEntry_RefErrListItem_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
   46794        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
   46795        7484 :         PyModule_AddObject(m, "DsAddEntryErrorInfo_Referr_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
   46796        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Type);
   46797        7484 :         PyModule_AddObject(m, "DsAddEntryErrorInfo", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Type);
   46798        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_V1_Type);
   46799        7484 :         PyModule_AddObject(m, "DsAddEntry_ErrData_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_V1_Type);
   46800        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_Type);
   46801        7484 :         PyModule_AddObject(m, "DsAddEntry_ErrData", (PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_Type);
   46802        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier2_Type);
   46803        7484 :         PyModule_AddObject(m, "DsReplicaObjectIdentifier2", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier2_Type);
   46804        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryCtr2_Type);
   46805        7484 :         PyModule_AddObject(m, "DsAddEntryCtr2", (PyObject *)(void *)&drsuapi_DsAddEntryCtr2_Type);
   46806        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryCtr3_Type);
   46807        7484 :         PyModule_AddObject(m, "DsAddEntryCtr3", (PyObject *)(void *)&drsuapi_DsAddEntryCtr3_Type);
   46808        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryCtr_Type);
   46809        7484 :         PyModule_AddObject(m, "DsAddEntryCtr", (PyObject *)(void *)&drsuapi_DsAddEntryCtr_Type);
   46810        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsExecuteKCC1_Type);
   46811        7484 :         PyModule_AddObject(m, "DsExecuteKCC1", (PyObject *)(void *)&drsuapi_DsExecuteKCC1_Type);
   46812        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsExecuteKCCRequest_Type);
   46813        7484 :         PyModule_AddObject(m, "DsExecuteKCCRequest", (PyObject *)(void *)&drsuapi_DsExecuteKCCRequest_Type);
   46814        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest1_Type);
   46815        7484 :         PyModule_AddObject(m, "DsReplicaGetInfoRequest1", (PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest1_Type);
   46816        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest2_Type);
   46817        7484 :         PyModule_AddObject(m, "DsReplicaGetInfoRequest2", (PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest2_Type);
   46818        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest_Type);
   46819        7484 :         PyModule_AddObject(m, "DsReplicaGetInfoRequest", (PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest_Type);
   46820        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaNeighbour_Type);
   46821        7484 :         PyModule_AddObject(m, "DsReplicaNeighbour", (PyObject *)(void *)&drsuapi_DsReplicaNeighbour_Type);
   46822        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaNeighbourCtr_Type);
   46823        7484 :         PyModule_AddObject(m, "DsReplicaNeighbourCtr", (PyObject *)(void *)&drsuapi_DsReplicaNeighbourCtr_Type);
   46824        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursorCtr_Type);
   46825        7484 :         PyModule_AddObject(m, "DsReplicaCursorCtr", (PyObject *)(void *)&drsuapi_DsReplicaCursorCtr_Type);
   46826        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData_Type);
   46827        7484 :         PyModule_AddObject(m, "DsReplicaObjMetaData", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData_Type);
   46828        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaDataCtr_Type);
   46829        7484 :         PyModule_AddObject(m, "DsReplicaObjMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaDataCtr_Type);
   46830        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailure_Type);
   46831        7484 :         PyModule_AddObject(m, "DsReplicaKccDsaFailure", (PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailure_Type);
   46832        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
   46833        7484 :         PyModule_AddObject(m, "DsReplicaKccDsaFailuresCtr", (PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
   46834        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOp_Type);
   46835        7484 :         PyModule_AddObject(m, "DsReplicaOp", (PyObject *)(void *)&drsuapi_DsReplicaOp_Type);
   46836        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOpCtr_Type);
   46837        7484 :         PyModule_AddObject(m, "DsReplicaOpCtr", (PyObject *)(void *)&drsuapi_DsReplicaOpCtr_Type);
   46838        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData_Type);
   46839        7484 :         PyModule_AddObject(m, "DsReplicaAttrValMetaData", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData_Type);
   46840        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
   46841        7484 :         PyModule_AddObject(m, "DsReplicaAttrValMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
   46842        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2Ctr_Type);
   46843        7484 :         PyModule_AddObject(m, "DsReplicaCursor2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaCursor2Ctr_Type);
   46844        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor3_Type);
   46845        7484 :         PyModule_AddObject(m, "DsReplicaCursor3", (PyObject *)(void *)&drsuapi_DsReplicaCursor3_Type);
   46846        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor3Ctr_Type);
   46847        7484 :         PyModule_AddObject(m, "DsReplicaCursor3Ctr", (PyObject *)(void *)&drsuapi_DsReplicaCursor3Ctr_Type);
   46848        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2_Type);
   46849        7484 :         PyModule_AddObject(m, "DsReplicaObjMetaData2", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2_Type);
   46850        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2Ctr_Type);
   46851        7484 :         PyModule_AddObject(m, "DsReplicaObjMetaData2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2Ctr_Type);
   46852        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2_Type);
   46853        7484 :         PyModule_AddObject(m, "DsReplicaAttrValMetaData2", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2_Type);
   46854        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
   46855        7484 :         PyModule_AddObject(m, "DsReplicaAttrValMetaData2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
   46856        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaConnection04_Type);
   46857        7484 :         PyModule_AddObject(m, "DsReplicaConnection04", (PyObject *)(void *)&drsuapi_DsReplicaConnection04_Type);
   46858        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaConnection04Ctr_Type);
   46859        7484 :         PyModule_AddObject(m, "DsReplicaConnection04Ctr", (PyObject *)(void *)&drsuapi_DsReplicaConnection04Ctr_Type);
   46860        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplica06_Type);
   46861        7484 :         PyModule_AddObject(m, "DsReplica06", (PyObject *)(void *)&drsuapi_DsReplica06_Type);
   46862        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplica06Ctr_Type);
   46863        7484 :         PyModule_AddObject(m, "DsReplica06Ctr", (PyObject *)(void *)&drsuapi_DsReplica06Ctr_Type);
   46864        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaInfo_Type);
   46865        7484 :         PyModule_AddObject(m, "DsReplicaInfo", (PyObject *)(void *)&drsuapi_DsReplicaInfo_Type);
   46866        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr1_Type);
   46867        7484 :         PyModule_AddObject(m, "DsGetMemberships2Ctr1", (PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr1_Type);
   46868        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr_Type);
   46869        7484 :         PyModule_AddObject(m, "DsGetMemberships2Ctr", (PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr_Type);
   46870        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Request1_Type);
   46871        7484 :         PyModule_AddObject(m, "DsGetMemberships2Request1", (PyObject *)(void *)&drsuapi_DsGetMemberships2Request1_Type);
   46872        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Request_Type);
   46873        7484 :         PyModule_AddObject(m, "DsGetMemberships2Request", (PyObject *)(void *)&drsuapi_DsGetMemberships2Request_Type);
   46874        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsSiteCostInfo_Type);
   46875        7484 :         PyModule_AddObject(m, "DsSiteCostInfo", (PyObject *)(void *)&drsuapi_DsSiteCostInfo_Type);
   46876        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostCtr1_Type);
   46877        7484 :         PyModule_AddObject(m, "QuerySitesByCostCtr1", (PyObject *)(void *)&drsuapi_QuerySitesByCostCtr1_Type);
   46878        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostCtr_Type);
   46879        7484 :         PyModule_AddObject(m, "QuerySitesByCostCtr", (PyObject *)(void *)&drsuapi_QuerySitesByCostCtr_Type);
   46880        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostRequest1_Type);
   46881        7484 :         PyModule_AddObject(m, "QuerySitesByCostRequest1", (PyObject *)(void *)&drsuapi_QuerySitesByCostRequest1_Type);
   46882        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostRequest_Type);
   46883        7484 :         PyModule_AddObject(m, "QuerySitesByCostRequest", (PyObject *)(void *)&drsuapi_QuerySitesByCostRequest_Type);
   46884        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsBind_Type);
   46885        7484 :         PyModule_AddObject(m, "DsBind", (PyObject *)(void *)&drsuapi_DsBind_Type);
   46886        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsUnbind_Type);
   46887        7484 :         PyModule_AddObject(m, "DsUnbind", (PyObject *)(void *)&drsuapi_DsUnbind_Type);
   46888        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaSync_Type);
   46889        7484 :         PyModule_AddObject(m, "DsReplicaSync", (PyObject *)(void *)&drsuapi_DsReplicaSync_Type);
   46890        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChanges_Type);
   46891        7484 :         PyModule_AddObject(m, "DsGetNCChanges", (PyObject *)(void *)&drsuapi_DsGetNCChanges_Type);
   46892        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaUpdateRefs_Type);
   46893        7484 :         PyModule_AddObject(m, "DsReplicaUpdateRefs", (PyObject *)(void *)&drsuapi_DsReplicaUpdateRefs_Type);
   46894        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAdd_Type);
   46895        7484 :         PyModule_AddObject(m, "DsReplicaAdd", (PyObject *)(void *)&drsuapi_DsReplicaAdd_Type);
   46896        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaDel_Type);
   46897        7484 :         PyModule_AddObject(m, "DsReplicaDel", (PyObject *)(void *)&drsuapi_DsReplicaDel_Type);
   46898        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaMod_Type);
   46899        7484 :         PyModule_AddObject(m, "DsReplicaMod", (PyObject *)(void *)&drsuapi_DsReplicaMod_Type);
   46900        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships_Type);
   46901        7484 :         PyModule_AddObject(m, "DsGetMemberships", (PyObject *)(void *)&drsuapi_DsGetMemberships_Type);
   46902        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLog_Type);
   46903        7484 :         PyModule_AddObject(m, "DsGetNT4ChangeLog", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLog_Type);
   46904        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsCrackNames_Type);
   46905        7484 :         PyModule_AddObject(m, "DsCrackNames", (PyObject *)(void *)&drsuapi_DsCrackNames_Type);
   46906        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpn_Type);
   46907        7484 :         PyModule_AddObject(m, "DsWriteAccountSpn", (PyObject *)(void *)&drsuapi_DsWriteAccountSpn_Type);
   46908        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServer_Type);
   46909        7484 :         PyModule_AddObject(m, "DsRemoveDSServer", (PyObject *)(void *)&drsuapi_DsRemoveDSServer_Type);
   46910        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDomainControllerInfo_Type);
   46911        7484 :         PyModule_AddObject(m, "DsGetDomainControllerInfo", (PyObject *)(void *)&drsuapi_DsGetDomainControllerInfo_Type);
   46912        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_Type);
   46913        7484 :         PyModule_AddObject(m, "DsAddEntry", (PyObject *)(void *)&drsuapi_DsAddEntry_Type);
   46914        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsExecuteKCC_Type);
   46915        7484 :         PyModule_AddObject(m, "DsExecuteKCC", (PyObject *)(void *)&drsuapi_DsExecuteKCC_Type);
   46916        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfo_Type);
   46917        7484 :         PyModule_AddObject(m, "DsReplicaGetInfo", (PyObject *)(void *)&drsuapi_DsReplicaGetInfo_Type);
   46918        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2_Type);
   46919        7484 :         PyModule_AddObject(m, "DsGetMemberships2", (PyObject *)(void *)&drsuapi_DsGetMemberships2_Type);
   46920        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCost_Type);
   46921        7484 :         PyModule_AddObject(m, "QuerySitesByCost", (PyObject *)(void *)&drsuapi_QuerySitesByCost_Type);
   46922        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_InterfaceType);
   46923        7484 :         PyModule_AddObject(m, "drsuapi", (PyObject *)(void *)&drsuapi_InterfaceType);
   46924        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_SyntaxType);
   46925        7484 :         PyModule_AddObject(m, "drsuapi_abstract_syntax", (PyObject *)(void *)&drsuapi_SyntaxType);
   46926        6245 :         Py_INCREF((PyObject *)(void *)&drsuapi_SyntaxType);
   46927        7484 :         PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&drsuapi_SyntaxType);
   46928             : #ifdef PY_MOD_DRSUAPI_PATCH
   46929             :         PY_MOD_DRSUAPI_PATCH(m);
   46930             : #endif
   46931        7484 :         out:
   46932        7484 :         Py_XDECREF(dep_samba_dcerpc_security);
   46933        7484 :         Py_XDECREF(dep_samba_dcerpc_misc);
   46934        7484 :         Py_XDECREF(dep_samba_dcerpc_lsa);
   46935        7484 :         Py_XDECREF(dep_samba_dcerpc_samr);
   46936        7484 :         Py_XDECREF(dep_talloc);
   46937        7484 :         Py_XDECREF(dep_samba_dcerpc_base);
   46938        7292 :         return m;
   46939             : 
   46940             : }

Generated by: LCOV version 1.14