Line data Source code
1 :
2 : /* Python wrapper functions auto-generated by pidl */
3 : #define PY_SSIZE_T_CLEAN 1 /* We use Py_ssize_t for PyArg_ParseTupleAndKeywords */
4 : #include <Python.h>
5 : #include "python/py3compat.h"
6 : #include "includes.h"
7 : #include "python/modules.h"
8 : #include <pytalloc.h>
9 : #include "librpc/rpc/pyrpc.h"
10 : #include "librpc/rpc/pyrpc_util.h"
11 : #include "bin/default/librpc/gen_ndr/ndr_drsuapi.h"
12 : #include "bin/default/librpc/gen_ndr/ndr_drsuapi_c.h"
13 :
14 : /*
15 : * Suppress compiler warnings if the generated code does not call these
16 : * functions
17 : */
18 : #ifndef _MAYBE_UNUSED_
19 : #ifdef __has_attribute
20 : #if __has_attribute(unused)
21 : #define _MAYBE_UNUSED_ __attribute__ ((unused))
22 : #else
23 : #define _MAYBE_UNUSED_
24 : #endif
25 : #endif
26 : #endif
27 : /*
28 : * These functions are here to ensure they can be optimized out by
29 : * the compiler based on the constant input values
30 : */
31 :
32 205100 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
33 : {
34 205100 : switch (var_size) {
35 9993 : case 8:
36 9993 : return UINT64_MAX;
37 194855 : case 4:
38 194855 : 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_DsGetNCChangesXPRESSCtr1_Type;
110 : static PyTypeObject drsuapi_DsGetNCChangesXPRESSCtr6_Type;
111 : static PyTypeObject drsuapi_DsGetNCChangesCompressedCtr_Type;
112 : static PyTypeObject drsuapi_DsGetNCChangesCtr2_Type;
113 : static PyTypeObject drsuapi_DsGetNCChangesCtr7_Type;
114 : static PyTypeObject drsuapi_DsGetNCChangesCtr_Type;
115 : static PyTypeObject drsuapi_DsReplicaUpdateRefsRequest1_Type;
116 : static PyTypeObject drsuapi_DsReplicaUpdateRefsRequest_Type;
117 : static PyTypeObject drsuapi_DsReplicaAddRequest1_Type;
118 : static PyTypeObject drsuapi_DsReplicaAddRequest2_Type;
119 : static PyTypeObject drsuapi_DsReplicaAddRequest_Type;
120 : static PyTypeObject drsuapi_DsReplicaDelRequest1_Type;
121 : static PyTypeObject drsuapi_DsReplicaDelRequest_Type;
122 : static PyTypeObject drsuapi_DsReplicaModRequest1_Type;
123 : static PyTypeObject drsuapi_DsReplicaModRequest_Type;
124 : static PyTypeObject drsuapi_DsGetMembershipsCtr1_Type;
125 : static PyTypeObject drsuapi_DsGetMembershipsCtr_Type;
126 : static PyTypeObject drsuapi_DsGetMembershipsRequest1_Type;
127 : static PyTypeObject drsuapi_DsGetMembershipsRequest_Type;
128 : static PyTypeObject drsuapi_DsGetNT4ChangeLogRequest1_Type;
129 : static PyTypeObject drsuapi_DsGetNT4ChangeLogRequest_Type;
130 : static PyTypeObject drsuapi_DsGetNT4ChangeLogInfo1_Type;
131 : static PyTypeObject drsuapi_DsGetNT4ChangeLogInfo_Type;
132 : static PyTypeObject drsuapi_DsNameString_Type;
133 : static PyTypeObject drsuapi_DsNameRequest1_Type;
134 : static PyTypeObject drsuapi_DsNameRequest_Type;
135 : static PyTypeObject drsuapi_DsNameInfo1_Type;
136 : static PyTypeObject drsuapi_DsNameCtr1_Type;
137 : static PyTypeObject drsuapi_DsNameCtr_Type;
138 : static PyTypeObject drsuapi_DsWriteAccountSpnRequest1_Type;
139 : static PyTypeObject drsuapi_DsWriteAccountSpnRequest_Type;
140 : static PyTypeObject drsuapi_DsWriteAccountSpnResult1_Type;
141 : static PyTypeObject drsuapi_DsWriteAccountSpnResult_Type;
142 : static PyTypeObject drsuapi_DsRemoveDSServerRequest1_Type;
143 : static PyTypeObject drsuapi_DsRemoveDSServerRequest_Type;
144 : static PyTypeObject drsuapi_DsRemoveDSServerResult1_Type;
145 : static PyTypeObject drsuapi_DsRemoveDSServerResult_Type;
146 : static PyTypeObject drsuapi_DsGetDCInfoRequest1_Type;
147 : static PyTypeObject drsuapi_DsGetDCInfoRequest_Type;
148 : static PyTypeObject drsuapi_DsGetDCInfo1_Type;
149 : static PyTypeObject drsuapi_DsGetDCInfoCtr1_Type;
150 : static PyTypeObject drsuapi_DsGetDCInfo2_Type;
151 : static PyTypeObject drsuapi_DsGetDCInfoCtr2_Type;
152 : static PyTypeObject drsuapi_DsGetDCInfo3_Type;
153 : static PyTypeObject drsuapi_DsGetDCInfoCtr3_Type;
154 : static PyTypeObject drsuapi_DsGetDCConnection01_Type;
155 : static PyTypeObject drsuapi_DsGetDCConnectionCtr01_Type;
156 : static PyTypeObject drsuapi_DsGetDCInfoCtr_Type;
157 : static PyTypeObject drsuapi_DsReplicaObjectListItem_Type;
158 : static PyTypeObject drsuapi_DsAddEntryRequest2_Type;
159 : static PyTypeObject drsuapi_SecBuffer_Type;
160 : static PyTypeObject drsuapi_SecBufferDesc_Type;
161 : static PyTypeObject drsuapi_DsAddEntryRequest3_Type;
162 : static PyTypeObject drsuapi_DsAddEntryRequest_Type;
163 : static PyTypeObject drsuapi_DsAddEntryErrorInfoX_Type;
164 : static PyTypeObject drsuapi_DsAddEntry_AttrErr_V1_Type;
165 : static PyTypeObject drsuapi_DsAddEntry_AttrErrListItem_V1_Type;
166 : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Attr_V1_Type;
167 : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Name_V1_Type;
168 : static PyTypeObject drsuapi_NameResOp_V1_Type;
169 : static PyTypeObject drsuapi_DsaAddressListItem_V1_Type;
170 : static PyTypeObject drsuapi_DsAddEntry_RefErrListItem_V1_Type;
171 : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Referr_V1_Type;
172 : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Type;
173 : static PyTypeObject drsuapi_DsAddEntry_ErrData_V1_Type;
174 : static PyTypeObject drsuapi_DsAddEntry_ErrData_Type;
175 : static PyTypeObject drsuapi_DsReplicaObjectIdentifier2_Type;
176 : static PyTypeObject drsuapi_DsAddEntryCtr2_Type;
177 : static PyTypeObject drsuapi_DsAddEntryCtr3_Type;
178 : static PyTypeObject drsuapi_DsAddEntryCtr_Type;
179 : static PyTypeObject drsuapi_DsExecuteKCC1_Type;
180 : static PyTypeObject drsuapi_DsExecuteKCCRequest_Type;
181 : static PyTypeObject drsuapi_DsReplicaGetInfoRequest1_Type;
182 : static PyTypeObject drsuapi_DsReplicaGetInfoRequest2_Type;
183 : static PyTypeObject drsuapi_DsReplicaGetInfoRequest_Type;
184 : static PyTypeObject drsuapi_DsReplicaNeighbour_Type;
185 : static PyTypeObject drsuapi_DsReplicaNeighbourCtr_Type;
186 : static PyTypeObject drsuapi_DsReplicaCursorCtr_Type;
187 : static PyTypeObject drsuapi_DsReplicaObjMetaData_Type;
188 : static PyTypeObject drsuapi_DsReplicaObjMetaDataCtr_Type;
189 : static PyTypeObject drsuapi_DsReplicaKccDsaFailure_Type;
190 : static PyTypeObject drsuapi_DsReplicaKccDsaFailuresCtr_Type;
191 : static PyTypeObject drsuapi_DsReplicaOp_Type;
192 : static PyTypeObject drsuapi_DsReplicaOpCtr_Type;
193 : static PyTypeObject drsuapi_DsReplicaAttrValMetaData_Type;
194 : static PyTypeObject drsuapi_DsReplicaAttrValMetaDataCtr_Type;
195 : static PyTypeObject drsuapi_DsReplicaCursor2Ctr_Type;
196 : static PyTypeObject drsuapi_DsReplicaCursor3_Type;
197 : static PyTypeObject drsuapi_DsReplicaCursor3Ctr_Type;
198 : static PyTypeObject drsuapi_DsReplicaObjMetaData2_Type;
199 : static PyTypeObject drsuapi_DsReplicaObjMetaData2Ctr_Type;
200 : static PyTypeObject drsuapi_DsReplicaAttrValMetaData2_Type;
201 : static PyTypeObject drsuapi_DsReplicaAttrValMetaData2Ctr_Type;
202 : static PyTypeObject drsuapi_DsReplicaConnection04_Type;
203 : static PyTypeObject drsuapi_DsReplicaConnection04Ctr_Type;
204 : static PyTypeObject drsuapi_DsReplica06_Type;
205 : static PyTypeObject drsuapi_DsReplica06Ctr_Type;
206 : static PyTypeObject drsuapi_DsReplicaInfo_Type;
207 : static PyTypeObject drsuapi_DsGetMemberships2Ctr1_Type;
208 : static PyTypeObject drsuapi_DsGetMemberships2Ctr_Type;
209 : static PyTypeObject drsuapi_DsGetMemberships2Request1_Type;
210 : static PyTypeObject drsuapi_DsGetMemberships2Request_Type;
211 : static PyTypeObject drsuapi_DsSiteCostInfo_Type;
212 : static PyTypeObject drsuapi_QuerySitesByCostCtr1_Type;
213 : static PyTypeObject drsuapi_QuerySitesByCostCtr_Type;
214 : static PyTypeObject drsuapi_QuerySitesByCostRequest1_Type;
215 : static PyTypeObject drsuapi_QuerySitesByCostRequest_Type;
216 : static PyTypeObject drsuapi_InterfaceType;
217 : static PyTypeObject drsuapi_DsBind_Type;
218 : static PyTypeObject drsuapi_DsUnbind_Type;
219 : static PyTypeObject drsuapi_DsReplicaSync_Type;
220 : static PyTypeObject drsuapi_DsGetNCChanges_Type;
221 : static PyTypeObject drsuapi_DsReplicaUpdateRefs_Type;
222 : static PyTypeObject drsuapi_DsReplicaAdd_Type;
223 : static PyTypeObject drsuapi_DsReplicaDel_Type;
224 : static PyTypeObject drsuapi_DsReplicaMod_Type;
225 : static PyTypeObject drsuapi_DsGetMemberships_Type;
226 : static PyTypeObject drsuapi_DsGetNT4ChangeLog_Type;
227 : static PyTypeObject drsuapi_DsCrackNames_Type;
228 : static PyTypeObject drsuapi_DsWriteAccountSpn_Type;
229 : static PyTypeObject drsuapi_DsRemoveDSServer_Type;
230 : static PyTypeObject drsuapi_DsGetDomainControllerInfo_Type;
231 : static PyTypeObject drsuapi_DsAddEntry_Type;
232 : static PyTypeObject drsuapi_DsExecuteKCC_Type;
233 : static PyTypeObject drsuapi_DsReplicaGetInfo_Type;
234 : static PyTypeObject drsuapi_DsGetMemberships2_Type;
235 : static PyTypeObject drsuapi_QuerySitesByCost_Type;
236 :
237 : static PyTypeObject *GUID_Type;
238 : static PyTypeObject *BaseObject_Type;
239 : static PyTypeObject *dom_sid_Type;
240 : static PyTypeObject *lsa_String_Type;
241 : static PyTypeObject *policy_handle_Type;
242 : static PyTypeObject *ClientConnection_Type;
243 : static PyTypeObject *ndr_syntax_id_Type;
244 :
245 0 : static PyObject *py_drsuapi_DsBindInfo24_get_supported_extensions(PyObject *obj, void *closure)
246 : {
247 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(obj);
248 : PyObject *py_supported_extensions;
249 0 : py_supported_extensions = PyLong_FromUnsignedLongLong((uint32_t)object->supported_extensions);
250 0 : return py_supported_extensions;
251 : }
252 :
253 0 : static int py_drsuapi_DsBindInfo24_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
254 : {
255 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
256 0 : if (value == NULL) {
257 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions");
258 0 : return -1;
259 : }
260 : {
261 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions));
262 0 : if (PyLong_Check(value)) {
263 : unsigned long long test_var;
264 0 : test_var = PyLong_AsUnsignedLongLong(value);
265 0 : if (PyErr_Occurred() != NULL) {
266 0 : return -1;
267 : }
268 0 : if (test_var > uint_max) {
269 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
270 : PyLong_Type.tp_name, uint_max, test_var);
271 0 : return -1;
272 : }
273 0 : object->supported_extensions = test_var;
274 : } else {
275 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
276 : PyLong_Type.tp_name);
277 0 : return -1;
278 : }
279 : }
280 0 : return 0;
281 : }
282 :
283 0 : static PyObject *py_drsuapi_DsBindInfo24_get_site_guid(PyObject *obj, void *closure)
284 : {
285 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(obj);
286 : PyObject *py_site_guid;
287 0 : py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
288 0 : return py_site_guid;
289 : }
290 :
291 0 : static int py_drsuapi_DsBindInfo24_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
292 : {
293 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
294 0 : if (value == NULL) {
295 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
296 0 : return -1;
297 : }
298 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
299 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
300 0 : PyErr_NoMemory();
301 0 : return -1;
302 : }
303 0 : object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
304 0 : return 0;
305 : }
306 :
307 0 : static PyObject *py_drsuapi_DsBindInfo24_get_pid(PyObject *obj, void *closure)
308 : {
309 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(obj);
310 : PyObject *py_pid;
311 0 : py_pid = PyLong_FromUnsignedLongLong((uint32_t)object->pid);
312 0 : return py_pid;
313 : }
314 :
315 0 : static int py_drsuapi_DsBindInfo24_set_pid(PyObject *py_obj, PyObject *value, void *closure)
316 : {
317 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
318 0 : if (value == NULL) {
319 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pid");
320 0 : return -1;
321 : }
322 : {
323 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pid));
324 0 : if (PyLong_Check(value)) {
325 : unsigned long long test_var;
326 0 : test_var = PyLong_AsUnsignedLongLong(value);
327 0 : if (PyErr_Occurred() != NULL) {
328 0 : return -1;
329 : }
330 0 : if (test_var > uint_max) {
331 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
332 : PyLong_Type.tp_name, uint_max, test_var);
333 0 : return -1;
334 : }
335 0 : object->pid = test_var;
336 : } else {
337 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
338 : PyLong_Type.tp_name);
339 0 : return -1;
340 : }
341 : }
342 0 : return 0;
343 : }
344 :
345 : static PyGetSetDef py_drsuapi_DsBindInfo24_getsetters[] = {
346 : {
347 : .name = discard_const_p(char, "supported_extensions"),
348 : .get = py_drsuapi_DsBindInfo24_get_supported_extensions,
349 : .set = py_drsuapi_DsBindInfo24_set_supported_extensions,
350 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensions")
351 : },
352 : {
353 : .name = discard_const_p(char, "site_guid"),
354 : .get = py_drsuapi_DsBindInfo24_get_site_guid,
355 : .set = py_drsuapi_DsBindInfo24_set_site_guid,
356 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
357 : },
358 : {
359 : .name = discard_const_p(char, "pid"),
360 : .get = py_drsuapi_DsBindInfo24_get_pid,
361 : .set = py_drsuapi_DsBindInfo24_set_pid,
362 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
363 : },
364 : { .name = NULL }
365 : };
366 :
367 0 : static PyObject *py_drsuapi_DsBindInfo24_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
368 : {
369 0 : return pytalloc_new(struct drsuapi_DsBindInfo24, type);
370 : }
371 :
372 0 : static PyObject *py_drsuapi_DsBindInfo24_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
373 : {
374 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
375 0 : PyObject *ret = NULL;
376 : DATA_BLOB blob;
377 : enum ndr_err_code err;
378 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
379 0 : if (tmp_ctx == NULL) {
380 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
381 0 : return NULL;
382 : }
383 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsBindInfo24);
384 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
385 0 : TALLOC_FREE(tmp_ctx);
386 0 : PyErr_SetNdrError(err);
387 0 : return NULL;
388 : }
389 :
390 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
391 0 : TALLOC_FREE(tmp_ctx);
392 0 : return ret;
393 : }
394 :
395 0 : static PyObject *py_drsuapi_DsBindInfo24_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
396 : {
397 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
398 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
399 0 : Py_ssize_t blob_length = 0;
400 : enum ndr_err_code err;
401 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
402 0 : PyObject *allow_remaining_obj = NULL;
403 0 : bool allow_remaining = false;
404 :
405 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
406 : discard_const_p(char *, kwnames),
407 : &blob.data, &blob_length,
408 : &allow_remaining_obj)) {
409 0 : return NULL;
410 : }
411 0 : blob.length = blob_length;
412 :
413 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
414 0 : allow_remaining = true;
415 : }
416 :
417 0 : if (allow_remaining) {
418 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo24);
419 : } else {
420 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo24);
421 : }
422 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
423 0 : PyErr_SetNdrError(err);
424 0 : return NULL;
425 : }
426 :
427 0 : Py_RETURN_NONE;
428 : }
429 :
430 0 : static PyObject *py_drsuapi_DsBindInfo24_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
431 : {
432 0 : struct drsuapi_DsBindInfo24 *object = (struct drsuapi_DsBindInfo24 *)pytalloc_get_ptr(py_obj);
433 : PyObject *ret;
434 : char *retstr;
435 :
436 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsBindInfo24, "drsuapi_DsBindInfo24", object);
437 0 : ret = PyUnicode_FromString(retstr);
438 0 : talloc_free(retstr);
439 :
440 0 : return ret;
441 : }
442 :
443 : static PyMethodDef py_drsuapi_DsBindInfo24_methods[] = {
444 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsBindInfo24_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
445 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBindInfo24_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
446 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsBindInfo24_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
447 : { NULL, NULL, 0, NULL }
448 : };
449 :
450 :
451 : static PyTypeObject drsuapi_DsBindInfo24_Type = {
452 : PyVarObject_HEAD_INIT(NULL, 0)
453 : .tp_name = "drsuapi.DsBindInfo24",
454 : .tp_getset = py_drsuapi_DsBindInfo24_getsetters,
455 : .tp_methods = py_drsuapi_DsBindInfo24_methods,
456 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
457 : .tp_new = py_drsuapi_DsBindInfo24_new,
458 : };
459 :
460 :
461 52829 : static PyObject *py_drsuapi_DsBindInfo28_get_supported_extensions(PyObject *obj, void *closure)
462 : {
463 52829 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(obj);
464 : PyObject *py_supported_extensions;
465 52829 : py_supported_extensions = PyLong_FromUnsignedLongLong((uint32_t)object->supported_extensions);
466 52829 : return py_supported_extensions;
467 : }
468 :
469 50876 : static int py_drsuapi_DsBindInfo28_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
470 : {
471 50876 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
472 50876 : if (value == NULL) {
473 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions");
474 0 : return -1;
475 : }
476 : {
477 50876 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions));
478 50876 : if (PyLong_Check(value)) {
479 : unsigned long long test_var;
480 50876 : test_var = PyLong_AsUnsignedLongLong(value);
481 50876 : if (PyErr_Occurred() != NULL) {
482 0 : return -1;
483 : }
484 50876 : 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 50876 : 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 50876 : return 0;
497 : }
498 :
499 4 : static PyObject *py_drsuapi_DsBindInfo28_get_site_guid(PyObject *obj, void *closure)
500 : {
501 4 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(obj);
502 : PyObject *py_site_guid;
503 4 : py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
504 4 : return py_site_guid;
505 : }
506 :
507 0 : static int py_drsuapi_DsBindInfo28_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
508 : {
509 0 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
510 0 : if (value == NULL) {
511 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
512 0 : return -1;
513 : }
514 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
515 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
516 0 : PyErr_NoMemory();
517 0 : return -1;
518 : }
519 0 : object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
520 0 : return 0;
521 : }
522 :
523 0 : static PyObject *py_drsuapi_DsBindInfo28_get_pid(PyObject *obj, void *closure)
524 : {
525 0 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(obj);
526 : PyObject *py_pid;
527 0 : py_pid = PyLong_FromUnsignedLongLong((uint32_t)object->pid);
528 0 : return py_pid;
529 : }
530 :
531 0 : static int py_drsuapi_DsBindInfo28_set_pid(PyObject *py_obj, PyObject *value, void *closure)
532 : {
533 0 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
534 0 : if (value == NULL) {
535 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pid");
536 0 : return -1;
537 : }
538 : {
539 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pid));
540 0 : if (PyLong_Check(value)) {
541 : unsigned long long test_var;
542 0 : test_var = PyLong_AsUnsignedLongLong(value);
543 0 : if (PyErr_Occurred() != NULL) {
544 0 : return -1;
545 : }
546 0 : if (test_var > uint_max) {
547 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
548 : PyLong_Type.tp_name, uint_max, test_var);
549 0 : return -1;
550 : }
551 0 : object->pid = test_var;
552 : } else {
553 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
554 : PyLong_Type.tp_name);
555 0 : return -1;
556 : }
557 : }
558 0 : return 0;
559 : }
560 :
561 4 : static PyObject *py_drsuapi_DsBindInfo28_get_repl_epoch(PyObject *obj, void *closure)
562 : {
563 4 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(obj);
564 : PyObject *py_repl_epoch;
565 4 : py_repl_epoch = PyLong_FromUnsignedLongLong((uint32_t)object->repl_epoch);
566 4 : return py_repl_epoch;
567 : }
568 :
569 0 : static int py_drsuapi_DsBindInfo28_set_repl_epoch(PyObject *py_obj, PyObject *value, void *closure)
570 : {
571 0 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
572 0 : if (value == NULL) {
573 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->repl_epoch");
574 0 : return -1;
575 : }
576 : {
577 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->repl_epoch));
578 0 : if (PyLong_Check(value)) {
579 : unsigned long long test_var;
580 0 : test_var = PyLong_AsUnsignedLongLong(value);
581 0 : if (PyErr_Occurred() != NULL) {
582 0 : return -1;
583 : }
584 0 : if (test_var > uint_max) {
585 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
586 : PyLong_Type.tp_name, uint_max, test_var);
587 0 : return -1;
588 : }
589 0 : object->repl_epoch = test_var;
590 : } else {
591 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
592 : PyLong_Type.tp_name);
593 0 : return -1;
594 : }
595 : }
596 0 : return 0;
597 : }
598 :
599 : static PyGetSetDef py_drsuapi_DsBindInfo28_getsetters[] = {
600 : {
601 : .name = discard_const_p(char, "supported_extensions"),
602 : .get = py_drsuapi_DsBindInfo28_get_supported_extensions,
603 : .set = py_drsuapi_DsBindInfo28_set_supported_extensions,
604 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensions")
605 : },
606 : {
607 : .name = discard_const_p(char, "site_guid"),
608 : .get = py_drsuapi_DsBindInfo28_get_site_guid,
609 : .set = py_drsuapi_DsBindInfo28_set_site_guid,
610 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
611 : },
612 : {
613 : .name = discard_const_p(char, "pid"),
614 : .get = py_drsuapi_DsBindInfo28_get_pid,
615 : .set = py_drsuapi_DsBindInfo28_set_pid,
616 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
617 : },
618 : {
619 : .name = discard_const_p(char, "repl_epoch"),
620 : .get = py_drsuapi_DsBindInfo28_get_repl_epoch,
621 : .set = py_drsuapi_DsBindInfo28_set_repl_epoch,
622 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
623 : },
624 : { .name = NULL }
625 : };
626 :
627 1821 : static PyObject *py_drsuapi_DsBindInfo28_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
628 : {
629 1821 : return pytalloc_new(struct drsuapi_DsBindInfo28, type);
630 : }
631 :
632 0 : static PyObject *py_drsuapi_DsBindInfo28_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
633 : {
634 0 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
635 0 : PyObject *ret = NULL;
636 : DATA_BLOB blob;
637 : enum ndr_err_code err;
638 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
639 0 : if (tmp_ctx == NULL) {
640 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
641 0 : return NULL;
642 : }
643 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsBindInfo28);
644 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
645 0 : TALLOC_FREE(tmp_ctx);
646 0 : PyErr_SetNdrError(err);
647 0 : return NULL;
648 : }
649 :
650 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
651 0 : TALLOC_FREE(tmp_ctx);
652 0 : return ret;
653 : }
654 :
655 0 : static PyObject *py_drsuapi_DsBindInfo28_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
656 : {
657 0 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
658 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
659 0 : Py_ssize_t blob_length = 0;
660 : enum ndr_err_code err;
661 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
662 0 : PyObject *allow_remaining_obj = NULL;
663 0 : bool allow_remaining = false;
664 :
665 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
666 : discard_const_p(char *, kwnames),
667 : &blob.data, &blob_length,
668 : &allow_remaining_obj)) {
669 0 : return NULL;
670 : }
671 0 : blob.length = blob_length;
672 :
673 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
674 0 : allow_remaining = true;
675 : }
676 :
677 0 : if (allow_remaining) {
678 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo28);
679 : } else {
680 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo28);
681 : }
682 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
683 0 : PyErr_SetNdrError(err);
684 0 : return NULL;
685 : }
686 :
687 0 : Py_RETURN_NONE;
688 : }
689 :
690 0 : static PyObject *py_drsuapi_DsBindInfo28_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
691 : {
692 0 : struct drsuapi_DsBindInfo28 *object = (struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(py_obj);
693 : PyObject *ret;
694 : char *retstr;
695 :
696 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsBindInfo28, "drsuapi_DsBindInfo28", object);
697 0 : ret = PyUnicode_FromString(retstr);
698 0 : talloc_free(retstr);
699 :
700 0 : return ret;
701 : }
702 :
703 : static PyMethodDef py_drsuapi_DsBindInfo28_methods[] = {
704 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsBindInfo28_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
705 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBindInfo28_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
706 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsBindInfo28_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
707 : { NULL, NULL, 0, NULL }
708 : };
709 :
710 :
711 : static PyTypeObject drsuapi_DsBindInfo28_Type = {
712 : PyVarObject_HEAD_INIT(NULL, 0)
713 : .tp_name = "drsuapi.DsBindInfo28",
714 : .tp_getset = py_drsuapi_DsBindInfo28_getsetters,
715 : .tp_methods = py_drsuapi_DsBindInfo28_methods,
716 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
717 : .tp_new = py_drsuapi_DsBindInfo28_new,
718 : };
719 :
720 :
721 0 : static PyObject *py_drsuapi_DsBindInfo32_get_supported_extensions(PyObject *obj, void *closure)
722 : {
723 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(obj);
724 : PyObject *py_supported_extensions;
725 0 : py_supported_extensions = PyLong_FromUnsignedLongLong((uint32_t)object->supported_extensions);
726 0 : return py_supported_extensions;
727 : }
728 :
729 0 : static int py_drsuapi_DsBindInfo32_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
730 : {
731 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(py_obj);
732 0 : if (value == NULL) {
733 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions");
734 0 : return -1;
735 : }
736 : {
737 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions));
738 0 : if (PyLong_Check(value)) {
739 : unsigned long long test_var;
740 0 : test_var = PyLong_AsUnsignedLongLong(value);
741 0 : if (PyErr_Occurred() != NULL) {
742 0 : return -1;
743 : }
744 0 : if (test_var > uint_max) {
745 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
746 : PyLong_Type.tp_name, uint_max, test_var);
747 0 : return -1;
748 : }
749 0 : object->supported_extensions = test_var;
750 : } else {
751 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
752 : PyLong_Type.tp_name);
753 0 : return -1;
754 : }
755 : }
756 0 : return 0;
757 : }
758 :
759 0 : static PyObject *py_drsuapi_DsBindInfo32_get_site_guid(PyObject *obj, void *closure)
760 : {
761 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(obj);
762 : PyObject *py_site_guid;
763 0 : py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
764 0 : return py_site_guid;
765 : }
766 :
767 0 : static int py_drsuapi_DsBindInfo32_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
768 : {
769 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(py_obj);
770 0 : if (value == NULL) {
771 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
772 0 : return -1;
773 : }
774 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
775 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
776 0 : PyErr_NoMemory();
777 0 : return -1;
778 : }
779 0 : object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
780 0 : return 0;
781 : }
782 :
783 0 : static PyObject *py_drsuapi_DsBindInfo32_get_pid(PyObject *obj, void *closure)
784 : {
785 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(obj);
786 : PyObject *py_pid;
787 0 : py_pid = PyLong_FromUnsignedLongLong((uint32_t)object->pid);
788 0 : return py_pid;
789 : }
790 :
791 0 : static int py_drsuapi_DsBindInfo32_set_pid(PyObject *py_obj, PyObject *value, void *closure)
792 : {
793 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(py_obj);
794 0 : if (value == NULL) {
795 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pid");
796 0 : return -1;
797 : }
798 : {
799 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pid));
800 0 : if (PyLong_Check(value)) {
801 : unsigned long long test_var;
802 0 : test_var = PyLong_AsUnsignedLongLong(value);
803 0 : if (PyErr_Occurred() != NULL) {
804 0 : return -1;
805 : }
806 0 : if (test_var > uint_max) {
807 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
808 : PyLong_Type.tp_name, uint_max, test_var);
809 0 : return -1;
810 : }
811 0 : object->pid = test_var;
812 : } else {
813 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
814 : PyLong_Type.tp_name);
815 0 : return -1;
816 : }
817 : }
818 0 : return 0;
819 : }
820 :
821 0 : static PyObject *py_drsuapi_DsBindInfo32_get_repl_epoch(PyObject *obj, void *closure)
822 : {
823 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(obj);
824 : PyObject *py_repl_epoch;
825 0 : py_repl_epoch = PyLong_FromUnsignedLongLong((uint32_t)object->repl_epoch);
826 0 : return py_repl_epoch;
827 : }
828 :
829 0 : static int py_drsuapi_DsBindInfo32_set_repl_epoch(PyObject *py_obj, PyObject *value, void *closure)
830 : {
831 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(py_obj);
832 0 : if (value == NULL) {
833 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->repl_epoch");
834 0 : return -1;
835 : }
836 : {
837 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->repl_epoch));
838 0 : if (PyLong_Check(value)) {
839 : unsigned long long test_var;
840 0 : test_var = PyLong_AsUnsignedLongLong(value);
841 0 : if (PyErr_Occurred() != NULL) {
842 0 : return -1;
843 : }
844 0 : if (test_var > uint_max) {
845 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
846 : PyLong_Type.tp_name, uint_max, test_var);
847 0 : return -1;
848 : }
849 0 : object->repl_epoch = test_var;
850 : } else {
851 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
852 : PyLong_Type.tp_name);
853 0 : return -1;
854 : }
855 : }
856 0 : return 0;
857 : }
858 :
859 0 : static PyObject *py_drsuapi_DsBindInfo32_get_supported_extensions_ext(PyObject *obj, void *closure)
860 : {
861 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(obj);
862 : PyObject *py_supported_extensions_ext;
863 0 : py_supported_extensions_ext = PyLong_FromUnsignedLongLong((uint32_t)object->supported_extensions_ext);
864 0 : return py_supported_extensions_ext;
865 : }
866 :
867 0 : static int py_drsuapi_DsBindInfo32_set_supported_extensions_ext(PyObject *py_obj, PyObject *value, void *closure)
868 : {
869 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(py_obj);
870 0 : if (value == NULL) {
871 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions_ext");
872 0 : return -1;
873 : }
874 : {
875 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions_ext));
876 0 : if (PyLong_Check(value)) {
877 : unsigned long long test_var;
878 0 : test_var = PyLong_AsUnsignedLongLong(value);
879 0 : if (PyErr_Occurred() != NULL) {
880 0 : return -1;
881 : }
882 0 : if (test_var > uint_max) {
883 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
884 : PyLong_Type.tp_name, uint_max, test_var);
885 0 : return -1;
886 : }
887 0 : object->supported_extensions_ext = test_var;
888 : } else {
889 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
890 : PyLong_Type.tp_name);
891 0 : return -1;
892 : }
893 : }
894 0 : return 0;
895 : }
896 :
897 : static PyGetSetDef py_drsuapi_DsBindInfo32_getsetters[] = {
898 : {
899 : .name = discard_const_p(char, "supported_extensions"),
900 : .get = py_drsuapi_DsBindInfo32_get_supported_extensions,
901 : .set = py_drsuapi_DsBindInfo32_set_supported_extensions,
902 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensions")
903 : },
904 : {
905 : .name = discard_const_p(char, "site_guid"),
906 : .get = py_drsuapi_DsBindInfo32_get_site_guid,
907 : .set = py_drsuapi_DsBindInfo32_set_site_guid,
908 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
909 : },
910 : {
911 : .name = discard_const_p(char, "pid"),
912 : .get = py_drsuapi_DsBindInfo32_get_pid,
913 : .set = py_drsuapi_DsBindInfo32_set_pid,
914 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
915 : },
916 : {
917 : .name = discard_const_p(char, "repl_epoch"),
918 : .get = py_drsuapi_DsBindInfo32_get_repl_epoch,
919 : .set = py_drsuapi_DsBindInfo32_set_repl_epoch,
920 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
921 : },
922 : {
923 : .name = discard_const_p(char, "supported_extensions_ext"),
924 : .get = py_drsuapi_DsBindInfo32_get_supported_extensions_ext,
925 : .set = py_drsuapi_DsBindInfo32_set_supported_extensions_ext,
926 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensionsExt")
927 : },
928 : { .name = NULL }
929 : };
930 :
931 0 : static PyObject *py_drsuapi_DsBindInfo32_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
932 : {
933 0 : return pytalloc_new(struct drsuapi_DsBindInfo32, type);
934 : }
935 :
936 0 : static PyObject *py_drsuapi_DsBindInfo32_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
937 : {
938 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(py_obj);
939 0 : PyObject *ret = NULL;
940 : DATA_BLOB blob;
941 : enum ndr_err_code err;
942 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
943 0 : if (tmp_ctx == NULL) {
944 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
945 0 : return NULL;
946 : }
947 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsBindInfo32);
948 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
949 0 : TALLOC_FREE(tmp_ctx);
950 0 : PyErr_SetNdrError(err);
951 0 : return NULL;
952 : }
953 :
954 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
955 0 : TALLOC_FREE(tmp_ctx);
956 0 : return ret;
957 : }
958 :
959 0 : static PyObject *py_drsuapi_DsBindInfo32_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
960 : {
961 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(py_obj);
962 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
963 0 : Py_ssize_t blob_length = 0;
964 : enum ndr_err_code err;
965 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
966 0 : PyObject *allow_remaining_obj = NULL;
967 0 : bool allow_remaining = false;
968 :
969 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
970 : discard_const_p(char *, kwnames),
971 : &blob.data, &blob_length,
972 : &allow_remaining_obj)) {
973 0 : return NULL;
974 : }
975 0 : blob.length = blob_length;
976 :
977 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
978 0 : allow_remaining = true;
979 : }
980 :
981 0 : if (allow_remaining) {
982 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo32);
983 : } else {
984 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo32);
985 : }
986 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
987 0 : PyErr_SetNdrError(err);
988 0 : return NULL;
989 : }
990 :
991 0 : Py_RETURN_NONE;
992 : }
993 :
994 0 : static PyObject *py_drsuapi_DsBindInfo32_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
995 : {
996 0 : struct drsuapi_DsBindInfo32 *object = (struct drsuapi_DsBindInfo32 *)pytalloc_get_ptr(py_obj);
997 : PyObject *ret;
998 : char *retstr;
999 :
1000 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsBindInfo32, "drsuapi_DsBindInfo32", object);
1001 0 : ret = PyUnicode_FromString(retstr);
1002 0 : talloc_free(retstr);
1003 :
1004 0 : return ret;
1005 : }
1006 :
1007 : static PyMethodDef py_drsuapi_DsBindInfo32_methods[] = {
1008 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsBindInfo32_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
1009 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBindInfo32_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
1010 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsBindInfo32_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
1011 : { NULL, NULL, 0, NULL }
1012 : };
1013 :
1014 :
1015 : static PyTypeObject drsuapi_DsBindInfo32_Type = {
1016 : PyVarObject_HEAD_INIT(NULL, 0)
1017 : .tp_name = "drsuapi.DsBindInfo32",
1018 : .tp_getset = py_drsuapi_DsBindInfo32_getsetters,
1019 : .tp_methods = py_drsuapi_DsBindInfo32_methods,
1020 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1021 : .tp_new = py_drsuapi_DsBindInfo32_new,
1022 : };
1023 :
1024 :
1025 0 : static PyObject *py_drsuapi_DsBindInfo48_get_supported_extensions(PyObject *obj, void *closure)
1026 : {
1027 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
1028 : PyObject *py_supported_extensions;
1029 0 : py_supported_extensions = PyLong_FromUnsignedLongLong((uint32_t)object->supported_extensions);
1030 0 : return py_supported_extensions;
1031 : }
1032 :
1033 0 : static int py_drsuapi_DsBindInfo48_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
1034 : {
1035 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1036 0 : if (value == NULL) {
1037 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions");
1038 0 : return -1;
1039 : }
1040 : {
1041 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions));
1042 0 : if (PyLong_Check(value)) {
1043 : unsigned long long test_var;
1044 0 : test_var = PyLong_AsUnsignedLongLong(value);
1045 0 : if (PyErr_Occurred() != NULL) {
1046 0 : return -1;
1047 : }
1048 0 : if (test_var > uint_max) {
1049 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1050 : PyLong_Type.tp_name, uint_max, test_var);
1051 0 : return -1;
1052 : }
1053 0 : object->supported_extensions = test_var;
1054 : } else {
1055 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1056 : PyLong_Type.tp_name);
1057 0 : return -1;
1058 : }
1059 : }
1060 0 : return 0;
1061 : }
1062 :
1063 0 : static PyObject *py_drsuapi_DsBindInfo48_get_site_guid(PyObject *obj, void *closure)
1064 : {
1065 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
1066 : PyObject *py_site_guid;
1067 0 : py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
1068 0 : return py_site_guid;
1069 : }
1070 :
1071 0 : static int py_drsuapi_DsBindInfo48_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
1072 : {
1073 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1074 0 : if (value == NULL) {
1075 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
1076 0 : return -1;
1077 : }
1078 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
1079 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1080 0 : PyErr_NoMemory();
1081 0 : return -1;
1082 : }
1083 0 : object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
1084 0 : return 0;
1085 : }
1086 :
1087 0 : static PyObject *py_drsuapi_DsBindInfo48_get_pid(PyObject *obj, void *closure)
1088 : {
1089 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
1090 : PyObject *py_pid;
1091 0 : py_pid = PyLong_FromUnsignedLongLong((uint32_t)object->pid);
1092 0 : return py_pid;
1093 : }
1094 :
1095 0 : static int py_drsuapi_DsBindInfo48_set_pid(PyObject *py_obj, PyObject *value, void *closure)
1096 : {
1097 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1098 0 : if (value == NULL) {
1099 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pid");
1100 0 : return -1;
1101 : }
1102 : {
1103 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pid));
1104 0 : if (PyLong_Check(value)) {
1105 : unsigned long long test_var;
1106 0 : test_var = PyLong_AsUnsignedLongLong(value);
1107 0 : if (PyErr_Occurred() != NULL) {
1108 0 : return -1;
1109 : }
1110 0 : if (test_var > uint_max) {
1111 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1112 : PyLong_Type.tp_name, uint_max, test_var);
1113 0 : return -1;
1114 : }
1115 0 : object->pid = test_var;
1116 : } else {
1117 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1118 : PyLong_Type.tp_name);
1119 0 : return -1;
1120 : }
1121 : }
1122 0 : return 0;
1123 : }
1124 :
1125 0 : static PyObject *py_drsuapi_DsBindInfo48_get_repl_epoch(PyObject *obj, void *closure)
1126 : {
1127 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
1128 : PyObject *py_repl_epoch;
1129 0 : py_repl_epoch = PyLong_FromUnsignedLongLong((uint32_t)object->repl_epoch);
1130 0 : return py_repl_epoch;
1131 : }
1132 :
1133 0 : static int py_drsuapi_DsBindInfo48_set_repl_epoch(PyObject *py_obj, PyObject *value, void *closure)
1134 : {
1135 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1136 0 : if (value == NULL) {
1137 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->repl_epoch");
1138 0 : return -1;
1139 : }
1140 : {
1141 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->repl_epoch));
1142 0 : if (PyLong_Check(value)) {
1143 : unsigned long long test_var;
1144 0 : test_var = PyLong_AsUnsignedLongLong(value);
1145 0 : if (PyErr_Occurred() != NULL) {
1146 0 : return -1;
1147 : }
1148 0 : if (test_var > uint_max) {
1149 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1150 : PyLong_Type.tp_name, uint_max, test_var);
1151 0 : return -1;
1152 : }
1153 0 : object->repl_epoch = test_var;
1154 : } else {
1155 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1156 : PyLong_Type.tp_name);
1157 0 : return -1;
1158 : }
1159 : }
1160 0 : return 0;
1161 : }
1162 :
1163 0 : static PyObject *py_drsuapi_DsBindInfo48_get_supported_extensions_ext(PyObject *obj, void *closure)
1164 : {
1165 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
1166 : PyObject *py_supported_extensions_ext;
1167 0 : py_supported_extensions_ext = PyLong_FromUnsignedLongLong((uint32_t)object->supported_extensions_ext);
1168 0 : return py_supported_extensions_ext;
1169 : }
1170 :
1171 0 : static int py_drsuapi_DsBindInfo48_set_supported_extensions_ext(PyObject *py_obj, PyObject *value, void *closure)
1172 : {
1173 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1174 0 : if (value == NULL) {
1175 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions_ext");
1176 0 : return -1;
1177 : }
1178 : {
1179 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions_ext));
1180 0 : if (PyLong_Check(value)) {
1181 : unsigned long long test_var;
1182 0 : test_var = PyLong_AsUnsignedLongLong(value);
1183 0 : if (PyErr_Occurred() != NULL) {
1184 0 : return -1;
1185 : }
1186 0 : if (test_var > uint_max) {
1187 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1188 : PyLong_Type.tp_name, uint_max, test_var);
1189 0 : return -1;
1190 : }
1191 0 : object->supported_extensions_ext = test_var;
1192 : } else {
1193 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1194 : PyLong_Type.tp_name);
1195 0 : return -1;
1196 : }
1197 : }
1198 0 : return 0;
1199 : }
1200 :
1201 0 : static PyObject *py_drsuapi_DsBindInfo48_get_config_dn_guid(PyObject *obj, void *closure)
1202 : {
1203 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(obj);
1204 : PyObject *py_config_dn_guid;
1205 0 : py_config_dn_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->config_dn_guid);
1206 0 : return py_config_dn_guid;
1207 : }
1208 :
1209 0 : static int py_drsuapi_DsBindInfo48_set_config_dn_guid(PyObject *py_obj, PyObject *value, void *closure)
1210 : {
1211 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1212 0 : if (value == NULL) {
1213 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->config_dn_guid");
1214 0 : return -1;
1215 : }
1216 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
1217 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1218 0 : PyErr_NoMemory();
1219 0 : return -1;
1220 : }
1221 0 : object->config_dn_guid = *(struct GUID *)pytalloc_get_ptr(value);
1222 0 : return 0;
1223 : }
1224 :
1225 : static PyGetSetDef py_drsuapi_DsBindInfo48_getsetters[] = {
1226 : {
1227 : .name = discard_const_p(char, "supported_extensions"),
1228 : .get = py_drsuapi_DsBindInfo48_get_supported_extensions,
1229 : .set = py_drsuapi_DsBindInfo48_set_supported_extensions,
1230 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensions")
1231 : },
1232 : {
1233 : .name = discard_const_p(char, "site_guid"),
1234 : .get = py_drsuapi_DsBindInfo48_get_site_guid,
1235 : .set = py_drsuapi_DsBindInfo48_set_site_guid,
1236 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
1237 : },
1238 : {
1239 : .name = discard_const_p(char, "pid"),
1240 : .get = py_drsuapi_DsBindInfo48_get_pid,
1241 : .set = py_drsuapi_DsBindInfo48_set_pid,
1242 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1243 : },
1244 : {
1245 : .name = discard_const_p(char, "repl_epoch"),
1246 : .get = py_drsuapi_DsBindInfo48_get_repl_epoch,
1247 : .set = py_drsuapi_DsBindInfo48_set_repl_epoch,
1248 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1249 : },
1250 : {
1251 : .name = discard_const_p(char, "supported_extensions_ext"),
1252 : .get = py_drsuapi_DsBindInfo48_get_supported_extensions_ext,
1253 : .set = py_drsuapi_DsBindInfo48_set_supported_extensions_ext,
1254 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensionsExt")
1255 : },
1256 : {
1257 : .name = discard_const_p(char, "config_dn_guid"),
1258 : .get = py_drsuapi_DsBindInfo48_get_config_dn_guid,
1259 : .set = py_drsuapi_DsBindInfo48_set_config_dn_guid,
1260 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
1261 : },
1262 : { .name = NULL }
1263 : };
1264 :
1265 0 : static PyObject *py_drsuapi_DsBindInfo48_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1266 : {
1267 0 : return pytalloc_new(struct drsuapi_DsBindInfo48, type);
1268 : }
1269 :
1270 0 : static PyObject *py_drsuapi_DsBindInfo48_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
1271 : {
1272 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1273 0 : PyObject *ret = NULL;
1274 : DATA_BLOB blob;
1275 : enum ndr_err_code err;
1276 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
1277 0 : if (tmp_ctx == NULL) {
1278 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
1279 0 : return NULL;
1280 : }
1281 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsBindInfo48);
1282 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
1283 0 : TALLOC_FREE(tmp_ctx);
1284 0 : PyErr_SetNdrError(err);
1285 0 : return NULL;
1286 : }
1287 :
1288 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
1289 0 : TALLOC_FREE(tmp_ctx);
1290 0 : return ret;
1291 : }
1292 :
1293 0 : static PyObject *py_drsuapi_DsBindInfo48_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
1294 : {
1295 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1296 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
1297 0 : Py_ssize_t blob_length = 0;
1298 : enum ndr_err_code err;
1299 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
1300 0 : PyObject *allow_remaining_obj = NULL;
1301 0 : bool allow_remaining = false;
1302 :
1303 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
1304 : discard_const_p(char *, kwnames),
1305 : &blob.data, &blob_length,
1306 : &allow_remaining_obj)) {
1307 0 : return NULL;
1308 : }
1309 0 : blob.length = blob_length;
1310 :
1311 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
1312 0 : allow_remaining = true;
1313 : }
1314 :
1315 0 : if (allow_remaining) {
1316 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo48);
1317 : } else {
1318 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo48);
1319 : }
1320 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
1321 0 : PyErr_SetNdrError(err);
1322 0 : return NULL;
1323 : }
1324 :
1325 0 : Py_RETURN_NONE;
1326 : }
1327 :
1328 0 : static PyObject *py_drsuapi_DsBindInfo48_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
1329 : {
1330 0 : struct drsuapi_DsBindInfo48 *object = (struct drsuapi_DsBindInfo48 *)pytalloc_get_ptr(py_obj);
1331 : PyObject *ret;
1332 : char *retstr;
1333 :
1334 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsBindInfo48, "drsuapi_DsBindInfo48", object);
1335 0 : ret = PyUnicode_FromString(retstr);
1336 0 : talloc_free(retstr);
1337 :
1338 0 : return ret;
1339 : }
1340 :
1341 : static PyMethodDef py_drsuapi_DsBindInfo48_methods[] = {
1342 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsBindInfo48_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
1343 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBindInfo48_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
1344 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsBindInfo48_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
1345 : { NULL, NULL, 0, NULL }
1346 : };
1347 :
1348 :
1349 : static PyTypeObject drsuapi_DsBindInfo48_Type = {
1350 : PyVarObject_HEAD_INIT(NULL, 0)
1351 : .tp_name = "drsuapi.DsBindInfo48",
1352 : .tp_getset = py_drsuapi_DsBindInfo48_getsetters,
1353 : .tp_methods = py_drsuapi_DsBindInfo48_methods,
1354 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1355 : .tp_new = py_drsuapi_DsBindInfo48_new,
1356 : };
1357 :
1358 :
1359 0 : static PyObject *py_drsuapi_DsBindInfo52_get_supported_extensions(PyObject *obj, void *closure)
1360 : {
1361 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(obj);
1362 : PyObject *py_supported_extensions;
1363 0 : py_supported_extensions = PyLong_FromUnsignedLongLong((uint32_t)object->supported_extensions);
1364 0 : return py_supported_extensions;
1365 : }
1366 :
1367 0 : static int py_drsuapi_DsBindInfo52_set_supported_extensions(PyObject *py_obj, PyObject *value, void *closure)
1368 : {
1369 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1370 0 : if (value == NULL) {
1371 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions");
1372 0 : return -1;
1373 : }
1374 : {
1375 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions));
1376 0 : if (PyLong_Check(value)) {
1377 : unsigned long long test_var;
1378 0 : test_var = PyLong_AsUnsignedLongLong(value);
1379 0 : if (PyErr_Occurred() != NULL) {
1380 0 : return -1;
1381 : }
1382 0 : if (test_var > uint_max) {
1383 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1384 : PyLong_Type.tp_name, uint_max, test_var);
1385 0 : return -1;
1386 : }
1387 0 : object->supported_extensions = test_var;
1388 : } else {
1389 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1390 : PyLong_Type.tp_name);
1391 0 : return -1;
1392 : }
1393 : }
1394 0 : return 0;
1395 : }
1396 :
1397 0 : static PyObject *py_drsuapi_DsBindInfo52_get_site_guid(PyObject *obj, void *closure)
1398 : {
1399 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(obj);
1400 : PyObject *py_site_guid;
1401 0 : py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
1402 0 : return py_site_guid;
1403 : }
1404 :
1405 0 : static int py_drsuapi_DsBindInfo52_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
1406 : {
1407 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1408 0 : if (value == NULL) {
1409 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
1410 0 : return -1;
1411 : }
1412 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
1413 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1414 0 : PyErr_NoMemory();
1415 0 : return -1;
1416 : }
1417 0 : object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
1418 0 : return 0;
1419 : }
1420 :
1421 0 : static PyObject *py_drsuapi_DsBindInfo52_get_pid(PyObject *obj, void *closure)
1422 : {
1423 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(obj);
1424 : PyObject *py_pid;
1425 0 : py_pid = PyLong_FromUnsignedLongLong((uint32_t)object->pid);
1426 0 : return py_pid;
1427 : }
1428 :
1429 0 : static int py_drsuapi_DsBindInfo52_set_pid(PyObject *py_obj, PyObject *value, void *closure)
1430 : {
1431 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1432 0 : if (value == NULL) {
1433 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pid");
1434 0 : return -1;
1435 : }
1436 : {
1437 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pid));
1438 0 : if (PyLong_Check(value)) {
1439 : unsigned long long test_var;
1440 0 : test_var = PyLong_AsUnsignedLongLong(value);
1441 0 : if (PyErr_Occurred() != NULL) {
1442 0 : return -1;
1443 : }
1444 0 : if (test_var > uint_max) {
1445 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1446 : PyLong_Type.tp_name, uint_max, test_var);
1447 0 : return -1;
1448 : }
1449 0 : object->pid = test_var;
1450 : } else {
1451 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1452 : PyLong_Type.tp_name);
1453 0 : return -1;
1454 : }
1455 : }
1456 0 : return 0;
1457 : }
1458 :
1459 0 : static PyObject *py_drsuapi_DsBindInfo52_get_repl_epoch(PyObject *obj, void *closure)
1460 : {
1461 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(obj);
1462 : PyObject *py_repl_epoch;
1463 0 : py_repl_epoch = PyLong_FromUnsignedLongLong((uint32_t)object->repl_epoch);
1464 0 : return py_repl_epoch;
1465 : }
1466 :
1467 0 : static int py_drsuapi_DsBindInfo52_set_repl_epoch(PyObject *py_obj, PyObject *value, void *closure)
1468 : {
1469 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1470 0 : if (value == NULL) {
1471 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->repl_epoch");
1472 0 : return -1;
1473 : }
1474 : {
1475 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->repl_epoch));
1476 0 : if (PyLong_Check(value)) {
1477 : unsigned long long test_var;
1478 0 : test_var = PyLong_AsUnsignedLongLong(value);
1479 0 : if (PyErr_Occurred() != NULL) {
1480 0 : return -1;
1481 : }
1482 0 : if (test_var > uint_max) {
1483 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1484 : PyLong_Type.tp_name, uint_max, test_var);
1485 0 : return -1;
1486 : }
1487 0 : object->repl_epoch = test_var;
1488 : } else {
1489 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1490 : PyLong_Type.tp_name);
1491 0 : return -1;
1492 : }
1493 : }
1494 0 : return 0;
1495 : }
1496 :
1497 0 : static PyObject *py_drsuapi_DsBindInfo52_get_supported_extensions_ext(PyObject *obj, void *closure)
1498 : {
1499 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(obj);
1500 : PyObject *py_supported_extensions_ext;
1501 0 : py_supported_extensions_ext = PyLong_FromUnsignedLongLong((uint32_t)object->supported_extensions_ext);
1502 0 : return py_supported_extensions_ext;
1503 : }
1504 :
1505 0 : static int py_drsuapi_DsBindInfo52_set_supported_extensions_ext(PyObject *py_obj, PyObject *value, void *closure)
1506 : {
1507 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1508 0 : if (value == NULL) {
1509 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_extensions_ext");
1510 0 : return -1;
1511 : }
1512 : {
1513 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_extensions_ext));
1514 0 : if (PyLong_Check(value)) {
1515 : unsigned long long test_var;
1516 0 : test_var = PyLong_AsUnsignedLongLong(value);
1517 0 : if (PyErr_Occurred() != NULL) {
1518 0 : return -1;
1519 : }
1520 0 : if (test_var > uint_max) {
1521 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1522 : PyLong_Type.tp_name, uint_max, test_var);
1523 0 : return -1;
1524 : }
1525 0 : object->supported_extensions_ext = test_var;
1526 : } else {
1527 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1528 : PyLong_Type.tp_name);
1529 0 : return -1;
1530 : }
1531 : }
1532 0 : return 0;
1533 : }
1534 :
1535 0 : static PyObject *py_drsuapi_DsBindInfo52_get_config_dn_guid(PyObject *obj, void *closure)
1536 : {
1537 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(obj);
1538 : PyObject *py_config_dn_guid;
1539 0 : py_config_dn_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->config_dn_guid);
1540 0 : return py_config_dn_guid;
1541 : }
1542 :
1543 0 : static int py_drsuapi_DsBindInfo52_set_config_dn_guid(PyObject *py_obj, PyObject *value, void *closure)
1544 : {
1545 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1546 0 : if (value == NULL) {
1547 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->config_dn_guid");
1548 0 : return -1;
1549 : }
1550 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
1551 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1552 0 : PyErr_NoMemory();
1553 0 : return -1;
1554 : }
1555 0 : object->config_dn_guid = *(struct GUID *)pytalloc_get_ptr(value);
1556 0 : return 0;
1557 : }
1558 :
1559 0 : static PyObject *py_drsuapi_DsBindInfo52_get_supported_capabilities_ext(PyObject *obj, void *closure)
1560 : {
1561 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(obj);
1562 : PyObject *py_supported_capabilities_ext;
1563 0 : py_supported_capabilities_ext = PyLong_FromUnsignedLongLong((uint32_t)object->supported_capabilities_ext);
1564 0 : return py_supported_capabilities_ext;
1565 : }
1566 :
1567 0 : static int py_drsuapi_DsBindInfo52_set_supported_capabilities_ext(PyObject *py_obj, PyObject *value, void *closure)
1568 : {
1569 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1570 0 : if (value == NULL) {
1571 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->supported_capabilities_ext");
1572 0 : return -1;
1573 : }
1574 : {
1575 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->supported_capabilities_ext));
1576 0 : if (PyLong_Check(value)) {
1577 : unsigned long long test_var;
1578 0 : test_var = PyLong_AsUnsignedLongLong(value);
1579 0 : if (PyErr_Occurred() != NULL) {
1580 0 : return -1;
1581 : }
1582 0 : if (test_var > uint_max) {
1583 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1584 : PyLong_Type.tp_name, uint_max, test_var);
1585 0 : return -1;
1586 : }
1587 0 : object->supported_capabilities_ext = test_var;
1588 : } else {
1589 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1590 : PyLong_Type.tp_name);
1591 0 : return -1;
1592 : }
1593 : }
1594 0 : return 0;
1595 : }
1596 :
1597 : static PyGetSetDef py_drsuapi_DsBindInfo52_getsetters[] = {
1598 : {
1599 : .name = discard_const_p(char, "supported_extensions"),
1600 : .get = py_drsuapi_DsBindInfo52_get_supported_extensions,
1601 : .set = py_drsuapi_DsBindInfo52_set_supported_extensions,
1602 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensions")
1603 : },
1604 : {
1605 : .name = discard_const_p(char, "site_guid"),
1606 : .get = py_drsuapi_DsBindInfo52_get_site_guid,
1607 : .set = py_drsuapi_DsBindInfo52_set_site_guid,
1608 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
1609 : },
1610 : {
1611 : .name = discard_const_p(char, "pid"),
1612 : .get = py_drsuapi_DsBindInfo52_get_pid,
1613 : .set = py_drsuapi_DsBindInfo52_set_pid,
1614 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1615 : },
1616 : {
1617 : .name = discard_const_p(char, "repl_epoch"),
1618 : .get = py_drsuapi_DsBindInfo52_get_repl_epoch,
1619 : .set = py_drsuapi_DsBindInfo52_set_repl_epoch,
1620 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1621 : },
1622 : {
1623 : .name = discard_const_p(char, "supported_extensions_ext"),
1624 : .get = py_drsuapi_DsBindInfo52_get_supported_extensions_ext,
1625 : .set = py_drsuapi_DsBindInfo52_set_supported_extensions_ext,
1626 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensionsExt")
1627 : },
1628 : {
1629 : .name = discard_const_p(char, "config_dn_guid"),
1630 : .get = py_drsuapi_DsBindInfo52_get_config_dn_guid,
1631 : .set = py_drsuapi_DsBindInfo52_set_config_dn_guid,
1632 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
1633 : },
1634 : {
1635 : .name = discard_const_p(char, "supported_capabilities_ext"),
1636 : .get = py_drsuapi_DsBindInfo52_get_supported_capabilities_ext,
1637 : .set = py_drsuapi_DsBindInfo52_set_supported_capabilities_ext,
1638 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SupportedExtensionsExt")
1639 : },
1640 : { .name = NULL }
1641 : };
1642 :
1643 0 : static PyObject *py_drsuapi_DsBindInfo52_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1644 : {
1645 0 : return pytalloc_new(struct drsuapi_DsBindInfo52, type);
1646 : }
1647 :
1648 0 : static PyObject *py_drsuapi_DsBindInfo52_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
1649 : {
1650 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1651 0 : PyObject *ret = NULL;
1652 : DATA_BLOB blob;
1653 : enum ndr_err_code err;
1654 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
1655 0 : if (tmp_ctx == NULL) {
1656 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
1657 0 : return NULL;
1658 : }
1659 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsBindInfo52);
1660 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
1661 0 : TALLOC_FREE(tmp_ctx);
1662 0 : PyErr_SetNdrError(err);
1663 0 : return NULL;
1664 : }
1665 :
1666 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
1667 0 : TALLOC_FREE(tmp_ctx);
1668 0 : return ret;
1669 : }
1670 :
1671 0 : static PyObject *py_drsuapi_DsBindInfo52_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
1672 : {
1673 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1674 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
1675 0 : Py_ssize_t blob_length = 0;
1676 : enum ndr_err_code err;
1677 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
1678 0 : PyObject *allow_remaining_obj = NULL;
1679 0 : bool allow_remaining = false;
1680 :
1681 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
1682 : discard_const_p(char *, kwnames),
1683 : &blob.data, &blob_length,
1684 : &allow_remaining_obj)) {
1685 0 : return NULL;
1686 : }
1687 0 : blob.length = blob_length;
1688 :
1689 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
1690 0 : allow_remaining = true;
1691 : }
1692 :
1693 0 : if (allow_remaining) {
1694 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo52);
1695 : } else {
1696 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfo52);
1697 : }
1698 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
1699 0 : PyErr_SetNdrError(err);
1700 0 : return NULL;
1701 : }
1702 :
1703 0 : Py_RETURN_NONE;
1704 : }
1705 :
1706 0 : static PyObject *py_drsuapi_DsBindInfo52_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
1707 : {
1708 0 : struct drsuapi_DsBindInfo52 *object = (struct drsuapi_DsBindInfo52 *)pytalloc_get_ptr(py_obj);
1709 : PyObject *ret;
1710 : char *retstr;
1711 :
1712 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsBindInfo52, "drsuapi_DsBindInfo52", object);
1713 0 : ret = PyUnicode_FromString(retstr);
1714 0 : talloc_free(retstr);
1715 :
1716 0 : return ret;
1717 : }
1718 :
1719 : static PyMethodDef py_drsuapi_DsBindInfo52_methods[] = {
1720 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsBindInfo52_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
1721 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBindInfo52_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
1722 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsBindInfo52_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
1723 : { NULL, NULL, 0, NULL }
1724 : };
1725 :
1726 :
1727 : static PyTypeObject drsuapi_DsBindInfo52_Type = {
1728 : PyVarObject_HEAD_INIT(NULL, 0)
1729 : .tp_name = "drsuapi.DsBindInfo52",
1730 : .tp_getset = py_drsuapi_DsBindInfo52_getsetters,
1731 : .tp_methods = py_drsuapi_DsBindInfo52_methods,
1732 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1733 : .tp_new = py_drsuapi_DsBindInfo52_new,
1734 : };
1735 :
1736 :
1737 0 : static PyObject *py_drsuapi_DsBindInfoFallBack_get_info(PyObject *obj, void *closure)
1738 : {
1739 0 : struct drsuapi_DsBindInfoFallBack *object = (struct drsuapi_DsBindInfoFallBack *)pytalloc_get_ptr(obj);
1740 : PyObject *py_info;
1741 0 : py_info = PyBytes_FromStringAndSize((char *)(object->info).data, (object->info).length);
1742 0 : return py_info;
1743 : }
1744 :
1745 0 : static int py_drsuapi_DsBindInfoFallBack_set_info(PyObject *py_obj, PyObject *value, void *closure)
1746 : {
1747 0 : struct drsuapi_DsBindInfoFallBack *object = (struct drsuapi_DsBindInfoFallBack *)pytalloc_get_ptr(py_obj);
1748 0 : if (value == NULL) {
1749 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
1750 0 : return -1;
1751 : }
1752 0 : object->info = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
1753 0 : return 0;
1754 : }
1755 :
1756 : static PyGetSetDef py_drsuapi_DsBindInfoFallBack_getsetters[] = {
1757 : {
1758 : .name = discard_const_p(char, "info"),
1759 : .get = py_drsuapi_DsBindInfoFallBack_get_info,
1760 : .set = py_drsuapi_DsBindInfoFallBack_set_info,
1761 : .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
1762 : },
1763 : { .name = NULL }
1764 : };
1765 :
1766 0 : static PyObject *py_drsuapi_DsBindInfoFallBack_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1767 : {
1768 0 : return pytalloc_new(struct drsuapi_DsBindInfoFallBack, type);
1769 : }
1770 :
1771 0 : static PyObject *py_drsuapi_DsBindInfoFallBack_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
1772 : {
1773 0 : struct drsuapi_DsBindInfoFallBack *object = (struct drsuapi_DsBindInfoFallBack *)pytalloc_get_ptr(py_obj);
1774 0 : PyObject *ret = NULL;
1775 : DATA_BLOB blob;
1776 : enum ndr_err_code err;
1777 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
1778 0 : if (tmp_ctx == NULL) {
1779 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
1780 0 : return NULL;
1781 : }
1782 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsBindInfoFallBack);
1783 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
1784 0 : TALLOC_FREE(tmp_ctx);
1785 0 : PyErr_SetNdrError(err);
1786 0 : return NULL;
1787 : }
1788 :
1789 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
1790 0 : TALLOC_FREE(tmp_ctx);
1791 0 : return ret;
1792 : }
1793 :
1794 0 : static PyObject *py_drsuapi_DsBindInfoFallBack_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
1795 : {
1796 0 : struct drsuapi_DsBindInfoFallBack *object = (struct drsuapi_DsBindInfoFallBack *)pytalloc_get_ptr(py_obj);
1797 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
1798 0 : Py_ssize_t blob_length = 0;
1799 : enum ndr_err_code err;
1800 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
1801 0 : PyObject *allow_remaining_obj = NULL;
1802 0 : bool allow_remaining = false;
1803 :
1804 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
1805 : discard_const_p(char *, kwnames),
1806 : &blob.data, &blob_length,
1807 : &allow_remaining_obj)) {
1808 0 : return NULL;
1809 : }
1810 0 : blob.length = blob_length;
1811 :
1812 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
1813 0 : allow_remaining = true;
1814 : }
1815 :
1816 0 : if (allow_remaining) {
1817 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfoFallBack);
1818 : } else {
1819 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsBindInfoFallBack);
1820 : }
1821 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
1822 0 : PyErr_SetNdrError(err);
1823 0 : return NULL;
1824 : }
1825 :
1826 0 : Py_RETURN_NONE;
1827 : }
1828 :
1829 0 : static PyObject *py_drsuapi_DsBindInfoFallBack_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
1830 : {
1831 0 : struct drsuapi_DsBindInfoFallBack *object = (struct drsuapi_DsBindInfoFallBack *)pytalloc_get_ptr(py_obj);
1832 : PyObject *ret;
1833 : char *retstr;
1834 :
1835 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsBindInfoFallBack, "drsuapi_DsBindInfoFallBack", object);
1836 0 : ret = PyUnicode_FromString(retstr);
1837 0 : talloc_free(retstr);
1838 :
1839 0 : return ret;
1840 : }
1841 :
1842 : static PyMethodDef py_drsuapi_DsBindInfoFallBack_methods[] = {
1843 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsBindInfoFallBack_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
1844 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBindInfoFallBack_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
1845 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsBindInfoFallBack_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
1846 : { NULL, NULL, 0, NULL }
1847 : };
1848 :
1849 :
1850 : static PyTypeObject drsuapi_DsBindInfoFallBack_Type = {
1851 : PyVarObject_HEAD_INIT(NULL, 0)
1852 : .tp_name = "drsuapi.DsBindInfoFallBack",
1853 : .tp_getset = py_drsuapi_DsBindInfoFallBack_getsetters,
1854 : .tp_methods = py_drsuapi_DsBindInfoFallBack_methods,
1855 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1856 : .tp_new = py_drsuapi_DsBindInfoFallBack_new,
1857 : };
1858 :
1859 52845 : static PyObject *py_import_drsuapi_DsBindInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsBindInfo *in)
1860 : {
1861 : PyObject *ret;
1862 :
1863 52845 : 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 52845 : case 28:
1869 52845 : ret = pytalloc_reference_ex(&drsuapi_DsBindInfo28_Type, mem_ctx, &in->info28);
1870 52845 : 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 1821 : static union drsuapi_DsBindInfo *py_export_drsuapi_DsBindInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
1894 : {
1895 1821 : union drsuapi_DsBindInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsBindInfo);
1896 1821 : 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 1821 : case 28:
1911 1821 : 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 1821 : PY_CHECK_TYPE(&drsuapi_DsBindInfo28_Type, in, talloc_free(ret); return NULL;);
1916 1821 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1917 0 : PyErr_NoMemory();
1918 0 : talloc_free(ret); return NULL;
1919 : }
1920 1821 : ret->info28 = *(struct drsuapi_DsBindInfo28 *)pytalloc_get_ptr(in);
1921 1821 : 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 1821 : return ret;
1978 : }
1979 :
1980 52845 : static PyObject *py_drsuapi_DsBindInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1981 : {
1982 52845 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
1983 52845 : PyObject *mem_ctx_obj = NULL;
1984 52845 : TALLOC_CTX *mem_ctx = NULL;
1985 52845 : int level = 0;
1986 52845 : PyObject *in_obj = NULL;
1987 52845 : union drsuapi_DsBindInfo *in = NULL;
1988 :
1989 52845 : 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 52845 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
1997 52845 : if (mem_ctx == NULL) {
1998 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
1999 0 : return NULL;
2000 : }
2001 52845 : in = (union drsuapi_DsBindInfo *)pytalloc_get_ptr(in_obj);
2002 52845 : 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 52845 : return py_import_drsuapi_DsBindInfo(mem_ctx, level, in);
2008 : }
2009 :
2010 1821 : static PyObject *py_drsuapi_DsBindInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2011 : {
2012 1821 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
2013 1821 : PyObject *mem_ctx_obj = NULL;
2014 1821 : TALLOC_CTX *mem_ctx = NULL;
2015 1821 : int level = 0;
2016 1821 : PyObject *in = NULL;
2017 1821 : union drsuapi_DsBindInfo *out = NULL;
2018 :
2019 1821 : 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 1821 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
2027 1821 : if (mem_ctx == NULL) {
2028 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
2029 0 : return NULL;
2030 : }
2031 :
2032 1821 : out = py_export_drsuapi_DsBindInfo(mem_ctx, level, in);
2033 1821 : if (out == NULL) {
2034 0 : return NULL;
2035 : }
2036 :
2037 1821 : return pytalloc_GenericObject_reference(out);
2038 : }
2039 :
2040 : static PyMethodDef py_drsuapi_DsBindInfo_methods[] = {
2041 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBindInfo_import),
2042 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
2043 : "T.__import__(mem_ctx, level, in) => ret." },
2044 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBindInfo_export),
2045 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
2046 : "T.__export__(mem_ctx, level, in) => ret." },
2047 : { NULL, NULL, 0, NULL }
2048 : };
2049 :
2050 0 : static PyObject *py_drsuapi_DsBindInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2051 : {
2052 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
2053 0 : return NULL;
2054 : }
2055 :
2056 :
2057 : static PyTypeObject drsuapi_DsBindInfo_Type = {
2058 : PyVarObject_HEAD_INIT(NULL, 0)
2059 : .tp_name = "drsuapi.DsBindInfo",
2060 : .tp_getset = NULL,
2061 : .tp_methods = py_drsuapi_DsBindInfo_methods,
2062 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2063 : .tp_new = py_drsuapi_DsBindInfo_new,
2064 : };
2065 :
2066 :
2067 0 : static PyObject *py_drsuapi_DsBindInfoCtr_get_length(PyObject *obj, void *closure)
2068 : {
2069 0 : struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(obj);
2070 : PyObject *py_length;
2071 0 : py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
2072 0 : return py_length;
2073 : }
2074 :
2075 1821 : static int py_drsuapi_DsBindInfoCtr_set_length(PyObject *py_obj, PyObject *value, void *closure)
2076 : {
2077 1821 : struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(py_obj);
2078 1821 : if (value == NULL) {
2079 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
2080 0 : return -1;
2081 : }
2082 : {
2083 1821 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
2084 1821 : if (PyLong_Check(value)) {
2085 : unsigned long long test_var;
2086 1821 : test_var = PyLong_AsUnsignedLongLong(value);
2087 1821 : if (PyErr_Occurred() != NULL) {
2088 0 : return -1;
2089 : }
2090 1821 : 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 1821 : 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 1821 : return 0;
2103 : }
2104 :
2105 0 : static PyObject *py_drsuapi_DsBindInfoCtr_get___ndr_length(PyObject *obj, void *closure)
2106 : {
2107 0 : struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(obj);
2108 : PyObject *py___ndr_length;
2109 0 : py___ndr_length = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_length);
2110 0 : return py___ndr_length;
2111 : }
2112 :
2113 0 : static int py_drsuapi_DsBindInfoCtr_set___ndr_length(PyObject *py_obj, PyObject *value, void *closure)
2114 : {
2115 0 : struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(py_obj);
2116 0 : if (value == NULL) {
2117 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_length");
2118 0 : return -1;
2119 : }
2120 : {
2121 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_length));
2122 0 : if (PyLong_Check(value)) {
2123 : unsigned long long test_var;
2124 0 : test_var = PyLong_AsUnsignedLongLong(value);
2125 0 : if (PyErr_Occurred() != NULL) {
2126 0 : return -1;
2127 : }
2128 0 : if (test_var > uint_max) {
2129 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2130 : PyLong_Type.tp_name, uint_max, test_var);
2131 0 : return -1;
2132 : }
2133 0 : object->__ndr_length = test_var;
2134 : } else {
2135 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2136 : PyLong_Type.tp_name);
2137 0 : return -1;
2138 : }
2139 : }
2140 0 : return 0;
2141 : }
2142 :
2143 52845 : static PyObject *py_drsuapi_DsBindInfoCtr_get_info(PyObject *obj, void *closure)
2144 : {
2145 52845 : struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(obj);
2146 : PyObject *py_info;
2147 52845 : py_info = pyrpc_import_union(&drsuapi_DsBindInfo_Type, pytalloc_get_mem_ctx(obj), object->length, &object->info, "union drsuapi_DsBindInfo");
2148 52845 : if (py_info == NULL) {
2149 0 : return NULL;
2150 : }
2151 52845 : return py_info;
2152 : }
2153 :
2154 1821 : static int py_drsuapi_DsBindInfoCtr_set_info(PyObject *py_obj, PyObject *value, void *closure)
2155 : {
2156 1821 : struct drsuapi_DsBindInfoCtr *object = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(py_obj);
2157 1821 : if (value == NULL) {
2158 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
2159 0 : return -1;
2160 : }
2161 : {
2162 : union drsuapi_DsBindInfo *info_switch_0;
2163 1821 : 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 1821 : if (info_switch_0 == NULL) {
2165 0 : return -1;
2166 : }
2167 1821 : object->info = *info_switch_0;
2168 : }
2169 1821 : 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 1821 : static PyObject *py_drsuapi_DsBindInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2195 : {
2196 1821 : return pytalloc_new(struct drsuapi_DsBindInfoCtr, type);
2197 : }
2198 :
2199 :
2200 : static PyTypeObject drsuapi_DsBindInfoCtr_Type = {
2201 : PyVarObject_HEAD_INIT(NULL, 0)
2202 : .tp_name = "drsuapi.DsBindInfoCtr",
2203 : .tp_getset = py_drsuapi_DsBindInfoCtr_getsetters,
2204 : .tp_methods = NULL,
2205 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2206 : .tp_new = py_drsuapi_DsBindInfoCtr_new,
2207 : };
2208 :
2209 :
2210 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size(PyObject *obj, void *closure)
2211 : {
2212 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
2213 : PyObject *py___ndr_size;
2214 0 : py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size);
2215 0 : return py___ndr_size;
2216 : }
2217 :
2218 0 : static int py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
2219 : {
2220 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2221 0 : if (value == NULL) {
2222 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
2223 0 : return -1;
2224 : }
2225 : {
2226 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
2227 0 : if (PyLong_Check(value)) {
2228 : unsigned long long test_var;
2229 0 : test_var = PyLong_AsUnsignedLongLong(value);
2230 0 : if (PyErr_Occurred() != NULL) {
2231 0 : return -1;
2232 : }
2233 0 : if (test_var > uint_max) {
2234 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2235 : PyLong_Type.tp_name, uint_max, test_var);
2236 0 : return -1;
2237 : }
2238 0 : object->__ndr_size = test_var;
2239 : } else {
2240 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2241 : PyLong_Type.tp_name);
2242 0 : return -1;
2243 : }
2244 : }
2245 0 : return 0;
2246 : }
2247 :
2248 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_sid(PyObject *obj, void *closure)
2249 : {
2250 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
2251 : PyObject *py___ndr_size_sid;
2252 0 : py___ndr_size_sid = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_sid);
2253 0 : return py___ndr_size_sid;
2254 : }
2255 :
2256 0 : static int py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_sid(PyObject *py_obj, PyObject *value, void *closure)
2257 : {
2258 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2259 0 : if (value == NULL) {
2260 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_sid");
2261 0 : return -1;
2262 : }
2263 : {
2264 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_sid));
2265 0 : if (PyLong_Check(value)) {
2266 : unsigned long long test_var;
2267 0 : test_var = PyLong_AsUnsignedLongLong(value);
2268 0 : if (PyErr_Occurred() != NULL) {
2269 0 : return -1;
2270 : }
2271 0 : if (test_var > uint_max) {
2272 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2273 : PyLong_Type.tp_name, uint_max, test_var);
2274 0 : return -1;
2275 : }
2276 0 : object->__ndr_size_sid = test_var;
2277 : } else {
2278 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2279 : PyLong_Type.tp_name);
2280 0 : return -1;
2281 : }
2282 : }
2283 0 : return 0;
2284 : }
2285 :
2286 119665 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get_guid(PyObject *obj, void *closure)
2287 : {
2288 119665 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
2289 : PyObject *py_guid;
2290 119665 : py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
2291 119665 : return py_guid;
2292 : }
2293 :
2294 214 : static int py_drsuapi_DsReplicaObjectIdentifier_set_guid(PyObject *py_obj, PyObject *value, void *closure)
2295 : {
2296 214 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2297 214 : if (value == NULL) {
2298 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
2299 0 : return -1;
2300 : }
2301 214 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
2302 214 : 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 214 : object->guid = *(struct GUID *)pytalloc_get_ptr(value);
2307 214 : return 0;
2308 : }
2309 :
2310 302 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get_sid(PyObject *obj, void *closure)
2311 : {
2312 302 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
2313 : PyObject *py_sid;
2314 302 : py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
2315 302 : return py_sid;
2316 : }
2317 :
2318 171 : static int py_drsuapi_DsReplicaObjectIdentifier_set_sid(PyObject *py_obj, PyObject *value, void *closure)
2319 : {
2320 171 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2321 171 : if (value == NULL) {
2322 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
2323 0 : return -1;
2324 : }
2325 171 : PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
2326 171 : 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 171 : object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
2331 171 : return 0;
2332 : }
2333 :
2334 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_dn(PyObject *obj, void *closure)
2335 : {
2336 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
2337 : PyObject *py___ndr_size_dn;
2338 0 : py___ndr_size_dn = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_dn);
2339 0 : return py___ndr_size_dn;
2340 : }
2341 :
2342 0 : static int py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_dn(PyObject *py_obj, PyObject *value, void *closure)
2343 : {
2344 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2345 0 : if (value == NULL) {
2346 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_dn");
2347 0 : return -1;
2348 : }
2349 : {
2350 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_dn));
2351 0 : if (PyLong_Check(value)) {
2352 : unsigned long long test_var;
2353 0 : test_var = PyLong_AsUnsignedLongLong(value);
2354 0 : if (PyErr_Occurred() != NULL) {
2355 0 : return -1;
2356 : }
2357 0 : if (test_var > uint_max) {
2358 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2359 : PyLong_Type.tp_name, uint_max, test_var);
2360 0 : return -1;
2361 : }
2362 0 : object->__ndr_size_dn = test_var;
2363 : } else {
2364 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2365 : PyLong_Type.tp_name);
2366 0 : return -1;
2367 : }
2368 : }
2369 0 : return 0;
2370 : }
2371 :
2372 80808 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_get_dn(PyObject *obj, void *closure)
2373 : {
2374 80808 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(obj);
2375 : PyObject *py_dn;
2376 80808 : if (object->dn == NULL) {
2377 0 : py_dn = Py_None;
2378 0 : Py_INCREF(py_dn);
2379 : } else {
2380 80808 : py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
2381 : }
2382 80808 : return py_dn;
2383 : }
2384 :
2385 3203 : static int py_drsuapi_DsReplicaObjectIdentifier_set_dn(PyObject *py_obj, PyObject *value, void *closure)
2386 : {
2387 3203 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2388 3203 : if (value == NULL) {
2389 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dn");
2390 0 : return -1;
2391 : }
2392 : {
2393 : const char *test_str;
2394 : const char *talloc_str;
2395 3203 : PyObject *unicode = NULL;
2396 3203 : if (PyUnicode_Check(value)) {
2397 3173 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
2398 3173 : if (unicode == NULL) {
2399 0 : PyErr_NoMemory();
2400 0 : return -1;
2401 : }
2402 3173 : test_str = PyBytes_AS_STRING(unicode);
2403 30 : } else if (PyBytes_Check(value)) {
2404 30 : test_str = PyBytes_AS_STRING(value);
2405 : } else {
2406 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
2407 0 : return -1;
2408 : }
2409 3203 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
2410 3203 : if (unicode != NULL) {
2411 3173 : Py_DECREF(unicode);
2412 : }
2413 3203 : if (talloc_str == NULL) {
2414 0 : PyErr_NoMemory();
2415 0 : return -1;
2416 : }
2417 3203 : object->dn = talloc_str;
2418 : }
2419 3203 : return 0;
2420 : }
2421 :
2422 : static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier_getsetters[] = {
2423 : {
2424 : .name = discard_const_p(char, "__ndr_size"),
2425 : .get = py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size,
2426 : .set = py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size,
2427 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2428 : },
2429 : {
2430 : .name = discard_const_p(char, "__ndr_size_sid"),
2431 : .get = py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_sid,
2432 : .set = py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_sid,
2433 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2434 : },
2435 : {
2436 : .name = discard_const_p(char, "guid"),
2437 : .get = py_drsuapi_DsReplicaObjectIdentifier_get_guid,
2438 : .set = py_drsuapi_DsReplicaObjectIdentifier_set_guid,
2439 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
2440 : },
2441 : {
2442 : .name = discard_const_p(char, "sid"),
2443 : .get = py_drsuapi_DsReplicaObjectIdentifier_get_sid,
2444 : .set = py_drsuapi_DsReplicaObjectIdentifier_set_sid,
2445 : .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
2446 : },
2447 : {
2448 : .name = discard_const_p(char, "__ndr_size_dn"),
2449 : .get = py_drsuapi_DsReplicaObjectIdentifier_get___ndr_size_dn,
2450 : .set = py_drsuapi_DsReplicaObjectIdentifier_set___ndr_size_dn,
2451 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2452 : },
2453 : {
2454 : .name = discard_const_p(char, "dn"),
2455 : .get = py_drsuapi_DsReplicaObjectIdentifier_get_dn,
2456 : .set = py_drsuapi_DsReplicaObjectIdentifier_set_dn,
2457 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
2458 : },
2459 : { .name = NULL }
2460 : };
2461 :
2462 2917 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2463 : {
2464 2917 : return pytalloc_new(struct drsuapi_DsReplicaObjectIdentifier, type);
2465 : }
2466 :
2467 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
2468 : {
2469 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2470 0 : PyObject *ret = NULL;
2471 : DATA_BLOB blob;
2472 : enum ndr_err_code err;
2473 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
2474 0 : if (tmp_ctx == NULL) {
2475 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
2476 0 : return NULL;
2477 : }
2478 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier);
2479 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
2480 0 : TALLOC_FREE(tmp_ctx);
2481 0 : PyErr_SetNdrError(err);
2482 0 : return NULL;
2483 : }
2484 :
2485 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
2486 0 : TALLOC_FREE(tmp_ctx);
2487 0 : return ret;
2488 : }
2489 :
2490 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
2491 : {
2492 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2493 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
2494 0 : Py_ssize_t blob_length = 0;
2495 : enum ndr_err_code err;
2496 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
2497 0 : PyObject *allow_remaining_obj = NULL;
2498 0 : bool allow_remaining = false;
2499 :
2500 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
2501 : discard_const_p(char *, kwnames),
2502 : &blob.data, &blob_length,
2503 : &allow_remaining_obj)) {
2504 0 : return NULL;
2505 : }
2506 0 : blob.length = blob_length;
2507 :
2508 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
2509 0 : allow_remaining = true;
2510 : }
2511 :
2512 0 : if (allow_remaining) {
2513 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier);
2514 : } else {
2515 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier);
2516 : }
2517 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
2518 0 : PyErr_SetNdrError(err);
2519 0 : return NULL;
2520 : }
2521 :
2522 0 : Py_RETURN_NONE;
2523 : }
2524 :
2525 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
2526 : {
2527 0 : struct drsuapi_DsReplicaObjectIdentifier *object = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(py_obj);
2528 : PyObject *ret;
2529 : char *retstr;
2530 :
2531 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier, "drsuapi_DsReplicaObjectIdentifier", object);
2532 0 : ret = PyUnicode_FromString(retstr);
2533 0 : talloc_free(retstr);
2534 :
2535 0 : return ret;
2536 : }
2537 :
2538 : static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier_methods[] = {
2539 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
2540 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaObjectIdentifier_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
2541 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
2542 : { NULL, NULL, 0, NULL }
2543 : };
2544 :
2545 :
2546 : static PyTypeObject drsuapi_DsReplicaObjectIdentifier_Type = {
2547 : PyVarObject_HEAD_INIT(NULL, 0)
2548 : .tp_name = "drsuapi.DsReplicaObjectIdentifier",
2549 : .tp_getset = py_drsuapi_DsReplicaObjectIdentifier_getsetters,
2550 : .tp_methods = py_drsuapi_DsReplicaObjectIdentifier_methods,
2551 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2552 : .tp_new = py_drsuapi_DsReplicaObjectIdentifier_new,
2553 : };
2554 :
2555 :
2556 0 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_naming_context(PyObject *obj, void *closure)
2557 : {
2558 0 : struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(obj);
2559 : PyObject *py_naming_context;
2560 0 : if (object->naming_context == NULL) {
2561 0 : Py_RETURN_NONE;
2562 : }
2563 0 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
2564 0 : return py_naming_context;
2565 : }
2566 :
2567 951 : static int py_drsuapi_DsReplicaSyncRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
2568 : {
2569 951 : struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(py_obj);
2570 951 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
2571 951 : if (value == NULL) {
2572 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
2573 0 : return -1;
2574 : }
2575 951 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
2576 951 : if (object->naming_context == NULL) {
2577 0 : PyErr_NoMemory();
2578 0 : return -1;
2579 : }
2580 951 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
2581 951 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
2582 0 : PyErr_NoMemory();
2583 0 : return -1;
2584 : }
2585 951 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
2586 951 : return 0;
2587 : }
2588 :
2589 0 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_guid(PyObject *obj, void *closure)
2590 : {
2591 0 : struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(obj);
2592 : PyObject *py_source_dsa_guid;
2593 0 : py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
2594 0 : return py_source_dsa_guid;
2595 : }
2596 :
2597 951 : static int py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
2598 : {
2599 951 : struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(py_obj);
2600 951 : if (value == NULL) {
2601 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
2602 0 : return -1;
2603 : }
2604 951 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
2605 951 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
2606 0 : PyErr_NoMemory();
2607 0 : return -1;
2608 : }
2609 951 : object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
2610 951 : return 0;
2611 : }
2612 :
2613 0 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_dns(PyObject *obj, void *closure)
2614 : {
2615 0 : struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(obj);
2616 : PyObject *py_source_dsa_dns;
2617 0 : if (object->source_dsa_dns == NULL) {
2618 0 : Py_RETURN_NONE;
2619 : }
2620 0 : if (object->source_dsa_dns == NULL) {
2621 0 : py_source_dsa_dns = Py_None;
2622 0 : Py_INCREF(py_source_dsa_dns);
2623 : } else {
2624 0 : if (object->source_dsa_dns == NULL) {
2625 0 : py_source_dsa_dns = Py_None;
2626 0 : Py_INCREF(py_source_dsa_dns);
2627 : } else {
2628 0 : py_source_dsa_dns = PyUnicode_Decode(object->source_dsa_dns, strlen(object->source_dsa_dns), "utf-8", "ignore");
2629 : }
2630 : }
2631 0 : return py_source_dsa_dns;
2632 : }
2633 :
2634 0 : static int py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_dns(PyObject *py_obj, PyObject *value, void *closure)
2635 : {
2636 0 : struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(py_obj);
2637 0 : if (value == NULL) {
2638 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_dns");
2639 0 : return -1;
2640 : }
2641 0 : if (value == Py_None) {
2642 0 : object->source_dsa_dns = NULL;
2643 : } else {
2644 0 : object->source_dsa_dns = NULL;
2645 : {
2646 : const char *test_str;
2647 : const char *talloc_str;
2648 0 : PyObject *unicode = NULL;
2649 0 : if (PyUnicode_Check(value)) {
2650 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
2651 0 : if (unicode == NULL) {
2652 0 : PyErr_NoMemory();
2653 0 : return -1;
2654 : }
2655 0 : test_str = PyBytes_AS_STRING(unicode);
2656 0 : } else if (PyBytes_Check(value)) {
2657 0 : test_str = PyBytes_AS_STRING(value);
2658 : } else {
2659 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
2660 0 : return -1;
2661 : }
2662 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
2663 0 : if (unicode != NULL) {
2664 0 : Py_DECREF(unicode);
2665 : }
2666 0 : if (talloc_str == NULL) {
2667 0 : PyErr_NoMemory();
2668 0 : return -1;
2669 : }
2670 0 : object->source_dsa_dns = talloc_str;
2671 : }
2672 : }
2673 0 : return 0;
2674 : }
2675 :
2676 0 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_get_options(PyObject *obj, void *closure)
2677 : {
2678 0 : struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(obj);
2679 : PyObject *py_options;
2680 0 : py_options = PyLong_FromUnsignedLongLong((uint32_t)object->options);
2681 0 : return py_options;
2682 : }
2683 :
2684 951 : static int py_drsuapi_DsReplicaSyncRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
2685 : {
2686 951 : struct drsuapi_DsReplicaSyncRequest1 *object = (struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(py_obj);
2687 951 : if (value == NULL) {
2688 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
2689 0 : return -1;
2690 : }
2691 : {
2692 951 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
2693 951 : if (PyLong_Check(value)) {
2694 : unsigned long long test_var;
2695 951 : test_var = PyLong_AsUnsignedLongLong(value);
2696 951 : if (PyErr_Occurred() != NULL) {
2697 0 : return -1;
2698 : }
2699 951 : if (test_var > uint_max) {
2700 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2701 : PyLong_Type.tp_name, uint_max, test_var);
2702 0 : return -1;
2703 : }
2704 951 : object->options = test_var;
2705 : } else {
2706 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2707 : PyLong_Type.tp_name);
2708 0 : return -1;
2709 : }
2710 : }
2711 951 : return 0;
2712 : }
2713 :
2714 : static PyGetSetDef py_drsuapi_DsReplicaSyncRequest1_getsetters[] = {
2715 : {
2716 : .name = discard_const_p(char, "naming_context"),
2717 : .get = py_drsuapi_DsReplicaSyncRequest1_get_naming_context,
2718 : .set = py_drsuapi_DsReplicaSyncRequest1_set_naming_context,
2719 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
2720 : },
2721 : {
2722 : .name = discard_const_p(char, "source_dsa_guid"),
2723 : .get = py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_guid,
2724 : .set = py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_guid,
2725 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
2726 : },
2727 : {
2728 : .name = discard_const_p(char, "source_dsa_dns"),
2729 : .get = py_drsuapi_DsReplicaSyncRequest1_get_source_dsa_dns,
2730 : .set = py_drsuapi_DsReplicaSyncRequest1_set_source_dsa_dns,
2731 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
2732 : },
2733 : {
2734 : .name = discard_const_p(char, "options"),
2735 : .get = py_drsuapi_DsReplicaSyncRequest1_get_options,
2736 : .set = py_drsuapi_DsReplicaSyncRequest1_set_options,
2737 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
2738 : },
2739 : { .name = NULL }
2740 : };
2741 :
2742 951 : static PyObject *py_drsuapi_DsReplicaSyncRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2743 : {
2744 951 : return pytalloc_new(struct drsuapi_DsReplicaSyncRequest1, type);
2745 : }
2746 :
2747 :
2748 : static PyTypeObject drsuapi_DsReplicaSyncRequest1_Type = {
2749 : PyVarObject_HEAD_INIT(NULL, 0)
2750 : .tp_name = "drsuapi.DsReplicaSyncRequest1",
2751 : .tp_getset = py_drsuapi_DsReplicaSyncRequest1_getsetters,
2752 : .tp_methods = NULL,
2753 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2754 : .tp_new = py_drsuapi_DsReplicaSyncRequest1_new,
2755 : };
2756 :
2757 0 : static PyObject *py_import_drsuapi_DsReplicaSyncRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaSyncRequest *in)
2758 : {
2759 : PyObject *ret;
2760 :
2761 0 : switch (level) {
2762 0 : case 1:
2763 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaSyncRequest1_Type, mem_ctx, &in->req1);
2764 0 : return ret;
2765 :
2766 : }
2767 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
2768 0 : return NULL;
2769 : }
2770 :
2771 951 : static union drsuapi_DsReplicaSyncRequest *py_export_drsuapi_DsReplicaSyncRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
2772 : {
2773 951 : union drsuapi_DsReplicaSyncRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaSyncRequest);
2774 951 : switch (level) {
2775 951 : case 1:
2776 951 : if (in == NULL) {
2777 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
2778 0 : talloc_free(ret); return NULL;
2779 : }
2780 951 : PY_CHECK_TYPE(&drsuapi_DsReplicaSyncRequest1_Type, in, talloc_free(ret); return NULL;);
2781 951 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
2782 0 : PyErr_NoMemory();
2783 0 : talloc_free(ret); return NULL;
2784 : }
2785 951 : ret->req1 = *(struct drsuapi_DsReplicaSyncRequest1 *)pytalloc_get_ptr(in);
2786 951 : break;
2787 :
2788 0 : default:
2789 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
2790 0 : talloc_free(ret);
2791 0 : ret = NULL;
2792 : }
2793 :
2794 951 : return ret;
2795 : }
2796 :
2797 0 : static PyObject *py_drsuapi_DsReplicaSyncRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2798 : {
2799 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
2800 0 : PyObject *mem_ctx_obj = NULL;
2801 0 : TALLOC_CTX *mem_ctx = NULL;
2802 0 : int level = 0;
2803 0 : PyObject *in_obj = NULL;
2804 0 : union drsuapi_DsReplicaSyncRequest *in = NULL;
2805 :
2806 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
2807 : discard_const_p(char *, kwnames),
2808 : &mem_ctx_obj,
2809 : &level,
2810 : &in_obj)) {
2811 0 : return NULL;
2812 : }
2813 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
2814 0 : if (mem_ctx == NULL) {
2815 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
2816 0 : return NULL;
2817 : }
2818 0 : in = (union drsuapi_DsReplicaSyncRequest *)pytalloc_get_ptr(in_obj);
2819 0 : if (in == NULL) {
2820 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaSyncRequest!");
2821 0 : return NULL;
2822 : }
2823 :
2824 0 : return py_import_drsuapi_DsReplicaSyncRequest(mem_ctx, level, in);
2825 : }
2826 :
2827 951 : static PyObject *py_drsuapi_DsReplicaSyncRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2828 : {
2829 951 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
2830 951 : PyObject *mem_ctx_obj = NULL;
2831 951 : TALLOC_CTX *mem_ctx = NULL;
2832 951 : int level = 0;
2833 951 : PyObject *in = NULL;
2834 951 : union drsuapi_DsReplicaSyncRequest *out = NULL;
2835 :
2836 951 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
2837 : discard_const_p(char *, kwnames),
2838 : &mem_ctx_obj,
2839 : &level,
2840 : &in)) {
2841 0 : return NULL;
2842 : }
2843 951 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
2844 951 : if (mem_ctx == NULL) {
2845 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
2846 0 : return NULL;
2847 : }
2848 :
2849 951 : out = py_export_drsuapi_DsReplicaSyncRequest(mem_ctx, level, in);
2850 951 : if (out == NULL) {
2851 0 : return NULL;
2852 : }
2853 :
2854 951 : return pytalloc_GenericObject_reference(out);
2855 : }
2856 :
2857 : static PyMethodDef py_drsuapi_DsReplicaSyncRequest_methods[] = {
2858 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSyncRequest_import),
2859 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
2860 : "T.__import__(mem_ctx, level, in) => ret." },
2861 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSyncRequest_export),
2862 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
2863 : "T.__export__(mem_ctx, level, in) => ret." },
2864 : { NULL, NULL, 0, NULL }
2865 : };
2866 :
2867 0 : static PyObject *py_drsuapi_DsReplicaSyncRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2868 : {
2869 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
2870 0 : return NULL;
2871 : }
2872 :
2873 :
2874 : static PyTypeObject drsuapi_DsReplicaSyncRequest_Type = {
2875 : PyVarObject_HEAD_INIT(NULL, 0)
2876 : .tp_name = "drsuapi.DsReplicaSyncRequest",
2877 : .tp_getset = NULL,
2878 : .tp_methods = py_drsuapi_DsReplicaSyncRequest_methods,
2879 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2880 : .tp_new = py_drsuapi_DsReplicaSyncRequest_new,
2881 : };
2882 :
2883 :
2884 2232 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_get_tmp_highest_usn(PyObject *obj, void *closure)
2885 : {
2886 2232 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(obj);
2887 : PyObject *py_tmp_highest_usn;
2888 2232 : py_tmp_highest_usn = PyLong_FromUnsignedLongLong(object->tmp_highest_usn);
2889 2232 : return py_tmp_highest_usn;
2890 : }
2891 :
2892 2755 : static int py_drsuapi_DsReplicaHighWaterMark_set_tmp_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
2893 : {
2894 2755 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
2895 2755 : if (value == NULL) {
2896 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->tmp_highest_usn");
2897 0 : return -1;
2898 : }
2899 : {
2900 2755 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->tmp_highest_usn));
2901 2755 : if (PyLong_Check(value)) {
2902 : unsigned long long test_var;
2903 2755 : test_var = PyLong_AsUnsignedLongLong(value);
2904 2755 : if (PyErr_Occurred() != NULL) {
2905 0 : return -1;
2906 : }
2907 2755 : if (test_var > uint_max) {
2908 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2909 : PyLong_Type.tp_name, uint_max, test_var);
2910 0 : return -1;
2911 : }
2912 2755 : object->tmp_highest_usn = test_var;
2913 : } else {
2914 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2915 : PyLong_Type.tp_name);
2916 0 : return -1;
2917 : }
2918 : }
2919 2755 : return 0;
2920 : }
2921 :
2922 927 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_get_reserved_usn(PyObject *obj, void *closure)
2923 : {
2924 927 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(obj);
2925 : PyObject *py_reserved_usn;
2926 927 : py_reserved_usn = PyLong_FromUnsignedLongLong(object->reserved_usn);
2927 927 : return py_reserved_usn;
2928 : }
2929 :
2930 2755 : static int py_drsuapi_DsReplicaHighWaterMark_set_reserved_usn(PyObject *py_obj, PyObject *value, void *closure)
2931 : {
2932 2755 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
2933 2755 : if (value == NULL) {
2934 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved_usn");
2935 0 : return -1;
2936 : }
2937 : {
2938 2755 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved_usn));
2939 2755 : if (PyLong_Check(value)) {
2940 : unsigned long long test_var;
2941 2755 : test_var = PyLong_AsUnsignedLongLong(value);
2942 2755 : if (PyErr_Occurred() != NULL) {
2943 0 : return -1;
2944 : }
2945 2755 : if (test_var > uint_max) {
2946 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2947 : PyLong_Type.tp_name, uint_max, test_var);
2948 0 : return -1;
2949 : }
2950 2755 : object->reserved_usn = test_var;
2951 : } else {
2952 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2953 : PyLong_Type.tp_name);
2954 0 : return -1;
2955 : }
2956 : }
2957 2755 : return 0;
2958 : }
2959 :
2960 1050 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_get_highest_usn(PyObject *obj, void *closure)
2961 : {
2962 1050 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(obj);
2963 : PyObject *py_highest_usn;
2964 1050 : py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
2965 1050 : return py_highest_usn;
2966 : }
2967 :
2968 2755 : static int py_drsuapi_DsReplicaHighWaterMark_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
2969 : {
2970 2755 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
2971 2755 : if (value == NULL) {
2972 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
2973 0 : return -1;
2974 : }
2975 : {
2976 2755 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
2977 2755 : if (PyLong_Check(value)) {
2978 : unsigned long long test_var;
2979 2755 : test_var = PyLong_AsUnsignedLongLong(value);
2980 2755 : if (PyErr_Occurred() != NULL) {
2981 0 : return -1;
2982 : }
2983 2755 : if (test_var > uint_max) {
2984 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2985 : PyLong_Type.tp_name, uint_max, test_var);
2986 0 : return -1;
2987 : }
2988 2755 : object->highest_usn = test_var;
2989 : } else {
2990 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2991 : PyLong_Type.tp_name);
2992 0 : return -1;
2993 : }
2994 : }
2995 2755 : return 0;
2996 : }
2997 :
2998 : static PyGetSetDef py_drsuapi_DsReplicaHighWaterMark_getsetters[] = {
2999 : {
3000 : .name = discard_const_p(char, "tmp_highest_usn"),
3001 : .get = py_drsuapi_DsReplicaHighWaterMark_get_tmp_highest_usn,
3002 : .set = py_drsuapi_DsReplicaHighWaterMark_set_tmp_highest_usn,
3003 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
3004 : },
3005 : {
3006 : .name = discard_const_p(char, "reserved_usn"),
3007 : .get = py_drsuapi_DsReplicaHighWaterMark_get_reserved_usn,
3008 : .set = py_drsuapi_DsReplicaHighWaterMark_set_reserved_usn,
3009 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
3010 : },
3011 : {
3012 : .name = discard_const_p(char, "highest_usn"),
3013 : .get = py_drsuapi_DsReplicaHighWaterMark_get_highest_usn,
3014 : .set = py_drsuapi_DsReplicaHighWaterMark_set_highest_usn,
3015 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
3016 : },
3017 : { .name = NULL }
3018 : };
3019 :
3020 1838 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3021 : {
3022 1838 : return pytalloc_new(struct drsuapi_DsReplicaHighWaterMark, type);
3023 : }
3024 :
3025 0 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
3026 : {
3027 0 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
3028 0 : PyObject *ret = NULL;
3029 : DATA_BLOB blob;
3030 : enum ndr_err_code err;
3031 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
3032 0 : if (tmp_ctx == NULL) {
3033 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
3034 0 : return NULL;
3035 : }
3036 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaHighWaterMark);
3037 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
3038 0 : TALLOC_FREE(tmp_ctx);
3039 0 : PyErr_SetNdrError(err);
3040 0 : return NULL;
3041 : }
3042 :
3043 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
3044 0 : TALLOC_FREE(tmp_ctx);
3045 0 : return ret;
3046 : }
3047 :
3048 0 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
3049 : {
3050 0 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
3051 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
3052 0 : Py_ssize_t blob_length = 0;
3053 : enum ndr_err_code err;
3054 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
3055 0 : PyObject *allow_remaining_obj = NULL;
3056 0 : bool allow_remaining = false;
3057 :
3058 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
3059 : discard_const_p(char *, kwnames),
3060 : &blob.data, &blob_length,
3061 : &allow_remaining_obj)) {
3062 0 : return NULL;
3063 : }
3064 0 : blob.length = blob_length;
3065 :
3066 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
3067 0 : allow_remaining = true;
3068 : }
3069 :
3070 0 : if (allow_remaining) {
3071 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaHighWaterMark);
3072 : } else {
3073 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaHighWaterMark);
3074 : }
3075 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
3076 0 : PyErr_SetNdrError(err);
3077 0 : return NULL;
3078 : }
3079 :
3080 0 : Py_RETURN_NONE;
3081 : }
3082 :
3083 0 : static PyObject *py_drsuapi_DsReplicaHighWaterMark_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
3084 : {
3085 0 : struct drsuapi_DsReplicaHighWaterMark *object = (struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(py_obj);
3086 : PyObject *ret;
3087 : char *retstr;
3088 :
3089 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaHighWaterMark, "drsuapi_DsReplicaHighWaterMark", object);
3090 0 : ret = PyUnicode_FromString(retstr);
3091 0 : talloc_free(retstr);
3092 :
3093 0 : return ret;
3094 : }
3095 :
3096 : static PyMethodDef py_drsuapi_DsReplicaHighWaterMark_methods[] = {
3097 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaHighWaterMark_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
3098 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaHighWaterMark_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
3099 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaHighWaterMark_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
3100 : { NULL, NULL, 0, NULL }
3101 : };
3102 :
3103 :
3104 : static PyTypeObject drsuapi_DsReplicaHighWaterMark_Type = {
3105 : PyVarObject_HEAD_INIT(NULL, 0)
3106 : .tp_name = "drsuapi.DsReplicaHighWaterMark",
3107 : .tp_getset = py_drsuapi_DsReplicaHighWaterMark_getsetters,
3108 : .tp_methods = py_drsuapi_DsReplicaHighWaterMark_methods,
3109 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3110 : .tp_new = py_drsuapi_DsReplicaHighWaterMark_new,
3111 : };
3112 :
3113 :
3114 0 : static PyObject *py_drsuapi_DsReplicaCursor_get_source_dsa_invocation_id(PyObject *obj, void *closure)
3115 : {
3116 0 : struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(obj);
3117 : PyObject *py_source_dsa_invocation_id;
3118 0 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
3119 0 : return py_source_dsa_invocation_id;
3120 : }
3121 :
3122 333 : static int py_drsuapi_DsReplicaCursor_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
3123 : {
3124 333 : struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
3125 333 : if (value == NULL) {
3126 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
3127 0 : return -1;
3128 : }
3129 333 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
3130 333 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3131 0 : PyErr_NoMemory();
3132 0 : return -1;
3133 : }
3134 333 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
3135 333 : return 0;
3136 : }
3137 :
3138 0 : static PyObject *py_drsuapi_DsReplicaCursor_get_highest_usn(PyObject *obj, void *closure)
3139 : {
3140 0 : struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(obj);
3141 : PyObject *py_highest_usn;
3142 0 : py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
3143 0 : return py_highest_usn;
3144 : }
3145 :
3146 333 : static int py_drsuapi_DsReplicaCursor_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
3147 : {
3148 333 : struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
3149 333 : if (value == NULL) {
3150 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
3151 0 : return -1;
3152 : }
3153 : {
3154 333 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
3155 333 : if (PyLong_Check(value)) {
3156 : unsigned long long test_var;
3157 333 : test_var = PyLong_AsUnsignedLongLong(value);
3158 333 : if (PyErr_Occurred() != NULL) {
3159 0 : return -1;
3160 : }
3161 333 : if (test_var > uint_max) {
3162 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3163 : PyLong_Type.tp_name, uint_max, test_var);
3164 0 : return -1;
3165 : }
3166 333 : object->highest_usn = test_var;
3167 : } else {
3168 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3169 : PyLong_Type.tp_name);
3170 0 : return -1;
3171 : }
3172 : }
3173 333 : return 0;
3174 : }
3175 :
3176 : static PyGetSetDef py_drsuapi_DsReplicaCursor_getsetters[] = {
3177 : {
3178 : .name = discard_const_p(char, "source_dsa_invocation_id"),
3179 : .get = py_drsuapi_DsReplicaCursor_get_source_dsa_invocation_id,
3180 : .set = py_drsuapi_DsReplicaCursor_set_source_dsa_invocation_id,
3181 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
3182 : },
3183 : {
3184 : .name = discard_const_p(char, "highest_usn"),
3185 : .get = py_drsuapi_DsReplicaCursor_get_highest_usn,
3186 : .set = py_drsuapi_DsReplicaCursor_set_highest_usn,
3187 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
3188 : },
3189 : { .name = NULL }
3190 : };
3191 :
3192 333 : static PyObject *py_drsuapi_DsReplicaCursor_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3193 : {
3194 333 : return pytalloc_new(struct drsuapi_DsReplicaCursor, type);
3195 : }
3196 :
3197 0 : static PyObject *py_drsuapi_DsReplicaCursor_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
3198 : {
3199 0 : struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
3200 0 : PyObject *ret = NULL;
3201 : DATA_BLOB blob;
3202 : enum ndr_err_code err;
3203 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
3204 0 : if (tmp_ctx == NULL) {
3205 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
3206 0 : return NULL;
3207 : }
3208 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaCursor);
3209 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
3210 0 : TALLOC_FREE(tmp_ctx);
3211 0 : PyErr_SetNdrError(err);
3212 0 : return NULL;
3213 : }
3214 :
3215 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
3216 0 : TALLOC_FREE(tmp_ctx);
3217 0 : return ret;
3218 : }
3219 :
3220 0 : static PyObject *py_drsuapi_DsReplicaCursor_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
3221 : {
3222 0 : struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
3223 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
3224 0 : Py_ssize_t blob_length = 0;
3225 : enum ndr_err_code err;
3226 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
3227 0 : PyObject *allow_remaining_obj = NULL;
3228 0 : bool allow_remaining = false;
3229 :
3230 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
3231 : discard_const_p(char *, kwnames),
3232 : &blob.data, &blob_length,
3233 : &allow_remaining_obj)) {
3234 0 : return NULL;
3235 : }
3236 0 : blob.length = blob_length;
3237 :
3238 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
3239 0 : allow_remaining = true;
3240 : }
3241 :
3242 0 : if (allow_remaining) {
3243 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor);
3244 : } else {
3245 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor);
3246 : }
3247 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
3248 0 : PyErr_SetNdrError(err);
3249 0 : return NULL;
3250 : }
3251 :
3252 0 : Py_RETURN_NONE;
3253 : }
3254 :
3255 0 : static PyObject *py_drsuapi_DsReplicaCursor_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
3256 : {
3257 0 : struct drsuapi_DsReplicaCursor *object = (struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(py_obj);
3258 : PyObject *ret;
3259 : char *retstr;
3260 :
3261 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaCursor, "drsuapi_DsReplicaCursor", object);
3262 0 : ret = PyUnicode_FromString(retstr);
3263 0 : talloc_free(retstr);
3264 :
3265 0 : return ret;
3266 : }
3267 :
3268 : static PyMethodDef py_drsuapi_DsReplicaCursor_methods[] = {
3269 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaCursor_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
3270 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaCursor_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
3271 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaCursor_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
3272 : { NULL, NULL, 0, NULL }
3273 : };
3274 :
3275 :
3276 : static PyTypeObject drsuapi_DsReplicaCursor_Type = {
3277 : PyVarObject_HEAD_INIT(NULL, 0)
3278 : .tp_name = "drsuapi.DsReplicaCursor",
3279 : .tp_getset = py_drsuapi_DsReplicaCursor_getsetters,
3280 : .tp_methods = py_drsuapi_DsReplicaCursor_methods,
3281 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3282 : .tp_new = py_drsuapi_DsReplicaCursor_new,
3283 : };
3284 :
3285 :
3286 0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_version(PyObject *obj, void *closure)
3287 : {
3288 0 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
3289 : PyObject *py_version;
3290 0 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
3291 0 : return py_version;
3292 : }
3293 :
3294 74 : static int py_drsuapi_DsReplicaCursorCtrEx_set_version(PyObject *py_obj, PyObject *value, void *closure)
3295 : {
3296 74 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
3297 74 : if (value == NULL) {
3298 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
3299 0 : return -1;
3300 : }
3301 : {
3302 74 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
3303 74 : if (PyLong_Check(value)) {
3304 : unsigned long long test_var;
3305 74 : test_var = PyLong_AsUnsignedLongLong(value);
3306 74 : if (PyErr_Occurred() != NULL) {
3307 0 : return -1;
3308 : }
3309 74 : if (test_var > uint_max) {
3310 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3311 : PyLong_Type.tp_name, uint_max, test_var);
3312 0 : return -1;
3313 : }
3314 74 : object->version = test_var;
3315 : } else {
3316 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3317 : PyLong_Type.tp_name);
3318 0 : return -1;
3319 : }
3320 : }
3321 74 : return 0;
3322 : }
3323 :
3324 0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_reserved1(PyObject *obj, void *closure)
3325 : {
3326 0 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
3327 : PyObject *py_reserved1;
3328 0 : py_reserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->reserved1);
3329 0 : return py_reserved1;
3330 : }
3331 :
3332 74 : static int py_drsuapi_DsReplicaCursorCtrEx_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
3333 : {
3334 74 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
3335 74 : if (value == NULL) {
3336 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
3337 0 : return -1;
3338 : }
3339 : {
3340 74 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
3341 74 : if (PyLong_Check(value)) {
3342 : unsigned long long test_var;
3343 74 : test_var = PyLong_AsUnsignedLongLong(value);
3344 74 : if (PyErr_Occurred() != NULL) {
3345 0 : return -1;
3346 : }
3347 74 : if (test_var > uint_max) {
3348 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3349 : PyLong_Type.tp_name, uint_max, test_var);
3350 0 : return -1;
3351 : }
3352 74 : object->reserved1 = test_var;
3353 : } else {
3354 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3355 : PyLong_Type.tp_name);
3356 0 : return -1;
3357 : }
3358 : }
3359 74 : return 0;
3360 : }
3361 :
3362 0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_count(PyObject *obj, void *closure)
3363 : {
3364 0 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
3365 : PyObject *py_count;
3366 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
3367 0 : return py_count;
3368 : }
3369 :
3370 196 : static int py_drsuapi_DsReplicaCursorCtrEx_set_count(PyObject *py_obj, PyObject *value, void *closure)
3371 : {
3372 196 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
3373 196 : if (value == NULL) {
3374 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
3375 0 : return -1;
3376 : }
3377 : {
3378 196 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
3379 196 : if (PyLong_Check(value)) {
3380 : unsigned long long test_var;
3381 196 : test_var = PyLong_AsUnsignedLongLong(value);
3382 196 : if (PyErr_Occurred() != NULL) {
3383 0 : return -1;
3384 : }
3385 196 : if (test_var > uint_max) {
3386 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3387 : PyLong_Type.tp_name, uint_max, test_var);
3388 0 : return -1;
3389 : }
3390 196 : object->count = test_var;
3391 : } else {
3392 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3393 : PyLong_Type.tp_name);
3394 0 : return -1;
3395 : }
3396 : }
3397 196 : return 0;
3398 : }
3399 :
3400 0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_reserved2(PyObject *obj, void *closure)
3401 : {
3402 0 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
3403 : PyObject *py_reserved2;
3404 0 : py_reserved2 = PyLong_FromUnsignedLongLong((uint32_t)object->reserved2);
3405 0 : return py_reserved2;
3406 : }
3407 :
3408 74 : static int py_drsuapi_DsReplicaCursorCtrEx_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
3409 : {
3410 74 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
3411 74 : if (value == NULL) {
3412 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved2");
3413 0 : return -1;
3414 : }
3415 : {
3416 74 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved2));
3417 74 : if (PyLong_Check(value)) {
3418 : unsigned long long test_var;
3419 74 : test_var = PyLong_AsUnsignedLongLong(value);
3420 74 : if (PyErr_Occurred() != NULL) {
3421 0 : return -1;
3422 : }
3423 74 : if (test_var > uint_max) {
3424 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3425 : PyLong_Type.tp_name, uint_max, test_var);
3426 0 : return -1;
3427 : }
3428 74 : object->reserved2 = test_var;
3429 : } else {
3430 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3431 : PyLong_Type.tp_name);
3432 0 : return -1;
3433 : }
3434 : }
3435 74 : return 0;
3436 : }
3437 :
3438 0 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_get_cursors(PyObject *obj, void *closure)
3439 : {
3440 0 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(obj);
3441 : PyObject *py_cursors;
3442 0 : py_cursors = PyList_New(object->count);
3443 0 : if (py_cursors == NULL) {
3444 0 : return NULL;
3445 : }
3446 : {
3447 : int cursors_cntr_0;
3448 0 : for (cursors_cntr_0 = 0; cursors_cntr_0 < (object->count); cursors_cntr_0++) {
3449 : PyObject *py_cursors_0;
3450 0 : py_cursors_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor_Type, object->cursors, &object->cursors[cursors_cntr_0]);
3451 0 : PyList_SetItem(py_cursors, cursors_cntr_0, py_cursors_0);
3452 : }
3453 : }
3454 0 : return py_cursors;
3455 : }
3456 :
3457 196 : static int py_drsuapi_DsReplicaCursorCtrEx_set_cursors(PyObject *py_obj, PyObject *value, void *closure)
3458 : {
3459 196 : struct drsuapi_DsReplicaCursorCtrEx *object = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(py_obj);
3460 196 : if (value == NULL) {
3461 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cursors");
3462 0 : return -1;
3463 : }
3464 196 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3465 : {
3466 : int cursors_cntr_0;
3467 196 : object->cursors = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cursors, PyList_GET_SIZE(value));
3468 196 : if (!object->cursors) { return -1;; }
3469 196 : talloc_set_name_const(object->cursors, "ARRAY: object->cursors");
3470 529 : for (cursors_cntr_0 = 0; cursors_cntr_0 < PyList_GET_SIZE(value); cursors_cntr_0++) {
3471 333 : if (PyList_GET_ITEM(value, cursors_cntr_0) == NULL) {
3472 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cursors[cursors_cntr_0]");
3473 0 : return -1;
3474 : }
3475 333 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursor_Type, PyList_GET_ITEM(value, cursors_cntr_0), return -1;);
3476 333 : if (talloc_reference(object->cursors, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, cursors_cntr_0))) == NULL) {
3477 0 : PyErr_NoMemory();
3478 0 : return -1;
3479 : }
3480 333 : object->cursors[cursors_cntr_0] = *(struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(PyList_GET_ITEM(value, cursors_cntr_0));
3481 : }
3482 : }
3483 196 : return 0;
3484 : }
3485 :
3486 : static PyGetSetDef py_drsuapi_DsReplicaCursorCtrEx_getsetters[] = {
3487 : {
3488 : .name = discard_const_p(char, "version"),
3489 : .get = py_drsuapi_DsReplicaCursorCtrEx_get_version,
3490 : .set = py_drsuapi_DsReplicaCursorCtrEx_set_version,
3491 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3492 : },
3493 : {
3494 : .name = discard_const_p(char, "reserved1"),
3495 : .get = py_drsuapi_DsReplicaCursorCtrEx_get_reserved1,
3496 : .set = py_drsuapi_DsReplicaCursorCtrEx_set_reserved1,
3497 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3498 : },
3499 : {
3500 : .name = discard_const_p(char, "count"),
3501 : .get = py_drsuapi_DsReplicaCursorCtrEx_get_count,
3502 : .set = py_drsuapi_DsReplicaCursorCtrEx_set_count,
3503 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3504 : },
3505 : {
3506 : .name = discard_const_p(char, "reserved2"),
3507 : .get = py_drsuapi_DsReplicaCursorCtrEx_get_reserved2,
3508 : .set = py_drsuapi_DsReplicaCursorCtrEx_set_reserved2,
3509 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3510 : },
3511 : {
3512 : .name = discard_const_p(char, "cursors"),
3513 : .get = py_drsuapi_DsReplicaCursorCtrEx_get_cursors,
3514 : .set = py_drsuapi_DsReplicaCursorCtrEx_set_cursors,
3515 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor")
3516 : },
3517 : { .name = NULL }
3518 : };
3519 :
3520 196 : static PyObject *py_drsuapi_DsReplicaCursorCtrEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3521 : {
3522 196 : return pytalloc_new(struct drsuapi_DsReplicaCursorCtrEx, type);
3523 : }
3524 :
3525 :
3526 : static PyTypeObject drsuapi_DsReplicaCursorCtrEx_Type = {
3527 : PyVarObject_HEAD_INIT(NULL, 0)
3528 : .tp_name = "drsuapi.DsReplicaCursorCtrEx",
3529 : .tp_getset = py_drsuapi_DsReplicaCursorCtrEx_getsetters,
3530 : .tp_methods = NULL,
3531 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3532 : .tp_new = py_drsuapi_DsReplicaCursorCtrEx_new,
3533 : };
3534 :
3535 :
3536 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_destination_dsa_guid(PyObject *obj, void *closure)
3537 : {
3538 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3539 : PyObject *py_destination_dsa_guid;
3540 0 : py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
3541 0 : return py_destination_dsa_guid;
3542 : }
3543 :
3544 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
3545 : {
3546 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3547 0 : if (value == NULL) {
3548 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->destination_dsa_guid");
3549 0 : return -1;
3550 : }
3551 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
3552 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3553 0 : PyErr_NoMemory();
3554 0 : return -1;
3555 : }
3556 0 : object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
3557 0 : return 0;
3558 : }
3559 :
3560 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_source_dsa_invocation_id(PyObject *obj, void *closure)
3561 : {
3562 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3563 : PyObject *py_source_dsa_invocation_id;
3564 0 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
3565 0 : return py_source_dsa_invocation_id;
3566 : }
3567 :
3568 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
3569 : {
3570 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3571 0 : if (value == NULL) {
3572 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
3573 0 : return -1;
3574 : }
3575 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
3576 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3577 0 : PyErr_NoMemory();
3578 0 : return -1;
3579 : }
3580 0 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
3581 0 : return 0;
3582 : }
3583 :
3584 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_naming_context(PyObject *obj, void *closure)
3585 : {
3586 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3587 : PyObject *py_naming_context;
3588 0 : if (object->naming_context == NULL) {
3589 0 : Py_RETURN_NONE;
3590 : }
3591 0 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
3592 0 : return py_naming_context;
3593 : }
3594 :
3595 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
3596 : {
3597 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3598 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
3599 0 : if (value == NULL) {
3600 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
3601 0 : return -1;
3602 : }
3603 0 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
3604 0 : if (object->naming_context == NULL) {
3605 0 : PyErr_NoMemory();
3606 0 : return -1;
3607 : }
3608 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
3609 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3610 0 : PyErr_NoMemory();
3611 0 : return -1;
3612 : }
3613 0 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
3614 0 : return 0;
3615 : }
3616 :
3617 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_highwatermark(PyObject *obj, void *closure)
3618 : {
3619 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3620 : PyObject *py_highwatermark;
3621 0 : py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
3622 0 : return py_highwatermark;
3623 : }
3624 :
3625 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
3626 : {
3627 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3628 0 : if (value == NULL) {
3629 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
3630 0 : return -1;
3631 : }
3632 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
3633 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3634 0 : PyErr_NoMemory();
3635 0 : return -1;
3636 : }
3637 0 : object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
3638 0 : return 0;
3639 : }
3640 :
3641 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_uptodateness_vector(PyObject *obj, void *closure)
3642 : {
3643 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3644 : PyObject *py_uptodateness_vector;
3645 0 : if (object->uptodateness_vector == NULL) {
3646 0 : Py_RETURN_NONE;
3647 : }
3648 0 : if (object->uptodateness_vector == NULL) {
3649 0 : py_uptodateness_vector = Py_None;
3650 0 : Py_INCREF(py_uptodateness_vector);
3651 : } else {
3652 0 : py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
3653 : }
3654 0 : return py_uptodateness_vector;
3655 : }
3656 :
3657 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
3658 : {
3659 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3660 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
3661 0 : if (value == NULL) {
3662 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
3663 0 : return -1;
3664 : }
3665 0 : if (value == Py_None) {
3666 0 : object->uptodateness_vector = NULL;
3667 : } else {
3668 0 : object->uptodateness_vector = NULL;
3669 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
3670 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3671 0 : PyErr_NoMemory();
3672 0 : return -1;
3673 : }
3674 0 : object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
3675 : }
3676 0 : return 0;
3677 : }
3678 :
3679 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_replica_flags(PyObject *obj, void *closure)
3680 : {
3681 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3682 : PyObject *py_replica_flags;
3683 0 : py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)object->replica_flags);
3684 0 : return py_replica_flags;
3685 : }
3686 :
3687 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
3688 : {
3689 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3690 0 : if (value == NULL) {
3691 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
3692 0 : return -1;
3693 : }
3694 : {
3695 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
3696 0 : if (PyLong_Check(value)) {
3697 : unsigned long long test_var;
3698 0 : test_var = PyLong_AsUnsignedLongLong(value);
3699 0 : if (PyErr_Occurred() != NULL) {
3700 0 : return -1;
3701 : }
3702 0 : if (test_var > uint_max) {
3703 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3704 : PyLong_Type.tp_name, uint_max, test_var);
3705 0 : return -1;
3706 : }
3707 0 : object->replica_flags = test_var;
3708 : } else {
3709 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3710 : PyLong_Type.tp_name);
3711 0 : return -1;
3712 : }
3713 : }
3714 0 : return 0;
3715 : }
3716 :
3717 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_max_object_count(PyObject *obj, void *closure)
3718 : {
3719 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3720 : PyObject *py_max_object_count;
3721 0 : py_max_object_count = PyLong_FromUnsignedLongLong((uint32_t)object->max_object_count);
3722 0 : return py_max_object_count;
3723 : }
3724 :
3725 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
3726 : {
3727 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3728 0 : if (value == NULL) {
3729 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_object_count");
3730 0 : return -1;
3731 : }
3732 : {
3733 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_object_count));
3734 0 : if (PyLong_Check(value)) {
3735 : unsigned long long test_var;
3736 0 : test_var = PyLong_AsUnsignedLongLong(value);
3737 0 : if (PyErr_Occurred() != NULL) {
3738 0 : return -1;
3739 : }
3740 0 : if (test_var > uint_max) {
3741 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3742 : PyLong_Type.tp_name, uint_max, test_var);
3743 0 : return -1;
3744 : }
3745 0 : object->max_object_count = test_var;
3746 : } else {
3747 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3748 : PyLong_Type.tp_name);
3749 0 : return -1;
3750 : }
3751 : }
3752 0 : return 0;
3753 : }
3754 :
3755 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_max_ndr_size(PyObject *obj, void *closure)
3756 : {
3757 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3758 : PyObject *py_max_ndr_size;
3759 0 : py_max_ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->max_ndr_size);
3760 0 : return py_max_ndr_size;
3761 : }
3762 :
3763 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
3764 : {
3765 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3766 0 : if (value == NULL) {
3767 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_ndr_size");
3768 0 : return -1;
3769 : }
3770 : {
3771 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_ndr_size));
3772 0 : if (PyLong_Check(value)) {
3773 : unsigned long long test_var;
3774 0 : test_var = PyLong_AsUnsignedLongLong(value);
3775 0 : if (PyErr_Occurred() != NULL) {
3776 0 : return -1;
3777 : }
3778 0 : if (test_var > uint_max) {
3779 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3780 : PyLong_Type.tp_name, uint_max, test_var);
3781 0 : return -1;
3782 : }
3783 0 : object->max_ndr_size = test_var;
3784 : } else {
3785 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3786 : PyLong_Type.tp_name);
3787 0 : return -1;
3788 : }
3789 : }
3790 0 : return 0;
3791 : }
3792 :
3793 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_extended_op(PyObject *obj, void *closure)
3794 : {
3795 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3796 : PyObject *py_extended_op;
3797 0 : py_extended_op = PyLong_FromUnsignedLongLong((uint32_t)object->extended_op);
3798 0 : return py_extended_op;
3799 : }
3800 :
3801 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
3802 : {
3803 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3804 0 : if (value == NULL) {
3805 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_op");
3806 0 : return -1;
3807 : }
3808 : {
3809 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_op));
3810 0 : if (PyLong_Check(value)) {
3811 : unsigned long long test_var;
3812 0 : test_var = PyLong_AsUnsignedLongLong(value);
3813 0 : if (PyErr_Occurred() != NULL) {
3814 0 : return -1;
3815 : }
3816 0 : if (test_var > uint_max) {
3817 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3818 : PyLong_Type.tp_name, uint_max, test_var);
3819 0 : return -1;
3820 : }
3821 0 : object->extended_op = test_var;
3822 : } else {
3823 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3824 : PyLong_Type.tp_name);
3825 0 : return -1;
3826 : }
3827 : }
3828 0 : return 0;
3829 : }
3830 :
3831 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_get_fsmo_info(PyObject *obj, void *closure)
3832 : {
3833 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(obj);
3834 : PyObject *py_fsmo_info;
3835 0 : py_fsmo_info = PyLong_FromUnsignedLongLong(object->fsmo_info);
3836 0 : return py_fsmo_info;
3837 : }
3838 :
3839 0 : static int py_drsuapi_DsGetNCChangesRequest5_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
3840 : {
3841 0 : struct drsuapi_DsGetNCChangesRequest5 *object = (struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(py_obj);
3842 0 : if (value == NULL) {
3843 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fsmo_info");
3844 0 : return -1;
3845 : }
3846 : {
3847 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fsmo_info));
3848 0 : if (PyLong_Check(value)) {
3849 : unsigned long long test_var;
3850 0 : test_var = PyLong_AsUnsignedLongLong(value);
3851 0 : if (PyErr_Occurred() != NULL) {
3852 0 : return -1;
3853 : }
3854 0 : if (test_var > uint_max) {
3855 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3856 : PyLong_Type.tp_name, uint_max, test_var);
3857 0 : return -1;
3858 : }
3859 0 : object->fsmo_info = test_var;
3860 : } else {
3861 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3862 : PyLong_Type.tp_name);
3863 0 : return -1;
3864 : }
3865 : }
3866 0 : return 0;
3867 : }
3868 :
3869 : static PyGetSetDef py_drsuapi_DsGetNCChangesRequest5_getsetters[] = {
3870 : {
3871 : .name = discard_const_p(char, "destination_dsa_guid"),
3872 : .get = py_drsuapi_DsGetNCChangesRequest5_get_destination_dsa_guid,
3873 : .set = py_drsuapi_DsGetNCChangesRequest5_set_destination_dsa_guid,
3874 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
3875 : },
3876 : {
3877 : .name = discard_const_p(char, "source_dsa_invocation_id"),
3878 : .get = py_drsuapi_DsGetNCChangesRequest5_get_source_dsa_invocation_id,
3879 : .set = py_drsuapi_DsGetNCChangesRequest5_set_source_dsa_invocation_id,
3880 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
3881 : },
3882 : {
3883 : .name = discard_const_p(char, "naming_context"),
3884 : .get = py_drsuapi_DsGetNCChangesRequest5_get_naming_context,
3885 : .set = py_drsuapi_DsGetNCChangesRequest5_set_naming_context,
3886 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
3887 : },
3888 : {
3889 : .name = discard_const_p(char, "highwatermark"),
3890 : .get = py_drsuapi_DsGetNCChangesRequest5_get_highwatermark,
3891 : .set = py_drsuapi_DsGetNCChangesRequest5_set_highwatermark,
3892 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
3893 : },
3894 : {
3895 : .name = discard_const_p(char, "uptodateness_vector"),
3896 : .get = py_drsuapi_DsGetNCChangesRequest5_get_uptodateness_vector,
3897 : .set = py_drsuapi_DsGetNCChangesRequest5_set_uptodateness_vector,
3898 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursorCtrEx")
3899 : },
3900 : {
3901 : .name = discard_const_p(char, "replica_flags"),
3902 : .get = py_drsuapi_DsGetNCChangesRequest5_get_replica_flags,
3903 : .set = py_drsuapi_DsGetNCChangesRequest5_set_replica_flags,
3904 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
3905 : },
3906 : {
3907 : .name = discard_const_p(char, "max_object_count"),
3908 : .get = py_drsuapi_DsGetNCChangesRequest5_get_max_object_count,
3909 : .set = py_drsuapi_DsGetNCChangesRequest5_set_max_object_count,
3910 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3911 : },
3912 : {
3913 : .name = discard_const_p(char, "max_ndr_size"),
3914 : .get = py_drsuapi_DsGetNCChangesRequest5_get_max_ndr_size,
3915 : .set = py_drsuapi_DsGetNCChangesRequest5_set_max_ndr_size,
3916 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3917 : },
3918 : {
3919 : .name = discard_const_p(char, "extended_op"),
3920 : .get = py_drsuapi_DsGetNCChangesRequest5_get_extended_op,
3921 : .set = py_drsuapi_DsGetNCChangesRequest5_set_extended_op,
3922 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedOperation")
3923 : },
3924 : {
3925 : .name = discard_const_p(char, "fsmo_info"),
3926 : .get = py_drsuapi_DsGetNCChangesRequest5_get_fsmo_info,
3927 : .set = py_drsuapi_DsGetNCChangesRequest5_set_fsmo_info,
3928 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
3929 : },
3930 : { .name = NULL }
3931 : };
3932 :
3933 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest5_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3934 : {
3935 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesRequest5, type);
3936 : }
3937 :
3938 :
3939 : static PyTypeObject drsuapi_DsGetNCChangesRequest5_Type = {
3940 : PyVarObject_HEAD_INIT(NULL, 0)
3941 : .tp_name = "drsuapi.DsGetNCChangesRequest5",
3942 : .tp_getset = py_drsuapi_DsGetNCChangesRequest5_getsetters,
3943 : .tp_methods = NULL,
3944 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3945 : .tp_new = py_drsuapi_DsGetNCChangesRequest5_new,
3946 : };
3947 :
3948 :
3949 0 : static PyObject *py_drsuapi_DsReplicaOID_get_length(PyObject *obj, void *closure)
3950 : {
3951 0 : struct drsuapi_DsReplicaOID *object = (struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(obj);
3952 : PyObject *py_length;
3953 0 : py_length = PyLong_FromUnsignedLongLong((uint32_t)object->length);
3954 0 : return py_length;
3955 : }
3956 :
3957 12 : static int py_drsuapi_DsReplicaOID_set_length(PyObject *py_obj, PyObject *value, void *closure)
3958 : {
3959 12 : struct drsuapi_DsReplicaOID *object = (struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(py_obj);
3960 12 : if (value == NULL) {
3961 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->length");
3962 0 : return -1;
3963 : }
3964 : {
3965 12 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->length));
3966 12 : if (PyLong_Check(value)) {
3967 : unsigned long long test_var;
3968 12 : test_var = PyLong_AsUnsignedLongLong(value);
3969 12 : if (PyErr_Occurred() != NULL) {
3970 0 : return -1;
3971 : }
3972 12 : if (test_var > uint_max) {
3973 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3974 : PyLong_Type.tp_name, uint_max, test_var);
3975 0 : return -1;
3976 : }
3977 12 : object->length = test_var;
3978 : } else {
3979 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3980 : PyLong_Type.tp_name);
3981 0 : return -1;
3982 : }
3983 : }
3984 12 : return 0;
3985 : }
3986 :
3987 498 : static PyObject *py_drsuapi_DsReplicaOID_get_binary_oid(PyObject *obj, void *closure)
3988 : {
3989 498 : struct drsuapi_DsReplicaOID *object = (struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(obj);
3990 : PyObject *py_binary_oid;
3991 498 : if (object->binary_oid == NULL) {
3992 0 : Py_RETURN_NONE;
3993 : }
3994 498 : if (object->binary_oid == NULL) {
3995 0 : py_binary_oid = Py_None;
3996 0 : Py_INCREF(py_binary_oid);
3997 : } else {
3998 498 : py_binary_oid = PyList_New(object->length);
3999 498 : if (py_binary_oid == NULL) {
4000 0 : return NULL;
4001 : }
4002 : {
4003 : int binary_oid_cntr_1;
4004 4554 : for (binary_oid_cntr_1 = 0; binary_oid_cntr_1 < (object->length); binary_oid_cntr_1++) {
4005 : PyObject *py_binary_oid_1;
4006 4056 : py_binary_oid_1 = PyLong_FromLong((uint16_t)object->binary_oid[binary_oid_cntr_1]);
4007 4056 : PyList_SetItem(py_binary_oid, binary_oid_cntr_1, py_binary_oid_1);
4008 : }
4009 : }
4010 : }
4011 498 : return py_binary_oid;
4012 : }
4013 :
4014 12 : static int py_drsuapi_DsReplicaOID_set_binary_oid(PyObject *py_obj, PyObject *value, void *closure)
4015 : {
4016 12 : struct drsuapi_DsReplicaOID *object = (struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(py_obj);
4017 12 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->binary_oid));
4018 12 : if (value == NULL) {
4019 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary_oid");
4020 0 : return -1;
4021 : }
4022 12 : if (value == Py_None) {
4023 0 : object->binary_oid = NULL;
4024 : } else {
4025 12 : object->binary_oid = NULL;
4026 12 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4027 : {
4028 : int binary_oid_cntr_1;
4029 12 : object->binary_oid = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary_oid, PyList_GET_SIZE(value));
4030 12 : if (!object->binary_oid) { return -1;; }
4031 12 : talloc_set_name_const(object->binary_oid, "ARRAY: object->binary_oid");
4032 264 : for (binary_oid_cntr_1 = 0; binary_oid_cntr_1 < PyList_GET_SIZE(value); binary_oid_cntr_1++) {
4033 252 : if (PyList_GET_ITEM(value, binary_oid_cntr_1) == NULL) {
4034 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary_oid[binary_oid_cntr_1]");
4035 0 : return -1;
4036 : }
4037 : {
4038 252 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->binary_oid[binary_oid_cntr_1]));
4039 252 : if (PyLong_Check(PyList_GET_ITEM(value, binary_oid_cntr_1))) {
4040 : unsigned long long test_var;
4041 252 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, binary_oid_cntr_1));
4042 252 : if (PyErr_Occurred() != NULL) {
4043 0 : return -1;
4044 : }
4045 252 : if (test_var > uint_max) {
4046 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4047 : PyLong_Type.tp_name, uint_max, test_var);
4048 0 : return -1;
4049 : }
4050 252 : object->binary_oid[binary_oid_cntr_1] = test_var;
4051 : } else {
4052 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4053 : PyLong_Type.tp_name);
4054 0 : return -1;
4055 : }
4056 : }
4057 : }
4058 : }
4059 : }
4060 12 : return 0;
4061 : }
4062 :
4063 : static PyGetSetDef py_drsuapi_DsReplicaOID_getsetters[] = {
4064 : {
4065 : .name = discard_const_p(char, "length"),
4066 : .get = py_drsuapi_DsReplicaOID_get_length,
4067 : .set = py_drsuapi_DsReplicaOID_set_length,
4068 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
4069 : },
4070 : {
4071 : .name = discard_const_p(char, "binary_oid"),
4072 : .get = py_drsuapi_DsReplicaOID_get_binary_oid,
4073 : .set = py_drsuapi_DsReplicaOID_set_binary_oid,
4074 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
4075 : },
4076 : { .name = NULL }
4077 : };
4078 :
4079 0 : static PyObject *py_drsuapi_DsReplicaOID_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4080 : {
4081 0 : return pytalloc_new(struct drsuapi_DsReplicaOID, type);
4082 : }
4083 :
4084 :
4085 : static PyTypeObject drsuapi_DsReplicaOID_Type = {
4086 : PyVarObject_HEAD_INIT(NULL, 0)
4087 : .tp_name = "drsuapi.DsReplicaOID",
4088 : .tp_getset = py_drsuapi_DsReplicaOID_getsetters,
4089 : .tp_methods = NULL,
4090 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4091 : .tp_new = py_drsuapi_DsReplicaOID_new,
4092 : };
4093 :
4094 :
4095 12 : static PyObject *py_drsuapi_DsReplicaOIDMapping_get_id_prefix(PyObject *obj, void *closure)
4096 : {
4097 12 : struct drsuapi_DsReplicaOIDMapping *object = (struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(obj);
4098 : PyObject *py_id_prefix;
4099 12 : py_id_prefix = PyLong_FromUnsignedLongLong((uint32_t)object->id_prefix);
4100 12 : return py_id_prefix;
4101 : }
4102 :
4103 24 : static int py_drsuapi_DsReplicaOIDMapping_set_id_prefix(PyObject *py_obj, PyObject *value, void *closure)
4104 : {
4105 24 : struct drsuapi_DsReplicaOIDMapping *object = (struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(py_obj);
4106 24 : if (value == NULL) {
4107 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id_prefix");
4108 0 : return -1;
4109 : }
4110 : {
4111 24 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->id_prefix));
4112 24 : if (PyLong_Check(value)) {
4113 : unsigned long long test_var;
4114 24 : test_var = PyLong_AsUnsignedLongLong(value);
4115 24 : if (PyErr_Occurred() != NULL) {
4116 0 : return -1;
4117 : }
4118 24 : if (test_var > uint_max) {
4119 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4120 : PyLong_Type.tp_name, uint_max, test_var);
4121 0 : return -1;
4122 : }
4123 24 : object->id_prefix = test_var;
4124 : } else {
4125 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4126 : PyLong_Type.tp_name);
4127 0 : return -1;
4128 : }
4129 : }
4130 24 : return 0;
4131 : }
4132 :
4133 522 : static PyObject *py_drsuapi_DsReplicaOIDMapping_get_oid(PyObject *obj, void *closure)
4134 : {
4135 522 : struct drsuapi_DsReplicaOIDMapping *object = (struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(obj);
4136 : PyObject *py_oid;
4137 522 : py_oid = pytalloc_reference_ex(&drsuapi_DsReplicaOID_Type, pytalloc_get_mem_ctx(obj), &object->oid);
4138 522 : return py_oid;
4139 : }
4140 :
4141 0 : static int py_drsuapi_DsReplicaOIDMapping_set_oid(PyObject *py_obj, PyObject *value, void *closure)
4142 : {
4143 0 : struct drsuapi_DsReplicaOIDMapping *object = (struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(py_obj);
4144 0 : if (value == NULL) {
4145 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->oid");
4146 0 : return -1;
4147 : }
4148 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaOID_Type, value, return -1;);
4149 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4150 0 : PyErr_NoMemory();
4151 0 : return -1;
4152 : }
4153 0 : object->oid = *(struct drsuapi_DsReplicaOID *)pytalloc_get_ptr(value);
4154 0 : return 0;
4155 : }
4156 :
4157 : static PyGetSetDef py_drsuapi_DsReplicaOIDMapping_getsetters[] = {
4158 : {
4159 : .name = discard_const_p(char, "id_prefix"),
4160 : .get = py_drsuapi_DsReplicaOIDMapping_get_id_prefix,
4161 : .set = py_drsuapi_DsReplicaOIDMapping_set_id_prefix,
4162 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
4163 : },
4164 : {
4165 : .name = discard_const_p(char, "oid"),
4166 : .get = py_drsuapi_DsReplicaOIDMapping_get_oid,
4167 : .set = py_drsuapi_DsReplicaOIDMapping_set_oid,
4168 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOID")
4169 : },
4170 : { .name = NULL }
4171 : };
4172 :
4173 12 : static PyObject *py_drsuapi_DsReplicaOIDMapping_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4174 : {
4175 12 : return pytalloc_new(struct drsuapi_DsReplicaOIDMapping, type);
4176 : }
4177 :
4178 :
4179 : static PyTypeObject drsuapi_DsReplicaOIDMapping_Type = {
4180 : PyVarObject_HEAD_INIT(NULL, 0)
4181 : .tp_name = "drsuapi.DsReplicaOIDMapping",
4182 : .tp_getset = py_drsuapi_DsReplicaOIDMapping_getsetters,
4183 : .tp_methods = NULL,
4184 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4185 : .tp_new = py_drsuapi_DsReplicaOIDMapping_new,
4186 : };
4187 :
4188 :
4189 12 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_get_num_mappings(PyObject *obj, void *closure)
4190 : {
4191 12 : struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(obj);
4192 : PyObject *py_num_mappings;
4193 12 : py_num_mappings = PyLong_FromUnsignedLongLong((uint32_t)object->num_mappings);
4194 12 : return py_num_mappings;
4195 : }
4196 :
4197 1691 : static int py_drsuapi_DsReplicaOIDMapping_Ctr_set_num_mappings(PyObject *py_obj, PyObject *value, void *closure)
4198 : {
4199 1691 : struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
4200 1691 : if (value == NULL) {
4201 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_mappings");
4202 0 : return -1;
4203 : }
4204 : {
4205 1691 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_mappings));
4206 1691 : if (PyLong_Check(value)) {
4207 : unsigned long long test_var;
4208 1691 : test_var = PyLong_AsUnsignedLongLong(value);
4209 1691 : if (PyErr_Occurred() != NULL) {
4210 0 : return -1;
4211 : }
4212 1691 : if (test_var > uint_max) {
4213 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4214 : PyLong_Type.tp_name, uint_max, test_var);
4215 0 : return -1;
4216 : }
4217 1691 : object->num_mappings = test_var;
4218 : } else {
4219 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4220 : PyLong_Type.tp_name);
4221 0 : return -1;
4222 : }
4223 : }
4224 1691 : return 0;
4225 : }
4226 :
4227 48 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_get_mappings(PyObject *obj, void *closure)
4228 : {
4229 48 : struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(obj);
4230 : PyObject *py_mappings;
4231 48 : if (object->mappings == NULL) {
4232 0 : Py_RETURN_NONE;
4233 : }
4234 48 : if (object->mappings == NULL) {
4235 0 : py_mappings = Py_None;
4236 0 : Py_INCREF(py_mappings);
4237 : } else {
4238 48 : py_mappings = PyList_New(object->num_mappings);
4239 48 : if (py_mappings == NULL) {
4240 0 : return NULL;
4241 : }
4242 : {
4243 : int mappings_cntr_1;
4244 2052 : for (mappings_cntr_1 = 0; mappings_cntr_1 < (object->num_mappings); mappings_cntr_1++) {
4245 : PyObject *py_mappings_1;
4246 2004 : py_mappings_1 = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Type, object->mappings, &object->mappings[mappings_cntr_1]);
4247 2004 : PyList_SetItem(py_mappings, mappings_cntr_1, py_mappings_1);
4248 : }
4249 : }
4250 : }
4251 48 : return py_mappings;
4252 : }
4253 :
4254 1697 : static int py_drsuapi_DsReplicaOIDMapping_Ctr_set_mappings(PyObject *py_obj, PyObject *value, void *closure)
4255 : {
4256 1697 : struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
4257 1697 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->mappings));
4258 1697 : if (value == NULL) {
4259 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mappings");
4260 0 : return -1;
4261 : }
4262 1697 : if (value == Py_None) {
4263 1679 : object->mappings = NULL;
4264 : } else {
4265 18 : object->mappings = NULL;
4266 18 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4267 : {
4268 : int mappings_cntr_1;
4269 18 : object->mappings = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->mappings, PyList_GET_SIZE(value));
4270 18 : if (!object->mappings) { return -1;; }
4271 18 : talloc_set_name_const(object->mappings, "ARRAY: object->mappings");
4272 774 : for (mappings_cntr_1 = 0; mappings_cntr_1 < PyList_GET_SIZE(value); mappings_cntr_1++) {
4273 756 : if (PyList_GET_ITEM(value, mappings_cntr_1) == NULL) {
4274 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mappings[mappings_cntr_1]");
4275 0 : return -1;
4276 : }
4277 756 : PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Type, PyList_GET_ITEM(value, mappings_cntr_1), return -1;);
4278 756 : if (talloc_reference(object->mappings, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, mappings_cntr_1))) == NULL) {
4279 0 : PyErr_NoMemory();
4280 0 : return -1;
4281 : }
4282 756 : object->mappings[mappings_cntr_1] = *(struct drsuapi_DsReplicaOIDMapping *)pytalloc_get_ptr(PyList_GET_ITEM(value, mappings_cntr_1));
4283 : }
4284 : }
4285 : }
4286 1697 : return 0;
4287 : }
4288 :
4289 : static PyGetSetDef py_drsuapi_DsReplicaOIDMapping_Ctr_getsetters[] = {
4290 : {
4291 : .name = discard_const_p(char, "num_mappings"),
4292 : .get = py_drsuapi_DsReplicaOIDMapping_Ctr_get_num_mappings,
4293 : .set = py_drsuapi_DsReplicaOIDMapping_Ctr_set_num_mappings,
4294 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
4295 : },
4296 : {
4297 : .name = discard_const_p(char, "mappings"),
4298 : .get = py_drsuapi_DsReplicaOIDMapping_Ctr_get_mappings,
4299 : .set = py_drsuapi_DsReplicaOIDMapping_Ctr_set_mappings,
4300 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping")
4301 : },
4302 : { .name = NULL }
4303 : };
4304 :
4305 0 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4306 : {
4307 0 : return pytalloc_new(struct drsuapi_DsReplicaOIDMapping_Ctr, type);
4308 : }
4309 :
4310 0 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
4311 : {
4312 0 : struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
4313 0 : PyObject *ret = NULL;
4314 : DATA_BLOB blob;
4315 : enum ndr_err_code err;
4316 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
4317 0 : if (tmp_ctx == NULL) {
4318 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
4319 0 : return NULL;
4320 : }
4321 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaOIDMapping_Ctr);
4322 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
4323 0 : TALLOC_FREE(tmp_ctx);
4324 0 : PyErr_SetNdrError(err);
4325 0 : return NULL;
4326 : }
4327 :
4328 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
4329 0 : TALLOC_FREE(tmp_ctx);
4330 0 : return ret;
4331 : }
4332 :
4333 0 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
4334 : {
4335 0 : struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
4336 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
4337 0 : Py_ssize_t blob_length = 0;
4338 : enum ndr_err_code err;
4339 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
4340 0 : PyObject *allow_remaining_obj = NULL;
4341 0 : bool allow_remaining = false;
4342 :
4343 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
4344 : discard_const_p(char *, kwnames),
4345 : &blob.data, &blob_length,
4346 : &allow_remaining_obj)) {
4347 0 : return NULL;
4348 : }
4349 0 : blob.length = blob_length;
4350 :
4351 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
4352 0 : allow_remaining = true;
4353 : }
4354 :
4355 0 : if (allow_remaining) {
4356 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr);
4357 : } else {
4358 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaOIDMapping_Ctr);
4359 : }
4360 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
4361 0 : PyErr_SetNdrError(err);
4362 0 : return NULL;
4363 : }
4364 :
4365 0 : Py_RETURN_NONE;
4366 : }
4367 :
4368 0 : static PyObject *py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
4369 : {
4370 0 : struct drsuapi_DsReplicaOIDMapping_Ctr *object = (struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(py_obj);
4371 : PyObject *ret;
4372 : char *retstr;
4373 :
4374 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaOIDMapping_Ctr, "drsuapi_DsReplicaOIDMapping_Ctr", object);
4375 0 : ret = PyUnicode_FromString(retstr);
4376 0 : talloc_free(retstr);
4377 :
4378 0 : return ret;
4379 : }
4380 :
4381 : static PyMethodDef py_drsuapi_DsReplicaOIDMapping_Ctr_methods[] = {
4382 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
4383 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
4384 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaOIDMapping_Ctr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
4385 : { NULL, NULL, 0, NULL }
4386 : };
4387 :
4388 :
4389 : static PyTypeObject drsuapi_DsReplicaOIDMapping_Ctr_Type = {
4390 : PyVarObject_HEAD_INIT(NULL, 0)
4391 : .tp_name = "drsuapi.DsReplicaOIDMapping_Ctr",
4392 : .tp_getset = py_drsuapi_DsReplicaOIDMapping_Ctr_getsetters,
4393 : .tp_methods = py_drsuapi_DsReplicaOIDMapping_Ctr_methods,
4394 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4395 : .tp_new = py_drsuapi_DsReplicaOIDMapping_Ctr_new,
4396 : };
4397 :
4398 :
4399 0 : static PyObject *py_drsuapi_DsPartialAttributeSet_get_version(PyObject *obj, void *closure)
4400 : {
4401 0 : struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(obj);
4402 : PyObject *py_version;
4403 0 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
4404 0 : return py_version;
4405 : }
4406 :
4407 397 : static int py_drsuapi_DsPartialAttributeSet_set_version(PyObject *py_obj, PyObject *value, void *closure)
4408 : {
4409 397 : struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(py_obj);
4410 397 : if (value == NULL) {
4411 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
4412 0 : return -1;
4413 : }
4414 : {
4415 397 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
4416 397 : if (PyLong_Check(value)) {
4417 : unsigned long long test_var;
4418 397 : test_var = PyLong_AsUnsignedLongLong(value);
4419 397 : if (PyErr_Occurred() != NULL) {
4420 0 : return -1;
4421 : }
4422 397 : if (test_var > uint_max) {
4423 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4424 : PyLong_Type.tp_name, uint_max, test_var);
4425 0 : return -1;
4426 : }
4427 397 : object->version = test_var;
4428 : } else {
4429 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4430 : PyLong_Type.tp_name);
4431 0 : return -1;
4432 : }
4433 : }
4434 397 : return 0;
4435 : }
4436 :
4437 0 : static PyObject *py_drsuapi_DsPartialAttributeSet_get_reserved1(PyObject *obj, void *closure)
4438 : {
4439 0 : struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(obj);
4440 : PyObject *py_reserved1;
4441 0 : py_reserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->reserved1);
4442 0 : return py_reserved1;
4443 : }
4444 :
4445 0 : static int py_drsuapi_DsPartialAttributeSet_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
4446 : {
4447 0 : struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(py_obj);
4448 0 : if (value == NULL) {
4449 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
4450 0 : return -1;
4451 : }
4452 : {
4453 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
4454 0 : if (PyLong_Check(value)) {
4455 : unsigned long long test_var;
4456 0 : test_var = PyLong_AsUnsignedLongLong(value);
4457 0 : if (PyErr_Occurred() != NULL) {
4458 0 : return -1;
4459 : }
4460 0 : if (test_var > uint_max) {
4461 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4462 : PyLong_Type.tp_name, uint_max, test_var);
4463 0 : return -1;
4464 : }
4465 0 : object->reserved1 = test_var;
4466 : } else {
4467 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4468 : PyLong_Type.tp_name);
4469 0 : return -1;
4470 : }
4471 : }
4472 0 : return 0;
4473 : }
4474 :
4475 0 : static PyObject *py_drsuapi_DsPartialAttributeSet_get_num_attids(PyObject *obj, void *closure)
4476 : {
4477 0 : struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(obj);
4478 : PyObject *py_num_attids;
4479 0 : py_num_attids = PyLong_FromUnsignedLongLong((uint32_t)object->num_attids);
4480 0 : return py_num_attids;
4481 : }
4482 :
4483 437 : static int py_drsuapi_DsPartialAttributeSet_set_num_attids(PyObject *py_obj, PyObject *value, void *closure)
4484 : {
4485 437 : struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(py_obj);
4486 437 : if (value == NULL) {
4487 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_attids");
4488 0 : return -1;
4489 : }
4490 : {
4491 437 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_attids));
4492 437 : if (PyLong_Check(value)) {
4493 : unsigned long long test_var;
4494 437 : test_var = PyLong_AsUnsignedLongLong(value);
4495 437 : if (PyErr_Occurred() != NULL) {
4496 0 : return -1;
4497 : }
4498 437 : if (test_var > uint_max) {
4499 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4500 : PyLong_Type.tp_name, uint_max, test_var);
4501 0 : return -1;
4502 : }
4503 437 : object->num_attids = test_var;
4504 : } else {
4505 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4506 : PyLong_Type.tp_name);
4507 0 : return -1;
4508 : }
4509 : }
4510 437 : return 0;
4511 : }
4512 :
4513 0 : static PyObject *py_drsuapi_DsPartialAttributeSet_get_attids(PyObject *obj, void *closure)
4514 : {
4515 0 : struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(obj);
4516 : PyObject *py_attids;
4517 0 : py_attids = PyList_New(object->num_attids);
4518 0 : if (py_attids == NULL) {
4519 0 : return NULL;
4520 : }
4521 : {
4522 : int attids_cntr_0;
4523 0 : for (attids_cntr_0 = 0; attids_cntr_0 < (object->num_attids); attids_cntr_0++) {
4524 : PyObject *py_attids_0;
4525 0 : py_attids_0 = PyLong_FromUnsignedLongLong((uint32_t)object->attids[attids_cntr_0]);
4526 0 : PyList_SetItem(py_attids, attids_cntr_0, py_attids_0);
4527 : }
4528 : }
4529 0 : return py_attids;
4530 : }
4531 :
4532 437 : static int py_drsuapi_DsPartialAttributeSet_set_attids(PyObject *py_obj, PyObject *value, void *closure)
4533 : {
4534 437 : struct drsuapi_DsPartialAttributeSet *object = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(py_obj);
4535 437 : if (value == NULL) {
4536 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attids");
4537 0 : return -1;
4538 : }
4539 437 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4540 : {
4541 : int attids_cntr_0;
4542 437 : object->attids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attids, PyList_GET_SIZE(value));
4543 437 : if (!object->attids) { return -1;; }
4544 437 : talloc_set_name_const(object->attids, "ARRAY: object->attids");
4545 126120 : for (attids_cntr_0 = 0; attids_cntr_0 < PyList_GET_SIZE(value); attids_cntr_0++) {
4546 125683 : if (PyList_GET_ITEM(value, attids_cntr_0) == NULL) {
4547 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attids[attids_cntr_0]");
4548 0 : return -1;
4549 : }
4550 : {
4551 125683 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attids[attids_cntr_0]));
4552 125683 : if (PyLong_Check(PyList_GET_ITEM(value, attids_cntr_0))) {
4553 : unsigned long long test_var;
4554 125683 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, attids_cntr_0));
4555 125683 : if (PyErr_Occurred() != NULL) {
4556 0 : return -1;
4557 : }
4558 125683 : if (test_var > uint_max) {
4559 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4560 : PyLong_Type.tp_name, uint_max, test_var);
4561 0 : return -1;
4562 : }
4563 125683 : object->attids[attids_cntr_0] = test_var;
4564 : } else {
4565 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4566 : PyLong_Type.tp_name);
4567 0 : return -1;
4568 : }
4569 : }
4570 : }
4571 : }
4572 437 : return 0;
4573 : }
4574 :
4575 : static PyGetSetDef py_drsuapi_DsPartialAttributeSet_getsetters[] = {
4576 : {
4577 : .name = discard_const_p(char, "version"),
4578 : .get = py_drsuapi_DsPartialAttributeSet_get_version,
4579 : .set = py_drsuapi_DsPartialAttributeSet_set_version,
4580 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
4581 : },
4582 : {
4583 : .name = discard_const_p(char, "reserved1"),
4584 : .get = py_drsuapi_DsPartialAttributeSet_get_reserved1,
4585 : .set = py_drsuapi_DsPartialAttributeSet_set_reserved1,
4586 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
4587 : },
4588 : {
4589 : .name = discard_const_p(char, "num_attids"),
4590 : .get = py_drsuapi_DsPartialAttributeSet_get_num_attids,
4591 : .set = py_drsuapi_DsPartialAttributeSet_set_num_attids,
4592 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
4593 : },
4594 : {
4595 : .name = discard_const_p(char, "attids"),
4596 : .get = py_drsuapi_DsPartialAttributeSet_get_attids,
4597 : .set = py_drsuapi_DsPartialAttributeSet_set_attids,
4598 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
4599 : },
4600 : { .name = NULL }
4601 : };
4602 :
4603 437 : static PyObject *py_drsuapi_DsPartialAttributeSet_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
4604 : {
4605 437 : return pytalloc_new(struct drsuapi_DsPartialAttributeSet, type);
4606 : }
4607 :
4608 :
4609 : static PyTypeObject drsuapi_DsPartialAttributeSet_Type = {
4610 : PyVarObject_HEAD_INIT(NULL, 0)
4611 : .tp_name = "drsuapi.DsPartialAttributeSet",
4612 : .tp_getset = py_drsuapi_DsPartialAttributeSet_getsetters,
4613 : .tp_methods = NULL,
4614 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
4615 : .tp_new = py_drsuapi_DsPartialAttributeSet_new,
4616 : };
4617 :
4618 :
4619 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_destination_dsa_guid(PyObject *obj, void *closure)
4620 : {
4621 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4622 : PyObject *py_destination_dsa_guid;
4623 0 : py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
4624 0 : return py_destination_dsa_guid;
4625 : }
4626 :
4627 481 : static int py_drsuapi_DsGetNCChangesRequest8_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
4628 : {
4629 481 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4630 481 : if (value == NULL) {
4631 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->destination_dsa_guid");
4632 0 : return -1;
4633 : }
4634 481 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
4635 481 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4636 0 : PyErr_NoMemory();
4637 0 : return -1;
4638 : }
4639 481 : object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
4640 481 : return 0;
4641 : }
4642 :
4643 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_source_dsa_invocation_id(PyObject *obj, void *closure)
4644 : {
4645 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4646 : PyObject *py_source_dsa_invocation_id;
4647 0 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
4648 0 : return py_source_dsa_invocation_id;
4649 : }
4650 :
4651 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
4652 : {
4653 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4654 541 : if (value == NULL) {
4655 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
4656 0 : return -1;
4657 : }
4658 541 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
4659 541 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4660 0 : PyErr_NoMemory();
4661 0 : return -1;
4662 : }
4663 541 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
4664 541 : return 0;
4665 : }
4666 :
4667 267 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_naming_context(PyObject *obj, void *closure)
4668 : {
4669 267 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4670 : PyObject *py_naming_context;
4671 267 : if (object->naming_context == NULL) {
4672 0 : Py_RETURN_NONE;
4673 : }
4674 267 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
4675 267 : return py_naming_context;
4676 : }
4677 :
4678 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
4679 : {
4680 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4681 541 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
4682 541 : if (value == NULL) {
4683 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
4684 0 : return -1;
4685 : }
4686 541 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
4687 541 : if (object->naming_context == NULL) {
4688 0 : PyErr_NoMemory();
4689 0 : return -1;
4690 : }
4691 541 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
4692 541 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4693 0 : PyErr_NoMemory();
4694 0 : return -1;
4695 : }
4696 541 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
4697 541 : return 0;
4698 : }
4699 :
4700 717 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_highwatermark(PyObject *obj, void *closure)
4701 : {
4702 717 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4703 : PyObject *py_highwatermark;
4704 717 : py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
4705 717 : return py_highwatermark;
4706 : }
4707 :
4708 566 : static int py_drsuapi_DsGetNCChangesRequest8_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
4709 : {
4710 566 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4711 566 : if (value == NULL) {
4712 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
4713 0 : return -1;
4714 : }
4715 566 : PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
4716 566 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4717 0 : PyErr_NoMemory();
4718 0 : return -1;
4719 : }
4720 566 : object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
4721 566 : return 0;
4722 : }
4723 :
4724 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_uptodateness_vector(PyObject *obj, void *closure)
4725 : {
4726 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4727 : PyObject *py_uptodateness_vector;
4728 0 : if (object->uptodateness_vector == NULL) {
4729 0 : Py_RETURN_NONE;
4730 : }
4731 0 : if (object->uptodateness_vector == NULL) {
4732 0 : py_uptodateness_vector = Py_None;
4733 0 : Py_INCREF(py_uptodateness_vector);
4734 : } else {
4735 0 : py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
4736 : }
4737 0 : return py_uptodateness_vector;
4738 : }
4739 :
4740 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
4741 : {
4742 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4743 541 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
4744 541 : if (value == NULL) {
4745 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
4746 0 : return -1;
4747 : }
4748 541 : if (value == Py_None) {
4749 541 : object->uptodateness_vector = NULL;
4750 : } else {
4751 0 : object->uptodateness_vector = NULL;
4752 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
4753 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4754 0 : PyErr_NoMemory();
4755 0 : return -1;
4756 : }
4757 0 : object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
4758 : }
4759 541 : return 0;
4760 : }
4761 :
4762 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_replica_flags(PyObject *obj, void *closure)
4763 : {
4764 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4765 : PyObject *py_replica_flags;
4766 0 : py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)object->replica_flags);
4767 0 : return py_replica_flags;
4768 : }
4769 :
4770 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
4771 : {
4772 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4773 541 : if (value == NULL) {
4774 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
4775 0 : return -1;
4776 : }
4777 : {
4778 541 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
4779 541 : if (PyLong_Check(value)) {
4780 : unsigned long long test_var;
4781 541 : test_var = PyLong_AsUnsignedLongLong(value);
4782 541 : if (PyErr_Occurred() != NULL) {
4783 0 : return -1;
4784 : }
4785 541 : if (test_var > uint_max) {
4786 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4787 : PyLong_Type.tp_name, uint_max, test_var);
4788 0 : return -1;
4789 : }
4790 541 : object->replica_flags = test_var;
4791 : } else {
4792 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4793 : PyLong_Type.tp_name);
4794 0 : return -1;
4795 : }
4796 : }
4797 541 : return 0;
4798 : }
4799 :
4800 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_max_object_count(PyObject *obj, void *closure)
4801 : {
4802 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4803 : PyObject *py_max_object_count;
4804 0 : py_max_object_count = PyLong_FromUnsignedLongLong((uint32_t)object->max_object_count);
4805 0 : return py_max_object_count;
4806 : }
4807 :
4808 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
4809 : {
4810 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4811 541 : if (value == NULL) {
4812 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_object_count");
4813 0 : return -1;
4814 : }
4815 : {
4816 541 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_object_count));
4817 541 : if (PyLong_Check(value)) {
4818 : unsigned long long test_var;
4819 541 : test_var = PyLong_AsUnsignedLongLong(value);
4820 541 : if (PyErr_Occurred() != NULL) {
4821 0 : return -1;
4822 : }
4823 541 : if (test_var > uint_max) {
4824 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4825 : PyLong_Type.tp_name, uint_max, test_var);
4826 0 : return -1;
4827 : }
4828 541 : object->max_object_count = test_var;
4829 : } else {
4830 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4831 : PyLong_Type.tp_name);
4832 0 : return -1;
4833 : }
4834 : }
4835 541 : return 0;
4836 : }
4837 :
4838 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_max_ndr_size(PyObject *obj, void *closure)
4839 : {
4840 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4841 : PyObject *py_max_ndr_size;
4842 0 : py_max_ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->max_ndr_size);
4843 0 : return py_max_ndr_size;
4844 : }
4845 :
4846 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
4847 : {
4848 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4849 541 : if (value == NULL) {
4850 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_ndr_size");
4851 0 : return -1;
4852 : }
4853 : {
4854 541 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_ndr_size));
4855 541 : if (PyLong_Check(value)) {
4856 : unsigned long long test_var;
4857 541 : test_var = PyLong_AsUnsignedLongLong(value);
4858 541 : if (PyErr_Occurred() != NULL) {
4859 0 : return -1;
4860 : }
4861 541 : if (test_var > uint_max) {
4862 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4863 : PyLong_Type.tp_name, uint_max, test_var);
4864 0 : return -1;
4865 : }
4866 541 : object->max_ndr_size = test_var;
4867 : } else {
4868 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4869 : PyLong_Type.tp_name);
4870 0 : return -1;
4871 : }
4872 : }
4873 541 : return 0;
4874 : }
4875 :
4876 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_extended_op(PyObject *obj, void *closure)
4877 : {
4878 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4879 : PyObject *py_extended_op;
4880 0 : py_extended_op = PyLong_FromUnsignedLongLong((uint32_t)object->extended_op);
4881 0 : return py_extended_op;
4882 : }
4883 :
4884 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
4885 : {
4886 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4887 541 : if (value == NULL) {
4888 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_op");
4889 0 : return -1;
4890 : }
4891 : {
4892 541 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_op));
4893 541 : if (PyLong_Check(value)) {
4894 : unsigned long long test_var;
4895 541 : test_var = PyLong_AsUnsignedLongLong(value);
4896 541 : if (PyErr_Occurred() != NULL) {
4897 0 : return -1;
4898 : }
4899 541 : if (test_var > uint_max) {
4900 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4901 : PyLong_Type.tp_name, uint_max, test_var);
4902 0 : return -1;
4903 : }
4904 541 : object->extended_op = test_var;
4905 : } else {
4906 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4907 : PyLong_Type.tp_name);
4908 0 : return -1;
4909 : }
4910 : }
4911 541 : return 0;
4912 : }
4913 :
4914 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_fsmo_info(PyObject *obj, void *closure)
4915 : {
4916 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4917 : PyObject *py_fsmo_info;
4918 0 : py_fsmo_info = PyLong_FromUnsignedLongLong(object->fsmo_info);
4919 0 : return py_fsmo_info;
4920 : }
4921 :
4922 239 : static int py_drsuapi_DsGetNCChangesRequest8_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
4923 : {
4924 239 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4925 239 : if (value == NULL) {
4926 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fsmo_info");
4927 0 : return -1;
4928 : }
4929 : {
4930 239 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fsmo_info));
4931 239 : if (PyLong_Check(value)) {
4932 : unsigned long long test_var;
4933 239 : test_var = PyLong_AsUnsignedLongLong(value);
4934 239 : if (PyErr_Occurred() != NULL) {
4935 0 : return -1;
4936 : }
4937 239 : if (test_var > uint_max) {
4938 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4939 : PyLong_Type.tp_name, uint_max, test_var);
4940 0 : return -1;
4941 : }
4942 239 : object->fsmo_info = test_var;
4943 : } else {
4944 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4945 : PyLong_Type.tp_name);
4946 0 : return -1;
4947 : }
4948 : }
4949 239 : return 0;
4950 : }
4951 :
4952 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set(PyObject *obj, void *closure)
4953 : {
4954 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4955 : PyObject *py_partial_attribute_set;
4956 0 : if (object->partial_attribute_set == NULL) {
4957 0 : Py_RETURN_NONE;
4958 : }
4959 0 : if (object->partial_attribute_set == NULL) {
4960 0 : py_partial_attribute_set = Py_None;
4961 0 : Py_INCREF(py_partial_attribute_set);
4962 : } else {
4963 0 : py_partial_attribute_set = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set, object->partial_attribute_set);
4964 : }
4965 0 : return py_partial_attribute_set;
4966 : }
4967 :
4968 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set(PyObject *py_obj, PyObject *value, void *closure)
4969 : {
4970 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
4971 541 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->partial_attribute_set));
4972 541 : if (value == NULL) {
4973 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->partial_attribute_set");
4974 0 : return -1;
4975 : }
4976 541 : if (value == Py_None) {
4977 202 : object->partial_attribute_set = NULL;
4978 : } else {
4979 339 : object->partial_attribute_set = NULL;
4980 339 : PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
4981 339 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4982 0 : PyErr_NoMemory();
4983 0 : return -1;
4984 : }
4985 339 : object->partial_attribute_set = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
4986 : }
4987 541 : return 0;
4988 : }
4989 :
4990 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set_ex(PyObject *obj, void *closure)
4991 : {
4992 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
4993 : PyObject *py_partial_attribute_set_ex;
4994 0 : if (object->partial_attribute_set_ex == NULL) {
4995 0 : Py_RETURN_NONE;
4996 : }
4997 0 : if (object->partial_attribute_set_ex == NULL) {
4998 0 : py_partial_attribute_set_ex = Py_None;
4999 0 : Py_INCREF(py_partial_attribute_set_ex);
5000 : } else {
5001 0 : py_partial_attribute_set_ex = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set_ex, object->partial_attribute_set_ex);
5002 : }
5003 0 : return py_partial_attribute_set_ex;
5004 : }
5005 :
5006 541 : static int py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set_ex(PyObject *py_obj, PyObject *value, void *closure)
5007 : {
5008 541 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
5009 541 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->partial_attribute_set_ex));
5010 541 : if (value == NULL) {
5011 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->partial_attribute_set_ex");
5012 0 : return -1;
5013 : }
5014 541 : if (value == Py_None) {
5015 538 : object->partial_attribute_set_ex = NULL;
5016 : } else {
5017 3 : object->partial_attribute_set_ex = NULL;
5018 3 : PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
5019 3 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5020 0 : PyErr_NoMemory();
5021 0 : return -1;
5022 : }
5023 3 : object->partial_attribute_set_ex = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
5024 : }
5025 541 : return 0;
5026 : }
5027 :
5028 1046 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_get_mapping_ctr(PyObject *obj, void *closure)
5029 : {
5030 1046 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(obj);
5031 : PyObject *py_mapping_ctr;
5032 1046 : py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
5033 1046 : return py_mapping_ctr;
5034 : }
5035 :
5036 18 : static int py_drsuapi_DsGetNCChangesRequest8_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
5037 : {
5038 18 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
5039 18 : if (value == NULL) {
5040 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mapping_ctr");
5041 0 : return -1;
5042 : }
5043 18 : PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
5044 18 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5045 0 : PyErr_NoMemory();
5046 0 : return -1;
5047 : }
5048 18 : object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
5049 18 : return 0;
5050 : }
5051 :
5052 : static PyGetSetDef py_drsuapi_DsGetNCChangesRequest8_getsetters[] = {
5053 : {
5054 : .name = discard_const_p(char, "destination_dsa_guid"),
5055 : .get = py_drsuapi_DsGetNCChangesRequest8_get_destination_dsa_guid,
5056 : .set = py_drsuapi_DsGetNCChangesRequest8_set_destination_dsa_guid,
5057 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
5058 : },
5059 : {
5060 : .name = discard_const_p(char, "source_dsa_invocation_id"),
5061 : .get = py_drsuapi_DsGetNCChangesRequest8_get_source_dsa_invocation_id,
5062 : .set = py_drsuapi_DsGetNCChangesRequest8_set_source_dsa_invocation_id,
5063 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
5064 : },
5065 : {
5066 : .name = discard_const_p(char, "naming_context"),
5067 : .get = py_drsuapi_DsGetNCChangesRequest8_get_naming_context,
5068 : .set = py_drsuapi_DsGetNCChangesRequest8_set_naming_context,
5069 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
5070 : },
5071 : {
5072 : .name = discard_const_p(char, "highwatermark"),
5073 : .get = py_drsuapi_DsGetNCChangesRequest8_get_highwatermark,
5074 : .set = py_drsuapi_DsGetNCChangesRequest8_set_highwatermark,
5075 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
5076 : },
5077 : {
5078 : .name = discard_const_p(char, "uptodateness_vector"),
5079 : .get = py_drsuapi_DsGetNCChangesRequest8_get_uptodateness_vector,
5080 : .set = py_drsuapi_DsGetNCChangesRequest8_set_uptodateness_vector,
5081 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursorCtrEx")
5082 : },
5083 : {
5084 : .name = discard_const_p(char, "replica_flags"),
5085 : .get = py_drsuapi_DsGetNCChangesRequest8_get_replica_flags,
5086 : .set = py_drsuapi_DsGetNCChangesRequest8_set_replica_flags,
5087 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
5088 : },
5089 : {
5090 : .name = discard_const_p(char, "max_object_count"),
5091 : .get = py_drsuapi_DsGetNCChangesRequest8_get_max_object_count,
5092 : .set = py_drsuapi_DsGetNCChangesRequest8_set_max_object_count,
5093 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5094 : },
5095 : {
5096 : .name = discard_const_p(char, "max_ndr_size"),
5097 : .get = py_drsuapi_DsGetNCChangesRequest8_get_max_ndr_size,
5098 : .set = py_drsuapi_DsGetNCChangesRequest8_set_max_ndr_size,
5099 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5100 : },
5101 : {
5102 : .name = discard_const_p(char, "extended_op"),
5103 : .get = py_drsuapi_DsGetNCChangesRequest8_get_extended_op,
5104 : .set = py_drsuapi_DsGetNCChangesRequest8_set_extended_op,
5105 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedOperation")
5106 : },
5107 : {
5108 : .name = discard_const_p(char, "fsmo_info"),
5109 : .get = py_drsuapi_DsGetNCChangesRequest8_get_fsmo_info,
5110 : .set = py_drsuapi_DsGetNCChangesRequest8_set_fsmo_info,
5111 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
5112 : },
5113 : {
5114 : .name = discard_const_p(char, "partial_attribute_set"),
5115 : .get = py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set,
5116 : .set = py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set,
5117 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsPartialAttributeSet")
5118 : },
5119 : {
5120 : .name = discard_const_p(char, "partial_attribute_set_ex"),
5121 : .get = py_drsuapi_DsGetNCChangesRequest8_get_partial_attribute_set_ex,
5122 : .set = py_drsuapi_DsGetNCChangesRequest8_set_partial_attribute_set_ex,
5123 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsPartialAttributeSet")
5124 : },
5125 : {
5126 : .name = discard_const_p(char, "mapping_ctr"),
5127 : .get = py_drsuapi_DsGetNCChangesRequest8_get_mapping_ctr,
5128 : .set = py_drsuapi_DsGetNCChangesRequest8_set_mapping_ctr,
5129 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping_Ctr")
5130 : },
5131 : { .name = NULL }
5132 : };
5133 :
5134 541 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5135 : {
5136 541 : return pytalloc_new(struct drsuapi_DsGetNCChangesRequest8, type);
5137 : }
5138 :
5139 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
5140 : {
5141 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
5142 0 : PyObject *ret = NULL;
5143 : DATA_BLOB blob;
5144 : enum ndr_err_code err;
5145 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
5146 0 : if (tmp_ctx == NULL) {
5147 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
5148 0 : return NULL;
5149 : }
5150 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesRequest8);
5151 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
5152 0 : TALLOC_FREE(tmp_ctx);
5153 0 : PyErr_SetNdrError(err);
5154 0 : return NULL;
5155 : }
5156 :
5157 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
5158 0 : TALLOC_FREE(tmp_ctx);
5159 0 : return ret;
5160 : }
5161 :
5162 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
5163 : {
5164 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
5165 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
5166 0 : Py_ssize_t blob_length = 0;
5167 : enum ndr_err_code err;
5168 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
5169 0 : PyObject *allow_remaining_obj = NULL;
5170 0 : bool allow_remaining = false;
5171 :
5172 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
5173 : discard_const_p(char *, kwnames),
5174 : &blob.data, &blob_length,
5175 : &allow_remaining_obj)) {
5176 0 : return NULL;
5177 : }
5178 0 : blob.length = blob_length;
5179 :
5180 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
5181 0 : allow_remaining = true;
5182 : }
5183 :
5184 0 : if (allow_remaining) {
5185 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesRequest8);
5186 : } else {
5187 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesRequest8);
5188 : }
5189 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
5190 0 : PyErr_SetNdrError(err);
5191 0 : return NULL;
5192 : }
5193 :
5194 0 : Py_RETURN_NONE;
5195 : }
5196 :
5197 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest8_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
5198 : {
5199 0 : struct drsuapi_DsGetNCChangesRequest8 *object = (struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(py_obj);
5200 : PyObject *ret;
5201 : char *retstr;
5202 :
5203 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesRequest8, "drsuapi_DsGetNCChangesRequest8", object);
5204 0 : ret = PyUnicode_FromString(retstr);
5205 0 : talloc_free(retstr);
5206 :
5207 0 : return ret;
5208 : }
5209 :
5210 : static PyMethodDef py_drsuapi_DsGetNCChangesRequest8_methods[] = {
5211 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesRequest8_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
5212 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesRequest8_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
5213 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesRequest8_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
5214 : { NULL, NULL, 0, NULL }
5215 : };
5216 :
5217 :
5218 : static PyTypeObject drsuapi_DsGetNCChangesRequest8_Type = {
5219 : PyVarObject_HEAD_INIT(NULL, 0)
5220 : .tp_name = "drsuapi.DsGetNCChangesRequest8",
5221 : .tp_getset = py_drsuapi_DsGetNCChangesRequest8_getsetters,
5222 : .tp_methods = py_drsuapi_DsGetNCChangesRequest8_methods,
5223 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5224 : .tp_new = py_drsuapi_DsGetNCChangesRequest8_new,
5225 : };
5226 :
5227 :
5228 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_destination_dsa_guid(PyObject *obj, void *closure)
5229 : {
5230 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5231 : PyObject *py_destination_dsa_guid;
5232 0 : py_destination_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->destination_dsa_guid);
5233 0 : return py_destination_dsa_guid;
5234 : }
5235 :
5236 1156 : static int py_drsuapi_DsGetNCChangesRequest10_set_destination_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
5237 : {
5238 1156 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5239 1156 : if (value == NULL) {
5240 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->destination_dsa_guid");
5241 0 : return -1;
5242 : }
5243 1156 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
5244 1156 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5245 0 : PyErr_NoMemory();
5246 0 : return -1;
5247 : }
5248 1156 : object->destination_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
5249 1156 : return 0;
5250 : }
5251 :
5252 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_source_dsa_invocation_id(PyObject *obj, void *closure)
5253 : {
5254 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5255 : PyObject *py_source_dsa_invocation_id;
5256 0 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
5257 0 : return py_source_dsa_invocation_id;
5258 : }
5259 :
5260 1156 : static int py_drsuapi_DsGetNCChangesRequest10_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
5261 : {
5262 1156 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5263 1156 : if (value == NULL) {
5264 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
5265 0 : return -1;
5266 : }
5267 1156 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
5268 1156 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5269 0 : PyErr_NoMemory();
5270 0 : return -1;
5271 : }
5272 1156 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
5273 1156 : return 0;
5274 : }
5275 :
5276 1157 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_naming_context(PyObject *obj, void *closure)
5277 : {
5278 1157 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5279 : PyObject *py_naming_context;
5280 1157 : if (object->naming_context == NULL) {
5281 0 : Py_RETURN_NONE;
5282 : }
5283 1157 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
5284 1157 : return py_naming_context;
5285 : }
5286 :
5287 1156 : static int py_drsuapi_DsGetNCChangesRequest10_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
5288 : {
5289 1156 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5290 1156 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
5291 1156 : if (value == NULL) {
5292 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
5293 0 : return -1;
5294 : }
5295 1156 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
5296 1156 : if (object->naming_context == NULL) {
5297 0 : PyErr_NoMemory();
5298 0 : return -1;
5299 : }
5300 1156 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
5301 1156 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5302 0 : PyErr_NoMemory();
5303 0 : return -1;
5304 : }
5305 1156 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
5306 1156 : return 0;
5307 : }
5308 :
5309 2757 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_highwatermark(PyObject *obj, void *closure)
5310 : {
5311 2757 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5312 : PyObject *py_highwatermark;
5313 2757 : py_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->highwatermark);
5314 2757 : return py_highwatermark;
5315 : }
5316 :
5317 1746 : static int py_drsuapi_DsGetNCChangesRequest10_set_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
5318 : {
5319 1746 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5320 1746 : if (value == NULL) {
5321 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highwatermark");
5322 0 : return -1;
5323 : }
5324 1746 : PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
5325 1746 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5326 0 : PyErr_NoMemory();
5327 0 : return -1;
5328 : }
5329 1746 : object->highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
5330 1746 : return 0;
5331 : }
5332 :
5333 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_uptodateness_vector(PyObject *obj, void *closure)
5334 : {
5335 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5336 : PyObject *py_uptodateness_vector;
5337 0 : if (object->uptodateness_vector == NULL) {
5338 0 : Py_RETURN_NONE;
5339 : }
5340 0 : if (object->uptodateness_vector == NULL) {
5341 0 : py_uptodateness_vector = Py_None;
5342 0 : Py_INCREF(py_uptodateness_vector);
5343 : } else {
5344 0 : py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
5345 : }
5346 0 : return py_uptodateness_vector;
5347 : }
5348 :
5349 1181 : static int py_drsuapi_DsGetNCChangesRequest10_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
5350 : {
5351 1181 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5352 1181 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
5353 1181 : if (value == NULL) {
5354 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
5355 0 : return -1;
5356 : }
5357 1181 : if (value == Py_None) {
5358 1082 : object->uptodateness_vector = NULL;
5359 : } else {
5360 99 : object->uptodateness_vector = NULL;
5361 99 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
5362 99 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5363 0 : PyErr_NoMemory();
5364 0 : return -1;
5365 : }
5366 99 : object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
5367 : }
5368 1181 : return 0;
5369 : }
5370 :
5371 77 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_replica_flags(PyObject *obj, void *closure)
5372 : {
5373 77 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5374 : PyObject *py_replica_flags;
5375 77 : py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)object->replica_flags);
5376 77 : return py_replica_flags;
5377 : }
5378 :
5379 1232 : static int py_drsuapi_DsGetNCChangesRequest10_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
5380 : {
5381 1232 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5382 1232 : if (value == NULL) {
5383 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
5384 0 : return -1;
5385 : }
5386 : {
5387 1232 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
5388 1232 : if (PyLong_Check(value)) {
5389 : unsigned long long test_var;
5390 1232 : test_var = PyLong_AsUnsignedLongLong(value);
5391 1232 : if (PyErr_Occurred() != NULL) {
5392 0 : return -1;
5393 : }
5394 1232 : if (test_var > uint_max) {
5395 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5396 : PyLong_Type.tp_name, uint_max, test_var);
5397 0 : return -1;
5398 : }
5399 1232 : object->replica_flags = test_var;
5400 : } else {
5401 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5402 : PyLong_Type.tp_name);
5403 0 : return -1;
5404 : }
5405 : }
5406 1232 : return 0;
5407 : }
5408 :
5409 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_max_object_count(PyObject *obj, void *closure)
5410 : {
5411 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5412 : PyObject *py_max_object_count;
5413 0 : py_max_object_count = PyLong_FromUnsignedLongLong((uint32_t)object->max_object_count);
5414 0 : return py_max_object_count;
5415 : }
5416 :
5417 1156 : static int py_drsuapi_DsGetNCChangesRequest10_set_max_object_count(PyObject *py_obj, PyObject *value, void *closure)
5418 : {
5419 1156 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5420 1156 : if (value == NULL) {
5421 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_object_count");
5422 0 : return -1;
5423 : }
5424 : {
5425 1156 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_object_count));
5426 1156 : if (PyLong_Check(value)) {
5427 : unsigned long long test_var;
5428 1156 : test_var = PyLong_AsUnsignedLongLong(value);
5429 1156 : if (PyErr_Occurred() != NULL) {
5430 0 : return -1;
5431 : }
5432 1156 : if (test_var > uint_max) {
5433 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5434 : PyLong_Type.tp_name, uint_max, test_var);
5435 0 : return -1;
5436 : }
5437 1156 : object->max_object_count = test_var;
5438 : } else {
5439 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5440 : PyLong_Type.tp_name);
5441 0 : return -1;
5442 : }
5443 : }
5444 1156 : return 0;
5445 : }
5446 :
5447 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_max_ndr_size(PyObject *obj, void *closure)
5448 : {
5449 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5450 : PyObject *py_max_ndr_size;
5451 0 : py_max_ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->max_ndr_size);
5452 0 : return py_max_ndr_size;
5453 : }
5454 :
5455 1156 : static int py_drsuapi_DsGetNCChangesRequest10_set_max_ndr_size(PyObject *py_obj, PyObject *value, void *closure)
5456 : {
5457 1156 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5458 1156 : if (value == NULL) {
5459 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->max_ndr_size");
5460 0 : return -1;
5461 : }
5462 : {
5463 1156 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->max_ndr_size));
5464 1156 : if (PyLong_Check(value)) {
5465 : unsigned long long test_var;
5466 1156 : test_var = PyLong_AsUnsignedLongLong(value);
5467 1156 : if (PyErr_Occurred() != NULL) {
5468 0 : return -1;
5469 : }
5470 1156 : if (test_var > uint_max) {
5471 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5472 : PyLong_Type.tp_name, uint_max, test_var);
5473 0 : return -1;
5474 : }
5475 1156 : object->max_ndr_size = test_var;
5476 : } else {
5477 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5478 : PyLong_Type.tp_name);
5479 0 : return -1;
5480 : }
5481 : }
5482 1156 : return 0;
5483 : }
5484 :
5485 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_extended_op(PyObject *obj, void *closure)
5486 : {
5487 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5488 : PyObject *py_extended_op;
5489 0 : py_extended_op = PyLong_FromUnsignedLongLong((uint32_t)object->extended_op);
5490 0 : return py_extended_op;
5491 : }
5492 :
5493 1156 : static int py_drsuapi_DsGetNCChangesRequest10_set_extended_op(PyObject *py_obj, PyObject *value, void *closure)
5494 : {
5495 1156 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5496 1156 : if (value == NULL) {
5497 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_op");
5498 0 : return -1;
5499 : }
5500 : {
5501 1156 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_op));
5502 1156 : if (PyLong_Check(value)) {
5503 : unsigned long long test_var;
5504 1156 : test_var = PyLong_AsUnsignedLongLong(value);
5505 1156 : if (PyErr_Occurred() != NULL) {
5506 0 : return -1;
5507 : }
5508 1156 : if (test_var > uint_max) {
5509 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5510 : PyLong_Type.tp_name, uint_max, test_var);
5511 0 : return -1;
5512 : }
5513 1156 : object->extended_op = test_var;
5514 : } else {
5515 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5516 : PyLong_Type.tp_name);
5517 0 : return -1;
5518 : }
5519 : }
5520 1156 : return 0;
5521 : }
5522 :
5523 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_fsmo_info(PyObject *obj, void *closure)
5524 : {
5525 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5526 : PyObject *py_fsmo_info;
5527 0 : py_fsmo_info = PyLong_FromUnsignedLongLong(object->fsmo_info);
5528 0 : return py_fsmo_info;
5529 : }
5530 :
5531 1156 : static int py_drsuapi_DsGetNCChangesRequest10_set_fsmo_info(PyObject *py_obj, PyObject *value, void *closure)
5532 : {
5533 1156 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5534 1156 : if (value == NULL) {
5535 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fsmo_info");
5536 0 : return -1;
5537 : }
5538 : {
5539 1156 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fsmo_info));
5540 1156 : if (PyLong_Check(value)) {
5541 : unsigned long long test_var;
5542 1156 : test_var = PyLong_AsUnsignedLongLong(value);
5543 1156 : if (PyErr_Occurred() != NULL) {
5544 0 : return -1;
5545 : }
5546 1156 : if (test_var > uint_max) {
5547 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5548 : PyLong_Type.tp_name, uint_max, test_var);
5549 0 : return -1;
5550 : }
5551 1156 : object->fsmo_info = test_var;
5552 : } else {
5553 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5554 : PyLong_Type.tp_name);
5555 0 : return -1;
5556 : }
5557 : }
5558 1156 : return 0;
5559 : }
5560 :
5561 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set(PyObject *obj, void *closure)
5562 : {
5563 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5564 : PyObject *py_partial_attribute_set;
5565 0 : if (object->partial_attribute_set == NULL) {
5566 0 : Py_RETURN_NONE;
5567 : }
5568 0 : if (object->partial_attribute_set == NULL) {
5569 0 : py_partial_attribute_set = Py_None;
5570 0 : Py_INCREF(py_partial_attribute_set);
5571 : } else {
5572 0 : py_partial_attribute_set = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set, object->partial_attribute_set);
5573 : }
5574 0 : return py_partial_attribute_set;
5575 : }
5576 :
5577 1240 : static int py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set(PyObject *py_obj, PyObject *value, void *closure)
5578 : {
5579 1240 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5580 1240 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->partial_attribute_set));
5581 1240 : if (value == NULL) {
5582 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->partial_attribute_set");
5583 0 : return -1;
5584 : }
5585 1240 : if (value == Py_None) {
5586 1145 : object->partial_attribute_set = NULL;
5587 : } else {
5588 95 : object->partial_attribute_set = NULL;
5589 95 : PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
5590 95 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5591 0 : PyErr_NoMemory();
5592 0 : return -1;
5593 : }
5594 95 : object->partial_attribute_set = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
5595 : }
5596 1240 : return 0;
5597 : }
5598 :
5599 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set_ex(PyObject *obj, void *closure)
5600 : {
5601 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5602 : PyObject *py_partial_attribute_set_ex;
5603 0 : if (object->partial_attribute_set_ex == NULL) {
5604 0 : Py_RETURN_NONE;
5605 : }
5606 0 : if (object->partial_attribute_set_ex == NULL) {
5607 0 : py_partial_attribute_set_ex = Py_None;
5608 0 : Py_INCREF(py_partial_attribute_set_ex);
5609 : } else {
5610 0 : py_partial_attribute_set_ex = pytalloc_reference_ex(&drsuapi_DsPartialAttributeSet_Type, object->partial_attribute_set_ex, object->partial_attribute_set_ex);
5611 : }
5612 0 : return py_partial_attribute_set_ex;
5613 : }
5614 :
5615 1156 : static int py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set_ex(PyObject *py_obj, PyObject *value, void *closure)
5616 : {
5617 1156 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5618 1156 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->partial_attribute_set_ex));
5619 1156 : if (value == NULL) {
5620 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->partial_attribute_set_ex");
5621 0 : return -1;
5622 : }
5623 1156 : if (value == Py_None) {
5624 1156 : object->partial_attribute_set_ex = NULL;
5625 : } else {
5626 0 : object->partial_attribute_set_ex = NULL;
5627 0 : PY_CHECK_TYPE(&drsuapi_DsPartialAttributeSet_Type, value, return -1;);
5628 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5629 0 : PyErr_NoMemory();
5630 0 : return -1;
5631 : }
5632 0 : object->partial_attribute_set_ex = (struct drsuapi_DsPartialAttributeSet *)pytalloc_get_ptr(value);
5633 : }
5634 1156 : return 0;
5635 : }
5636 :
5637 2312 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_mapping_ctr(PyObject *obj, void *closure)
5638 : {
5639 2312 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5640 : PyObject *py_mapping_ctr;
5641 2312 : py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
5642 2312 : return py_mapping_ctr;
5643 : }
5644 :
5645 0 : static int py_drsuapi_DsGetNCChangesRequest10_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
5646 : {
5647 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5648 0 : if (value == NULL) {
5649 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mapping_ctr");
5650 0 : return -1;
5651 : }
5652 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
5653 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
5654 0 : PyErr_NoMemory();
5655 0 : return -1;
5656 : }
5657 0 : object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
5658 0 : return 0;
5659 : }
5660 :
5661 48 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_get_more_flags(PyObject *obj, void *closure)
5662 : {
5663 48 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(obj);
5664 : PyObject *py_more_flags;
5665 48 : py_more_flags = PyLong_FromUnsignedLongLong((uint32_t)object->more_flags);
5666 48 : return py_more_flags;
5667 : }
5668 :
5669 1180 : static int py_drsuapi_DsGetNCChangesRequest10_set_more_flags(PyObject *py_obj, PyObject *value, void *closure)
5670 : {
5671 1180 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5672 1180 : if (value == NULL) {
5673 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->more_flags");
5674 0 : return -1;
5675 : }
5676 : {
5677 1180 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->more_flags));
5678 1180 : if (PyLong_Check(value)) {
5679 : unsigned long long test_var;
5680 1180 : test_var = PyLong_AsUnsignedLongLong(value);
5681 1180 : if (PyErr_Occurred() != NULL) {
5682 0 : return -1;
5683 : }
5684 1180 : if (test_var > uint_max) {
5685 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5686 : PyLong_Type.tp_name, uint_max, test_var);
5687 0 : return -1;
5688 : }
5689 1180 : object->more_flags = test_var;
5690 : } else {
5691 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5692 : PyLong_Type.tp_name);
5693 0 : return -1;
5694 : }
5695 : }
5696 1180 : return 0;
5697 : }
5698 :
5699 : static PyGetSetDef py_drsuapi_DsGetNCChangesRequest10_getsetters[] = {
5700 : {
5701 : .name = discard_const_p(char, "destination_dsa_guid"),
5702 : .get = py_drsuapi_DsGetNCChangesRequest10_get_destination_dsa_guid,
5703 : .set = py_drsuapi_DsGetNCChangesRequest10_set_destination_dsa_guid,
5704 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
5705 : },
5706 : {
5707 : .name = discard_const_p(char, "source_dsa_invocation_id"),
5708 : .get = py_drsuapi_DsGetNCChangesRequest10_get_source_dsa_invocation_id,
5709 : .set = py_drsuapi_DsGetNCChangesRequest10_set_source_dsa_invocation_id,
5710 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
5711 : },
5712 : {
5713 : .name = discard_const_p(char, "naming_context"),
5714 : .get = py_drsuapi_DsGetNCChangesRequest10_get_naming_context,
5715 : .set = py_drsuapi_DsGetNCChangesRequest10_set_naming_context,
5716 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
5717 : },
5718 : {
5719 : .name = discard_const_p(char, "highwatermark"),
5720 : .get = py_drsuapi_DsGetNCChangesRequest10_get_highwatermark,
5721 : .set = py_drsuapi_DsGetNCChangesRequest10_set_highwatermark,
5722 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
5723 : },
5724 : {
5725 : .name = discard_const_p(char, "uptodateness_vector"),
5726 : .get = py_drsuapi_DsGetNCChangesRequest10_get_uptodateness_vector,
5727 : .set = py_drsuapi_DsGetNCChangesRequest10_set_uptodateness_vector,
5728 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursorCtrEx")
5729 : },
5730 : {
5731 : .name = discard_const_p(char, "replica_flags"),
5732 : .get = py_drsuapi_DsGetNCChangesRequest10_get_replica_flags,
5733 : .set = py_drsuapi_DsGetNCChangesRequest10_set_replica_flags,
5734 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
5735 : },
5736 : {
5737 : .name = discard_const_p(char, "max_object_count"),
5738 : .get = py_drsuapi_DsGetNCChangesRequest10_get_max_object_count,
5739 : .set = py_drsuapi_DsGetNCChangesRequest10_set_max_object_count,
5740 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5741 : },
5742 : {
5743 : .name = discard_const_p(char, "max_ndr_size"),
5744 : .get = py_drsuapi_DsGetNCChangesRequest10_get_max_ndr_size,
5745 : .set = py_drsuapi_DsGetNCChangesRequest10_set_max_ndr_size,
5746 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5747 : },
5748 : {
5749 : .name = discard_const_p(char, "extended_op"),
5750 : .get = py_drsuapi_DsGetNCChangesRequest10_get_extended_op,
5751 : .set = py_drsuapi_DsGetNCChangesRequest10_set_extended_op,
5752 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedOperation")
5753 : },
5754 : {
5755 : .name = discard_const_p(char, "fsmo_info"),
5756 : .get = py_drsuapi_DsGetNCChangesRequest10_get_fsmo_info,
5757 : .set = py_drsuapi_DsGetNCChangesRequest10_set_fsmo_info,
5758 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
5759 : },
5760 : {
5761 : .name = discard_const_p(char, "partial_attribute_set"),
5762 : .get = py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set,
5763 : .set = py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set,
5764 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsPartialAttributeSet")
5765 : },
5766 : {
5767 : .name = discard_const_p(char, "partial_attribute_set_ex"),
5768 : .get = py_drsuapi_DsGetNCChangesRequest10_get_partial_attribute_set_ex,
5769 : .set = py_drsuapi_DsGetNCChangesRequest10_set_partial_attribute_set_ex,
5770 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsPartialAttributeSet")
5771 : },
5772 : {
5773 : .name = discard_const_p(char, "mapping_ctr"),
5774 : .get = py_drsuapi_DsGetNCChangesRequest10_get_mapping_ctr,
5775 : .set = py_drsuapi_DsGetNCChangesRequest10_set_mapping_ctr,
5776 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping_Ctr")
5777 : },
5778 : {
5779 : .name = discard_const_p(char, "more_flags"),
5780 : .get = py_drsuapi_DsGetNCChangesRequest10_get_more_flags,
5781 : .set = py_drsuapi_DsGetNCChangesRequest10_set_more_flags,
5782 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsMoreOptions")
5783 : },
5784 : { .name = NULL }
5785 : };
5786 :
5787 1156 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5788 : {
5789 1156 : return pytalloc_new(struct drsuapi_DsGetNCChangesRequest10, type);
5790 : }
5791 :
5792 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
5793 : {
5794 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5795 0 : PyObject *ret = NULL;
5796 : DATA_BLOB blob;
5797 : enum ndr_err_code err;
5798 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
5799 0 : if (tmp_ctx == NULL) {
5800 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
5801 0 : return NULL;
5802 : }
5803 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesRequest10);
5804 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
5805 0 : TALLOC_FREE(tmp_ctx);
5806 0 : PyErr_SetNdrError(err);
5807 0 : return NULL;
5808 : }
5809 :
5810 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
5811 0 : TALLOC_FREE(tmp_ctx);
5812 0 : return ret;
5813 : }
5814 :
5815 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
5816 : {
5817 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5818 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
5819 0 : Py_ssize_t blob_length = 0;
5820 : enum ndr_err_code err;
5821 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
5822 0 : PyObject *allow_remaining_obj = NULL;
5823 0 : bool allow_remaining = false;
5824 :
5825 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
5826 : discard_const_p(char *, kwnames),
5827 : &blob.data, &blob_length,
5828 : &allow_remaining_obj)) {
5829 0 : return NULL;
5830 : }
5831 0 : blob.length = blob_length;
5832 :
5833 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
5834 0 : allow_remaining = true;
5835 : }
5836 :
5837 0 : if (allow_remaining) {
5838 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesRequest10);
5839 : } else {
5840 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesRequest10);
5841 : }
5842 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
5843 0 : PyErr_SetNdrError(err);
5844 0 : return NULL;
5845 : }
5846 :
5847 0 : Py_RETURN_NONE;
5848 : }
5849 :
5850 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest10_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
5851 : {
5852 0 : struct drsuapi_DsGetNCChangesRequest10 *object = (struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(py_obj);
5853 : PyObject *ret;
5854 : char *retstr;
5855 :
5856 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesRequest10, "drsuapi_DsGetNCChangesRequest10", object);
5857 0 : ret = PyUnicode_FromString(retstr);
5858 0 : talloc_free(retstr);
5859 :
5860 0 : return ret;
5861 : }
5862 :
5863 : static PyMethodDef py_drsuapi_DsGetNCChangesRequest10_methods[] = {
5864 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesRequest10_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
5865 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesRequest10_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
5866 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesRequest10_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
5867 : { NULL, NULL, 0, NULL }
5868 : };
5869 :
5870 :
5871 : static PyTypeObject drsuapi_DsGetNCChangesRequest10_Type = {
5872 : PyVarObject_HEAD_INIT(NULL, 0)
5873 : .tp_name = "drsuapi.DsGetNCChangesRequest10",
5874 : .tp_getset = py_drsuapi_DsGetNCChangesRequest10_getsetters,
5875 : .tp_methods = py_drsuapi_DsGetNCChangesRequest10_methods,
5876 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5877 : .tp_new = py_drsuapi_DsGetNCChangesRequest10_new,
5878 : };
5879 :
5880 0 : static PyObject *py_import_drsuapi_DsGetNCChangesRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesRequest *in)
5881 : {
5882 : PyObject *ret;
5883 :
5884 0 : switch (level) {
5885 0 : case 5:
5886 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest5_Type, mem_ctx, &in->req5);
5887 0 : return ret;
5888 :
5889 0 : case 8:
5890 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest8_Type, mem_ctx, &in->req8);
5891 0 : return ret;
5892 :
5893 0 : case 10:
5894 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesRequest10_Type, mem_ctx, &in->req10);
5895 0 : return ret;
5896 :
5897 : }
5898 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
5899 0 : return NULL;
5900 : }
5901 :
5902 2679 : static union drsuapi_DsGetNCChangesRequest *py_export_drsuapi_DsGetNCChangesRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
5903 : {
5904 2679 : union drsuapi_DsGetNCChangesRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesRequest);
5905 2679 : switch (level) {
5906 0 : case 5:
5907 0 : if (in == NULL) {
5908 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req5");
5909 0 : talloc_free(ret); return NULL;
5910 : }
5911 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest5_Type, in, talloc_free(ret); return NULL;);
5912 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
5913 0 : PyErr_NoMemory();
5914 0 : talloc_free(ret); return NULL;
5915 : }
5916 0 : ret->req5 = *(struct drsuapi_DsGetNCChangesRequest5 *)pytalloc_get_ptr(in);
5917 0 : break;
5918 :
5919 568 : case 8:
5920 568 : if (in == NULL) {
5921 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req8");
5922 0 : talloc_free(ret); return NULL;
5923 : }
5924 568 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest8_Type, in, talloc_free(ret); return NULL;);
5925 568 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
5926 0 : PyErr_NoMemory();
5927 0 : talloc_free(ret); return NULL;
5928 : }
5929 568 : ret->req8 = *(struct drsuapi_DsGetNCChangesRequest8 *)pytalloc_get_ptr(in);
5930 568 : break;
5931 :
5932 2111 : case 10:
5933 2111 : if (in == NULL) {
5934 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req10");
5935 0 : talloc_free(ret); return NULL;
5936 : }
5937 2111 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesRequest10_Type, in, talloc_free(ret); return NULL;);
5938 2111 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
5939 0 : PyErr_NoMemory();
5940 0 : talloc_free(ret); return NULL;
5941 : }
5942 2111 : ret->req10 = *(struct drsuapi_DsGetNCChangesRequest10 *)pytalloc_get_ptr(in);
5943 2111 : break;
5944 :
5945 0 : default:
5946 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
5947 0 : talloc_free(ret);
5948 0 : ret = NULL;
5949 : }
5950 :
5951 2679 : return ret;
5952 : }
5953 :
5954 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5955 : {
5956 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
5957 0 : PyObject *mem_ctx_obj = NULL;
5958 0 : TALLOC_CTX *mem_ctx = NULL;
5959 0 : int level = 0;
5960 0 : PyObject *in_obj = NULL;
5961 0 : union drsuapi_DsGetNCChangesRequest *in = NULL;
5962 :
5963 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
5964 : discard_const_p(char *, kwnames),
5965 : &mem_ctx_obj,
5966 : &level,
5967 : &in_obj)) {
5968 0 : return NULL;
5969 : }
5970 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
5971 0 : if (mem_ctx == NULL) {
5972 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
5973 0 : return NULL;
5974 : }
5975 0 : in = (union drsuapi_DsGetNCChangesRequest *)pytalloc_get_ptr(in_obj);
5976 0 : if (in == NULL) {
5977 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNCChangesRequest!");
5978 0 : return NULL;
5979 : }
5980 :
5981 0 : return py_import_drsuapi_DsGetNCChangesRequest(mem_ctx, level, in);
5982 : }
5983 :
5984 2679 : static PyObject *py_drsuapi_DsGetNCChangesRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5985 : {
5986 2679 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
5987 2679 : PyObject *mem_ctx_obj = NULL;
5988 2679 : TALLOC_CTX *mem_ctx = NULL;
5989 2679 : int level = 0;
5990 2679 : PyObject *in = NULL;
5991 2679 : union drsuapi_DsGetNCChangesRequest *out = NULL;
5992 :
5993 2679 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
5994 : discard_const_p(char *, kwnames),
5995 : &mem_ctx_obj,
5996 : &level,
5997 : &in)) {
5998 0 : return NULL;
5999 : }
6000 2679 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
6001 2679 : if (mem_ctx == NULL) {
6002 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
6003 0 : return NULL;
6004 : }
6005 :
6006 2679 : out = py_export_drsuapi_DsGetNCChangesRequest(mem_ctx, level, in);
6007 2679 : if (out == NULL) {
6008 0 : return NULL;
6009 : }
6010 :
6011 2679 : return pytalloc_GenericObject_reference(out);
6012 : }
6013 :
6014 : static PyMethodDef py_drsuapi_DsGetNCChangesRequest_methods[] = {
6015 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesRequest_import),
6016 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
6017 : "T.__import__(mem_ctx, level, in) => ret." },
6018 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesRequest_export),
6019 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
6020 : "T.__export__(mem_ctx, level, in) => ret." },
6021 : { NULL, NULL, 0, NULL }
6022 : };
6023 :
6024 0 : static PyObject *py_drsuapi_DsGetNCChangesRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6025 : {
6026 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
6027 0 : return NULL;
6028 : }
6029 :
6030 :
6031 : static PyTypeObject drsuapi_DsGetNCChangesRequest_Type = {
6032 : PyVarObject_HEAD_INIT(NULL, 0)
6033 : .tp_name = "drsuapi.DsGetNCChangesRequest",
6034 : .tp_getset = NULL,
6035 : .tp_methods = py_drsuapi_DsGetNCChangesRequest_methods,
6036 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6037 : .tp_new = py_drsuapi_DsGetNCChangesRequest_new,
6038 : };
6039 :
6040 :
6041 917 : static PyObject *py_drsuapi_DsReplicaCursor2_get_source_dsa_invocation_id(PyObject *obj, void *closure)
6042 : {
6043 917 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(obj);
6044 : PyObject *py_source_dsa_invocation_id;
6045 917 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
6046 917 : return py_source_dsa_invocation_id;
6047 : }
6048 :
6049 0 : static int py_drsuapi_DsReplicaCursor2_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
6050 : {
6051 0 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
6052 0 : if (value == NULL) {
6053 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
6054 0 : return -1;
6055 : }
6056 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
6057 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6058 0 : PyErr_NoMemory();
6059 0 : return -1;
6060 : }
6061 0 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
6062 0 : return 0;
6063 : }
6064 :
6065 614 : static PyObject *py_drsuapi_DsReplicaCursor2_get_highest_usn(PyObject *obj, void *closure)
6066 : {
6067 614 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(obj);
6068 : PyObject *py_highest_usn;
6069 614 : py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
6070 614 : return py_highest_usn;
6071 : }
6072 :
6073 0 : static int py_drsuapi_DsReplicaCursor2_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
6074 : {
6075 0 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
6076 0 : if (value == NULL) {
6077 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
6078 0 : return -1;
6079 : }
6080 : {
6081 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
6082 0 : if (PyLong_Check(value)) {
6083 : unsigned long long test_var;
6084 0 : test_var = PyLong_AsUnsignedLongLong(value);
6085 0 : if (PyErr_Occurred() != NULL) {
6086 0 : return -1;
6087 : }
6088 0 : if (test_var > uint_max) {
6089 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6090 : PyLong_Type.tp_name, uint_max, test_var);
6091 0 : return -1;
6092 : }
6093 0 : object->highest_usn = test_var;
6094 : } else {
6095 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6096 : PyLong_Type.tp_name);
6097 0 : return -1;
6098 : }
6099 : }
6100 0 : return 0;
6101 : }
6102 :
6103 424 : static PyObject *py_drsuapi_DsReplicaCursor2_get_last_sync_success(PyObject *obj, void *closure)
6104 : {
6105 424 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(obj);
6106 : PyObject *py_last_sync_success;
6107 424 : py_last_sync_success = PyLong_FromUnsignedLongLong(object->last_sync_success);
6108 424 : return py_last_sync_success;
6109 : }
6110 :
6111 0 : static int py_drsuapi_DsReplicaCursor2_set_last_sync_success(PyObject *py_obj, PyObject *value, void *closure)
6112 : {
6113 0 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
6114 0 : if (value == NULL) {
6115 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_sync_success");
6116 0 : return -1;
6117 : }
6118 : {
6119 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_sync_success));
6120 0 : if (PyLong_Check(value)) {
6121 : unsigned long long test_var;
6122 0 : test_var = PyLong_AsUnsignedLongLong(value);
6123 0 : if (PyErr_Occurred() != NULL) {
6124 0 : return -1;
6125 : }
6126 0 : if (test_var > uint_max) {
6127 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6128 : PyLong_Type.tp_name, uint_max, test_var);
6129 0 : return -1;
6130 : }
6131 0 : object->last_sync_success = test_var;
6132 : } else {
6133 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6134 : PyLong_Type.tp_name);
6135 0 : return -1;
6136 : }
6137 : }
6138 0 : return 0;
6139 : }
6140 :
6141 : static PyGetSetDef py_drsuapi_DsReplicaCursor2_getsetters[] = {
6142 : {
6143 : .name = discard_const_p(char, "source_dsa_invocation_id"),
6144 : .get = py_drsuapi_DsReplicaCursor2_get_source_dsa_invocation_id,
6145 : .set = py_drsuapi_DsReplicaCursor2_set_source_dsa_invocation_id,
6146 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
6147 : },
6148 : {
6149 : .name = discard_const_p(char, "highest_usn"),
6150 : .get = py_drsuapi_DsReplicaCursor2_get_highest_usn,
6151 : .set = py_drsuapi_DsReplicaCursor2_set_highest_usn,
6152 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
6153 : },
6154 : {
6155 : .name = discard_const_p(char, "last_sync_success"),
6156 : .get = py_drsuapi_DsReplicaCursor2_get_last_sync_success,
6157 : .set = py_drsuapi_DsReplicaCursor2_set_last_sync_success,
6158 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
6159 : },
6160 : { .name = NULL }
6161 : };
6162 :
6163 0 : static PyObject *py_drsuapi_DsReplicaCursor2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6164 : {
6165 0 : return pytalloc_new(struct drsuapi_DsReplicaCursor2, type);
6166 : }
6167 :
6168 0 : static PyObject *py_drsuapi_DsReplicaCursor2_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
6169 : {
6170 0 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
6171 0 : PyObject *ret = NULL;
6172 : DATA_BLOB blob;
6173 : enum ndr_err_code err;
6174 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
6175 0 : if (tmp_ctx == NULL) {
6176 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
6177 0 : return NULL;
6178 : }
6179 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaCursor2);
6180 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
6181 0 : TALLOC_FREE(tmp_ctx);
6182 0 : PyErr_SetNdrError(err);
6183 0 : return NULL;
6184 : }
6185 :
6186 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
6187 0 : TALLOC_FREE(tmp_ctx);
6188 0 : return ret;
6189 : }
6190 :
6191 0 : static PyObject *py_drsuapi_DsReplicaCursor2_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
6192 : {
6193 0 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
6194 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
6195 0 : Py_ssize_t blob_length = 0;
6196 : enum ndr_err_code err;
6197 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
6198 0 : PyObject *allow_remaining_obj = NULL;
6199 0 : bool allow_remaining = false;
6200 :
6201 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
6202 : discard_const_p(char *, kwnames),
6203 : &blob.data, &blob_length,
6204 : &allow_remaining_obj)) {
6205 0 : return NULL;
6206 : }
6207 0 : blob.length = blob_length;
6208 :
6209 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
6210 0 : allow_remaining = true;
6211 : }
6212 :
6213 0 : if (allow_remaining) {
6214 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor2);
6215 : } else {
6216 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaCursor2);
6217 : }
6218 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
6219 0 : PyErr_SetNdrError(err);
6220 0 : return NULL;
6221 : }
6222 :
6223 0 : Py_RETURN_NONE;
6224 : }
6225 :
6226 0 : static PyObject *py_drsuapi_DsReplicaCursor2_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
6227 : {
6228 0 : struct drsuapi_DsReplicaCursor2 *object = (struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(py_obj);
6229 : PyObject *ret;
6230 : char *retstr;
6231 :
6232 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaCursor2, "drsuapi_DsReplicaCursor2", object);
6233 0 : ret = PyUnicode_FromString(retstr);
6234 0 : talloc_free(retstr);
6235 :
6236 0 : return ret;
6237 : }
6238 :
6239 : static PyMethodDef py_drsuapi_DsReplicaCursor2_methods[] = {
6240 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaCursor2_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
6241 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaCursor2_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
6242 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaCursor2_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
6243 : { NULL, NULL, 0, NULL }
6244 : };
6245 :
6246 :
6247 : static PyTypeObject drsuapi_DsReplicaCursor2_Type = {
6248 : PyVarObject_HEAD_INIT(NULL, 0)
6249 : .tp_name = "drsuapi.DsReplicaCursor2",
6250 : .tp_getset = py_drsuapi_DsReplicaCursor2_getsetters,
6251 : .tp_methods = py_drsuapi_DsReplicaCursor2_methods,
6252 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6253 : .tp_new = py_drsuapi_DsReplicaCursor2_new,
6254 : };
6255 :
6256 :
6257 0 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_version(PyObject *obj, void *closure)
6258 : {
6259 0 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
6260 : PyObject *py_version;
6261 0 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
6262 0 : return py_version;
6263 : }
6264 :
6265 0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_version(PyObject *py_obj, PyObject *value, void *closure)
6266 : {
6267 0 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
6268 0 : if (value == NULL) {
6269 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
6270 0 : return -1;
6271 : }
6272 : {
6273 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
6274 0 : if (PyLong_Check(value)) {
6275 : unsigned long long test_var;
6276 0 : test_var = PyLong_AsUnsignedLongLong(value);
6277 0 : if (PyErr_Occurred() != NULL) {
6278 0 : return -1;
6279 : }
6280 0 : if (test_var > uint_max) {
6281 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6282 : PyLong_Type.tp_name, uint_max, test_var);
6283 0 : return -1;
6284 : }
6285 0 : object->version = test_var;
6286 : } else {
6287 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6288 : PyLong_Type.tp_name);
6289 0 : return -1;
6290 : }
6291 : }
6292 0 : return 0;
6293 : }
6294 :
6295 0 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_reserved1(PyObject *obj, void *closure)
6296 : {
6297 0 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
6298 : PyObject *py_reserved1;
6299 0 : py_reserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->reserved1);
6300 0 : return py_reserved1;
6301 : }
6302 :
6303 0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_reserved1(PyObject *py_obj, PyObject *value, void *closure)
6304 : {
6305 0 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
6306 0 : if (value == NULL) {
6307 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved1");
6308 0 : return -1;
6309 : }
6310 : {
6311 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved1));
6312 0 : if (PyLong_Check(value)) {
6313 : unsigned long long test_var;
6314 0 : test_var = PyLong_AsUnsignedLongLong(value);
6315 0 : if (PyErr_Occurred() != NULL) {
6316 0 : return -1;
6317 : }
6318 0 : if (test_var > uint_max) {
6319 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6320 : PyLong_Type.tp_name, uint_max, test_var);
6321 0 : return -1;
6322 : }
6323 0 : object->reserved1 = test_var;
6324 : } else {
6325 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6326 : PyLong_Type.tp_name);
6327 0 : return -1;
6328 : }
6329 : }
6330 0 : return 0;
6331 : }
6332 :
6333 25 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_count(PyObject *obj, void *closure)
6334 : {
6335 25 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
6336 : PyObject *py_count;
6337 25 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
6338 25 : return py_count;
6339 : }
6340 :
6341 0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_count(PyObject *py_obj, PyObject *value, void *closure)
6342 : {
6343 0 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
6344 0 : if (value == NULL) {
6345 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
6346 0 : return -1;
6347 : }
6348 : {
6349 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
6350 0 : if (PyLong_Check(value)) {
6351 : unsigned long long test_var;
6352 0 : test_var = PyLong_AsUnsignedLongLong(value);
6353 0 : if (PyErr_Occurred() != NULL) {
6354 0 : return -1;
6355 : }
6356 0 : if (test_var > uint_max) {
6357 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6358 : PyLong_Type.tp_name, uint_max, test_var);
6359 0 : return -1;
6360 : }
6361 0 : object->count = test_var;
6362 : } else {
6363 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6364 : PyLong_Type.tp_name);
6365 0 : return -1;
6366 : }
6367 : }
6368 0 : return 0;
6369 : }
6370 :
6371 0 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_reserved2(PyObject *obj, void *closure)
6372 : {
6373 0 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
6374 : PyObject *py_reserved2;
6375 0 : py_reserved2 = PyLong_FromUnsignedLongLong((uint32_t)object->reserved2);
6376 0 : return py_reserved2;
6377 : }
6378 :
6379 0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_reserved2(PyObject *py_obj, PyObject *value, void *closure)
6380 : {
6381 0 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
6382 0 : if (value == NULL) {
6383 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved2");
6384 0 : return -1;
6385 : }
6386 : {
6387 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved2));
6388 0 : if (PyLong_Check(value)) {
6389 : unsigned long long test_var;
6390 0 : test_var = PyLong_AsUnsignedLongLong(value);
6391 0 : if (PyErr_Occurred() != NULL) {
6392 0 : return -1;
6393 : }
6394 0 : if (test_var > uint_max) {
6395 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6396 : PyLong_Type.tp_name, uint_max, test_var);
6397 0 : return -1;
6398 : }
6399 0 : object->reserved2 = test_var;
6400 : } else {
6401 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6402 : PyLong_Type.tp_name);
6403 0 : return -1;
6404 : }
6405 : }
6406 0 : return 0;
6407 : }
6408 :
6409 50 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_get_cursors(PyObject *obj, void *closure)
6410 : {
6411 50 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(obj);
6412 : PyObject *py_cursors;
6413 50 : py_cursors = PyList_New(object->count);
6414 50 : if (py_cursors == NULL) {
6415 0 : return NULL;
6416 : }
6417 : {
6418 : int cursors_cntr_0;
6419 150 : for (cursors_cntr_0 = 0; cursors_cntr_0 < (object->count); cursors_cntr_0++) {
6420 : PyObject *py_cursors_0;
6421 100 : py_cursors_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2_Type, object->cursors, &object->cursors[cursors_cntr_0]);
6422 100 : PyList_SetItem(py_cursors, cursors_cntr_0, py_cursors_0);
6423 : }
6424 : }
6425 50 : return py_cursors;
6426 : }
6427 :
6428 0 : static int py_drsuapi_DsReplicaCursor2CtrEx_set_cursors(PyObject *py_obj, PyObject *value, void *closure)
6429 : {
6430 0 : struct drsuapi_DsReplicaCursor2CtrEx *object = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(py_obj);
6431 0 : if (value == NULL) {
6432 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cursors");
6433 0 : return -1;
6434 : }
6435 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6436 : {
6437 : int cursors_cntr_0;
6438 0 : object->cursors = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->cursors, PyList_GET_SIZE(value));
6439 0 : if (!object->cursors) { return -1;; }
6440 0 : talloc_set_name_const(object->cursors, "ARRAY: object->cursors");
6441 0 : for (cursors_cntr_0 = 0; cursors_cntr_0 < PyList_GET_SIZE(value); cursors_cntr_0++) {
6442 0 : if (PyList_GET_ITEM(value, cursors_cntr_0) == NULL) {
6443 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cursors[cursors_cntr_0]");
6444 0 : return -1;
6445 : }
6446 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2_Type, PyList_GET_ITEM(value, cursors_cntr_0), return -1;);
6447 0 : if (talloc_reference(object->cursors, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, cursors_cntr_0))) == NULL) {
6448 0 : PyErr_NoMemory();
6449 0 : return -1;
6450 : }
6451 0 : object->cursors[cursors_cntr_0] = *(struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, cursors_cntr_0));
6452 : }
6453 : }
6454 0 : return 0;
6455 : }
6456 :
6457 : static PyGetSetDef py_drsuapi_DsReplicaCursor2CtrEx_getsetters[] = {
6458 : {
6459 : .name = discard_const_p(char, "version"),
6460 : .get = py_drsuapi_DsReplicaCursor2CtrEx_get_version,
6461 : .set = py_drsuapi_DsReplicaCursor2CtrEx_set_version,
6462 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6463 : },
6464 : {
6465 : .name = discard_const_p(char, "reserved1"),
6466 : .get = py_drsuapi_DsReplicaCursor2CtrEx_get_reserved1,
6467 : .set = py_drsuapi_DsReplicaCursor2CtrEx_set_reserved1,
6468 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6469 : },
6470 : {
6471 : .name = discard_const_p(char, "count"),
6472 : .get = py_drsuapi_DsReplicaCursor2CtrEx_get_count,
6473 : .set = py_drsuapi_DsReplicaCursor2CtrEx_set_count,
6474 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6475 : },
6476 : {
6477 : .name = discard_const_p(char, "reserved2"),
6478 : .get = py_drsuapi_DsReplicaCursor2CtrEx_get_reserved2,
6479 : .set = py_drsuapi_DsReplicaCursor2CtrEx_set_reserved2,
6480 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6481 : },
6482 : {
6483 : .name = discard_const_p(char, "cursors"),
6484 : .get = py_drsuapi_DsReplicaCursor2CtrEx_get_cursors,
6485 : .set = py_drsuapi_DsReplicaCursor2CtrEx_set_cursors,
6486 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor2")
6487 : },
6488 : { .name = NULL }
6489 : };
6490 :
6491 0 : static PyObject *py_drsuapi_DsReplicaCursor2CtrEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6492 : {
6493 0 : return pytalloc_new(struct drsuapi_DsReplicaCursor2CtrEx, type);
6494 : }
6495 :
6496 :
6497 : static PyTypeObject drsuapi_DsReplicaCursor2CtrEx_Type = {
6498 : PyVarObject_HEAD_INIT(NULL, 0)
6499 : .tp_name = "drsuapi.DsReplicaCursor2CtrEx",
6500 : .tp_getset = py_drsuapi_DsReplicaCursor2CtrEx_getsetters,
6501 : .tp_methods = NULL,
6502 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6503 : .tp_new = py_drsuapi_DsReplicaCursor2CtrEx_new,
6504 : };
6505 :
6506 :
6507 0 : static PyObject *py_drsuapi_DsAttributeValue_get___ndr_size(PyObject *obj, void *closure)
6508 : {
6509 0 : struct drsuapi_DsAttributeValue *object = (struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(obj);
6510 : PyObject *py___ndr_size;
6511 0 : py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size);
6512 0 : return py___ndr_size;
6513 : }
6514 :
6515 0 : static int py_drsuapi_DsAttributeValue_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
6516 : {
6517 0 : struct drsuapi_DsAttributeValue *object = (struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(py_obj);
6518 0 : if (value == NULL) {
6519 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
6520 0 : return -1;
6521 : }
6522 : {
6523 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
6524 0 : if (PyLong_Check(value)) {
6525 : unsigned long long test_var;
6526 0 : test_var = PyLong_AsUnsignedLongLong(value);
6527 0 : if (PyErr_Occurred() != NULL) {
6528 0 : return -1;
6529 : }
6530 0 : if (test_var > uint_max) {
6531 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6532 : PyLong_Type.tp_name, uint_max, test_var);
6533 0 : return -1;
6534 : }
6535 0 : object->__ndr_size = test_var;
6536 : } else {
6537 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6538 : PyLong_Type.tp_name);
6539 0 : return -1;
6540 : }
6541 : }
6542 0 : return 0;
6543 : }
6544 :
6545 8479 : static PyObject *py_drsuapi_DsAttributeValue_get_blob(PyObject *obj, void *closure)
6546 : {
6547 8479 : struct drsuapi_DsAttributeValue *object = (struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(obj);
6548 : PyObject *py_blob;
6549 8479 : if (object->blob == NULL) {
6550 0 : Py_RETURN_NONE;
6551 : }
6552 8479 : if (object->blob == NULL) {
6553 0 : py_blob = Py_None;
6554 0 : Py_INCREF(py_blob);
6555 : } else {
6556 8479 : py_blob = PyBytes_FromStringAndSize((char *)(*object->blob).data, (*object->blob).length);
6557 : }
6558 8479 : return py_blob;
6559 : }
6560 :
6561 28 : static int py_drsuapi_DsAttributeValue_set_blob(PyObject *py_obj, PyObject *value, void *closure)
6562 : {
6563 28 : struct drsuapi_DsAttributeValue *object = (struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(py_obj);
6564 28 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->blob));
6565 28 : if (value == NULL) {
6566 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->blob");
6567 0 : return -1;
6568 : }
6569 28 : if (value == Py_None) {
6570 0 : object->blob = NULL;
6571 : } else {
6572 28 : object->blob = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->blob);
6573 28 : if (object->blob == NULL) {
6574 0 : PyErr_NoMemory();
6575 0 : return -1;
6576 : }
6577 28 : *object->blob = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
6578 : }
6579 28 : return 0;
6580 : }
6581 :
6582 : static PyGetSetDef py_drsuapi_DsAttributeValue_getsetters[] = {
6583 : {
6584 : .name = discard_const_p(char, "__ndr_size"),
6585 : .get = py_drsuapi_DsAttributeValue_get___ndr_size,
6586 : .set = py_drsuapi_DsAttributeValue_set___ndr_size,
6587 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6588 : },
6589 : {
6590 : .name = discard_const_p(char, "blob"),
6591 : .get = py_drsuapi_DsAttributeValue_get_blob,
6592 : .set = py_drsuapi_DsAttributeValue_set_blob,
6593 : .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
6594 : },
6595 : { .name = NULL }
6596 : };
6597 :
6598 0 : static PyObject *py_drsuapi_DsAttributeValue_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6599 : {
6600 0 : return pytalloc_new(struct drsuapi_DsAttributeValue, type);
6601 : }
6602 :
6603 :
6604 : static PyTypeObject drsuapi_DsAttributeValue_Type = {
6605 : PyVarObject_HEAD_INIT(NULL, 0)
6606 : .tp_name = "drsuapi.DsAttributeValue",
6607 : .tp_getset = py_drsuapi_DsAttributeValue_getsetters,
6608 : .tp_methods = NULL,
6609 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6610 : .tp_new = py_drsuapi_DsAttributeValue_new,
6611 : };
6612 :
6613 :
6614 604 : static PyObject *py_drsuapi_DsAttributeValueCtr_get_num_values(PyObject *obj, void *closure)
6615 : {
6616 604 : struct drsuapi_DsAttributeValueCtr *object = (struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(obj);
6617 : PyObject *py_num_values;
6618 604 : py_num_values = PyLong_FromUnsignedLongLong((uint32_t)object->num_values);
6619 604 : return py_num_values;
6620 : }
6621 :
6622 0 : static int py_drsuapi_DsAttributeValueCtr_set_num_values(PyObject *py_obj, PyObject *value, void *closure)
6623 : {
6624 0 : struct drsuapi_DsAttributeValueCtr *object = (struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(py_obj);
6625 0 : if (value == NULL) {
6626 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_values");
6627 0 : return -1;
6628 : }
6629 : {
6630 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_values));
6631 0 : if (PyLong_Check(value)) {
6632 : unsigned long long test_var;
6633 0 : test_var = PyLong_AsUnsignedLongLong(value);
6634 0 : if (PyErr_Occurred() != NULL) {
6635 0 : return -1;
6636 : }
6637 0 : if (test_var > uint_max) {
6638 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6639 : PyLong_Type.tp_name, uint_max, test_var);
6640 0 : return -1;
6641 : }
6642 0 : object->num_values = test_var;
6643 : } else {
6644 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6645 : PyLong_Type.tp_name);
6646 0 : return -1;
6647 : }
6648 : }
6649 0 : return 0;
6650 : }
6651 :
6652 594 : static PyObject *py_drsuapi_DsAttributeValueCtr_get_values(PyObject *obj, void *closure)
6653 : {
6654 594 : struct drsuapi_DsAttributeValueCtr *object = (struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(obj);
6655 : PyObject *py_values;
6656 594 : if (object->values == NULL) {
6657 0 : Py_RETURN_NONE;
6658 : }
6659 594 : if (object->values == NULL) {
6660 0 : py_values = Py_None;
6661 0 : Py_INCREF(py_values);
6662 : } else {
6663 594 : py_values = PyList_New(object->num_values);
6664 594 : if (py_values == NULL) {
6665 0 : return NULL;
6666 : }
6667 : {
6668 : int values_cntr_1;
6669 1188 : for (values_cntr_1 = 0; values_cntr_1 < (object->num_values); values_cntr_1++) {
6670 : PyObject *py_values_1;
6671 594 : py_values_1 = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, object->values, &object->values[values_cntr_1]);
6672 594 : PyList_SetItem(py_values, values_cntr_1, py_values_1);
6673 : }
6674 : }
6675 : }
6676 594 : return py_values;
6677 : }
6678 :
6679 0 : static int py_drsuapi_DsAttributeValueCtr_set_values(PyObject *py_obj, PyObject *value, void *closure)
6680 : {
6681 0 : struct drsuapi_DsAttributeValueCtr *object = (struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(py_obj);
6682 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->values));
6683 0 : if (value == NULL) {
6684 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->values");
6685 0 : return -1;
6686 : }
6687 0 : if (value == Py_None) {
6688 0 : object->values = NULL;
6689 : } else {
6690 0 : object->values = NULL;
6691 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6692 : {
6693 : int values_cntr_1;
6694 0 : object->values = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->values, PyList_GET_SIZE(value));
6695 0 : if (!object->values) { return -1;; }
6696 0 : talloc_set_name_const(object->values, "ARRAY: object->values");
6697 0 : for (values_cntr_1 = 0; values_cntr_1 < PyList_GET_SIZE(value); values_cntr_1++) {
6698 0 : if (PyList_GET_ITEM(value, values_cntr_1) == NULL) {
6699 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->values[values_cntr_1]");
6700 0 : return -1;
6701 : }
6702 0 : PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, PyList_GET_ITEM(value, values_cntr_1), return -1;);
6703 0 : if (talloc_reference(object->values, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, values_cntr_1))) == NULL) {
6704 0 : PyErr_NoMemory();
6705 0 : return -1;
6706 : }
6707 0 : object->values[values_cntr_1] = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(PyList_GET_ITEM(value, values_cntr_1));
6708 : }
6709 : }
6710 : }
6711 0 : return 0;
6712 : }
6713 :
6714 : static PyGetSetDef py_drsuapi_DsAttributeValueCtr_getsetters[] = {
6715 : {
6716 : .name = discard_const_p(char, "num_values"),
6717 : .get = py_drsuapi_DsAttributeValueCtr_get_num_values,
6718 : .set = py_drsuapi_DsAttributeValueCtr_set_num_values,
6719 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6720 : },
6721 : {
6722 : .name = discard_const_p(char, "values"),
6723 : .get = py_drsuapi_DsAttributeValueCtr_get_values,
6724 : .set = py_drsuapi_DsAttributeValueCtr_set_values,
6725 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeValue")
6726 : },
6727 : { .name = NULL }
6728 : };
6729 :
6730 0 : static PyObject *py_drsuapi_DsAttributeValueCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6731 : {
6732 0 : return pytalloc_new(struct drsuapi_DsAttributeValueCtr, type);
6733 : }
6734 :
6735 :
6736 : static PyTypeObject drsuapi_DsAttributeValueCtr_Type = {
6737 : PyVarObject_HEAD_INIT(NULL, 0)
6738 : .tp_name = "drsuapi.DsAttributeValueCtr",
6739 : .tp_getset = py_drsuapi_DsAttributeValueCtr_getsetters,
6740 : .tp_methods = NULL,
6741 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
6742 : .tp_new = py_drsuapi_DsAttributeValueCtr_new,
6743 : };
6744 :
6745 :
6746 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size(PyObject *obj, void *closure)
6747 : {
6748 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
6749 : PyObject *py___ndr_size;
6750 0 : py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size);
6751 0 : return py___ndr_size;
6752 : }
6753 :
6754 0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
6755 : {
6756 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
6757 0 : if (value == NULL) {
6758 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
6759 0 : return -1;
6760 : }
6761 : {
6762 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
6763 0 : if (PyLong_Check(value)) {
6764 : unsigned long long test_var;
6765 0 : test_var = PyLong_AsUnsignedLongLong(value);
6766 0 : if (PyErr_Occurred() != NULL) {
6767 0 : return -1;
6768 : }
6769 0 : if (test_var > uint_max) {
6770 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6771 : PyLong_Type.tp_name, uint_max, test_var);
6772 0 : return -1;
6773 : }
6774 0 : object->__ndr_size = test_var;
6775 : } else {
6776 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6777 : PyLong_Type.tp_name);
6778 0 : return -1;
6779 : }
6780 : }
6781 0 : return 0;
6782 : }
6783 :
6784 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_sid(PyObject *obj, void *closure)
6785 : {
6786 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
6787 : PyObject *py___ndr_size_sid;
6788 0 : py___ndr_size_sid = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_sid);
6789 0 : return py___ndr_size_sid;
6790 : }
6791 :
6792 0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_sid(PyObject *py_obj, PyObject *value, void *closure)
6793 : {
6794 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
6795 0 : if (value == NULL) {
6796 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_sid");
6797 0 : return -1;
6798 : }
6799 : {
6800 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_sid));
6801 0 : if (PyLong_Check(value)) {
6802 : unsigned long long test_var;
6803 0 : test_var = PyLong_AsUnsignedLongLong(value);
6804 0 : if (PyErr_Occurred() != NULL) {
6805 0 : return -1;
6806 : }
6807 0 : if (test_var > uint_max) {
6808 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6809 : PyLong_Type.tp_name, uint_max, test_var);
6810 0 : return -1;
6811 : }
6812 0 : object->__ndr_size_sid = test_var;
6813 : } else {
6814 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6815 : PyLong_Type.tp_name);
6816 0 : return -1;
6817 : }
6818 : }
6819 0 : return 0;
6820 : }
6821 :
6822 7595 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get_guid(PyObject *obj, void *closure)
6823 : {
6824 7595 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
6825 : PyObject *py_guid;
6826 7595 : py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
6827 7595 : return py_guid;
6828 : }
6829 :
6830 0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set_guid(PyObject *py_obj, PyObject *value, void *closure)
6831 : {
6832 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
6833 0 : if (value == NULL) {
6834 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
6835 0 : return -1;
6836 : }
6837 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
6838 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6839 0 : PyErr_NoMemory();
6840 0 : return -1;
6841 : }
6842 0 : object->guid = *(struct GUID *)pytalloc_get_ptr(value);
6843 0 : return 0;
6844 : }
6845 :
6846 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get_sid(PyObject *obj, void *closure)
6847 : {
6848 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
6849 : PyObject *py_sid;
6850 0 : py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
6851 0 : return py_sid;
6852 : }
6853 :
6854 0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set_sid(PyObject *py_obj, PyObject *value, void *closure)
6855 : {
6856 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
6857 0 : if (value == NULL) {
6858 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
6859 0 : return -1;
6860 : }
6861 0 : PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
6862 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6863 0 : PyErr_NoMemory();
6864 0 : return -1;
6865 : }
6866 0 : object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
6867 0 : return 0;
6868 : }
6869 :
6870 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_dn(PyObject *obj, void *closure)
6871 : {
6872 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
6873 : PyObject *py___ndr_size_dn;
6874 0 : py___ndr_size_dn = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_dn);
6875 0 : return py___ndr_size_dn;
6876 : }
6877 :
6878 0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_dn(PyObject *py_obj, PyObject *value, void *closure)
6879 : {
6880 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
6881 0 : if (value == NULL) {
6882 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_dn");
6883 0 : return -1;
6884 : }
6885 : {
6886 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_dn));
6887 0 : if (PyLong_Check(value)) {
6888 : unsigned long long test_var;
6889 0 : test_var = PyLong_AsUnsignedLongLong(value);
6890 0 : if (PyErr_Occurred() != NULL) {
6891 0 : return -1;
6892 : }
6893 0 : if (test_var > uint_max) {
6894 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6895 : PyLong_Type.tp_name, uint_max, test_var);
6896 0 : return -1;
6897 : }
6898 0 : object->__ndr_size_dn = test_var;
6899 : } else {
6900 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6901 : PyLong_Type.tp_name);
6902 0 : return -1;
6903 : }
6904 : }
6905 0 : return 0;
6906 : }
6907 :
6908 7486 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_get_dn(PyObject *obj, void *closure)
6909 : {
6910 7486 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(obj);
6911 : PyObject *py_dn;
6912 7486 : if (object->dn == NULL) {
6913 0 : py_dn = Py_None;
6914 0 : Py_INCREF(py_dn);
6915 : } else {
6916 7486 : py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
6917 : }
6918 7486 : return py_dn;
6919 : }
6920 :
6921 0 : static int py_drsuapi_DsReplicaObjectIdentifier3_set_dn(PyObject *py_obj, PyObject *value, void *closure)
6922 : {
6923 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
6924 0 : if (value == NULL) {
6925 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dn");
6926 0 : return -1;
6927 : }
6928 : {
6929 : const char *test_str;
6930 : const char *talloc_str;
6931 0 : PyObject *unicode = NULL;
6932 0 : if (PyUnicode_Check(value)) {
6933 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6934 0 : if (unicode == NULL) {
6935 0 : PyErr_NoMemory();
6936 0 : return -1;
6937 : }
6938 0 : test_str = PyBytes_AS_STRING(unicode);
6939 0 : } else if (PyBytes_Check(value)) {
6940 0 : test_str = PyBytes_AS_STRING(value);
6941 : } else {
6942 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6943 0 : return -1;
6944 : }
6945 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6946 0 : if (unicode != NULL) {
6947 0 : Py_DECREF(unicode);
6948 : }
6949 0 : if (talloc_str == NULL) {
6950 0 : PyErr_NoMemory();
6951 0 : return -1;
6952 : }
6953 0 : object->dn = talloc_str;
6954 : }
6955 0 : return 0;
6956 : }
6957 :
6958 : static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier3_getsetters[] = {
6959 : {
6960 : .name = discard_const_p(char, "__ndr_size"),
6961 : .get = py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size,
6962 : .set = py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size,
6963 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6964 : },
6965 : {
6966 : .name = discard_const_p(char, "__ndr_size_sid"),
6967 : .get = py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_sid,
6968 : .set = py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_sid,
6969 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6970 : },
6971 : {
6972 : .name = discard_const_p(char, "guid"),
6973 : .get = py_drsuapi_DsReplicaObjectIdentifier3_get_guid,
6974 : .set = py_drsuapi_DsReplicaObjectIdentifier3_set_guid,
6975 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
6976 : },
6977 : {
6978 : .name = discard_const_p(char, "sid"),
6979 : .get = py_drsuapi_DsReplicaObjectIdentifier3_get_sid,
6980 : .set = py_drsuapi_DsReplicaObjectIdentifier3_set_sid,
6981 : .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
6982 : },
6983 : {
6984 : .name = discard_const_p(char, "__ndr_size_dn"),
6985 : .get = py_drsuapi_DsReplicaObjectIdentifier3_get___ndr_size_dn,
6986 : .set = py_drsuapi_DsReplicaObjectIdentifier3_set___ndr_size_dn,
6987 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
6988 : },
6989 : {
6990 : .name = discard_const_p(char, "dn"),
6991 : .get = py_drsuapi_DsReplicaObjectIdentifier3_get_dn,
6992 : .set = py_drsuapi_DsReplicaObjectIdentifier3_set_dn,
6993 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
6994 : },
6995 : { .name = NULL }
6996 : };
6997 :
6998 7763 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
6999 : {
7000 7763 : return pytalloc_new(struct drsuapi_DsReplicaObjectIdentifier3, type);
7001 : }
7002 :
7003 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
7004 : {
7005 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
7006 0 : PyObject *ret = NULL;
7007 : DATA_BLOB blob;
7008 : enum ndr_err_code err;
7009 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
7010 0 : if (tmp_ctx == NULL) {
7011 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
7012 0 : return NULL;
7013 : }
7014 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3);
7015 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
7016 0 : TALLOC_FREE(tmp_ctx);
7017 0 : PyErr_SetNdrError(err);
7018 0 : return NULL;
7019 : }
7020 :
7021 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
7022 0 : TALLOC_FREE(tmp_ctx);
7023 0 : return ret;
7024 : }
7025 :
7026 7763 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
7027 : {
7028 7763 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
7029 7763 : DATA_BLOB blob = {.data = NULL, .length = 0};
7030 7763 : Py_ssize_t blob_length = 0;
7031 : enum ndr_err_code err;
7032 7763 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
7033 7763 : PyObject *allow_remaining_obj = NULL;
7034 7763 : bool allow_remaining = false;
7035 :
7036 7763 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
7037 : discard_const_p(char *, kwnames),
7038 : &blob.data, &blob_length,
7039 : &allow_remaining_obj)) {
7040 0 : return NULL;
7041 : }
7042 7763 : blob.length = blob_length;
7043 :
7044 7763 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
7045 0 : allow_remaining = true;
7046 : }
7047 :
7048 7763 : if (allow_remaining) {
7049 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
7050 : } else {
7051 7763 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3);
7052 : }
7053 7763 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
7054 150 : PyErr_SetNdrError(err);
7055 150 : return NULL;
7056 : }
7057 :
7058 7613 : Py_RETURN_NONE;
7059 : }
7060 :
7061 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
7062 : {
7063 0 : struct drsuapi_DsReplicaObjectIdentifier3 *object = (struct drsuapi_DsReplicaObjectIdentifier3 *)pytalloc_get_ptr(py_obj);
7064 : PyObject *ret;
7065 : char *retstr;
7066 :
7067 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier3, "drsuapi_DsReplicaObjectIdentifier3", object);
7068 0 : ret = PyUnicode_FromString(retstr);
7069 0 : talloc_free(retstr);
7070 :
7071 0 : return ret;
7072 : }
7073 :
7074 : static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier3_methods[] = {
7075 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
7076 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaObjectIdentifier3_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
7077 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
7078 : { NULL, NULL, 0, NULL }
7079 : };
7080 :
7081 :
7082 : static PyTypeObject drsuapi_DsReplicaObjectIdentifier3_Type = {
7083 : PyVarObject_HEAD_INIT(NULL, 0)
7084 : .tp_name = "drsuapi.DsReplicaObjectIdentifier3",
7085 : .tp_getset = py_drsuapi_DsReplicaObjectIdentifier3_getsetters,
7086 : .tp_methods = py_drsuapi_DsReplicaObjectIdentifier3_methods,
7087 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7088 : .tp_new = py_drsuapi_DsReplicaObjectIdentifier3_new,
7089 : };
7090 :
7091 :
7092 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size(PyObject *obj, void *closure)
7093 : {
7094 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
7095 : PyObject *py___ndr_size;
7096 0 : py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size);
7097 0 : return py___ndr_size;
7098 : }
7099 :
7100 0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
7101 : {
7102 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7103 0 : if (value == NULL) {
7104 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
7105 0 : return -1;
7106 : }
7107 : {
7108 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
7109 0 : if (PyLong_Check(value)) {
7110 : unsigned long long test_var;
7111 0 : test_var = PyLong_AsUnsignedLongLong(value);
7112 0 : if (PyErr_Occurred() != NULL) {
7113 0 : return -1;
7114 : }
7115 0 : if (test_var > uint_max) {
7116 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7117 : PyLong_Type.tp_name, uint_max, test_var);
7118 0 : return -1;
7119 : }
7120 0 : object->__ndr_size = test_var;
7121 : } else {
7122 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7123 : PyLong_Type.tp_name);
7124 0 : return -1;
7125 : }
7126 : }
7127 0 : return 0;
7128 : }
7129 :
7130 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_sid(PyObject *obj, void *closure)
7131 : {
7132 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
7133 : PyObject *py___ndr_size_sid;
7134 0 : py___ndr_size_sid = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_sid);
7135 0 : return py___ndr_size_sid;
7136 : }
7137 :
7138 0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_sid(PyObject *py_obj, PyObject *value, void *closure)
7139 : {
7140 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7141 0 : if (value == NULL) {
7142 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_sid");
7143 0 : return -1;
7144 : }
7145 : {
7146 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_sid));
7147 0 : if (PyLong_Check(value)) {
7148 : unsigned long long test_var;
7149 0 : test_var = PyLong_AsUnsignedLongLong(value);
7150 0 : if (PyErr_Occurred() != NULL) {
7151 0 : return -1;
7152 : }
7153 0 : if (test_var > uint_max) {
7154 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7155 : PyLong_Type.tp_name, uint_max, test_var);
7156 0 : return -1;
7157 : }
7158 0 : object->__ndr_size_sid = test_var;
7159 : } else {
7160 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7161 : PyLong_Type.tp_name);
7162 0 : return -1;
7163 : }
7164 : }
7165 0 : return 0;
7166 : }
7167 :
7168 150 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_guid(PyObject *obj, void *closure)
7169 : {
7170 150 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
7171 : PyObject *py_guid;
7172 150 : py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
7173 150 : return py_guid;
7174 : }
7175 :
7176 0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_guid(PyObject *py_obj, PyObject *value, void *closure)
7177 : {
7178 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7179 0 : if (value == NULL) {
7180 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
7181 0 : return -1;
7182 : }
7183 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
7184 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7185 0 : PyErr_NoMemory();
7186 0 : return -1;
7187 : }
7188 0 : object->guid = *(struct GUID *)pytalloc_get_ptr(value);
7189 0 : return 0;
7190 : }
7191 :
7192 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_sid(PyObject *obj, void *closure)
7193 : {
7194 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
7195 : PyObject *py_sid;
7196 0 : py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
7197 0 : return py_sid;
7198 : }
7199 :
7200 0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_sid(PyObject *py_obj, PyObject *value, void *closure)
7201 : {
7202 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7203 0 : if (value == NULL) {
7204 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
7205 0 : return -1;
7206 : }
7207 0 : PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
7208 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7209 0 : PyErr_NoMemory();
7210 0 : return -1;
7211 : }
7212 0 : object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
7213 0 : return 0;
7214 : }
7215 :
7216 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_dn(PyObject *obj, void *closure)
7217 : {
7218 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
7219 : PyObject *py___ndr_size_dn;
7220 0 : py___ndr_size_dn = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_dn);
7221 0 : return py___ndr_size_dn;
7222 : }
7223 :
7224 0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_dn(PyObject *py_obj, PyObject *value, void *closure)
7225 : {
7226 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7227 0 : if (value == NULL) {
7228 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_dn");
7229 0 : return -1;
7230 : }
7231 : {
7232 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_dn));
7233 0 : if (PyLong_Check(value)) {
7234 : unsigned long long test_var;
7235 0 : test_var = PyLong_AsUnsignedLongLong(value);
7236 0 : if (PyErr_Occurred() != NULL) {
7237 0 : return -1;
7238 : }
7239 0 : if (test_var > uint_max) {
7240 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7241 : PyLong_Type.tp_name, uint_max, test_var);
7242 0 : return -1;
7243 : }
7244 0 : object->__ndr_size_dn = test_var;
7245 : } else {
7246 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7247 : PyLong_Type.tp_name);
7248 0 : return -1;
7249 : }
7250 : }
7251 0 : return 0;
7252 : }
7253 :
7254 120 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_dn(PyObject *obj, void *closure)
7255 : {
7256 120 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
7257 : PyObject *py_dn;
7258 120 : if (object->dn == NULL) {
7259 0 : py_dn = Py_None;
7260 0 : Py_INCREF(py_dn);
7261 : } else {
7262 120 : py_dn = PyUnicode_Decode(object->dn, strlen(object->dn), "utf-8", "ignore");
7263 : }
7264 120 : return py_dn;
7265 : }
7266 :
7267 0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_dn(PyObject *py_obj, PyObject *value, void *closure)
7268 : {
7269 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7270 0 : if (value == NULL) {
7271 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dn");
7272 0 : return -1;
7273 : }
7274 : {
7275 : const char *test_str;
7276 : const char *talloc_str;
7277 0 : PyObject *unicode = NULL;
7278 0 : if (PyUnicode_Check(value)) {
7279 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
7280 0 : if (unicode == NULL) {
7281 0 : PyErr_NoMemory();
7282 0 : return -1;
7283 : }
7284 0 : test_str = PyBytes_AS_STRING(unicode);
7285 0 : } else if (PyBytes_Check(value)) {
7286 0 : test_str = PyBytes_AS_STRING(value);
7287 : } else {
7288 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
7289 0 : return -1;
7290 : }
7291 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
7292 0 : if (unicode != NULL) {
7293 0 : Py_DECREF(unicode);
7294 : }
7295 0 : if (talloc_str == NULL) {
7296 0 : PyErr_NoMemory();
7297 0 : return -1;
7298 : }
7299 0 : object->dn = talloc_str;
7300 : }
7301 0 : return 0;
7302 : }
7303 :
7304 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_binary(PyObject *obj, void *closure)
7305 : {
7306 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
7307 : PyObject *py___ndr_size_binary;
7308 0 : py___ndr_size_binary = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_binary);
7309 0 : return py___ndr_size_binary;
7310 : }
7311 :
7312 0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
7313 : {
7314 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7315 0 : if (value == NULL) {
7316 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_binary");
7317 0 : return -1;
7318 : }
7319 : {
7320 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_binary));
7321 0 : if (PyLong_Check(value)) {
7322 : unsigned long long test_var;
7323 0 : test_var = PyLong_AsUnsignedLongLong(value);
7324 0 : if (PyErr_Occurred() != NULL) {
7325 0 : return -1;
7326 : }
7327 0 : if (test_var > uint_max) {
7328 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7329 : PyLong_Type.tp_name, uint_max, test_var);
7330 0 : return -1;
7331 : }
7332 0 : object->__ndr_size_binary = test_var;
7333 : } else {
7334 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7335 : PyLong_Type.tp_name);
7336 0 : return -1;
7337 : }
7338 : }
7339 0 : return 0;
7340 : }
7341 :
7342 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_get_binary(PyObject *obj, void *closure)
7343 : {
7344 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(obj);
7345 : PyObject *py_binary;
7346 0 : py_binary = PyBytes_FromStringAndSize((char *)(object->binary).data, (object->binary).length);
7347 0 : return py_binary;
7348 : }
7349 :
7350 0 : static int py_drsuapi_DsReplicaObjectIdentifier3Binary_set_binary(PyObject *py_obj, PyObject *value, void *closure)
7351 : {
7352 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7353 0 : if (value == NULL) {
7354 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary");
7355 0 : return -1;
7356 : }
7357 0 : object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
7358 0 : return 0;
7359 : }
7360 :
7361 : static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier3Binary_getsetters[] = {
7362 : {
7363 : .name = discard_const_p(char, "__ndr_size"),
7364 : .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size,
7365 : .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size,
7366 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
7367 : },
7368 : {
7369 : .name = discard_const_p(char, "__ndr_size_sid"),
7370 : .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_sid,
7371 : .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_sid,
7372 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
7373 : },
7374 : {
7375 : .name = discard_const_p(char, "guid"),
7376 : .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get_guid,
7377 : .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set_guid,
7378 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
7379 : },
7380 : {
7381 : .name = discard_const_p(char, "sid"),
7382 : .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get_sid,
7383 : .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set_sid,
7384 : .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
7385 : },
7386 : {
7387 : .name = discard_const_p(char, "__ndr_size_dn"),
7388 : .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_dn,
7389 : .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_dn,
7390 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
7391 : },
7392 : {
7393 : .name = discard_const_p(char, "dn"),
7394 : .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get_dn,
7395 : .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set_dn,
7396 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
7397 : },
7398 : {
7399 : .name = discard_const_p(char, "__ndr_size_binary"),
7400 : .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get___ndr_size_binary,
7401 : .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set___ndr_size_binary,
7402 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
7403 : },
7404 : {
7405 : .name = discard_const_p(char, "binary"),
7406 : .get = py_drsuapi_DsReplicaObjectIdentifier3Binary_get_binary,
7407 : .set = py_drsuapi_DsReplicaObjectIdentifier3Binary_set_binary,
7408 : .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
7409 : },
7410 : { .name = NULL }
7411 : };
7412 :
7413 150 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7414 : {
7415 150 : return pytalloc_new(struct drsuapi_DsReplicaObjectIdentifier3Binary, type);
7416 : }
7417 :
7418 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
7419 : {
7420 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7421 0 : PyObject *ret = NULL;
7422 : DATA_BLOB blob;
7423 : enum ndr_err_code err;
7424 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
7425 0 : if (tmp_ctx == NULL) {
7426 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
7427 0 : return NULL;
7428 : }
7429 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectIdentifier3Binary);
7430 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
7431 0 : TALLOC_FREE(tmp_ctx);
7432 0 : PyErr_SetNdrError(err);
7433 0 : return NULL;
7434 : }
7435 :
7436 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
7437 0 : TALLOC_FREE(tmp_ctx);
7438 0 : return ret;
7439 : }
7440 :
7441 150 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
7442 : {
7443 150 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7444 150 : DATA_BLOB blob = {.data = NULL, .length = 0};
7445 150 : Py_ssize_t blob_length = 0;
7446 : enum ndr_err_code err;
7447 150 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
7448 150 : PyObject *allow_remaining_obj = NULL;
7449 150 : bool allow_remaining = false;
7450 :
7451 150 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
7452 : discard_const_p(char *, kwnames),
7453 : &blob.data, &blob_length,
7454 : &allow_remaining_obj)) {
7455 0 : return NULL;
7456 : }
7457 150 : blob.length = blob_length;
7458 :
7459 150 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
7460 0 : allow_remaining = true;
7461 : }
7462 :
7463 150 : if (allow_remaining) {
7464 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
7465 : } else {
7466 150 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectIdentifier3Binary);
7467 : }
7468 150 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
7469 0 : PyErr_SetNdrError(err);
7470 0 : return NULL;
7471 : }
7472 :
7473 150 : Py_RETURN_NONE;
7474 : }
7475 :
7476 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
7477 : {
7478 0 : struct drsuapi_DsReplicaObjectIdentifier3Binary *object = (struct drsuapi_DsReplicaObjectIdentifier3Binary *)pytalloc_get_ptr(py_obj);
7479 : PyObject *ret;
7480 : char *retstr;
7481 :
7482 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectIdentifier3Binary, "drsuapi_DsReplicaObjectIdentifier3Binary", object);
7483 0 : ret = PyUnicode_FromString(retstr);
7484 0 : talloc_free(retstr);
7485 :
7486 0 : return ret;
7487 : }
7488 :
7489 : static PyMethodDef py_drsuapi_DsReplicaObjectIdentifier3Binary_methods[] = {
7490 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
7491 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
7492 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectIdentifier3Binary_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
7493 : { NULL, NULL, 0, NULL }
7494 : };
7495 :
7496 :
7497 : static PyTypeObject drsuapi_DsReplicaObjectIdentifier3Binary_Type = {
7498 : PyVarObject_HEAD_INIT(NULL, 0)
7499 : .tp_name = "drsuapi.DsReplicaObjectIdentifier3Binary",
7500 : .tp_getset = py_drsuapi_DsReplicaObjectIdentifier3Binary_getsetters,
7501 : .tp_methods = py_drsuapi_DsReplicaObjectIdentifier3Binary_methods,
7502 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7503 : .tp_new = py_drsuapi_DsReplicaObjectIdentifier3Binary_new,
7504 : };
7505 :
7506 :
7507 3864 : static PyObject *py_drsuapi_DsReplicaAttribute_get_attid(PyObject *obj, void *closure)
7508 : {
7509 3864 : struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(obj);
7510 : PyObject *py_attid;
7511 3864 : py_attid = PyLong_FromUnsignedLongLong((uint32_t)object->attid);
7512 3864 : return py_attid;
7513 : }
7514 :
7515 0 : static int py_drsuapi_DsReplicaAttribute_set_attid(PyObject *py_obj, PyObject *value, void *closure)
7516 : {
7517 0 : struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
7518 0 : if (value == NULL) {
7519 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attid");
7520 0 : return -1;
7521 : }
7522 : {
7523 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attid));
7524 0 : if (PyLong_Check(value)) {
7525 : unsigned long long test_var;
7526 0 : test_var = PyLong_AsUnsignedLongLong(value);
7527 0 : if (PyErr_Occurred() != NULL) {
7528 0 : return -1;
7529 : }
7530 0 : if (test_var > uint_max) {
7531 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7532 : PyLong_Type.tp_name, uint_max, test_var);
7533 0 : return -1;
7534 : }
7535 0 : object->attid = test_var;
7536 : } else {
7537 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7538 : PyLong_Type.tp_name);
7539 0 : return -1;
7540 : }
7541 : }
7542 0 : return 0;
7543 : }
7544 :
7545 1198 : static PyObject *py_drsuapi_DsReplicaAttribute_get_value_ctr(PyObject *obj, void *closure)
7546 : {
7547 1198 : struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(obj);
7548 : PyObject *py_value_ctr;
7549 1198 : py_value_ctr = pytalloc_reference_ex(&drsuapi_DsAttributeValueCtr_Type, pytalloc_get_mem_ctx(obj), &object->value_ctr);
7550 1198 : return py_value_ctr;
7551 : }
7552 :
7553 0 : static int py_drsuapi_DsReplicaAttribute_set_value_ctr(PyObject *py_obj, PyObject *value, void *closure)
7554 : {
7555 0 : struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
7556 0 : if (value == NULL) {
7557 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value_ctr");
7558 0 : return -1;
7559 : }
7560 0 : PY_CHECK_TYPE(&drsuapi_DsAttributeValueCtr_Type, value, return -1;);
7561 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7562 0 : PyErr_NoMemory();
7563 0 : return -1;
7564 : }
7565 0 : object->value_ctr = *(struct drsuapi_DsAttributeValueCtr *)pytalloc_get_ptr(value);
7566 0 : return 0;
7567 : }
7568 :
7569 : static PyGetSetDef py_drsuapi_DsReplicaAttribute_getsetters[] = {
7570 : {
7571 : .name = discard_const_p(char, "attid"),
7572 : .get = py_drsuapi_DsReplicaAttribute_get_attid,
7573 : .set = py_drsuapi_DsReplicaAttribute_set_attid,
7574 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
7575 : },
7576 : {
7577 : .name = discard_const_p(char, "value_ctr"),
7578 : .get = py_drsuapi_DsReplicaAttribute_get_value_ctr,
7579 : .set = py_drsuapi_DsReplicaAttribute_set_value_ctr,
7580 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeValueCtr")
7581 : },
7582 : { .name = NULL }
7583 : };
7584 :
7585 0 : static PyObject *py_drsuapi_DsReplicaAttribute_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7586 : {
7587 0 : return pytalloc_new(struct drsuapi_DsReplicaAttribute, type);
7588 : }
7589 :
7590 0 : static PyObject *py_drsuapi_DsReplicaAttribute_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
7591 : {
7592 0 : struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
7593 0 : PyObject *ret = NULL;
7594 : DATA_BLOB blob;
7595 : enum ndr_err_code err;
7596 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
7597 0 : if (tmp_ctx == NULL) {
7598 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
7599 0 : return NULL;
7600 : }
7601 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaAttribute);
7602 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
7603 0 : TALLOC_FREE(tmp_ctx);
7604 0 : PyErr_SetNdrError(err);
7605 0 : return NULL;
7606 : }
7607 :
7608 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
7609 0 : TALLOC_FREE(tmp_ctx);
7610 0 : return ret;
7611 : }
7612 :
7613 0 : static PyObject *py_drsuapi_DsReplicaAttribute_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
7614 : {
7615 0 : struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
7616 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
7617 0 : Py_ssize_t blob_length = 0;
7618 : enum ndr_err_code err;
7619 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
7620 0 : PyObject *allow_remaining_obj = NULL;
7621 0 : bool allow_remaining = false;
7622 :
7623 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
7624 : discard_const_p(char *, kwnames),
7625 : &blob.data, &blob_length,
7626 : &allow_remaining_obj)) {
7627 0 : return NULL;
7628 : }
7629 0 : blob.length = blob_length;
7630 :
7631 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
7632 0 : allow_remaining = true;
7633 : }
7634 :
7635 0 : if (allow_remaining) {
7636 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaAttribute);
7637 : } else {
7638 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaAttribute);
7639 : }
7640 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
7641 0 : PyErr_SetNdrError(err);
7642 0 : return NULL;
7643 : }
7644 :
7645 0 : Py_RETURN_NONE;
7646 : }
7647 :
7648 0 : static PyObject *py_drsuapi_DsReplicaAttribute_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
7649 : {
7650 0 : struct drsuapi_DsReplicaAttribute *object = (struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(py_obj);
7651 : PyObject *ret;
7652 : char *retstr;
7653 :
7654 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaAttribute, "drsuapi_DsReplicaAttribute", object);
7655 0 : ret = PyUnicode_FromString(retstr);
7656 0 : talloc_free(retstr);
7657 :
7658 0 : return ret;
7659 : }
7660 :
7661 : static PyMethodDef py_drsuapi_DsReplicaAttribute_methods[] = {
7662 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaAttribute_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
7663 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAttribute_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
7664 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaAttribute_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
7665 : { NULL, NULL, 0, NULL }
7666 : };
7667 :
7668 :
7669 : static PyTypeObject drsuapi_DsReplicaAttribute_Type = {
7670 : PyVarObject_HEAD_INIT(NULL, 0)
7671 : .tp_name = "drsuapi.DsReplicaAttribute",
7672 : .tp_getset = py_drsuapi_DsReplicaAttribute_getsetters,
7673 : .tp_methods = py_drsuapi_DsReplicaAttribute_methods,
7674 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7675 : .tp_new = py_drsuapi_DsReplicaAttribute_new,
7676 : };
7677 :
7678 :
7679 0 : static PyObject *py_drsuapi_DsReplicaAttributeCtr_get_num_attributes(PyObject *obj, void *closure)
7680 : {
7681 0 : struct drsuapi_DsReplicaAttributeCtr *object = (struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(obj);
7682 : PyObject *py_num_attributes;
7683 0 : py_num_attributes = PyLong_FromUnsignedLongLong((uint32_t)object->num_attributes);
7684 0 : return py_num_attributes;
7685 : }
7686 :
7687 84 : static int py_drsuapi_DsReplicaAttributeCtr_set_num_attributes(PyObject *py_obj, PyObject *value, void *closure)
7688 : {
7689 84 : struct drsuapi_DsReplicaAttributeCtr *object = (struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(py_obj);
7690 84 : if (value == NULL) {
7691 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_attributes");
7692 0 : return -1;
7693 : }
7694 : {
7695 84 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_attributes));
7696 84 : if (PyLong_Check(value)) {
7697 : unsigned long long test_var;
7698 84 : test_var = PyLong_AsUnsignedLongLong(value);
7699 84 : if (PyErr_Occurred() != NULL) {
7700 0 : return -1;
7701 : }
7702 84 : if (test_var > uint_max) {
7703 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7704 : PyLong_Type.tp_name, uint_max, test_var);
7705 0 : return -1;
7706 : }
7707 84 : object->num_attributes = test_var;
7708 : } else {
7709 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7710 : PyLong_Type.tp_name);
7711 0 : return -1;
7712 : }
7713 : }
7714 84 : return 0;
7715 : }
7716 :
7717 409 : static PyObject *py_drsuapi_DsReplicaAttributeCtr_get_attributes(PyObject *obj, void *closure)
7718 : {
7719 409 : struct drsuapi_DsReplicaAttributeCtr *object = (struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(obj);
7720 : PyObject *py_attributes;
7721 409 : if (object->attributes == NULL) {
7722 0 : Py_RETURN_NONE;
7723 : }
7724 409 : if (object->attributes == NULL) {
7725 0 : py_attributes = Py_None;
7726 0 : Py_INCREF(py_attributes);
7727 : } else {
7728 409 : py_attributes = PyList_New(object->num_attributes);
7729 409 : if (py_attributes == NULL) {
7730 0 : return NULL;
7731 : }
7732 : {
7733 : int attributes_cntr_1;
7734 4301 : for (attributes_cntr_1 = 0; attributes_cntr_1 < (object->num_attributes); attributes_cntr_1++) {
7735 : PyObject *py_attributes_1;
7736 3892 : py_attributes_1 = pytalloc_reference_ex(&drsuapi_DsReplicaAttribute_Type, object->attributes, &object->attributes[attributes_cntr_1]);
7737 3892 : PyList_SetItem(py_attributes, attributes_cntr_1, py_attributes_1);
7738 : }
7739 : }
7740 : }
7741 409 : return py_attributes;
7742 : }
7743 :
7744 84 : static int py_drsuapi_DsReplicaAttributeCtr_set_attributes(PyObject *py_obj, PyObject *value, void *closure)
7745 : {
7746 84 : struct drsuapi_DsReplicaAttributeCtr *object = (struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(py_obj);
7747 84 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->attributes));
7748 84 : if (value == NULL) {
7749 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attributes");
7750 0 : return -1;
7751 : }
7752 84 : if (value == Py_None) {
7753 0 : object->attributes = NULL;
7754 : } else {
7755 84 : object->attributes = NULL;
7756 84 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
7757 : {
7758 : int attributes_cntr_1;
7759 84 : object->attributes = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->attributes, PyList_GET_SIZE(value));
7760 84 : if (!object->attributes) { return -1;; }
7761 84 : talloc_set_name_const(object->attributes, "ARRAY: object->attributes");
7762 885 : for (attributes_cntr_1 = 0; attributes_cntr_1 < PyList_GET_SIZE(value); attributes_cntr_1++) {
7763 801 : if (PyList_GET_ITEM(value, attributes_cntr_1) == NULL) {
7764 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attributes[attributes_cntr_1]");
7765 0 : return -1;
7766 : }
7767 801 : PY_CHECK_TYPE(&drsuapi_DsReplicaAttribute_Type, PyList_GET_ITEM(value, attributes_cntr_1), return -1;);
7768 801 : if (talloc_reference(object->attributes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, attributes_cntr_1))) == NULL) {
7769 0 : PyErr_NoMemory();
7770 0 : return -1;
7771 : }
7772 801 : object->attributes[attributes_cntr_1] = *(struct drsuapi_DsReplicaAttribute *)pytalloc_get_ptr(PyList_GET_ITEM(value, attributes_cntr_1));
7773 : }
7774 : }
7775 : }
7776 84 : return 0;
7777 : }
7778 :
7779 : static PyGetSetDef py_drsuapi_DsReplicaAttributeCtr_getsetters[] = {
7780 : {
7781 : .name = discard_const_p(char, "num_attributes"),
7782 : .get = py_drsuapi_DsReplicaAttributeCtr_get_num_attributes,
7783 : .set = py_drsuapi_DsReplicaAttributeCtr_set_num_attributes,
7784 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
7785 : },
7786 : {
7787 : .name = discard_const_p(char, "attributes"),
7788 : .get = py_drsuapi_DsReplicaAttributeCtr_get_attributes,
7789 : .set = py_drsuapi_DsReplicaAttributeCtr_set_attributes,
7790 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAttribute")
7791 : },
7792 : { .name = NULL }
7793 : };
7794 :
7795 84 : static PyObject *py_drsuapi_DsReplicaAttributeCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7796 : {
7797 84 : return pytalloc_new(struct drsuapi_DsReplicaAttributeCtr, type);
7798 : }
7799 :
7800 :
7801 : static PyTypeObject drsuapi_DsReplicaAttributeCtr_Type = {
7802 : PyVarObject_HEAD_INIT(NULL, 0)
7803 : .tp_name = "drsuapi.DsReplicaAttributeCtr",
7804 : .tp_getset = py_drsuapi_DsReplicaAttributeCtr_getsetters,
7805 : .tp_methods = NULL,
7806 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
7807 : .tp_new = py_drsuapi_DsReplicaAttributeCtr_new,
7808 : };
7809 :
7810 :
7811 192411 : static PyObject *py_drsuapi_DsReplicaObject_get_identifier(PyObject *obj, void *closure)
7812 : {
7813 192411 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(obj);
7814 : PyObject *py_identifier;
7815 192411 : if (object->identifier == NULL) {
7816 0 : Py_RETURN_NONE;
7817 : }
7818 192411 : if (object->identifier == NULL) {
7819 0 : py_identifier = Py_None;
7820 0 : Py_INCREF(py_identifier);
7821 : } else {
7822 192411 : py_identifier = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->identifier, object->identifier);
7823 : }
7824 192411 : return py_identifier;
7825 : }
7826 :
7827 84 : static int py_drsuapi_DsReplicaObject_set_identifier(PyObject *py_obj, PyObject *value, void *closure)
7828 : {
7829 84 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
7830 84 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->identifier));
7831 84 : if (value == NULL) {
7832 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identifier");
7833 0 : return -1;
7834 : }
7835 84 : if (value == Py_None) {
7836 0 : object->identifier = NULL;
7837 : } else {
7838 84 : object->identifier = NULL;
7839 84 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
7840 84 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7841 0 : PyErr_NoMemory();
7842 0 : return -1;
7843 : }
7844 84 : object->identifier = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
7845 : }
7846 84 : return 0;
7847 : }
7848 :
7849 0 : static PyObject *py_drsuapi_DsReplicaObject_get_flags(PyObject *obj, void *closure)
7850 : {
7851 0 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(obj);
7852 : PyObject *py_flags;
7853 0 : py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
7854 0 : return py_flags;
7855 : }
7856 :
7857 0 : static int py_drsuapi_DsReplicaObject_set_flags(PyObject *py_obj, PyObject *value, void *closure)
7858 : {
7859 0 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
7860 0 : if (value == NULL) {
7861 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
7862 0 : return -1;
7863 : }
7864 : {
7865 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
7866 0 : if (PyLong_Check(value)) {
7867 : unsigned long long test_var;
7868 0 : test_var = PyLong_AsUnsignedLongLong(value);
7869 0 : if (PyErr_Occurred() != NULL) {
7870 0 : return -1;
7871 : }
7872 0 : if (test_var > uint_max) {
7873 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7874 : PyLong_Type.tp_name, uint_max, test_var);
7875 0 : return -1;
7876 : }
7877 0 : object->flags = test_var;
7878 : } else {
7879 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7880 : PyLong_Type.tp_name);
7881 0 : return -1;
7882 : }
7883 : }
7884 0 : return 0;
7885 : }
7886 :
7887 409 : static PyObject *py_drsuapi_DsReplicaObject_get_attribute_ctr(PyObject *obj, void *closure)
7888 : {
7889 409 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(obj);
7890 : PyObject *py_attribute_ctr;
7891 409 : py_attribute_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaAttributeCtr_Type, pytalloc_get_mem_ctx(obj), &object->attribute_ctr);
7892 409 : return py_attribute_ctr;
7893 : }
7894 :
7895 84 : static int py_drsuapi_DsReplicaObject_set_attribute_ctr(PyObject *py_obj, PyObject *value, void *closure)
7896 : {
7897 84 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
7898 84 : if (value == NULL) {
7899 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_ctr");
7900 0 : return -1;
7901 : }
7902 84 : PY_CHECK_TYPE(&drsuapi_DsReplicaAttributeCtr_Type, value, return -1;);
7903 84 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
7904 0 : PyErr_NoMemory();
7905 0 : return -1;
7906 : }
7907 84 : object->attribute_ctr = *(struct drsuapi_DsReplicaAttributeCtr *)pytalloc_get_ptr(value);
7908 84 : return 0;
7909 : }
7910 :
7911 : static PyGetSetDef py_drsuapi_DsReplicaObject_getsetters[] = {
7912 : {
7913 : .name = discard_const_p(char, "identifier"),
7914 : .get = py_drsuapi_DsReplicaObject_get_identifier,
7915 : .set = py_drsuapi_DsReplicaObject_set_identifier,
7916 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
7917 : },
7918 : {
7919 : .name = discard_const_p(char, "flags"),
7920 : .get = py_drsuapi_DsReplicaObject_get_flags,
7921 : .set = py_drsuapi_DsReplicaObject_set_flags,
7922 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectFlags")
7923 : },
7924 : {
7925 : .name = discard_const_p(char, "attribute_ctr"),
7926 : .get = py_drsuapi_DsReplicaObject_get_attribute_ctr,
7927 : .set = py_drsuapi_DsReplicaObject_set_attribute_ctr,
7928 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAttributeCtr")
7929 : },
7930 : { .name = NULL }
7931 : };
7932 :
7933 84 : static PyObject *py_drsuapi_DsReplicaObject_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
7934 : {
7935 84 : return pytalloc_new(struct drsuapi_DsReplicaObject, type);
7936 : }
7937 :
7938 0 : static PyObject *py_drsuapi_DsReplicaObject_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
7939 : {
7940 0 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
7941 0 : PyObject *ret = NULL;
7942 : DATA_BLOB blob;
7943 : enum ndr_err_code err;
7944 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
7945 0 : if (tmp_ctx == NULL) {
7946 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
7947 0 : return NULL;
7948 : }
7949 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObject);
7950 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
7951 0 : TALLOC_FREE(tmp_ctx);
7952 0 : PyErr_SetNdrError(err);
7953 0 : return NULL;
7954 : }
7955 :
7956 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
7957 0 : TALLOC_FREE(tmp_ctx);
7958 0 : return ret;
7959 : }
7960 :
7961 0 : static PyObject *py_drsuapi_DsReplicaObject_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
7962 : {
7963 0 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
7964 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
7965 0 : Py_ssize_t blob_length = 0;
7966 : enum ndr_err_code err;
7967 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
7968 0 : PyObject *allow_remaining_obj = NULL;
7969 0 : bool allow_remaining = false;
7970 :
7971 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
7972 : discard_const_p(char *, kwnames),
7973 : &blob.data, &blob_length,
7974 : &allow_remaining_obj)) {
7975 0 : return NULL;
7976 : }
7977 0 : blob.length = blob_length;
7978 :
7979 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
7980 0 : allow_remaining = true;
7981 : }
7982 :
7983 0 : if (allow_remaining) {
7984 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObject);
7985 : } else {
7986 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObject);
7987 : }
7988 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
7989 0 : PyErr_SetNdrError(err);
7990 0 : return NULL;
7991 : }
7992 :
7993 0 : Py_RETURN_NONE;
7994 : }
7995 :
7996 0 : static PyObject *py_drsuapi_DsReplicaObject_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
7997 : {
7998 0 : struct drsuapi_DsReplicaObject *object = (struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(py_obj);
7999 : PyObject *ret;
8000 : char *retstr;
8001 :
8002 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObject, "drsuapi_DsReplicaObject", object);
8003 0 : ret = PyUnicode_FromString(retstr);
8004 0 : talloc_free(retstr);
8005 :
8006 0 : return ret;
8007 : }
8008 :
8009 : static PyMethodDef py_drsuapi_DsReplicaObject_methods[] = {
8010 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObject_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
8011 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaObject_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
8012 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObject_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
8013 : { NULL, NULL, 0, NULL }
8014 : };
8015 :
8016 :
8017 : static PyTypeObject drsuapi_DsReplicaObject_Type = {
8018 : PyVarObject_HEAD_INIT(NULL, 0)
8019 : .tp_name = "drsuapi.DsReplicaObject",
8020 : .tp_getset = py_drsuapi_DsReplicaObject_getsetters,
8021 : .tp_methods = py_drsuapi_DsReplicaObject_methods,
8022 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8023 : .tp_new = py_drsuapi_DsReplicaObject_new,
8024 : };
8025 :
8026 :
8027 122 : static PyObject *py_drsuapi_DsReplicaMetaData_get_version(PyObject *obj, void *closure)
8028 : {
8029 122 : struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(obj);
8030 : PyObject *py_version;
8031 122 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
8032 122 : return py_version;
8033 : }
8034 :
8035 0 : static int py_drsuapi_DsReplicaMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
8036 : {
8037 0 : struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(py_obj);
8038 0 : if (value == NULL) {
8039 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
8040 0 : return -1;
8041 : }
8042 : {
8043 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
8044 0 : if (PyLong_Check(value)) {
8045 : unsigned long long test_var;
8046 0 : test_var = PyLong_AsUnsignedLongLong(value);
8047 0 : if (PyErr_Occurred() != NULL) {
8048 0 : return -1;
8049 : }
8050 0 : if (test_var > uint_max) {
8051 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8052 : PyLong_Type.tp_name, uint_max, test_var);
8053 0 : return -1;
8054 : }
8055 0 : object->version = test_var;
8056 : } else {
8057 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8058 : PyLong_Type.tp_name);
8059 0 : return -1;
8060 : }
8061 : }
8062 0 : return 0;
8063 : }
8064 :
8065 0 : static PyObject *py_drsuapi_DsReplicaMetaData_get_originating_change_time(PyObject *obj, void *closure)
8066 : {
8067 0 : struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(obj);
8068 : PyObject *py_originating_change_time;
8069 0 : py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
8070 0 : return py_originating_change_time;
8071 : }
8072 :
8073 0 : static int py_drsuapi_DsReplicaMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
8074 : {
8075 0 : struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(py_obj);
8076 0 : if (value == NULL) {
8077 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
8078 0 : return -1;
8079 : }
8080 : {
8081 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
8082 0 : if (PyLong_Check(value)) {
8083 : unsigned long long test_var;
8084 0 : test_var = PyLong_AsUnsignedLongLong(value);
8085 0 : if (PyErr_Occurred() != NULL) {
8086 0 : return -1;
8087 : }
8088 0 : if (test_var > uint_max) {
8089 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8090 : PyLong_Type.tp_name, uint_max, test_var);
8091 0 : return -1;
8092 : }
8093 0 : object->originating_change_time = test_var;
8094 : } else {
8095 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8096 : PyLong_Type.tp_name);
8097 0 : return -1;
8098 : }
8099 : }
8100 0 : return 0;
8101 : }
8102 :
8103 120 : static PyObject *py_drsuapi_DsReplicaMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
8104 : {
8105 120 : struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(obj);
8106 : PyObject *py_originating_invocation_id;
8107 120 : py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
8108 120 : return py_originating_invocation_id;
8109 : }
8110 :
8111 0 : static int py_drsuapi_DsReplicaMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
8112 : {
8113 0 : struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(py_obj);
8114 0 : if (value == NULL) {
8115 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
8116 0 : return -1;
8117 : }
8118 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
8119 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8120 0 : PyErr_NoMemory();
8121 0 : return -1;
8122 : }
8123 0 : object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
8124 0 : return 0;
8125 : }
8126 :
8127 0 : static PyObject *py_drsuapi_DsReplicaMetaData_get_originating_usn(PyObject *obj, void *closure)
8128 : {
8129 0 : struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(obj);
8130 : PyObject *py_originating_usn;
8131 0 : py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
8132 0 : return py_originating_usn;
8133 : }
8134 :
8135 0 : static int py_drsuapi_DsReplicaMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
8136 : {
8137 0 : struct drsuapi_DsReplicaMetaData *object = (struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(py_obj);
8138 0 : if (value == NULL) {
8139 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
8140 0 : return -1;
8141 : }
8142 : {
8143 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
8144 0 : if (PyLong_Check(value)) {
8145 : unsigned long long test_var;
8146 0 : test_var = PyLong_AsUnsignedLongLong(value);
8147 0 : if (PyErr_Occurred() != NULL) {
8148 0 : return -1;
8149 : }
8150 0 : if (test_var > uint_max) {
8151 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8152 : PyLong_Type.tp_name, uint_max, test_var);
8153 0 : return -1;
8154 : }
8155 0 : object->originating_usn = test_var;
8156 : } else {
8157 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8158 : PyLong_Type.tp_name);
8159 0 : return -1;
8160 : }
8161 : }
8162 0 : return 0;
8163 : }
8164 :
8165 : static PyGetSetDef py_drsuapi_DsReplicaMetaData_getsetters[] = {
8166 : {
8167 : .name = discard_const_p(char, "version"),
8168 : .get = py_drsuapi_DsReplicaMetaData_get_version,
8169 : .set = py_drsuapi_DsReplicaMetaData_set_version,
8170 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8171 : },
8172 : {
8173 : .name = discard_const_p(char, "originating_change_time"),
8174 : .get = py_drsuapi_DsReplicaMetaData_get_originating_change_time,
8175 : .set = py_drsuapi_DsReplicaMetaData_set_originating_change_time,
8176 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
8177 : },
8178 : {
8179 : .name = discard_const_p(char, "originating_invocation_id"),
8180 : .get = py_drsuapi_DsReplicaMetaData_get_originating_invocation_id,
8181 : .set = py_drsuapi_DsReplicaMetaData_set_originating_invocation_id,
8182 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
8183 : },
8184 : {
8185 : .name = discard_const_p(char, "originating_usn"),
8186 : .get = py_drsuapi_DsReplicaMetaData_get_originating_usn,
8187 : .set = py_drsuapi_DsReplicaMetaData_set_originating_usn,
8188 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
8189 : },
8190 : { .name = NULL }
8191 : };
8192 :
8193 0 : static PyObject *py_drsuapi_DsReplicaMetaData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8194 : {
8195 0 : return pytalloc_new(struct drsuapi_DsReplicaMetaData, type);
8196 : }
8197 :
8198 :
8199 : static PyTypeObject drsuapi_DsReplicaMetaData_Type = {
8200 : PyVarObject_HEAD_INIT(NULL, 0)
8201 : .tp_name = "drsuapi.DsReplicaMetaData",
8202 : .tp_getset = py_drsuapi_DsReplicaMetaData_getsetters,
8203 : .tp_methods = NULL,
8204 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8205 : .tp_new = py_drsuapi_DsReplicaMetaData_new,
8206 : };
8207 :
8208 :
8209 0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_get_count(PyObject *obj, void *closure)
8210 : {
8211 0 : struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(obj);
8212 : PyObject *py_count;
8213 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
8214 0 : return py_count;
8215 : }
8216 :
8217 0 : static int py_drsuapi_DsReplicaMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
8218 : {
8219 0 : struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
8220 0 : if (value == NULL) {
8221 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
8222 0 : return -1;
8223 : }
8224 : {
8225 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
8226 0 : if (PyLong_Check(value)) {
8227 : unsigned long long test_var;
8228 0 : test_var = PyLong_AsUnsignedLongLong(value);
8229 0 : if (PyErr_Occurred() != NULL) {
8230 0 : return -1;
8231 : }
8232 0 : if (test_var > uint_max) {
8233 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8234 : PyLong_Type.tp_name, uint_max, test_var);
8235 0 : return -1;
8236 : }
8237 0 : object->count = test_var;
8238 : } else {
8239 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8240 : PyLong_Type.tp_name);
8241 0 : return -1;
8242 : }
8243 : }
8244 0 : return 0;
8245 : }
8246 :
8247 120 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_get_meta_data(PyObject *obj, void *closure)
8248 : {
8249 120 : struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(obj);
8250 : PyObject *py_meta_data;
8251 120 : py_meta_data = PyList_New(object->count);
8252 120 : if (py_meta_data == NULL) {
8253 0 : return NULL;
8254 : }
8255 : {
8256 : int meta_data_cntr_0;
8257 2840 : for (meta_data_cntr_0 = 0; meta_data_cntr_0 < (object->count); meta_data_cntr_0++) {
8258 : PyObject *py_meta_data_0;
8259 2720 : py_meta_data_0 = pytalloc_reference_ex(&drsuapi_DsReplicaMetaData_Type, object->meta_data, &object->meta_data[meta_data_cntr_0]);
8260 2720 : PyList_SetItem(py_meta_data, meta_data_cntr_0, py_meta_data_0);
8261 : }
8262 : }
8263 120 : return py_meta_data;
8264 : }
8265 :
8266 0 : static int py_drsuapi_DsReplicaMetaDataCtr_set_meta_data(PyObject *py_obj, PyObject *value, void *closure)
8267 : {
8268 0 : struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
8269 0 : if (value == NULL) {
8270 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->meta_data");
8271 0 : return -1;
8272 : }
8273 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
8274 : {
8275 : int meta_data_cntr_0;
8276 0 : object->meta_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->meta_data, PyList_GET_SIZE(value));
8277 0 : if (!object->meta_data) { return -1;; }
8278 0 : talloc_set_name_const(object->meta_data, "ARRAY: object->meta_data");
8279 0 : for (meta_data_cntr_0 = 0; meta_data_cntr_0 < PyList_GET_SIZE(value); meta_data_cntr_0++) {
8280 0 : if (PyList_GET_ITEM(value, meta_data_cntr_0) == NULL) {
8281 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->meta_data[meta_data_cntr_0]");
8282 0 : return -1;
8283 : }
8284 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaMetaData_Type, PyList_GET_ITEM(value, meta_data_cntr_0), return -1;);
8285 0 : if (talloc_reference(object->meta_data, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, meta_data_cntr_0))) == NULL) {
8286 0 : PyErr_NoMemory();
8287 0 : return -1;
8288 : }
8289 0 : object->meta_data[meta_data_cntr_0] = *(struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, meta_data_cntr_0));
8290 : }
8291 : }
8292 0 : return 0;
8293 : }
8294 :
8295 : static PyGetSetDef py_drsuapi_DsReplicaMetaDataCtr_getsetters[] = {
8296 : {
8297 : .name = discard_const_p(char, "count"),
8298 : .get = py_drsuapi_DsReplicaMetaDataCtr_get_count,
8299 : .set = py_drsuapi_DsReplicaMetaDataCtr_set_count,
8300 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8301 : },
8302 : {
8303 : .name = discard_const_p(char, "meta_data"),
8304 : .get = py_drsuapi_DsReplicaMetaDataCtr_get_meta_data,
8305 : .set = py_drsuapi_DsReplicaMetaDataCtr_set_meta_data,
8306 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaMetaData")
8307 : },
8308 : { .name = NULL }
8309 : };
8310 :
8311 0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8312 : {
8313 0 : return pytalloc_new(struct drsuapi_DsReplicaMetaDataCtr, type);
8314 : }
8315 :
8316 0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
8317 : {
8318 0 : struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
8319 0 : PyObject *ret = NULL;
8320 : DATA_BLOB blob;
8321 : enum ndr_err_code err;
8322 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
8323 0 : if (tmp_ctx == NULL) {
8324 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
8325 0 : return NULL;
8326 : }
8327 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaMetaDataCtr);
8328 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
8329 0 : TALLOC_FREE(tmp_ctx);
8330 0 : PyErr_SetNdrError(err);
8331 0 : return NULL;
8332 : }
8333 :
8334 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
8335 0 : TALLOC_FREE(tmp_ctx);
8336 0 : return ret;
8337 : }
8338 :
8339 0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
8340 : {
8341 0 : struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
8342 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
8343 0 : Py_ssize_t blob_length = 0;
8344 : enum ndr_err_code err;
8345 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
8346 0 : PyObject *allow_remaining_obj = NULL;
8347 0 : bool allow_remaining = false;
8348 :
8349 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
8350 : discard_const_p(char *, kwnames),
8351 : &blob.data, &blob_length,
8352 : &allow_remaining_obj)) {
8353 0 : return NULL;
8354 : }
8355 0 : blob.length = blob_length;
8356 :
8357 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
8358 0 : allow_remaining = true;
8359 : }
8360 :
8361 0 : if (allow_remaining) {
8362 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaMetaDataCtr);
8363 : } else {
8364 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaMetaDataCtr);
8365 : }
8366 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
8367 0 : PyErr_SetNdrError(err);
8368 0 : return NULL;
8369 : }
8370 :
8371 0 : Py_RETURN_NONE;
8372 : }
8373 :
8374 0 : static PyObject *py_drsuapi_DsReplicaMetaDataCtr_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
8375 : {
8376 0 : struct drsuapi_DsReplicaMetaDataCtr *object = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(py_obj);
8377 : PyObject *ret;
8378 : char *retstr;
8379 :
8380 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaMetaDataCtr, "drsuapi_DsReplicaMetaDataCtr", object);
8381 0 : ret = PyUnicode_FromString(retstr);
8382 0 : talloc_free(retstr);
8383 :
8384 0 : return ret;
8385 : }
8386 :
8387 : static PyMethodDef py_drsuapi_DsReplicaMetaDataCtr_methods[] = {
8388 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaMetaDataCtr_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
8389 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMetaDataCtr_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
8390 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaMetaDataCtr_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
8391 : { NULL, NULL, 0, NULL }
8392 : };
8393 :
8394 :
8395 : static PyTypeObject drsuapi_DsReplicaMetaDataCtr_Type = {
8396 : PyVarObject_HEAD_INIT(NULL, 0)
8397 : .tp_name = "drsuapi.DsReplicaMetaDataCtr",
8398 : .tp_getset = py_drsuapi_DsReplicaMetaDataCtr_getsetters,
8399 : .tp_methods = py_drsuapi_DsReplicaMetaDataCtr_methods,
8400 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8401 : .tp_new = py_drsuapi_DsReplicaMetaDataCtr_new,
8402 : };
8403 :
8404 :
8405 191661 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_next_object(PyObject *obj, void *closure)
8406 : {
8407 191661 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
8408 : PyObject *py_next_object;
8409 191661 : if (object->next_object == NULL) {
8410 2140 : Py_RETURN_NONE;
8411 : }
8412 189521 : if (object->next_object == NULL) {
8413 0 : py_next_object = Py_None;
8414 0 : Py_INCREF(py_next_object);
8415 : } else {
8416 189521 : py_next_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->next_object, object->next_object);
8417 : }
8418 189521 : return py_next_object;
8419 : }
8420 :
8421 0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_next_object(PyObject *py_obj, PyObject *value, void *closure)
8422 : {
8423 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
8424 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next_object));
8425 0 : if (value == NULL) {
8426 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next_object");
8427 0 : return -1;
8428 : }
8429 0 : if (value == Py_None) {
8430 0 : object->next_object = NULL;
8431 : } else {
8432 0 : object->next_object = NULL;
8433 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
8434 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8435 0 : PyErr_NoMemory();
8436 0 : return -1;
8437 : }
8438 0 : object->next_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
8439 : }
8440 0 : return 0;
8441 : }
8442 :
8443 192428 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_object(PyObject *obj, void *closure)
8444 : {
8445 192428 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
8446 : PyObject *py_object;
8447 192428 : py_object = pytalloc_reference_ex(&drsuapi_DsReplicaObject_Type, pytalloc_get_mem_ctx(obj), &object->object);
8448 192428 : return py_object;
8449 : }
8450 :
8451 0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_object(PyObject *py_obj, PyObject *value, void *closure)
8452 : {
8453 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
8454 0 : if (value == NULL) {
8455 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object");
8456 0 : return -1;
8457 : }
8458 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObject_Type, value, return -1;);
8459 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8460 0 : PyErr_NoMemory();
8461 0 : return -1;
8462 : }
8463 0 : object->object = *(struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(value);
8464 0 : return 0;
8465 : }
8466 :
8467 0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_is_nc_prefix(PyObject *obj, void *closure)
8468 : {
8469 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
8470 : PyObject *py_is_nc_prefix;
8471 0 : py_is_nc_prefix = PyLong_FromUnsignedLongLong((uint32_t)object->is_nc_prefix);
8472 0 : return py_is_nc_prefix;
8473 : }
8474 :
8475 0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_is_nc_prefix(PyObject *py_obj, PyObject *value, void *closure)
8476 : {
8477 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
8478 0 : if (value == NULL) {
8479 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_nc_prefix");
8480 0 : return -1;
8481 : }
8482 : {
8483 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_nc_prefix));
8484 0 : if (PyLong_Check(value)) {
8485 : unsigned long long test_var;
8486 0 : test_var = PyLong_AsUnsignedLongLong(value);
8487 0 : if (PyErr_Occurred() != NULL) {
8488 0 : return -1;
8489 : }
8490 0 : if (test_var > uint_max) {
8491 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8492 : PyLong_Type.tp_name, uint_max, test_var);
8493 0 : return -1;
8494 : }
8495 0 : object->is_nc_prefix = test_var;
8496 : } else {
8497 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8498 : PyLong_Type.tp_name);
8499 0 : return -1;
8500 : }
8501 : }
8502 0 : return 0;
8503 : }
8504 :
8505 293 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_parent_object_guid(PyObject *obj, void *closure)
8506 : {
8507 293 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
8508 : PyObject *py_parent_object_guid;
8509 293 : if (object->parent_object_guid == NULL) {
8510 1 : Py_RETURN_NONE;
8511 : }
8512 292 : if (object->parent_object_guid == NULL) {
8513 0 : py_parent_object_guid = Py_None;
8514 0 : Py_INCREF(py_parent_object_guid);
8515 : } else {
8516 292 : py_parent_object_guid = pytalloc_reference_ex(GUID_Type, object->parent_object_guid, object->parent_object_guid);
8517 : }
8518 292 : return py_parent_object_guid;
8519 : }
8520 :
8521 0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_parent_object_guid(PyObject *py_obj, PyObject *value, void *closure)
8522 : {
8523 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
8524 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->parent_object_guid));
8525 0 : if (value == NULL) {
8526 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->parent_object_guid");
8527 0 : return -1;
8528 : }
8529 0 : if (value == Py_None) {
8530 0 : object->parent_object_guid = NULL;
8531 : } else {
8532 0 : object->parent_object_guid = NULL;
8533 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
8534 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8535 0 : PyErr_NoMemory();
8536 0 : return -1;
8537 : }
8538 0 : object->parent_object_guid = (struct GUID *)pytalloc_get_ptr(value);
8539 : }
8540 0 : return 0;
8541 : }
8542 :
8543 120 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_get_meta_data_ctr(PyObject *obj, void *closure)
8544 : {
8545 120 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(obj);
8546 : PyObject *py_meta_data_ctr;
8547 120 : if (object->meta_data_ctr == NULL) {
8548 0 : Py_RETURN_NONE;
8549 : }
8550 120 : if (object->meta_data_ctr == NULL) {
8551 0 : py_meta_data_ctr = Py_None;
8552 0 : Py_INCREF(py_meta_data_ctr);
8553 : } else {
8554 120 : py_meta_data_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaMetaDataCtr_Type, object->meta_data_ctr, object->meta_data_ctr);
8555 : }
8556 120 : return py_meta_data_ctr;
8557 : }
8558 :
8559 0 : static int py_drsuapi_DsReplicaObjectListItemEx_set_meta_data_ctr(PyObject *py_obj, PyObject *value, void *closure)
8560 : {
8561 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
8562 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->meta_data_ctr));
8563 0 : if (value == NULL) {
8564 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->meta_data_ctr");
8565 0 : return -1;
8566 : }
8567 0 : if (value == Py_None) {
8568 0 : object->meta_data_ctr = NULL;
8569 : } else {
8570 0 : object->meta_data_ctr = NULL;
8571 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaMetaDataCtr_Type, value, return -1;);
8572 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8573 0 : PyErr_NoMemory();
8574 0 : return -1;
8575 : }
8576 0 : object->meta_data_ctr = (struct drsuapi_DsReplicaMetaDataCtr *)pytalloc_get_ptr(value);
8577 : }
8578 0 : return 0;
8579 : }
8580 :
8581 : static PyGetSetDef py_drsuapi_DsReplicaObjectListItemEx_getsetters[] = {
8582 : {
8583 : .name = discard_const_p(char, "next_object"),
8584 : .get = py_drsuapi_DsReplicaObjectListItemEx_get_next_object,
8585 : .set = py_drsuapi_DsReplicaObjectListItemEx_set_next_object,
8586 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItemEx")
8587 : },
8588 : {
8589 : .name = discard_const_p(char, "object"),
8590 : .get = py_drsuapi_DsReplicaObjectListItemEx_get_object,
8591 : .set = py_drsuapi_DsReplicaObjectListItemEx_set_object,
8592 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObject")
8593 : },
8594 : {
8595 : .name = discard_const_p(char, "is_nc_prefix"),
8596 : .get = py_drsuapi_DsReplicaObjectListItemEx_get_is_nc_prefix,
8597 : .set = py_drsuapi_DsReplicaObjectListItemEx_set_is_nc_prefix,
8598 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8599 : },
8600 : {
8601 : .name = discard_const_p(char, "parent_object_guid"),
8602 : .get = py_drsuapi_DsReplicaObjectListItemEx_get_parent_object_guid,
8603 : .set = py_drsuapi_DsReplicaObjectListItemEx_set_parent_object_guid,
8604 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
8605 : },
8606 : {
8607 : .name = discard_const_p(char, "meta_data_ctr"),
8608 : .get = py_drsuapi_DsReplicaObjectListItemEx_get_meta_data_ctr,
8609 : .set = py_drsuapi_DsReplicaObjectListItemEx_set_meta_data_ctr,
8610 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaMetaDataCtr")
8611 : },
8612 : { .name = NULL }
8613 : };
8614 :
8615 0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8616 : {
8617 0 : return pytalloc_new(struct drsuapi_DsReplicaObjectListItemEx, type);
8618 : }
8619 :
8620 0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
8621 : {
8622 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
8623 0 : PyObject *ret = NULL;
8624 : DATA_BLOB blob;
8625 : enum ndr_err_code err;
8626 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
8627 0 : if (tmp_ctx == NULL) {
8628 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
8629 0 : return NULL;
8630 : }
8631 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectListItemEx);
8632 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
8633 0 : TALLOC_FREE(tmp_ctx);
8634 0 : PyErr_SetNdrError(err);
8635 0 : return NULL;
8636 : }
8637 :
8638 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
8639 0 : TALLOC_FREE(tmp_ctx);
8640 0 : return ret;
8641 : }
8642 :
8643 0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
8644 : {
8645 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
8646 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
8647 0 : Py_ssize_t blob_length = 0;
8648 : enum ndr_err_code err;
8649 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
8650 0 : PyObject *allow_remaining_obj = NULL;
8651 0 : bool allow_remaining = false;
8652 :
8653 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
8654 : discard_const_p(char *, kwnames),
8655 : &blob.data, &blob_length,
8656 : &allow_remaining_obj)) {
8657 0 : return NULL;
8658 : }
8659 0 : blob.length = blob_length;
8660 :
8661 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
8662 0 : allow_remaining = true;
8663 : }
8664 :
8665 0 : if (allow_remaining) {
8666 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItemEx);
8667 : } else {
8668 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItemEx);
8669 : }
8670 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
8671 0 : PyErr_SetNdrError(err);
8672 0 : return NULL;
8673 : }
8674 :
8675 0 : Py_RETURN_NONE;
8676 : }
8677 :
8678 0 : static PyObject *py_drsuapi_DsReplicaObjectListItemEx_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
8679 : {
8680 0 : struct drsuapi_DsReplicaObjectListItemEx *object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(py_obj);
8681 : PyObject *ret;
8682 : char *retstr;
8683 :
8684 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectListItemEx, "drsuapi_DsReplicaObjectListItemEx", object);
8685 0 : ret = PyUnicode_FromString(retstr);
8686 0 : talloc_free(retstr);
8687 :
8688 0 : return ret;
8689 : }
8690 :
8691 : static PyMethodDef py_drsuapi_DsReplicaObjectListItemEx_methods[] = {
8692 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectListItemEx_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
8693 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaObjectListItemEx_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
8694 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectListItemEx_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
8695 : { NULL, NULL, 0, NULL }
8696 : };
8697 :
8698 :
8699 : static PyTypeObject drsuapi_DsReplicaObjectListItemEx_Type = {
8700 : PyVarObject_HEAD_INIT(NULL, 0)
8701 : .tp_name = "drsuapi.DsReplicaObjectListItemEx",
8702 : .tp_getset = py_drsuapi_DsReplicaObjectListItemEx_getsetters,
8703 : .tp_methods = py_drsuapi_DsReplicaObjectListItemEx_methods,
8704 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8705 : .tp_new = py_drsuapi_DsReplicaObjectListItemEx_new,
8706 : };
8707 :
8708 :
8709 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_guid(PyObject *obj, void *closure)
8710 : {
8711 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8712 : PyObject *py_source_dsa_guid;
8713 0 : py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
8714 0 : return py_source_dsa_guid;
8715 : }
8716 :
8717 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
8718 : {
8719 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8720 0 : if (value == NULL) {
8721 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
8722 0 : return -1;
8723 : }
8724 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
8725 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8726 0 : PyErr_NoMemory();
8727 0 : return -1;
8728 : }
8729 0 : object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
8730 0 : return 0;
8731 : }
8732 :
8733 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_invocation_id(PyObject *obj, void *closure)
8734 : {
8735 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8736 : PyObject *py_source_dsa_invocation_id;
8737 0 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
8738 0 : return py_source_dsa_invocation_id;
8739 : }
8740 :
8741 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
8742 : {
8743 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8744 0 : if (value == NULL) {
8745 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
8746 0 : return -1;
8747 : }
8748 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
8749 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8750 0 : PyErr_NoMemory();
8751 0 : return -1;
8752 : }
8753 0 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
8754 0 : return 0;
8755 : }
8756 :
8757 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_naming_context(PyObject *obj, void *closure)
8758 : {
8759 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8760 : PyObject *py_naming_context;
8761 0 : if (object->naming_context == NULL) {
8762 0 : Py_RETURN_NONE;
8763 : }
8764 0 : if (object->naming_context == NULL) {
8765 0 : py_naming_context = Py_None;
8766 0 : Py_INCREF(py_naming_context);
8767 : } else {
8768 0 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
8769 : }
8770 0 : return py_naming_context;
8771 : }
8772 :
8773 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
8774 : {
8775 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8776 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
8777 0 : if (value == NULL) {
8778 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
8779 0 : return -1;
8780 : }
8781 0 : if (value == Py_None) {
8782 0 : object->naming_context = NULL;
8783 : } else {
8784 0 : object->naming_context = NULL;
8785 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
8786 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8787 0 : PyErr_NoMemory();
8788 0 : return -1;
8789 : }
8790 0 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
8791 : }
8792 0 : return 0;
8793 : }
8794 :
8795 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_old_highwatermark(PyObject *obj, void *closure)
8796 : {
8797 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8798 : PyObject *py_old_highwatermark;
8799 0 : py_old_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->old_highwatermark);
8800 0 : return py_old_highwatermark;
8801 : }
8802 :
8803 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_old_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
8804 : {
8805 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8806 0 : if (value == NULL) {
8807 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_highwatermark");
8808 0 : return -1;
8809 : }
8810 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
8811 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8812 0 : PyErr_NoMemory();
8813 0 : return -1;
8814 : }
8815 0 : object->old_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
8816 0 : return 0;
8817 : }
8818 :
8819 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_new_highwatermark(PyObject *obj, void *closure)
8820 : {
8821 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8822 : PyObject *py_new_highwatermark;
8823 0 : py_new_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->new_highwatermark);
8824 0 : return py_new_highwatermark;
8825 : }
8826 :
8827 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_new_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
8828 : {
8829 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8830 0 : if (value == NULL) {
8831 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->new_highwatermark");
8832 0 : return -1;
8833 : }
8834 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
8835 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8836 0 : PyErr_NoMemory();
8837 0 : return -1;
8838 : }
8839 0 : object->new_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
8840 0 : return 0;
8841 : }
8842 :
8843 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_uptodateness_vector(PyObject *obj, void *closure)
8844 : {
8845 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8846 : PyObject *py_uptodateness_vector;
8847 0 : if (object->uptodateness_vector == NULL) {
8848 0 : Py_RETURN_NONE;
8849 : }
8850 0 : if (object->uptodateness_vector == NULL) {
8851 0 : py_uptodateness_vector = Py_None;
8852 0 : Py_INCREF(py_uptodateness_vector);
8853 : } else {
8854 0 : py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
8855 : }
8856 0 : return py_uptodateness_vector;
8857 : }
8858 :
8859 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
8860 : {
8861 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8862 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
8863 0 : if (value == NULL) {
8864 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
8865 0 : return -1;
8866 : }
8867 0 : if (value == Py_None) {
8868 0 : object->uptodateness_vector = NULL;
8869 : } else {
8870 0 : object->uptodateness_vector = NULL;
8871 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, value, return -1;);
8872 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8873 0 : PyErr_NoMemory();
8874 0 : return -1;
8875 : }
8876 0 : object->uptodateness_vector = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(value);
8877 : }
8878 0 : return 0;
8879 : }
8880 :
8881 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_mapping_ctr(PyObject *obj, void *closure)
8882 : {
8883 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8884 : PyObject *py_mapping_ctr;
8885 0 : py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
8886 0 : return py_mapping_ctr;
8887 : }
8888 :
8889 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
8890 : {
8891 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8892 0 : if (value == NULL) {
8893 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mapping_ctr");
8894 0 : return -1;
8895 : }
8896 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
8897 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
8898 0 : PyErr_NoMemory();
8899 0 : return -1;
8900 : }
8901 0 : object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
8902 0 : return 0;
8903 : }
8904 :
8905 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_extended_ret(PyObject *obj, void *closure)
8906 : {
8907 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8908 : PyObject *py_extended_ret;
8909 0 : py_extended_ret = PyLong_FromUnsignedLongLong((uint32_t)object->extended_ret);
8910 0 : return py_extended_ret;
8911 : }
8912 :
8913 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_extended_ret(PyObject *py_obj, PyObject *value, void *closure)
8914 : {
8915 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8916 0 : if (value == NULL) {
8917 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_ret");
8918 0 : return -1;
8919 : }
8920 : {
8921 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_ret));
8922 0 : if (PyLong_Check(value)) {
8923 : unsigned long long test_var;
8924 0 : test_var = PyLong_AsUnsignedLongLong(value);
8925 0 : if (PyErr_Occurred() != NULL) {
8926 0 : return -1;
8927 : }
8928 0 : if (test_var > uint_max) {
8929 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8930 : PyLong_Type.tp_name, uint_max, test_var);
8931 0 : return -1;
8932 : }
8933 0 : object->extended_ret = test_var;
8934 : } else {
8935 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8936 : PyLong_Type.tp_name);
8937 0 : return -1;
8938 : }
8939 : }
8940 0 : return 0;
8941 : }
8942 :
8943 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_object_count(PyObject *obj, void *closure)
8944 : {
8945 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8946 : PyObject *py_object_count;
8947 0 : py_object_count = PyLong_FromUnsignedLongLong((uint32_t)object->object_count);
8948 0 : return py_object_count;
8949 : }
8950 :
8951 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_object_count(PyObject *py_obj, PyObject *value, void *closure)
8952 : {
8953 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8954 0 : if (value == NULL) {
8955 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_count");
8956 0 : return -1;
8957 : }
8958 : {
8959 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->object_count));
8960 0 : if (PyLong_Check(value)) {
8961 : unsigned long long test_var;
8962 0 : test_var = PyLong_AsUnsignedLongLong(value);
8963 0 : if (PyErr_Occurred() != NULL) {
8964 0 : return -1;
8965 : }
8966 0 : if (test_var > uint_max) {
8967 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8968 : PyLong_Type.tp_name, uint_max, test_var);
8969 0 : return -1;
8970 : }
8971 0 : object->object_count = test_var;
8972 : } else {
8973 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8974 : PyLong_Type.tp_name);
8975 0 : return -1;
8976 : }
8977 : }
8978 0 : return 0;
8979 : }
8980 :
8981 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get___ndr_size(PyObject *obj, void *closure)
8982 : {
8983 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
8984 : PyObject *py___ndr_size;
8985 0 : py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size);
8986 0 : return py___ndr_size;
8987 : }
8988 :
8989 0 : static int py_drsuapi_DsGetNCChangesCtr1_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
8990 : {
8991 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
8992 0 : if (value == NULL) {
8993 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
8994 0 : return -1;
8995 : }
8996 : {
8997 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
8998 0 : if (PyLong_Check(value)) {
8999 : unsigned long long test_var;
9000 0 : test_var = PyLong_AsUnsignedLongLong(value);
9001 0 : if (PyErr_Occurred() != NULL) {
9002 0 : return -1;
9003 : }
9004 0 : if (test_var > uint_max) {
9005 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9006 : PyLong_Type.tp_name, uint_max, test_var);
9007 0 : return -1;
9008 : }
9009 0 : object->__ndr_size = test_var;
9010 : } else {
9011 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9012 : PyLong_Type.tp_name);
9013 0 : return -1;
9014 : }
9015 : }
9016 0 : return 0;
9017 : }
9018 :
9019 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_first_object(PyObject *obj, void *closure)
9020 : {
9021 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
9022 : PyObject *py_first_object;
9023 0 : if (object->first_object == NULL) {
9024 0 : Py_RETURN_NONE;
9025 : }
9026 0 : if (object->first_object == NULL) {
9027 0 : py_first_object = Py_None;
9028 0 : Py_INCREF(py_first_object);
9029 : } else {
9030 0 : py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->first_object, object->first_object);
9031 : }
9032 0 : return py_first_object;
9033 : }
9034 :
9035 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
9036 : {
9037 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
9038 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->first_object));
9039 0 : if (value == NULL) {
9040 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_object");
9041 0 : return -1;
9042 : }
9043 0 : if (value == Py_None) {
9044 0 : object->first_object = NULL;
9045 : } else {
9046 0 : object->first_object = NULL;
9047 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
9048 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9049 0 : PyErr_NoMemory();
9050 0 : return -1;
9051 : }
9052 0 : object->first_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
9053 : }
9054 0 : return 0;
9055 : }
9056 :
9057 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_get_more_data(PyObject *obj, void *closure)
9058 : {
9059 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(obj);
9060 : PyObject *py_more_data;
9061 0 : py_more_data = PyLong_FromUnsignedLongLong((uint32_t)object->more_data);
9062 0 : return py_more_data;
9063 : }
9064 :
9065 0 : static int py_drsuapi_DsGetNCChangesCtr1_set_more_data(PyObject *py_obj, PyObject *value, void *closure)
9066 : {
9067 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
9068 0 : if (value == NULL) {
9069 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->more_data");
9070 0 : return -1;
9071 : }
9072 : {
9073 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->more_data));
9074 0 : if (PyLong_Check(value)) {
9075 : unsigned long long test_var;
9076 0 : test_var = PyLong_AsUnsignedLongLong(value);
9077 0 : if (PyErr_Occurred() != NULL) {
9078 0 : return -1;
9079 : }
9080 0 : if (test_var > uint_max) {
9081 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9082 : PyLong_Type.tp_name, uint_max, test_var);
9083 0 : return -1;
9084 : }
9085 0 : object->more_data = test_var;
9086 : } else {
9087 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9088 : PyLong_Type.tp_name);
9089 0 : return -1;
9090 : }
9091 : }
9092 0 : return 0;
9093 : }
9094 :
9095 : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr1_getsetters[] = {
9096 : {
9097 : .name = discard_const_p(char, "source_dsa_guid"),
9098 : .get = py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_guid,
9099 : .set = py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_guid,
9100 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
9101 : },
9102 : {
9103 : .name = discard_const_p(char, "source_dsa_invocation_id"),
9104 : .get = py_drsuapi_DsGetNCChangesCtr1_get_source_dsa_invocation_id,
9105 : .set = py_drsuapi_DsGetNCChangesCtr1_set_source_dsa_invocation_id,
9106 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
9107 : },
9108 : {
9109 : .name = discard_const_p(char, "naming_context"),
9110 : .get = py_drsuapi_DsGetNCChangesCtr1_get_naming_context,
9111 : .set = py_drsuapi_DsGetNCChangesCtr1_set_naming_context,
9112 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
9113 : },
9114 : {
9115 : .name = discard_const_p(char, "old_highwatermark"),
9116 : .get = py_drsuapi_DsGetNCChangesCtr1_get_old_highwatermark,
9117 : .set = py_drsuapi_DsGetNCChangesCtr1_set_old_highwatermark,
9118 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
9119 : },
9120 : {
9121 : .name = discard_const_p(char, "new_highwatermark"),
9122 : .get = py_drsuapi_DsGetNCChangesCtr1_get_new_highwatermark,
9123 : .set = py_drsuapi_DsGetNCChangesCtr1_set_new_highwatermark,
9124 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
9125 : },
9126 : {
9127 : .name = discard_const_p(char, "uptodateness_vector"),
9128 : .get = py_drsuapi_DsGetNCChangesCtr1_get_uptodateness_vector,
9129 : .set = py_drsuapi_DsGetNCChangesCtr1_set_uptodateness_vector,
9130 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursorCtrEx")
9131 : },
9132 : {
9133 : .name = discard_const_p(char, "mapping_ctr"),
9134 : .get = py_drsuapi_DsGetNCChangesCtr1_get_mapping_ctr,
9135 : .set = py_drsuapi_DsGetNCChangesCtr1_set_mapping_ctr,
9136 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping_Ctr")
9137 : },
9138 : {
9139 : .name = discard_const_p(char, "extended_ret"),
9140 : .get = py_drsuapi_DsGetNCChangesCtr1_get_extended_ret,
9141 : .set = py_drsuapi_DsGetNCChangesCtr1_set_extended_ret,
9142 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedError")
9143 : },
9144 : {
9145 : .name = discard_const_p(char, "object_count"),
9146 : .get = py_drsuapi_DsGetNCChangesCtr1_get_object_count,
9147 : .set = py_drsuapi_DsGetNCChangesCtr1_set_object_count,
9148 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
9149 : },
9150 : {
9151 : .name = discard_const_p(char, "__ndr_size"),
9152 : .get = py_drsuapi_DsGetNCChangesCtr1_get___ndr_size,
9153 : .set = py_drsuapi_DsGetNCChangesCtr1_set___ndr_size,
9154 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
9155 : },
9156 : {
9157 : .name = discard_const_p(char, "first_object"),
9158 : .get = py_drsuapi_DsGetNCChangesCtr1_get_first_object,
9159 : .set = py_drsuapi_DsGetNCChangesCtr1_set_first_object,
9160 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItemEx")
9161 : },
9162 : {
9163 : .name = discard_const_p(char, "more_data"),
9164 : .get = py_drsuapi_DsGetNCChangesCtr1_get_more_data,
9165 : .set = py_drsuapi_DsGetNCChangesCtr1_set_more_data,
9166 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
9167 : },
9168 : { .name = NULL }
9169 : };
9170 :
9171 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9172 : {
9173 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesCtr1, type);
9174 : }
9175 :
9176 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
9177 : {
9178 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
9179 0 : PyObject *ret = NULL;
9180 : DATA_BLOB blob;
9181 : enum ndr_err_code err;
9182 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
9183 0 : if (tmp_ctx == NULL) {
9184 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
9185 0 : return NULL;
9186 : }
9187 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1);
9188 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
9189 0 : TALLOC_FREE(tmp_ctx);
9190 0 : PyErr_SetNdrError(err);
9191 0 : return NULL;
9192 : }
9193 :
9194 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
9195 0 : TALLOC_FREE(tmp_ctx);
9196 0 : return ret;
9197 : }
9198 :
9199 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
9200 : {
9201 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
9202 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
9203 0 : Py_ssize_t blob_length = 0;
9204 : enum ndr_err_code err;
9205 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
9206 0 : PyObject *allow_remaining_obj = NULL;
9207 0 : bool allow_remaining = false;
9208 :
9209 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
9210 : discard_const_p(char *, kwnames),
9211 : &blob.data, &blob_length,
9212 : &allow_remaining_obj)) {
9213 0 : return NULL;
9214 : }
9215 0 : blob.length = blob_length;
9216 :
9217 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
9218 0 : allow_remaining = true;
9219 : }
9220 :
9221 0 : if (allow_remaining) {
9222 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1);
9223 : } else {
9224 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1);
9225 : }
9226 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
9227 0 : PyErr_SetNdrError(err);
9228 0 : return NULL;
9229 : }
9230 :
9231 0 : Py_RETURN_NONE;
9232 : }
9233 :
9234 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
9235 : {
9236 0 : struct drsuapi_DsGetNCChangesCtr1 *object = (struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(py_obj);
9237 : PyObject *ret;
9238 : char *retstr;
9239 :
9240 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr1, "drsuapi_DsGetNCChangesCtr1", object);
9241 0 : ret = PyUnicode_FromString(retstr);
9242 0 : talloc_free(retstr);
9243 :
9244 0 : return ret;
9245 : }
9246 :
9247 : static PyMethodDef py_drsuapi_DsGetNCChangesCtr1_methods[] = {
9248 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
9249 : { "__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" },
9250 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
9251 : { NULL, NULL, 0, NULL }
9252 : };
9253 :
9254 :
9255 : static PyTypeObject drsuapi_DsGetNCChangesCtr1_Type = {
9256 : PyVarObject_HEAD_INIT(NULL, 0)
9257 : .tp_name = "drsuapi.DsGetNCChangesCtr1",
9258 : .tp_getset = py_drsuapi_DsGetNCChangesCtr1_getsetters,
9259 : .tp_methods = py_drsuapi_DsGetNCChangesCtr1_methods,
9260 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9261 : .tp_new = py_drsuapi_DsGetNCChangesCtr1_new,
9262 : };
9263 :
9264 :
9265 7920 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_identifier(PyObject *obj, void *closure)
9266 : {
9267 7920 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
9268 : PyObject *py_identifier;
9269 7920 : if (object->identifier == NULL) {
9270 0 : Py_RETURN_NONE;
9271 : }
9272 7920 : if (object->identifier == NULL) {
9273 0 : py_identifier = Py_None;
9274 0 : Py_INCREF(py_identifier);
9275 : } else {
9276 7920 : py_identifier = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->identifier, object->identifier);
9277 : }
9278 7920 : return py_identifier;
9279 : }
9280 :
9281 0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_identifier(PyObject *py_obj, PyObject *value, void *closure)
9282 : {
9283 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9284 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->identifier));
9285 0 : if (value == NULL) {
9286 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->identifier");
9287 0 : return -1;
9288 : }
9289 0 : if (value == Py_None) {
9290 0 : object->identifier = NULL;
9291 : } else {
9292 0 : object->identifier = NULL;
9293 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
9294 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9295 0 : PyErr_NoMemory();
9296 0 : return -1;
9297 : }
9298 0 : object->identifier = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
9299 : }
9300 0 : return 0;
9301 : }
9302 :
9303 7886 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_attid(PyObject *obj, void *closure)
9304 : {
9305 7886 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
9306 : PyObject *py_attid;
9307 7886 : py_attid = PyLong_FromUnsignedLongLong((uint32_t)object->attid);
9308 7886 : return py_attid;
9309 : }
9310 :
9311 0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_attid(PyObject *py_obj, PyObject *value, void *closure)
9312 : {
9313 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9314 0 : if (value == NULL) {
9315 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attid");
9316 0 : return -1;
9317 : }
9318 : {
9319 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attid));
9320 0 : if (PyLong_Check(value)) {
9321 : unsigned long long test_var;
9322 0 : test_var = PyLong_AsUnsignedLongLong(value);
9323 0 : if (PyErr_Occurred() != NULL) {
9324 0 : return -1;
9325 : }
9326 0 : if (test_var > uint_max) {
9327 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9328 : PyLong_Type.tp_name, uint_max, test_var);
9329 0 : return -1;
9330 : }
9331 0 : object->attid = test_var;
9332 : } else {
9333 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9334 : PyLong_Type.tp_name);
9335 0 : return -1;
9336 : }
9337 : }
9338 0 : return 0;
9339 : }
9340 :
9341 7913 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_value(PyObject *obj, void *closure)
9342 : {
9343 7913 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
9344 : PyObject *py_value;
9345 7913 : py_value = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, pytalloc_get_mem_ctx(obj), &object->value);
9346 7913 : return py_value;
9347 : }
9348 :
9349 0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_value(PyObject *py_obj, PyObject *value, void *closure)
9350 : {
9351 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9352 0 : if (value == NULL) {
9353 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value");
9354 0 : return -1;
9355 : }
9356 0 : PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, value, return -1;);
9357 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9358 0 : PyErr_NoMemory();
9359 0 : return -1;
9360 : }
9361 0 : object->value = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(value);
9362 0 : return 0;
9363 : }
9364 :
9365 7818 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_flags(PyObject *obj, void *closure)
9366 : {
9367 7818 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
9368 : PyObject *py_flags;
9369 7818 : py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
9370 7818 : return py_flags;
9371 : }
9372 :
9373 0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_flags(PyObject *py_obj, PyObject *value, void *closure)
9374 : {
9375 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9376 0 : if (value == NULL) {
9377 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
9378 0 : return -1;
9379 : }
9380 : {
9381 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
9382 0 : if (PyLong_Check(value)) {
9383 : unsigned long long test_var;
9384 0 : test_var = PyLong_AsUnsignedLongLong(value);
9385 0 : if (PyErr_Occurred() != NULL) {
9386 0 : return -1;
9387 : }
9388 0 : if (test_var > uint_max) {
9389 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9390 : PyLong_Type.tp_name, uint_max, test_var);
9391 0 : return -1;
9392 : }
9393 0 : object->flags = test_var;
9394 : } else {
9395 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9396 : PyLong_Type.tp_name);
9397 0 : return -1;
9398 : }
9399 : }
9400 0 : return 0;
9401 : }
9402 :
9403 0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_originating_add_time(PyObject *obj, void *closure)
9404 : {
9405 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
9406 : PyObject *py_originating_add_time;
9407 0 : py_originating_add_time = PyLong_FromUnsignedLongLong(object->originating_add_time);
9408 0 : return py_originating_add_time;
9409 : }
9410 :
9411 0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_originating_add_time(PyObject *py_obj, PyObject *value, void *closure)
9412 : {
9413 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9414 0 : if (value == NULL) {
9415 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_add_time");
9416 0 : return -1;
9417 : }
9418 : {
9419 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_add_time));
9420 0 : if (PyLong_Check(value)) {
9421 : unsigned long long test_var;
9422 0 : test_var = PyLong_AsUnsignedLongLong(value);
9423 0 : if (PyErr_Occurred() != NULL) {
9424 0 : return -1;
9425 : }
9426 0 : if (test_var > uint_max) {
9427 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9428 : PyLong_Type.tp_name, uint_max, test_var);
9429 0 : return -1;
9430 : }
9431 0 : object->originating_add_time = test_var;
9432 : } else {
9433 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9434 : PyLong_Type.tp_name);
9435 0 : return -1;
9436 : }
9437 : }
9438 0 : return 0;
9439 : }
9440 :
9441 2 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_get_meta_data(PyObject *obj, void *closure)
9442 : {
9443 2 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(obj);
9444 : PyObject *py_meta_data;
9445 2 : py_meta_data = pytalloc_reference_ex(&drsuapi_DsReplicaMetaData_Type, pytalloc_get_mem_ctx(obj), &object->meta_data);
9446 2 : return py_meta_data;
9447 : }
9448 :
9449 0 : static int py_drsuapi_DsReplicaLinkedAttribute_set_meta_data(PyObject *py_obj, PyObject *value, void *closure)
9450 : {
9451 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9452 0 : if (value == NULL) {
9453 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->meta_data");
9454 0 : return -1;
9455 : }
9456 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaMetaData_Type, value, return -1;);
9457 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9458 0 : PyErr_NoMemory();
9459 0 : return -1;
9460 : }
9461 0 : object->meta_data = *(struct drsuapi_DsReplicaMetaData *)pytalloc_get_ptr(value);
9462 0 : return 0;
9463 : }
9464 :
9465 : static PyGetSetDef py_drsuapi_DsReplicaLinkedAttribute_getsetters[] = {
9466 : {
9467 : .name = discard_const_p(char, "identifier"),
9468 : .get = py_drsuapi_DsReplicaLinkedAttribute_get_identifier,
9469 : .set = py_drsuapi_DsReplicaLinkedAttribute_set_identifier,
9470 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
9471 : },
9472 : {
9473 : .name = discard_const_p(char, "attid"),
9474 : .get = py_drsuapi_DsReplicaLinkedAttribute_get_attid,
9475 : .set = py_drsuapi_DsReplicaLinkedAttribute_set_attid,
9476 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
9477 : },
9478 : {
9479 : .name = discard_const_p(char, "value"),
9480 : .get = py_drsuapi_DsReplicaLinkedAttribute_get_value,
9481 : .set = py_drsuapi_DsReplicaLinkedAttribute_set_value,
9482 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeValue")
9483 : },
9484 : {
9485 : .name = discard_const_p(char, "flags"),
9486 : .get = py_drsuapi_DsReplicaLinkedAttribute_get_flags,
9487 : .set = py_drsuapi_DsReplicaLinkedAttribute_set_flags,
9488 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsLinkedAttributeFlags")
9489 : },
9490 : {
9491 : .name = discard_const_p(char, "originating_add_time"),
9492 : .get = py_drsuapi_DsReplicaLinkedAttribute_get_originating_add_time,
9493 : .set = py_drsuapi_DsReplicaLinkedAttribute_set_originating_add_time,
9494 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
9495 : },
9496 : {
9497 : .name = discard_const_p(char, "meta_data"),
9498 : .get = py_drsuapi_DsReplicaLinkedAttribute_get_meta_data,
9499 : .set = py_drsuapi_DsReplicaLinkedAttribute_set_meta_data,
9500 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaMetaData")
9501 : },
9502 : { .name = NULL }
9503 : };
9504 :
9505 0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
9506 : {
9507 0 : return pytalloc_new(struct drsuapi_DsReplicaLinkedAttribute, type);
9508 : }
9509 :
9510 0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
9511 : {
9512 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9513 0 : PyObject *ret = NULL;
9514 : DATA_BLOB blob;
9515 : enum ndr_err_code err;
9516 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
9517 0 : if (tmp_ctx == NULL) {
9518 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
9519 0 : return NULL;
9520 : }
9521 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaLinkedAttribute);
9522 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
9523 0 : TALLOC_FREE(tmp_ctx);
9524 0 : PyErr_SetNdrError(err);
9525 0 : return NULL;
9526 : }
9527 :
9528 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
9529 0 : TALLOC_FREE(tmp_ctx);
9530 0 : return ret;
9531 : }
9532 :
9533 0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
9534 : {
9535 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9536 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
9537 0 : Py_ssize_t blob_length = 0;
9538 : enum ndr_err_code err;
9539 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
9540 0 : PyObject *allow_remaining_obj = NULL;
9541 0 : bool allow_remaining = false;
9542 :
9543 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
9544 : discard_const_p(char *, kwnames),
9545 : &blob.data, &blob_length,
9546 : &allow_remaining_obj)) {
9547 0 : return NULL;
9548 : }
9549 0 : blob.length = blob_length;
9550 :
9551 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
9552 0 : allow_remaining = true;
9553 : }
9554 :
9555 0 : if (allow_remaining) {
9556 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaLinkedAttribute);
9557 : } else {
9558 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaLinkedAttribute);
9559 : }
9560 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
9561 0 : PyErr_SetNdrError(err);
9562 0 : return NULL;
9563 : }
9564 :
9565 0 : Py_RETURN_NONE;
9566 : }
9567 :
9568 0 : static PyObject *py_drsuapi_DsReplicaLinkedAttribute_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
9569 : {
9570 0 : struct drsuapi_DsReplicaLinkedAttribute *object = (struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(py_obj);
9571 : PyObject *ret;
9572 : char *retstr;
9573 :
9574 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaLinkedAttribute, "drsuapi_DsReplicaLinkedAttribute", object);
9575 0 : ret = PyUnicode_FromString(retstr);
9576 0 : talloc_free(retstr);
9577 :
9578 0 : return ret;
9579 : }
9580 :
9581 : static PyMethodDef py_drsuapi_DsReplicaLinkedAttribute_methods[] = {
9582 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaLinkedAttribute_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
9583 : { "__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" },
9584 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaLinkedAttribute_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
9585 : { NULL, NULL, 0, NULL }
9586 : };
9587 :
9588 :
9589 : static PyTypeObject drsuapi_DsReplicaLinkedAttribute_Type = {
9590 : PyVarObject_HEAD_INIT(NULL, 0)
9591 : .tp_name = "drsuapi.DsReplicaLinkedAttribute",
9592 : .tp_getset = py_drsuapi_DsReplicaLinkedAttribute_getsetters,
9593 : .tp_methods = py_drsuapi_DsReplicaLinkedAttribute_methods,
9594 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
9595 : .tp_new = py_drsuapi_DsReplicaLinkedAttribute_new,
9596 : };
9597 :
9598 :
9599 605 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_guid(PyObject *obj, void *closure)
9600 : {
9601 605 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9602 : PyObject *py_source_dsa_guid;
9603 605 : py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
9604 605 : return py_source_dsa_guid;
9605 : }
9606 :
9607 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
9608 : {
9609 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9610 0 : if (value == NULL) {
9611 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
9612 0 : return -1;
9613 : }
9614 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
9615 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9616 0 : PyErr_NoMemory();
9617 0 : return -1;
9618 : }
9619 0 : object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
9620 0 : return 0;
9621 : }
9622 :
9623 605 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_invocation_id(PyObject *obj, void *closure)
9624 : {
9625 605 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9626 : PyObject *py_source_dsa_invocation_id;
9627 605 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
9628 605 : return py_source_dsa_invocation_id;
9629 : }
9630 :
9631 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
9632 : {
9633 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9634 0 : if (value == NULL) {
9635 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
9636 0 : return -1;
9637 : }
9638 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
9639 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9640 0 : PyErr_NoMemory();
9641 0 : return -1;
9642 : }
9643 0 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
9644 0 : return 0;
9645 : }
9646 :
9647 606 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_naming_context(PyObject *obj, void *closure)
9648 : {
9649 606 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9650 : PyObject *py_naming_context;
9651 606 : if (object->naming_context == NULL) {
9652 0 : Py_RETURN_NONE;
9653 : }
9654 606 : if (object->naming_context == NULL) {
9655 0 : py_naming_context = Py_None;
9656 0 : Py_INCREF(py_naming_context);
9657 : } else {
9658 606 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
9659 : }
9660 606 : return py_naming_context;
9661 : }
9662 :
9663 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
9664 : {
9665 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9666 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
9667 0 : if (value == NULL) {
9668 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
9669 0 : return -1;
9670 : }
9671 0 : if (value == Py_None) {
9672 0 : object->naming_context = NULL;
9673 : } else {
9674 0 : object->naming_context = NULL;
9675 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
9676 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9677 0 : PyErr_NoMemory();
9678 0 : return -1;
9679 : }
9680 0 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
9681 : }
9682 0 : return 0;
9683 : }
9684 :
9685 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_old_highwatermark(PyObject *obj, void *closure)
9686 : {
9687 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9688 : PyObject *py_old_highwatermark;
9689 0 : py_old_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->old_highwatermark);
9690 0 : return py_old_highwatermark;
9691 : }
9692 :
9693 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_old_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
9694 : {
9695 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9696 0 : if (value == NULL) {
9697 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->old_highwatermark");
9698 0 : return -1;
9699 : }
9700 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
9701 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9702 0 : PyErr_NoMemory();
9703 0 : return -1;
9704 : }
9705 0 : object->old_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
9706 0 : return 0;
9707 : }
9708 :
9709 2702 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_new_highwatermark(PyObject *obj, void *closure)
9710 : {
9711 2702 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9712 : PyObject *py_new_highwatermark;
9713 2702 : py_new_highwatermark = pytalloc_reference_ex(&drsuapi_DsReplicaHighWaterMark_Type, pytalloc_get_mem_ctx(obj), &object->new_highwatermark);
9714 2702 : return py_new_highwatermark;
9715 : }
9716 :
9717 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_new_highwatermark(PyObject *py_obj, PyObject *value, void *closure)
9718 : {
9719 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9720 0 : if (value == NULL) {
9721 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->new_highwatermark");
9722 0 : return -1;
9723 : }
9724 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaHighWaterMark_Type, value, return -1;);
9725 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9726 0 : PyErr_NoMemory();
9727 0 : return -1;
9728 : }
9729 0 : object->new_highwatermark = *(struct drsuapi_DsReplicaHighWaterMark *)pytalloc_get_ptr(value);
9730 0 : return 0;
9731 : }
9732 :
9733 520 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_uptodateness_vector(PyObject *obj, void *closure)
9734 : {
9735 520 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9736 : PyObject *py_uptodateness_vector;
9737 520 : if (object->uptodateness_vector == NULL) {
9738 408 : Py_RETURN_NONE;
9739 : }
9740 112 : if (object->uptodateness_vector == NULL) {
9741 0 : py_uptodateness_vector = Py_None;
9742 0 : Py_INCREF(py_uptodateness_vector);
9743 : } else {
9744 112 : py_uptodateness_vector = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2CtrEx_Type, object->uptodateness_vector, object->uptodateness_vector);
9745 : }
9746 112 : return py_uptodateness_vector;
9747 : }
9748 :
9749 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_uptodateness_vector(PyObject *py_obj, PyObject *value, void *closure)
9750 : {
9751 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9752 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->uptodateness_vector));
9753 0 : if (value == NULL) {
9754 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->uptodateness_vector");
9755 0 : return -1;
9756 : }
9757 0 : if (value == Py_None) {
9758 0 : object->uptodateness_vector = NULL;
9759 : } else {
9760 0 : object->uptodateness_vector = NULL;
9761 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2CtrEx_Type, value, return -1;);
9762 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9763 0 : PyErr_NoMemory();
9764 0 : return -1;
9765 : }
9766 0 : object->uptodateness_vector = (struct drsuapi_DsReplicaCursor2CtrEx *)pytalloc_get_ptr(value);
9767 : }
9768 0 : return 0;
9769 : }
9770 :
9771 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_mapping_ctr(PyObject *obj, void *closure)
9772 : {
9773 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9774 : PyObject *py_mapping_ctr;
9775 0 : py_mapping_ctr = pytalloc_reference_ex(&drsuapi_DsReplicaOIDMapping_Ctr_Type, pytalloc_get_mem_ctx(obj), &object->mapping_ctr);
9776 0 : return py_mapping_ctr;
9777 : }
9778 :
9779 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_mapping_ctr(PyObject *py_obj, PyObject *value, void *closure)
9780 : {
9781 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9782 0 : if (value == NULL) {
9783 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mapping_ctr");
9784 0 : return -1;
9785 : }
9786 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaOIDMapping_Ctr_Type, value, return -1;);
9787 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9788 0 : PyErr_NoMemory();
9789 0 : return -1;
9790 : }
9791 0 : object->mapping_ctr = *(struct drsuapi_DsReplicaOIDMapping_Ctr *)pytalloc_get_ptr(value);
9792 0 : return 0;
9793 : }
9794 :
9795 611 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_extended_ret(PyObject *obj, void *closure)
9796 : {
9797 611 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9798 : PyObject *py_extended_ret;
9799 611 : py_extended_ret = PyLong_FromUnsignedLongLong((uint32_t)object->extended_ret);
9800 611 : return py_extended_ret;
9801 : }
9802 :
9803 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_extended_ret(PyObject *py_obj, PyObject *value, void *closure)
9804 : {
9805 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9806 0 : if (value == NULL) {
9807 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_ret");
9808 0 : return -1;
9809 : }
9810 : {
9811 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_ret));
9812 0 : if (PyLong_Check(value)) {
9813 : unsigned long long test_var;
9814 0 : test_var = PyLong_AsUnsignedLongLong(value);
9815 0 : if (PyErr_Occurred() != NULL) {
9816 0 : return -1;
9817 : }
9818 0 : if (test_var > uint_max) {
9819 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9820 : PyLong_Type.tp_name, uint_max, test_var);
9821 0 : return -1;
9822 : }
9823 0 : object->extended_ret = test_var;
9824 : } else {
9825 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9826 : PyLong_Type.tp_name);
9827 0 : return -1;
9828 : }
9829 : }
9830 0 : return 0;
9831 : }
9832 :
9833 4467 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_object_count(PyObject *obj, void *closure)
9834 : {
9835 4467 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9836 : PyObject *py_object_count;
9837 4467 : py_object_count = PyLong_FromUnsignedLongLong((uint32_t)object->object_count);
9838 4467 : return py_object_count;
9839 : }
9840 :
9841 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_object_count(PyObject *py_obj, PyObject *value, void *closure)
9842 : {
9843 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9844 0 : if (value == NULL) {
9845 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_count");
9846 0 : return -1;
9847 : }
9848 : {
9849 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->object_count));
9850 0 : if (PyLong_Check(value)) {
9851 : unsigned long long test_var;
9852 0 : test_var = PyLong_AsUnsignedLongLong(value);
9853 0 : if (PyErr_Occurred() != NULL) {
9854 0 : return -1;
9855 : }
9856 0 : if (test_var > uint_max) {
9857 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9858 : PyLong_Type.tp_name, uint_max, test_var);
9859 0 : return -1;
9860 : }
9861 0 : object->object_count = test_var;
9862 : } else {
9863 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9864 : PyLong_Type.tp_name);
9865 0 : return -1;
9866 : }
9867 : }
9868 0 : return 0;
9869 : }
9870 :
9871 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get___ndr_size(PyObject *obj, void *closure)
9872 : {
9873 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9874 : PyObject *py___ndr_size;
9875 0 : py___ndr_size = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size);
9876 0 : return py___ndr_size;
9877 : }
9878 :
9879 0 : static int py_drsuapi_DsGetNCChangesCtr6_set___ndr_size(PyObject *py_obj, PyObject *value, void *closure)
9880 : {
9881 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9882 0 : if (value == NULL) {
9883 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size");
9884 0 : return -1;
9885 : }
9886 : {
9887 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size));
9888 0 : if (PyLong_Check(value)) {
9889 : unsigned long long test_var;
9890 0 : test_var = PyLong_AsUnsignedLongLong(value);
9891 0 : if (PyErr_Occurred() != NULL) {
9892 0 : return -1;
9893 : }
9894 0 : if (test_var > uint_max) {
9895 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9896 : PyLong_Type.tp_name, uint_max, test_var);
9897 0 : return -1;
9898 : }
9899 0 : object->__ndr_size = test_var;
9900 : } else {
9901 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9902 : PyLong_Type.tp_name);
9903 0 : return -1;
9904 : }
9905 : }
9906 0 : return 0;
9907 : }
9908 :
9909 4590 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_first_object(PyObject *obj, void *closure)
9910 : {
9911 4590 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9912 : PyObject *py_first_object;
9913 4590 : if (object->first_object == NULL) {
9914 250 : Py_RETURN_NONE;
9915 : }
9916 4340 : if (object->first_object == NULL) {
9917 0 : py_first_object = Py_None;
9918 0 : Py_INCREF(py_first_object);
9919 : } else {
9920 4340 : py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItemEx_Type, object->first_object, object->first_object);
9921 : }
9922 4340 : return py_first_object;
9923 : }
9924 :
9925 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
9926 : {
9927 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9928 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->first_object));
9929 0 : if (value == NULL) {
9930 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_object");
9931 0 : return -1;
9932 : }
9933 0 : if (value == Py_None) {
9934 0 : object->first_object = NULL;
9935 : } else {
9936 0 : object->first_object = NULL;
9937 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItemEx_Type, value, return -1;);
9938 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9939 0 : PyErr_NoMemory();
9940 0 : return -1;
9941 : }
9942 0 : object->first_object = (struct drsuapi_DsReplicaObjectListItemEx *)pytalloc_get_ptr(value);
9943 : }
9944 0 : return 0;
9945 : }
9946 :
9947 2687 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_more_data(PyObject *obj, void *closure)
9948 : {
9949 2687 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9950 : PyObject *py_more_data;
9951 2687 : py_more_data = PyLong_FromUnsignedLongLong((uint32_t)object->more_data);
9952 2687 : return py_more_data;
9953 : }
9954 :
9955 1 : static int py_drsuapi_DsGetNCChangesCtr6_set_more_data(PyObject *py_obj, PyObject *value, void *closure)
9956 : {
9957 1 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9958 1 : if (value == NULL) {
9959 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->more_data");
9960 0 : return -1;
9961 : }
9962 : {
9963 1 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->more_data));
9964 1 : if (PyLong_Check(value)) {
9965 : unsigned long long test_var;
9966 1 : test_var = PyLong_AsUnsignedLongLong(value);
9967 1 : if (PyErr_Occurred() != NULL) {
9968 0 : return -1;
9969 : }
9970 1 : if (test_var > uint_max) {
9971 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9972 : PyLong_Type.tp_name, uint_max, test_var);
9973 0 : return -1;
9974 : }
9975 1 : object->more_data = test_var;
9976 : } else {
9977 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9978 : PyLong_Type.tp_name);
9979 0 : return -1;
9980 : }
9981 : }
9982 1 : return 0;
9983 : }
9984 :
9985 164 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_nc_object_count(PyObject *obj, void *closure)
9986 : {
9987 164 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
9988 : PyObject *py_nc_object_count;
9989 164 : py_nc_object_count = PyLong_FromUnsignedLongLong((uint32_t)object->nc_object_count);
9990 164 : return py_nc_object_count;
9991 : }
9992 :
9993 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_nc_object_count(PyObject *py_obj, PyObject *value, void *closure)
9994 : {
9995 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
9996 0 : if (value == NULL) {
9997 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nc_object_count");
9998 0 : return -1;
9999 : }
10000 : {
10001 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nc_object_count));
10002 0 : if (PyLong_Check(value)) {
10003 : unsigned long long test_var;
10004 0 : test_var = PyLong_AsUnsignedLongLong(value);
10005 0 : if (PyErr_Occurred() != NULL) {
10006 0 : return -1;
10007 : }
10008 0 : if (test_var > uint_max) {
10009 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10010 : PyLong_Type.tp_name, uint_max, test_var);
10011 0 : return -1;
10012 : }
10013 0 : object->nc_object_count = test_var;
10014 : } else {
10015 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10016 : PyLong_Type.tp_name);
10017 0 : return -1;
10018 : }
10019 : }
10020 0 : return 0;
10021 : }
10022 :
10023 164 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_nc_linked_attributes_count(PyObject *obj, void *closure)
10024 : {
10025 164 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
10026 : PyObject *py_nc_linked_attributes_count;
10027 164 : py_nc_linked_attributes_count = PyLong_FromUnsignedLongLong((uint32_t)object->nc_linked_attributes_count);
10028 164 : return py_nc_linked_attributes_count;
10029 : }
10030 :
10031 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_nc_linked_attributes_count(PyObject *py_obj, PyObject *value, void *closure)
10032 : {
10033 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
10034 0 : if (value == NULL) {
10035 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nc_linked_attributes_count");
10036 0 : return -1;
10037 : }
10038 : {
10039 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->nc_linked_attributes_count));
10040 0 : if (PyLong_Check(value)) {
10041 : unsigned long long test_var;
10042 0 : test_var = PyLong_AsUnsignedLongLong(value);
10043 0 : if (PyErr_Occurred() != NULL) {
10044 0 : return -1;
10045 : }
10046 0 : if (test_var > uint_max) {
10047 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10048 : PyLong_Type.tp_name, uint_max, test_var);
10049 0 : return -1;
10050 : }
10051 0 : object->nc_linked_attributes_count = test_var;
10052 : } else {
10053 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10054 : PyLong_Type.tp_name);
10055 0 : return -1;
10056 : }
10057 : }
10058 0 : return 0;
10059 : }
10060 :
10061 2657 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes_count(PyObject *obj, void *closure)
10062 : {
10063 2657 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
10064 : PyObject *py_linked_attributes_count;
10065 2657 : py_linked_attributes_count = PyLong_FromUnsignedLongLong((uint32_t)object->linked_attributes_count);
10066 2657 : return py_linked_attributes_count;
10067 : }
10068 :
10069 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes_count(PyObject *py_obj, PyObject *value, void *closure)
10070 : {
10071 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
10072 0 : if (value == NULL) {
10073 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linked_attributes_count");
10074 0 : return -1;
10075 : }
10076 : {
10077 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->linked_attributes_count));
10078 0 : if (PyLong_Check(value)) {
10079 : unsigned long long test_var;
10080 0 : test_var = PyLong_AsUnsignedLongLong(value);
10081 0 : if (PyErr_Occurred() != NULL) {
10082 0 : return -1;
10083 : }
10084 0 : if (test_var > uint_max) {
10085 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10086 : PyLong_Type.tp_name, uint_max, test_var);
10087 0 : return -1;
10088 : }
10089 0 : object->linked_attributes_count = test_var;
10090 : } else {
10091 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10092 : PyLong_Type.tp_name);
10093 0 : return -1;
10094 : }
10095 : }
10096 0 : return 0;
10097 : }
10098 :
10099 7639 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes(PyObject *obj, void *closure)
10100 : {
10101 7639 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
10102 : PyObject *py_linked_attributes;
10103 7639 : if (object->linked_attributes == NULL) {
10104 0 : Py_RETURN_NONE;
10105 : }
10106 7639 : if (object->linked_attributes == NULL) {
10107 0 : py_linked_attributes = Py_None;
10108 0 : Py_INCREF(py_linked_attributes);
10109 : } else {
10110 7639 : py_linked_attributes = PyList_New(object->linked_attributes_count);
10111 7639 : if (py_linked_attributes == NULL) {
10112 0 : return NULL;
10113 : }
10114 : {
10115 : int linked_attributes_cntr_1;
10116 1220977 : for (linked_attributes_cntr_1 = 0; linked_attributes_cntr_1 < (object->linked_attributes_count); linked_attributes_cntr_1++) {
10117 : PyObject *py_linked_attributes_1;
10118 1213338 : py_linked_attributes_1 = pytalloc_reference_ex(&drsuapi_DsReplicaLinkedAttribute_Type, object->linked_attributes, &object->linked_attributes[linked_attributes_cntr_1]);
10119 1213338 : PyList_SetItem(py_linked_attributes, linked_attributes_cntr_1, py_linked_attributes_1);
10120 : }
10121 : }
10122 : }
10123 7639 : return py_linked_attributes;
10124 : }
10125 :
10126 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes(PyObject *py_obj, PyObject *value, void *closure)
10127 : {
10128 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
10129 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->linked_attributes));
10130 0 : if (value == NULL) {
10131 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linked_attributes");
10132 0 : return -1;
10133 : }
10134 0 : if (value == Py_None) {
10135 0 : object->linked_attributes = NULL;
10136 : } else {
10137 0 : object->linked_attributes = NULL;
10138 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
10139 : {
10140 : int linked_attributes_cntr_1;
10141 0 : object->linked_attributes = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->linked_attributes, PyList_GET_SIZE(value));
10142 0 : if (!object->linked_attributes) { return -1;; }
10143 0 : talloc_set_name_const(object->linked_attributes, "ARRAY: object->linked_attributes");
10144 0 : for (linked_attributes_cntr_1 = 0; linked_attributes_cntr_1 < PyList_GET_SIZE(value); linked_attributes_cntr_1++) {
10145 0 : if (PyList_GET_ITEM(value, linked_attributes_cntr_1) == NULL) {
10146 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->linked_attributes[linked_attributes_cntr_1]");
10147 0 : return -1;
10148 : }
10149 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaLinkedAttribute_Type, PyList_GET_ITEM(value, linked_attributes_cntr_1), return -1;);
10150 0 : if (talloc_reference(object->linked_attributes, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, linked_attributes_cntr_1))) == NULL) {
10151 0 : PyErr_NoMemory();
10152 0 : return -1;
10153 : }
10154 0 : object->linked_attributes[linked_attributes_cntr_1] = *(struct drsuapi_DsReplicaLinkedAttribute *)pytalloc_get_ptr(PyList_GET_ITEM(value, linked_attributes_cntr_1));
10155 : }
10156 : }
10157 : }
10158 0 : return 0;
10159 : }
10160 :
10161 164 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_get_drs_error(PyObject *obj, void *closure)
10162 : {
10163 164 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(obj);
10164 : PyObject *py_drs_error;
10165 164 : py_drs_error = PyErr_FromWERROR(object->drs_error);
10166 164 : return py_drs_error;
10167 : }
10168 :
10169 0 : static int py_drsuapi_DsGetNCChangesCtr6_set_drs_error(PyObject *py_obj, PyObject *value, void *closure)
10170 : {
10171 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
10172 0 : if (value == NULL) {
10173 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->drs_error");
10174 0 : return -1;
10175 : }
10176 0 : object->drs_error = W_ERROR(PyLong_AsLong(value));
10177 0 : return 0;
10178 : }
10179 :
10180 : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr6_getsetters[] = {
10181 : {
10182 : .name = discard_const_p(char, "source_dsa_guid"),
10183 : .get = py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_guid,
10184 : .set = py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_guid,
10185 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
10186 : },
10187 : {
10188 : .name = discard_const_p(char, "source_dsa_invocation_id"),
10189 : .get = py_drsuapi_DsGetNCChangesCtr6_get_source_dsa_invocation_id,
10190 : .set = py_drsuapi_DsGetNCChangesCtr6_set_source_dsa_invocation_id,
10191 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
10192 : },
10193 : {
10194 : .name = discard_const_p(char, "naming_context"),
10195 : .get = py_drsuapi_DsGetNCChangesCtr6_get_naming_context,
10196 : .set = py_drsuapi_DsGetNCChangesCtr6_set_naming_context,
10197 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
10198 : },
10199 : {
10200 : .name = discard_const_p(char, "old_highwatermark"),
10201 : .get = py_drsuapi_DsGetNCChangesCtr6_get_old_highwatermark,
10202 : .set = py_drsuapi_DsGetNCChangesCtr6_set_old_highwatermark,
10203 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
10204 : },
10205 : {
10206 : .name = discard_const_p(char, "new_highwatermark"),
10207 : .get = py_drsuapi_DsGetNCChangesCtr6_get_new_highwatermark,
10208 : .set = py_drsuapi_DsGetNCChangesCtr6_set_new_highwatermark,
10209 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaHighWaterMark")
10210 : },
10211 : {
10212 : .name = discard_const_p(char, "uptodateness_vector"),
10213 : .get = py_drsuapi_DsGetNCChangesCtr6_get_uptodateness_vector,
10214 : .set = py_drsuapi_DsGetNCChangesCtr6_set_uptodateness_vector,
10215 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor2CtrEx")
10216 : },
10217 : {
10218 : .name = discard_const_p(char, "mapping_ctr"),
10219 : .get = py_drsuapi_DsGetNCChangesCtr6_get_mapping_ctr,
10220 : .set = py_drsuapi_DsGetNCChangesCtr6_set_mapping_ctr,
10221 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOIDMapping_Ctr")
10222 : },
10223 : {
10224 : .name = discard_const_p(char, "extended_ret"),
10225 : .get = py_drsuapi_DsGetNCChangesCtr6_get_extended_ret,
10226 : .set = py_drsuapi_DsGetNCChangesCtr6_set_extended_ret,
10227 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExtendedError")
10228 : },
10229 : {
10230 : .name = discard_const_p(char, "object_count"),
10231 : .get = py_drsuapi_DsGetNCChangesCtr6_get_object_count,
10232 : .set = py_drsuapi_DsGetNCChangesCtr6_set_object_count,
10233 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10234 : },
10235 : {
10236 : .name = discard_const_p(char, "__ndr_size"),
10237 : .get = py_drsuapi_DsGetNCChangesCtr6_get___ndr_size,
10238 : .set = py_drsuapi_DsGetNCChangesCtr6_set___ndr_size,
10239 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10240 : },
10241 : {
10242 : .name = discard_const_p(char, "first_object"),
10243 : .get = py_drsuapi_DsGetNCChangesCtr6_get_first_object,
10244 : .set = py_drsuapi_DsGetNCChangesCtr6_set_first_object,
10245 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItemEx")
10246 : },
10247 : {
10248 : .name = discard_const_p(char, "more_data"),
10249 : .get = py_drsuapi_DsGetNCChangesCtr6_get_more_data,
10250 : .set = py_drsuapi_DsGetNCChangesCtr6_set_more_data,
10251 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10252 : },
10253 : {
10254 : .name = discard_const_p(char, "nc_object_count"),
10255 : .get = py_drsuapi_DsGetNCChangesCtr6_get_nc_object_count,
10256 : .set = py_drsuapi_DsGetNCChangesCtr6_set_nc_object_count,
10257 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10258 : },
10259 : {
10260 : .name = discard_const_p(char, "nc_linked_attributes_count"),
10261 : .get = py_drsuapi_DsGetNCChangesCtr6_get_nc_linked_attributes_count,
10262 : .set = py_drsuapi_DsGetNCChangesCtr6_set_nc_linked_attributes_count,
10263 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10264 : },
10265 : {
10266 : .name = discard_const_p(char, "linked_attributes_count"),
10267 : .get = py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes_count,
10268 : .set = py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes_count,
10269 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10270 : },
10271 : {
10272 : .name = discard_const_p(char, "linked_attributes"),
10273 : .get = py_drsuapi_DsGetNCChangesCtr6_get_linked_attributes,
10274 : .set = py_drsuapi_DsGetNCChangesCtr6_set_linked_attributes,
10275 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaLinkedAttribute")
10276 : },
10277 : {
10278 : .name = discard_const_p(char, "drs_error"),
10279 : .get = py_drsuapi_DsGetNCChangesCtr6_get_drs_error,
10280 : .set = py_drsuapi_DsGetNCChangesCtr6_set_drs_error,
10281 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
10282 : },
10283 : { .name = NULL }
10284 : };
10285 :
10286 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10287 : {
10288 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesCtr6, type);
10289 : }
10290 :
10291 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
10292 : {
10293 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
10294 0 : PyObject *ret = NULL;
10295 : DATA_BLOB blob;
10296 : enum ndr_err_code err;
10297 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
10298 0 : if (tmp_ctx == NULL) {
10299 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
10300 0 : return NULL;
10301 : }
10302 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6);
10303 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
10304 0 : TALLOC_FREE(tmp_ctx);
10305 0 : PyErr_SetNdrError(err);
10306 0 : return NULL;
10307 : }
10308 :
10309 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
10310 0 : TALLOC_FREE(tmp_ctx);
10311 0 : return ret;
10312 : }
10313 :
10314 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
10315 : {
10316 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
10317 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
10318 0 : Py_ssize_t blob_length = 0;
10319 : enum ndr_err_code err;
10320 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
10321 0 : PyObject *allow_remaining_obj = NULL;
10322 0 : bool allow_remaining = false;
10323 :
10324 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
10325 : discard_const_p(char *, kwnames),
10326 : &blob.data, &blob_length,
10327 : &allow_remaining_obj)) {
10328 0 : return NULL;
10329 : }
10330 0 : blob.length = blob_length;
10331 :
10332 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
10333 0 : allow_remaining = true;
10334 : }
10335 :
10336 0 : if (allow_remaining) {
10337 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6);
10338 : } else {
10339 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6);
10340 : }
10341 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
10342 0 : PyErr_SetNdrError(err);
10343 0 : return NULL;
10344 : }
10345 :
10346 0 : Py_RETURN_NONE;
10347 : }
10348 :
10349 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
10350 : {
10351 0 : struct drsuapi_DsGetNCChangesCtr6 *object = (struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(py_obj);
10352 : PyObject *ret;
10353 : char *retstr;
10354 :
10355 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr6, "drsuapi_DsGetNCChangesCtr6", object);
10356 0 : ret = PyUnicode_FromString(retstr);
10357 0 : talloc_free(retstr);
10358 :
10359 0 : return ret;
10360 : }
10361 :
10362 : static PyMethodDef py_drsuapi_DsGetNCChangesCtr6_methods[] = {
10363 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
10364 : { "__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" },
10365 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
10366 : { NULL, NULL, 0, NULL }
10367 : };
10368 :
10369 :
10370 : static PyTypeObject drsuapi_DsGetNCChangesCtr6_Type = {
10371 : PyVarObject_HEAD_INIT(NULL, 0)
10372 : .tp_name = "drsuapi.DsGetNCChangesCtr6",
10373 : .tp_getset = py_drsuapi_DsGetNCChangesCtr6_getsetters,
10374 : .tp_methods = py_drsuapi_DsGetNCChangesCtr6_methods,
10375 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10376 : .tp_new = py_drsuapi_DsGetNCChangesCtr6_new,
10377 : };
10378 :
10379 :
10380 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_get_ctr1(PyObject *obj, void *closure)
10381 : {
10382 0 : struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(obj);
10383 : PyObject *py_ctr1;
10384 0 : py_ctr1 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1_Type, pytalloc_get_mem_ctx(obj), &object->ctr1);
10385 0 : return py_ctr1;
10386 : }
10387 :
10388 0 : static int py_drsuapi_DsGetNCChangesCtr1TS_set_ctr1(PyObject *py_obj, PyObject *value, void *closure)
10389 : {
10390 0 : struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(py_obj);
10391 0 : if (value == NULL) {
10392 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr1");
10393 0 : return -1;
10394 : }
10395 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1_Type, value, return -1;);
10396 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
10397 0 : PyErr_NoMemory();
10398 0 : return -1;
10399 : }
10400 0 : object->ctr1 = *(struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(value);
10401 0 : return 0;
10402 : }
10403 :
10404 : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr1TS_getsetters[] = {
10405 : {
10406 : .name = discard_const_p(char, "ctr1"),
10407 : .get = py_drsuapi_DsGetNCChangesCtr1TS_get_ctr1,
10408 : .set = py_drsuapi_DsGetNCChangesCtr1TS_set_ctr1,
10409 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr1")
10410 : },
10411 : { .name = NULL }
10412 : };
10413 :
10414 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10415 : {
10416 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesCtr1TS, type);
10417 : }
10418 :
10419 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
10420 : {
10421 0 : struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(py_obj);
10422 0 : PyObject *ret = NULL;
10423 : DATA_BLOB blob;
10424 : enum ndr_err_code err;
10425 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
10426 0 : if (tmp_ctx == NULL) {
10427 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
10428 0 : return NULL;
10429 : }
10430 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr1TS);
10431 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
10432 0 : TALLOC_FREE(tmp_ctx);
10433 0 : PyErr_SetNdrError(err);
10434 0 : return NULL;
10435 : }
10436 :
10437 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
10438 0 : TALLOC_FREE(tmp_ctx);
10439 0 : return ret;
10440 : }
10441 :
10442 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
10443 : {
10444 0 : struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(py_obj);
10445 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
10446 0 : Py_ssize_t blob_length = 0;
10447 : enum ndr_err_code err;
10448 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
10449 0 : PyObject *allow_remaining_obj = NULL;
10450 0 : bool allow_remaining = false;
10451 :
10452 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
10453 : discard_const_p(char *, kwnames),
10454 : &blob.data, &blob_length,
10455 : &allow_remaining_obj)) {
10456 0 : return NULL;
10457 : }
10458 0 : blob.length = blob_length;
10459 :
10460 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
10461 0 : allow_remaining = true;
10462 : }
10463 :
10464 0 : if (allow_remaining) {
10465 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1TS);
10466 : } else {
10467 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr1TS);
10468 : }
10469 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
10470 0 : PyErr_SetNdrError(err);
10471 0 : return NULL;
10472 : }
10473 :
10474 0 : Py_RETURN_NONE;
10475 : }
10476 :
10477 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr1TS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
10478 : {
10479 0 : struct drsuapi_DsGetNCChangesCtr1TS *object = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(py_obj);
10480 : PyObject *ret;
10481 : char *retstr;
10482 :
10483 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr1TS, "drsuapi_DsGetNCChangesCtr1TS", object);
10484 0 : ret = PyUnicode_FromString(retstr);
10485 0 : talloc_free(retstr);
10486 :
10487 0 : return ret;
10488 : }
10489 :
10490 : static PyMethodDef py_drsuapi_DsGetNCChangesCtr1TS_methods[] = {
10491 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1TS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
10492 : { "__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" },
10493 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr1TS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
10494 : { NULL, NULL, 0, NULL }
10495 : };
10496 :
10497 :
10498 : static PyTypeObject drsuapi_DsGetNCChangesCtr1TS_Type = {
10499 : PyVarObject_HEAD_INIT(NULL, 0)
10500 : .tp_name = "drsuapi.DsGetNCChangesCtr1TS",
10501 : .tp_getset = py_drsuapi_DsGetNCChangesCtr1TS_getsetters,
10502 : .tp_methods = py_drsuapi_DsGetNCChangesCtr1TS_methods,
10503 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10504 : .tp_new = py_drsuapi_DsGetNCChangesCtr1TS_new,
10505 : };
10506 :
10507 :
10508 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_get_ctr6(PyObject *obj, void *closure)
10509 : {
10510 0 : struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(obj);
10511 : PyObject *py_ctr6;
10512 0 : py_ctr6 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6_Type, pytalloc_get_mem_ctx(obj), &object->ctr6);
10513 0 : return py_ctr6;
10514 : }
10515 :
10516 0 : static int py_drsuapi_DsGetNCChangesCtr6TS_set_ctr6(PyObject *py_obj, PyObject *value, void *closure)
10517 : {
10518 0 : struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(py_obj);
10519 0 : if (value == NULL) {
10520 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr6");
10521 0 : return -1;
10522 : }
10523 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6_Type, value, return -1;);
10524 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
10525 0 : PyErr_NoMemory();
10526 0 : return -1;
10527 : }
10528 0 : object->ctr6 = *(struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(value);
10529 0 : return 0;
10530 : }
10531 :
10532 : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr6TS_getsetters[] = {
10533 : {
10534 : .name = discard_const_p(char, "ctr6"),
10535 : .get = py_drsuapi_DsGetNCChangesCtr6TS_get_ctr6,
10536 : .set = py_drsuapi_DsGetNCChangesCtr6TS_set_ctr6,
10537 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr6")
10538 : },
10539 : { .name = NULL }
10540 : };
10541 :
10542 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10543 : {
10544 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesCtr6TS, type);
10545 : }
10546 :
10547 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
10548 : {
10549 0 : struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(py_obj);
10550 0 : PyObject *ret = NULL;
10551 : DATA_BLOB blob;
10552 : enum ndr_err_code err;
10553 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
10554 0 : if (tmp_ctx == NULL) {
10555 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
10556 0 : return NULL;
10557 : }
10558 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsGetNCChangesCtr6TS);
10559 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
10560 0 : TALLOC_FREE(tmp_ctx);
10561 0 : PyErr_SetNdrError(err);
10562 0 : return NULL;
10563 : }
10564 :
10565 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
10566 0 : TALLOC_FREE(tmp_ctx);
10567 0 : return ret;
10568 : }
10569 :
10570 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
10571 : {
10572 0 : struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(py_obj);
10573 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
10574 0 : Py_ssize_t blob_length = 0;
10575 : enum ndr_err_code err;
10576 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
10577 0 : PyObject *allow_remaining_obj = NULL;
10578 0 : bool allow_remaining = false;
10579 :
10580 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
10581 : discard_const_p(char *, kwnames),
10582 : &blob.data, &blob_length,
10583 : &allow_remaining_obj)) {
10584 0 : return NULL;
10585 : }
10586 0 : blob.length = blob_length;
10587 :
10588 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
10589 0 : allow_remaining = true;
10590 : }
10591 :
10592 0 : if (allow_remaining) {
10593 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6TS);
10594 : } else {
10595 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsGetNCChangesCtr6TS);
10596 : }
10597 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
10598 0 : PyErr_SetNdrError(err);
10599 0 : return NULL;
10600 : }
10601 :
10602 0 : Py_RETURN_NONE;
10603 : }
10604 :
10605 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr6TS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
10606 : {
10607 0 : struct drsuapi_DsGetNCChangesCtr6TS *object = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(py_obj);
10608 : PyObject *ret;
10609 : char *retstr;
10610 :
10611 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsGetNCChangesCtr6TS, "drsuapi_DsGetNCChangesCtr6TS", object);
10612 0 : ret = PyUnicode_FromString(retstr);
10613 0 : talloc_free(retstr);
10614 :
10615 0 : return ret;
10616 : }
10617 :
10618 : static PyMethodDef py_drsuapi_DsGetNCChangesCtr6TS_methods[] = {
10619 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6TS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
10620 : { "__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" },
10621 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsGetNCChangesCtr6TS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
10622 : { NULL, NULL, 0, NULL }
10623 : };
10624 :
10625 :
10626 : static PyTypeObject drsuapi_DsGetNCChangesCtr6TS_Type = {
10627 : PyVarObject_HEAD_INIT(NULL, 0)
10628 : .tp_name = "drsuapi.DsGetNCChangesCtr6TS",
10629 : .tp_getset = py_drsuapi_DsGetNCChangesCtr6TS_getsetters,
10630 : .tp_methods = py_drsuapi_DsGetNCChangesCtr6TS_methods,
10631 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10632 : .tp_new = py_drsuapi_DsGetNCChangesCtr6TS_new,
10633 : };
10634 :
10635 :
10636 0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_decompressed_length(PyObject *obj, void *closure)
10637 : {
10638 0 : struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(obj);
10639 : PyObject *py_decompressed_length;
10640 0 : py_decompressed_length = PyLong_FromUnsignedLongLong((uint32_t)object->decompressed_length);
10641 0 : return py_decompressed_length;
10642 : }
10643 :
10644 0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
10645 : {
10646 0 : struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(py_obj);
10647 0 : if (value == NULL) {
10648 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->decompressed_length");
10649 0 : return -1;
10650 : }
10651 : {
10652 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->decompressed_length));
10653 0 : if (PyLong_Check(value)) {
10654 : unsigned long long test_var;
10655 0 : test_var = PyLong_AsUnsignedLongLong(value);
10656 0 : if (PyErr_Occurred() != NULL) {
10657 0 : return -1;
10658 : }
10659 0 : if (test_var > uint_max) {
10660 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10661 : PyLong_Type.tp_name, uint_max, test_var);
10662 0 : return -1;
10663 : }
10664 0 : object->decompressed_length = test_var;
10665 : } else {
10666 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10667 : PyLong_Type.tp_name);
10668 0 : return -1;
10669 : }
10670 : }
10671 0 : return 0;
10672 : }
10673 :
10674 0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_compressed_length(PyObject *obj, void *closure)
10675 : {
10676 0 : struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(obj);
10677 : PyObject *py_compressed_length;
10678 0 : py_compressed_length = PyLong_FromUnsignedLongLong((uint32_t)object->compressed_length);
10679 0 : return py_compressed_length;
10680 : }
10681 :
10682 0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
10683 : {
10684 0 : struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(py_obj);
10685 0 : if (value == NULL) {
10686 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->compressed_length");
10687 0 : return -1;
10688 : }
10689 : {
10690 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compressed_length));
10691 0 : if (PyLong_Check(value)) {
10692 : unsigned long long test_var;
10693 0 : test_var = PyLong_AsUnsignedLongLong(value);
10694 0 : if (PyErr_Occurred() != NULL) {
10695 0 : return -1;
10696 : }
10697 0 : if (test_var > uint_max) {
10698 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10699 : PyLong_Type.tp_name, uint_max, test_var);
10700 0 : return -1;
10701 : }
10702 0 : object->compressed_length = test_var;
10703 : } else {
10704 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10705 : PyLong_Type.tp_name);
10706 0 : return -1;
10707 : }
10708 : }
10709 0 : return 0;
10710 : }
10711 :
10712 0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_get_ts(PyObject *obj, void *closure)
10713 : {
10714 0 : struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(obj);
10715 : PyObject *py_ts;
10716 0 : if (object->ts == NULL) {
10717 0 : Py_RETURN_NONE;
10718 : }
10719 0 : if (object->ts == NULL) {
10720 0 : py_ts = Py_None;
10721 0 : Py_INCREF(py_ts);
10722 : } else {
10723 0 : py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1TS_Type, object->ts, object->ts);
10724 : }
10725 0 : return py_ts;
10726 : }
10727 :
10728 0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr1_set_ts(PyObject *py_obj, PyObject *value, void *closure)
10729 : {
10730 0 : struct drsuapi_DsGetNCChangesMSZIPCtr1 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(py_obj);
10731 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ts));
10732 0 : if (value == NULL) {
10733 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ts");
10734 0 : return -1;
10735 : }
10736 0 : if (value == Py_None) {
10737 0 : object->ts = NULL;
10738 : } else {
10739 0 : object->ts = NULL;
10740 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1TS_Type, value, return -1;);
10741 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
10742 0 : PyErr_NoMemory();
10743 0 : return -1;
10744 : }
10745 0 : object->ts = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(value);
10746 : }
10747 0 : return 0;
10748 : }
10749 :
10750 : static PyGetSetDef py_drsuapi_DsGetNCChangesMSZIPCtr1_getsetters[] = {
10751 : {
10752 : .name = discard_const_p(char, "decompressed_length"),
10753 : .get = py_drsuapi_DsGetNCChangesMSZIPCtr1_get_decompressed_length,
10754 : .set = py_drsuapi_DsGetNCChangesMSZIPCtr1_set_decompressed_length,
10755 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10756 : },
10757 : {
10758 : .name = discard_const_p(char, "compressed_length"),
10759 : .get = py_drsuapi_DsGetNCChangesMSZIPCtr1_get_compressed_length,
10760 : .set = py_drsuapi_DsGetNCChangesMSZIPCtr1_set_compressed_length,
10761 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10762 : },
10763 : {
10764 : .name = discard_const_p(char, "ts"),
10765 : .get = py_drsuapi_DsGetNCChangesMSZIPCtr1_get_ts,
10766 : .set = py_drsuapi_DsGetNCChangesMSZIPCtr1_set_ts,
10767 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr1TS")
10768 : },
10769 : { .name = NULL }
10770 : };
10771 :
10772 0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10773 : {
10774 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesMSZIPCtr1, type);
10775 : }
10776 :
10777 :
10778 : static PyTypeObject drsuapi_DsGetNCChangesMSZIPCtr1_Type = {
10779 : PyVarObject_HEAD_INIT(NULL, 0)
10780 : .tp_name = "drsuapi.DsGetNCChangesMSZIPCtr1",
10781 : .tp_getset = py_drsuapi_DsGetNCChangesMSZIPCtr1_getsetters,
10782 : .tp_methods = NULL,
10783 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10784 : .tp_new = py_drsuapi_DsGetNCChangesMSZIPCtr1_new,
10785 : };
10786 :
10787 :
10788 0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_decompressed_length(PyObject *obj, void *closure)
10789 : {
10790 0 : struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(obj);
10791 : PyObject *py_decompressed_length;
10792 0 : py_decompressed_length = PyLong_FromUnsignedLongLong((uint32_t)object->decompressed_length);
10793 0 : return py_decompressed_length;
10794 : }
10795 :
10796 0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
10797 : {
10798 0 : struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(py_obj);
10799 0 : if (value == NULL) {
10800 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->decompressed_length");
10801 0 : return -1;
10802 : }
10803 : {
10804 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->decompressed_length));
10805 0 : if (PyLong_Check(value)) {
10806 : unsigned long long test_var;
10807 0 : test_var = PyLong_AsUnsignedLongLong(value);
10808 0 : if (PyErr_Occurred() != NULL) {
10809 0 : return -1;
10810 : }
10811 0 : if (test_var > uint_max) {
10812 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10813 : PyLong_Type.tp_name, uint_max, test_var);
10814 0 : return -1;
10815 : }
10816 0 : object->decompressed_length = test_var;
10817 : } else {
10818 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10819 : PyLong_Type.tp_name);
10820 0 : return -1;
10821 : }
10822 : }
10823 0 : return 0;
10824 : }
10825 :
10826 0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_compressed_length(PyObject *obj, void *closure)
10827 : {
10828 0 : struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(obj);
10829 : PyObject *py_compressed_length;
10830 0 : py_compressed_length = PyLong_FromUnsignedLongLong((uint32_t)object->compressed_length);
10831 0 : return py_compressed_length;
10832 : }
10833 :
10834 0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
10835 : {
10836 0 : struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(py_obj);
10837 0 : if (value == NULL) {
10838 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->compressed_length");
10839 0 : return -1;
10840 : }
10841 : {
10842 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compressed_length));
10843 0 : if (PyLong_Check(value)) {
10844 : unsigned long long test_var;
10845 0 : test_var = PyLong_AsUnsignedLongLong(value);
10846 0 : if (PyErr_Occurred() != NULL) {
10847 0 : return -1;
10848 : }
10849 0 : if (test_var > uint_max) {
10850 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10851 : PyLong_Type.tp_name, uint_max, test_var);
10852 0 : return -1;
10853 : }
10854 0 : object->compressed_length = test_var;
10855 : } else {
10856 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10857 : PyLong_Type.tp_name);
10858 0 : return -1;
10859 : }
10860 : }
10861 0 : return 0;
10862 : }
10863 :
10864 0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_get_ts(PyObject *obj, void *closure)
10865 : {
10866 0 : struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(obj);
10867 : PyObject *py_ts;
10868 0 : if (object->ts == NULL) {
10869 0 : Py_RETURN_NONE;
10870 : }
10871 0 : if (object->ts == NULL) {
10872 0 : py_ts = Py_None;
10873 0 : Py_INCREF(py_ts);
10874 : } else {
10875 0 : py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6TS_Type, object->ts, object->ts);
10876 : }
10877 0 : return py_ts;
10878 : }
10879 :
10880 0 : static int py_drsuapi_DsGetNCChangesMSZIPCtr6_set_ts(PyObject *py_obj, PyObject *value, void *closure)
10881 : {
10882 0 : struct drsuapi_DsGetNCChangesMSZIPCtr6 *object = (struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(py_obj);
10883 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ts));
10884 0 : if (value == NULL) {
10885 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ts");
10886 0 : return -1;
10887 : }
10888 0 : if (value == Py_None) {
10889 0 : object->ts = NULL;
10890 : } else {
10891 0 : object->ts = NULL;
10892 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6TS_Type, value, return -1;);
10893 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
10894 0 : PyErr_NoMemory();
10895 0 : return -1;
10896 : }
10897 0 : object->ts = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(value);
10898 : }
10899 0 : return 0;
10900 : }
10901 :
10902 : static PyGetSetDef py_drsuapi_DsGetNCChangesMSZIPCtr6_getsetters[] = {
10903 : {
10904 : .name = discard_const_p(char, "decompressed_length"),
10905 : .get = py_drsuapi_DsGetNCChangesMSZIPCtr6_get_decompressed_length,
10906 : .set = py_drsuapi_DsGetNCChangesMSZIPCtr6_set_decompressed_length,
10907 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10908 : },
10909 : {
10910 : .name = discard_const_p(char, "compressed_length"),
10911 : .get = py_drsuapi_DsGetNCChangesMSZIPCtr6_get_compressed_length,
10912 : .set = py_drsuapi_DsGetNCChangesMSZIPCtr6_set_compressed_length,
10913 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10914 : },
10915 : {
10916 : .name = discard_const_p(char, "ts"),
10917 : .get = py_drsuapi_DsGetNCChangesMSZIPCtr6_get_ts,
10918 : .set = py_drsuapi_DsGetNCChangesMSZIPCtr6_set_ts,
10919 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr6TS")
10920 : },
10921 : { .name = NULL }
10922 : };
10923 :
10924 0 : static PyObject *py_drsuapi_DsGetNCChangesMSZIPCtr6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
10925 : {
10926 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesMSZIPCtr6, type);
10927 : }
10928 :
10929 :
10930 : static PyTypeObject drsuapi_DsGetNCChangesMSZIPCtr6_Type = {
10931 : PyVarObject_HEAD_INIT(NULL, 0)
10932 : .tp_name = "drsuapi.DsGetNCChangesMSZIPCtr6",
10933 : .tp_getset = py_drsuapi_DsGetNCChangesMSZIPCtr6_getsetters,
10934 : .tp_methods = NULL,
10935 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
10936 : .tp_new = py_drsuapi_DsGetNCChangesMSZIPCtr6_new,
10937 : };
10938 :
10939 :
10940 0 : static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr1_get_decompressed_length(PyObject *obj, void *closure)
10941 : {
10942 0 : struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(obj);
10943 : PyObject *py_decompressed_length;
10944 0 : py_decompressed_length = PyLong_FromUnsignedLongLong((uint32_t)object->decompressed_length);
10945 0 : return py_decompressed_length;
10946 : }
10947 :
10948 0 : static int py_drsuapi_DsGetNCChangesXPRESSCtr1_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
10949 : {
10950 0 : struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(py_obj);
10951 0 : if (value == NULL) {
10952 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->decompressed_length");
10953 0 : return -1;
10954 : }
10955 : {
10956 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->decompressed_length));
10957 0 : if (PyLong_Check(value)) {
10958 : unsigned long long test_var;
10959 0 : test_var = PyLong_AsUnsignedLongLong(value);
10960 0 : if (PyErr_Occurred() != NULL) {
10961 0 : return -1;
10962 : }
10963 0 : if (test_var > uint_max) {
10964 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10965 : PyLong_Type.tp_name, uint_max, test_var);
10966 0 : return -1;
10967 : }
10968 0 : object->decompressed_length = test_var;
10969 : } else {
10970 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10971 : PyLong_Type.tp_name);
10972 0 : return -1;
10973 : }
10974 : }
10975 0 : return 0;
10976 : }
10977 :
10978 0 : static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr1_get_compressed_length(PyObject *obj, void *closure)
10979 : {
10980 0 : struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(obj);
10981 : PyObject *py_compressed_length;
10982 0 : py_compressed_length = PyLong_FromUnsignedLongLong((uint32_t)object->compressed_length);
10983 0 : return py_compressed_length;
10984 : }
10985 :
10986 0 : static int py_drsuapi_DsGetNCChangesXPRESSCtr1_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
10987 : {
10988 0 : struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(py_obj);
10989 0 : if (value == NULL) {
10990 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->compressed_length");
10991 0 : return -1;
10992 : }
10993 : {
10994 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compressed_length));
10995 0 : if (PyLong_Check(value)) {
10996 : unsigned long long test_var;
10997 0 : test_var = PyLong_AsUnsignedLongLong(value);
10998 0 : if (PyErr_Occurred() != NULL) {
10999 0 : return -1;
11000 : }
11001 0 : if (test_var > uint_max) {
11002 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11003 : PyLong_Type.tp_name, uint_max, test_var);
11004 0 : return -1;
11005 : }
11006 0 : object->compressed_length = test_var;
11007 : } else {
11008 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11009 : PyLong_Type.tp_name);
11010 0 : return -1;
11011 : }
11012 : }
11013 0 : return 0;
11014 : }
11015 :
11016 0 : static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr1_get_ts(PyObject *obj, void *closure)
11017 : {
11018 0 : struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(obj);
11019 : PyObject *py_ts;
11020 0 : if (object->ts == NULL) {
11021 0 : Py_RETURN_NONE;
11022 : }
11023 0 : if (object->ts == NULL) {
11024 0 : py_ts = Py_None;
11025 0 : Py_INCREF(py_ts);
11026 : } else {
11027 0 : py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1TS_Type, object->ts, object->ts);
11028 : }
11029 0 : return py_ts;
11030 : }
11031 :
11032 0 : static int py_drsuapi_DsGetNCChangesXPRESSCtr1_set_ts(PyObject *py_obj, PyObject *value, void *closure)
11033 : {
11034 0 : struct drsuapi_DsGetNCChangesXPRESSCtr1 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(py_obj);
11035 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ts));
11036 0 : if (value == NULL) {
11037 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ts");
11038 0 : return -1;
11039 : }
11040 0 : if (value == Py_None) {
11041 0 : object->ts = NULL;
11042 : } else {
11043 0 : object->ts = NULL;
11044 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1TS_Type, value, return -1;);
11045 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11046 0 : PyErr_NoMemory();
11047 0 : return -1;
11048 : }
11049 0 : object->ts = (struct drsuapi_DsGetNCChangesCtr1TS *)pytalloc_get_ptr(value);
11050 : }
11051 0 : return 0;
11052 : }
11053 :
11054 : static PyGetSetDef py_drsuapi_DsGetNCChangesXPRESSCtr1_getsetters[] = {
11055 : {
11056 : .name = discard_const_p(char, "decompressed_length"),
11057 : .get = py_drsuapi_DsGetNCChangesXPRESSCtr1_get_decompressed_length,
11058 : .set = py_drsuapi_DsGetNCChangesXPRESSCtr1_set_decompressed_length,
11059 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11060 : },
11061 : {
11062 : .name = discard_const_p(char, "compressed_length"),
11063 : .get = py_drsuapi_DsGetNCChangesXPRESSCtr1_get_compressed_length,
11064 : .set = py_drsuapi_DsGetNCChangesXPRESSCtr1_set_compressed_length,
11065 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11066 : },
11067 : {
11068 : .name = discard_const_p(char, "ts"),
11069 : .get = py_drsuapi_DsGetNCChangesXPRESSCtr1_get_ts,
11070 : .set = py_drsuapi_DsGetNCChangesXPRESSCtr1_set_ts,
11071 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr1TS")
11072 : },
11073 : { .name = NULL }
11074 : };
11075 :
11076 0 : static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11077 : {
11078 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesXPRESSCtr1, type);
11079 : }
11080 :
11081 :
11082 : static PyTypeObject drsuapi_DsGetNCChangesXPRESSCtr1_Type = {
11083 : PyVarObject_HEAD_INIT(NULL, 0)
11084 : .tp_name = "drsuapi.DsGetNCChangesXPRESSCtr1",
11085 : .tp_getset = py_drsuapi_DsGetNCChangesXPRESSCtr1_getsetters,
11086 : .tp_methods = NULL,
11087 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11088 : .tp_new = py_drsuapi_DsGetNCChangesXPRESSCtr1_new,
11089 : };
11090 :
11091 :
11092 0 : static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr6_get_decompressed_length(PyObject *obj, void *closure)
11093 : {
11094 0 : struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(obj);
11095 : PyObject *py_decompressed_length;
11096 0 : py_decompressed_length = PyLong_FromUnsignedLongLong((uint32_t)object->decompressed_length);
11097 0 : return py_decompressed_length;
11098 : }
11099 :
11100 0 : static int py_drsuapi_DsGetNCChangesXPRESSCtr6_set_decompressed_length(PyObject *py_obj, PyObject *value, void *closure)
11101 : {
11102 0 : struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(py_obj);
11103 0 : if (value == NULL) {
11104 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->decompressed_length");
11105 0 : return -1;
11106 : }
11107 : {
11108 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->decompressed_length));
11109 0 : if (PyLong_Check(value)) {
11110 : unsigned long long test_var;
11111 0 : test_var = PyLong_AsUnsignedLongLong(value);
11112 0 : if (PyErr_Occurred() != NULL) {
11113 0 : return -1;
11114 : }
11115 0 : if (test_var > uint_max) {
11116 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11117 : PyLong_Type.tp_name, uint_max, test_var);
11118 0 : return -1;
11119 : }
11120 0 : object->decompressed_length = test_var;
11121 : } else {
11122 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11123 : PyLong_Type.tp_name);
11124 0 : return -1;
11125 : }
11126 : }
11127 0 : return 0;
11128 : }
11129 :
11130 0 : static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr6_get_compressed_length(PyObject *obj, void *closure)
11131 : {
11132 0 : struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(obj);
11133 : PyObject *py_compressed_length;
11134 0 : py_compressed_length = PyLong_FromUnsignedLongLong((uint32_t)object->compressed_length);
11135 0 : return py_compressed_length;
11136 : }
11137 :
11138 0 : static int py_drsuapi_DsGetNCChangesXPRESSCtr6_set_compressed_length(PyObject *py_obj, PyObject *value, void *closure)
11139 : {
11140 0 : struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(py_obj);
11141 0 : if (value == NULL) {
11142 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->compressed_length");
11143 0 : return -1;
11144 : }
11145 : {
11146 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->compressed_length));
11147 0 : if (PyLong_Check(value)) {
11148 : unsigned long long test_var;
11149 0 : test_var = PyLong_AsUnsignedLongLong(value);
11150 0 : if (PyErr_Occurred() != NULL) {
11151 0 : return -1;
11152 : }
11153 0 : if (test_var > uint_max) {
11154 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11155 : PyLong_Type.tp_name, uint_max, test_var);
11156 0 : return -1;
11157 : }
11158 0 : object->compressed_length = test_var;
11159 : } else {
11160 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11161 : PyLong_Type.tp_name);
11162 0 : return -1;
11163 : }
11164 : }
11165 0 : return 0;
11166 : }
11167 :
11168 0 : static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr6_get_ts(PyObject *obj, void *closure)
11169 : {
11170 0 : struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(obj);
11171 : PyObject *py_ts;
11172 0 : if (object->ts == NULL) {
11173 0 : Py_RETURN_NONE;
11174 : }
11175 0 : if (object->ts == NULL) {
11176 0 : py_ts = Py_None;
11177 0 : Py_INCREF(py_ts);
11178 : } else {
11179 0 : py_ts = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6TS_Type, object->ts, object->ts);
11180 : }
11181 0 : return py_ts;
11182 : }
11183 :
11184 0 : static int py_drsuapi_DsGetNCChangesXPRESSCtr6_set_ts(PyObject *py_obj, PyObject *value, void *closure)
11185 : {
11186 0 : struct drsuapi_DsGetNCChangesXPRESSCtr6 *object = (struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(py_obj);
11187 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ts));
11188 0 : if (value == NULL) {
11189 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ts");
11190 0 : return -1;
11191 : }
11192 0 : if (value == Py_None) {
11193 0 : object->ts = NULL;
11194 : } else {
11195 0 : object->ts = NULL;
11196 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6TS_Type, value, return -1;);
11197 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11198 0 : PyErr_NoMemory();
11199 0 : return -1;
11200 : }
11201 0 : object->ts = (struct drsuapi_DsGetNCChangesCtr6TS *)pytalloc_get_ptr(value);
11202 : }
11203 0 : return 0;
11204 : }
11205 :
11206 : static PyGetSetDef py_drsuapi_DsGetNCChangesXPRESSCtr6_getsetters[] = {
11207 : {
11208 : .name = discard_const_p(char, "decompressed_length"),
11209 : .get = py_drsuapi_DsGetNCChangesXPRESSCtr6_get_decompressed_length,
11210 : .set = py_drsuapi_DsGetNCChangesXPRESSCtr6_set_decompressed_length,
11211 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11212 : },
11213 : {
11214 : .name = discard_const_p(char, "compressed_length"),
11215 : .get = py_drsuapi_DsGetNCChangesXPRESSCtr6_get_compressed_length,
11216 : .set = py_drsuapi_DsGetNCChangesXPRESSCtr6_set_compressed_length,
11217 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11218 : },
11219 : {
11220 : .name = discard_const_p(char, "ts"),
11221 : .get = py_drsuapi_DsGetNCChangesXPRESSCtr6_get_ts,
11222 : .set = py_drsuapi_DsGetNCChangesXPRESSCtr6_set_ts,
11223 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr6TS")
11224 : },
11225 : { .name = NULL }
11226 : };
11227 :
11228 0 : static PyObject *py_drsuapi_DsGetNCChangesXPRESSCtr6_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11229 : {
11230 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesXPRESSCtr6, type);
11231 : }
11232 :
11233 :
11234 : static PyTypeObject drsuapi_DsGetNCChangesXPRESSCtr6_Type = {
11235 : PyVarObject_HEAD_INIT(NULL, 0)
11236 : .tp_name = "drsuapi.DsGetNCChangesXPRESSCtr6",
11237 : .tp_getset = py_drsuapi_DsGetNCChangesXPRESSCtr6_getsetters,
11238 : .tp_methods = NULL,
11239 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11240 : .tp_new = py_drsuapi_DsGetNCChangesXPRESSCtr6_new,
11241 : };
11242 :
11243 0 : static PyObject *py_import_drsuapi_DsGetNCChangesCompressedCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesCompressedCtr *in)
11244 : {
11245 : PyObject *ret;
11246 :
11247 0 : switch (level) {
11248 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
11249 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, mem_ctx, &in->mszip1);
11250 0 : return ret;
11251 :
11252 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
11253 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr6_Type, mem_ctx, &in->mszip6);
11254 0 : return ret;
11255 :
11256 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
11257 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesXPRESSCtr1_Type, mem_ctx, &in->xpress1);
11258 0 : return ret;
11259 :
11260 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
11261 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesXPRESSCtr6_Type, mem_ctx, &in->xpress6);
11262 0 : return ret;
11263 :
11264 : }
11265 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
11266 0 : return NULL;
11267 : }
11268 :
11269 0 : static union drsuapi_DsGetNCChangesCompressedCtr *py_export_drsuapi_DsGetNCChangesCompressedCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
11270 : {
11271 0 : union drsuapi_DsGetNCChangesCompressedCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesCompressedCtr);
11272 0 : switch (level) {
11273 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
11274 0 : if (in == NULL) {
11275 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->mszip1");
11276 0 : talloc_free(ret); return NULL;
11277 : }
11278 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, in, talloc_free(ret); return NULL;);
11279 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
11280 0 : PyErr_NoMemory();
11281 0 : talloc_free(ret); return NULL;
11282 : }
11283 0 : ret->mszip1 = *(struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(in);
11284 0 : break;
11285 :
11286 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16):
11287 0 : if (in == NULL) {
11288 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->mszip6");
11289 0 : talloc_free(ret); return NULL;
11290 : }
11291 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr6_Type, in, talloc_free(ret); return NULL;);
11292 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
11293 0 : PyErr_NoMemory();
11294 0 : talloc_free(ret); return NULL;
11295 : }
11296 0 : ret->mszip6 = *(struct drsuapi_DsGetNCChangesMSZIPCtr6 *)pytalloc_get_ptr(in);
11297 0 : break;
11298 :
11299 0 : case 1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
11300 0 : if (in == NULL) {
11301 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->xpress1");
11302 0 : talloc_free(ret); return NULL;
11303 : }
11304 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesXPRESSCtr1_Type, in, talloc_free(ret); return NULL;);
11305 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
11306 0 : PyErr_NoMemory();
11307 0 : talloc_free(ret); return NULL;
11308 : }
11309 0 : ret->xpress1 = *(struct drsuapi_DsGetNCChangesXPRESSCtr1 *)pytalloc_get_ptr(in);
11310 0 : break;
11311 :
11312 0 : case 6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16):
11313 0 : if (in == NULL) {
11314 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->xpress6");
11315 0 : talloc_free(ret); return NULL;
11316 : }
11317 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesXPRESSCtr6_Type, in, talloc_free(ret); return NULL;);
11318 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
11319 0 : PyErr_NoMemory();
11320 0 : talloc_free(ret); return NULL;
11321 : }
11322 0 : ret->xpress6 = *(struct drsuapi_DsGetNCChangesXPRESSCtr6 *)pytalloc_get_ptr(in);
11323 0 : break;
11324 :
11325 0 : default:
11326 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
11327 0 : talloc_free(ret);
11328 0 : ret = NULL;
11329 : }
11330 :
11331 0 : return ret;
11332 : }
11333 :
11334 0 : static PyObject *py_drsuapi_DsGetNCChangesCompressedCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11335 : {
11336 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
11337 0 : PyObject *mem_ctx_obj = NULL;
11338 0 : TALLOC_CTX *mem_ctx = NULL;
11339 0 : int level = 0;
11340 0 : PyObject *in_obj = NULL;
11341 0 : union drsuapi_DsGetNCChangesCompressedCtr *in = NULL;
11342 :
11343 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
11344 : discard_const_p(char *, kwnames),
11345 : &mem_ctx_obj,
11346 : &level,
11347 : &in_obj)) {
11348 0 : return NULL;
11349 : }
11350 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
11351 0 : if (mem_ctx == NULL) {
11352 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
11353 0 : return NULL;
11354 : }
11355 0 : in = (union drsuapi_DsGetNCChangesCompressedCtr *)pytalloc_get_ptr(in_obj);
11356 0 : if (in == NULL) {
11357 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNCChangesCompressedCtr!");
11358 0 : return NULL;
11359 : }
11360 :
11361 0 : return py_import_drsuapi_DsGetNCChangesCompressedCtr(mem_ctx, level, in);
11362 : }
11363 :
11364 0 : static PyObject *py_drsuapi_DsGetNCChangesCompressedCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11365 : {
11366 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
11367 0 : PyObject *mem_ctx_obj = NULL;
11368 0 : TALLOC_CTX *mem_ctx = NULL;
11369 0 : int level = 0;
11370 0 : PyObject *in = NULL;
11371 0 : union drsuapi_DsGetNCChangesCompressedCtr *out = NULL;
11372 :
11373 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
11374 : discard_const_p(char *, kwnames),
11375 : &mem_ctx_obj,
11376 : &level,
11377 : &in)) {
11378 0 : return NULL;
11379 : }
11380 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
11381 0 : if (mem_ctx == NULL) {
11382 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
11383 0 : return NULL;
11384 : }
11385 :
11386 0 : out = py_export_drsuapi_DsGetNCChangesCompressedCtr(mem_ctx, level, in);
11387 0 : if (out == NULL) {
11388 0 : return NULL;
11389 : }
11390 :
11391 0 : return pytalloc_GenericObject_reference(out);
11392 : }
11393 :
11394 : static PyMethodDef py_drsuapi_DsGetNCChangesCompressedCtr_methods[] = {
11395 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCompressedCtr_import),
11396 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
11397 : "T.__import__(mem_ctx, level, in) => ret." },
11398 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCompressedCtr_export),
11399 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
11400 : "T.__export__(mem_ctx, level, in) => ret." },
11401 : { NULL, NULL, 0, NULL }
11402 : };
11403 :
11404 0 : static PyObject *py_drsuapi_DsGetNCChangesCompressedCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11405 : {
11406 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
11407 0 : return NULL;
11408 : }
11409 :
11410 :
11411 : static PyTypeObject drsuapi_DsGetNCChangesCompressedCtr_Type = {
11412 : PyVarObject_HEAD_INIT(NULL, 0)
11413 : .tp_name = "drsuapi.DsGetNCChangesCompressedCtr",
11414 : .tp_getset = NULL,
11415 : .tp_methods = py_drsuapi_DsGetNCChangesCompressedCtr_methods,
11416 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11417 : .tp_new = py_drsuapi_DsGetNCChangesCompressedCtr_new,
11418 : };
11419 :
11420 :
11421 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr2_get_mszip1(PyObject *obj, void *closure)
11422 : {
11423 0 : struct drsuapi_DsGetNCChangesCtr2 *object = (struct drsuapi_DsGetNCChangesCtr2 *)pytalloc_get_ptr(obj);
11424 : PyObject *py_mszip1;
11425 0 : py_mszip1 = pytalloc_reference_ex(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, pytalloc_get_mem_ctx(obj), &object->mszip1);
11426 0 : return py_mszip1;
11427 : }
11428 :
11429 0 : static int py_drsuapi_DsGetNCChangesCtr2_set_mszip1(PyObject *py_obj, PyObject *value, void *closure)
11430 : {
11431 0 : struct drsuapi_DsGetNCChangesCtr2 *object = (struct drsuapi_DsGetNCChangesCtr2 *)pytalloc_get_ptr(py_obj);
11432 0 : if (value == NULL) {
11433 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->mszip1");
11434 0 : return -1;
11435 : }
11436 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesMSZIPCtr1_Type, value, return -1;);
11437 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11438 0 : PyErr_NoMemory();
11439 0 : return -1;
11440 : }
11441 0 : object->mszip1 = *(struct drsuapi_DsGetNCChangesMSZIPCtr1 *)pytalloc_get_ptr(value);
11442 0 : return 0;
11443 : }
11444 :
11445 : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr2_getsetters[] = {
11446 : {
11447 : .name = discard_const_p(char, "mszip1"),
11448 : .get = py_drsuapi_DsGetNCChangesCtr2_get_mszip1,
11449 : .set = py_drsuapi_DsGetNCChangesCtr2_set_mszip1,
11450 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesMSZIPCtr1")
11451 : },
11452 : { .name = NULL }
11453 : };
11454 :
11455 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11456 : {
11457 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesCtr2, type);
11458 : }
11459 :
11460 :
11461 : static PyTypeObject drsuapi_DsGetNCChangesCtr2_Type = {
11462 : PyVarObject_HEAD_INIT(NULL, 0)
11463 : .tp_name = "drsuapi.DsGetNCChangesCtr2",
11464 : .tp_getset = py_drsuapi_DsGetNCChangesCtr2_getsetters,
11465 : .tp_methods = NULL,
11466 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11467 : .tp_new = py_drsuapi_DsGetNCChangesCtr2_new,
11468 : };
11469 :
11470 :
11471 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr7_get_level(PyObject *obj, void *closure)
11472 : {
11473 0 : struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(obj);
11474 : PyObject *py_level;
11475 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
11476 0 : return py_level;
11477 : }
11478 :
11479 0 : static int py_drsuapi_DsGetNCChangesCtr7_set_level(PyObject *py_obj, PyObject *value, void *closure)
11480 : {
11481 0 : struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(py_obj);
11482 0 : if (value == NULL) {
11483 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
11484 0 : return -1;
11485 : }
11486 : {
11487 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
11488 0 : if (PyLong_Check(value)) {
11489 : unsigned long long test_var;
11490 0 : test_var = PyLong_AsUnsignedLongLong(value);
11491 0 : if (PyErr_Occurred() != NULL) {
11492 0 : return -1;
11493 : }
11494 0 : if (test_var > uint_max) {
11495 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11496 : PyLong_Type.tp_name, uint_max, test_var);
11497 0 : return -1;
11498 : }
11499 0 : object->level = test_var;
11500 : } else {
11501 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11502 : PyLong_Type.tp_name);
11503 0 : return -1;
11504 : }
11505 : }
11506 0 : return 0;
11507 : }
11508 :
11509 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr7_get_type(PyObject *obj, void *closure)
11510 : {
11511 0 : struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(obj);
11512 : PyObject *py_type;
11513 0 : py_type = PyLong_FromLong((uint16_t)object->type);
11514 0 : return py_type;
11515 : }
11516 :
11517 0 : static int py_drsuapi_DsGetNCChangesCtr7_set_type(PyObject *py_obj, PyObject *value, void *closure)
11518 : {
11519 0 : struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(py_obj);
11520 0 : if (value == NULL) {
11521 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
11522 0 : return -1;
11523 : }
11524 : {
11525 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
11526 0 : if (PyLong_Check(value)) {
11527 : unsigned long long test_var;
11528 0 : test_var = PyLong_AsUnsignedLongLong(value);
11529 0 : if (PyErr_Occurred() != NULL) {
11530 0 : return -1;
11531 : }
11532 0 : if (test_var > uint_max) {
11533 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11534 : PyLong_Type.tp_name, uint_max, test_var);
11535 0 : return -1;
11536 : }
11537 0 : object->type = test_var;
11538 : } else {
11539 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11540 : PyLong_Type.tp_name);
11541 0 : return -1;
11542 : }
11543 : }
11544 0 : return 0;
11545 : }
11546 :
11547 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr7_get_ctr(PyObject *obj, void *closure)
11548 : {
11549 0 : struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(obj);
11550 : PyObject *py_ctr;
11551 0 : py_ctr = pyrpc_import_union(&drsuapi_DsGetNCChangesCompressedCtr_Type, pytalloc_get_mem_ctx(obj), object->level | (object->type << 16), &object->ctr, "union drsuapi_DsGetNCChangesCompressedCtr");
11552 0 : if (py_ctr == NULL) {
11553 0 : return NULL;
11554 : }
11555 0 : return py_ctr;
11556 : }
11557 :
11558 0 : static int py_drsuapi_DsGetNCChangesCtr7_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
11559 : {
11560 0 : struct drsuapi_DsGetNCChangesCtr7 *object = (struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(py_obj);
11561 0 : if (value == NULL) {
11562 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctr");
11563 0 : return -1;
11564 : }
11565 : {
11566 : union drsuapi_DsGetNCChangesCompressedCtr *ctr_switch_0;
11567 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");
11568 0 : if (ctr_switch_0 == NULL) {
11569 0 : return -1;
11570 : }
11571 0 : object->ctr = *ctr_switch_0;
11572 : }
11573 0 : return 0;
11574 : }
11575 :
11576 : static PyGetSetDef py_drsuapi_DsGetNCChangesCtr7_getsetters[] = {
11577 : {
11578 : .name = discard_const_p(char, "level"),
11579 : .get = py_drsuapi_DsGetNCChangesCtr7_get_level,
11580 : .set = py_drsuapi_DsGetNCChangesCtr7_set_level,
11581 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11582 : },
11583 : {
11584 : .name = discard_const_p(char, "type"),
11585 : .get = py_drsuapi_DsGetNCChangesCtr7_get_type,
11586 : .set = py_drsuapi_DsGetNCChangesCtr7_set_type,
11587 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCompressionType")
11588 : },
11589 : {
11590 : .name = discard_const_p(char, "ctr"),
11591 : .get = py_drsuapi_DsGetNCChangesCtr7_get_ctr,
11592 : .set = py_drsuapi_DsGetNCChangesCtr7_set_ctr,
11593 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCompressedCtr")
11594 : },
11595 : { .name = NULL }
11596 : };
11597 :
11598 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr7_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11599 : {
11600 0 : return pytalloc_new(struct drsuapi_DsGetNCChangesCtr7, type);
11601 : }
11602 :
11603 :
11604 : static PyTypeObject drsuapi_DsGetNCChangesCtr7_Type = {
11605 : PyVarObject_HEAD_INIT(NULL, 0)
11606 : .tp_name = "drsuapi.DsGetNCChangesCtr7",
11607 : .tp_getset = py_drsuapi_DsGetNCChangesCtr7_getsetters,
11608 : .tp_methods = NULL,
11609 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11610 : .tp_new = py_drsuapi_DsGetNCChangesCtr7_new,
11611 : };
11612 :
11613 2679 : static PyObject *py_import_drsuapi_DsGetNCChangesCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNCChangesCtr *in)
11614 : {
11615 : PyObject *ret;
11616 :
11617 2679 : switch (level) {
11618 0 : case 1:
11619 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr1_Type, mem_ctx, &in->ctr1);
11620 0 : return ret;
11621 :
11622 0 : case 2:
11623 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr2_Type, mem_ctx, &in->ctr2);
11624 0 : return ret;
11625 :
11626 2679 : case 6:
11627 2679 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr6_Type, mem_ctx, &in->ctr6);
11628 2679 : return ret;
11629 :
11630 0 : case 7:
11631 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNCChangesCtr7_Type, mem_ctx, &in->ctr7);
11632 0 : return ret;
11633 :
11634 : }
11635 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
11636 0 : return NULL;
11637 : }
11638 :
11639 0 : static union drsuapi_DsGetNCChangesCtr *py_export_drsuapi_DsGetNCChangesCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
11640 : {
11641 0 : union drsuapi_DsGetNCChangesCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesCtr);
11642 0 : switch (level) {
11643 0 : case 1:
11644 0 : if (in == NULL) {
11645 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
11646 0 : talloc_free(ret); return NULL;
11647 : }
11648 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr1_Type, in, talloc_free(ret); return NULL;);
11649 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
11650 0 : PyErr_NoMemory();
11651 0 : talloc_free(ret); return NULL;
11652 : }
11653 0 : ret->ctr1 = *(struct drsuapi_DsGetNCChangesCtr1 *)pytalloc_get_ptr(in);
11654 0 : break;
11655 :
11656 0 : case 2:
11657 0 : if (in == NULL) {
11658 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
11659 0 : talloc_free(ret); return NULL;
11660 : }
11661 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr2_Type, in, talloc_free(ret); return NULL;);
11662 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
11663 0 : PyErr_NoMemory();
11664 0 : talloc_free(ret); return NULL;
11665 : }
11666 0 : ret->ctr2 = *(struct drsuapi_DsGetNCChangesCtr2 *)pytalloc_get_ptr(in);
11667 0 : break;
11668 :
11669 0 : case 6:
11670 0 : if (in == NULL) {
11671 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr6");
11672 0 : talloc_free(ret); return NULL;
11673 : }
11674 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr6_Type, in, talloc_free(ret); return NULL;);
11675 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
11676 0 : PyErr_NoMemory();
11677 0 : talloc_free(ret); return NULL;
11678 : }
11679 0 : ret->ctr6 = *(struct drsuapi_DsGetNCChangesCtr6 *)pytalloc_get_ptr(in);
11680 0 : break;
11681 :
11682 0 : case 7:
11683 0 : if (in == NULL) {
11684 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr7");
11685 0 : talloc_free(ret); return NULL;
11686 : }
11687 0 : PY_CHECK_TYPE(&drsuapi_DsGetNCChangesCtr7_Type, in, talloc_free(ret); return NULL;);
11688 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
11689 0 : PyErr_NoMemory();
11690 0 : talloc_free(ret); return NULL;
11691 : }
11692 0 : ret->ctr7 = *(struct drsuapi_DsGetNCChangesCtr7 *)pytalloc_get_ptr(in);
11693 0 : break;
11694 :
11695 0 : default:
11696 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
11697 0 : talloc_free(ret);
11698 0 : ret = NULL;
11699 : }
11700 :
11701 0 : return ret;
11702 : }
11703 :
11704 2679 : static PyObject *py_drsuapi_DsGetNCChangesCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11705 : {
11706 2679 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
11707 2679 : PyObject *mem_ctx_obj = NULL;
11708 2679 : TALLOC_CTX *mem_ctx = NULL;
11709 2679 : int level = 0;
11710 2679 : PyObject *in_obj = NULL;
11711 2679 : union drsuapi_DsGetNCChangesCtr *in = NULL;
11712 :
11713 2679 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
11714 : discard_const_p(char *, kwnames),
11715 : &mem_ctx_obj,
11716 : &level,
11717 : &in_obj)) {
11718 0 : return NULL;
11719 : }
11720 2679 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
11721 2679 : if (mem_ctx == NULL) {
11722 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
11723 0 : return NULL;
11724 : }
11725 2679 : in = (union drsuapi_DsGetNCChangesCtr *)pytalloc_get_ptr(in_obj);
11726 2679 : if (in == NULL) {
11727 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNCChangesCtr!");
11728 0 : return NULL;
11729 : }
11730 :
11731 2679 : return py_import_drsuapi_DsGetNCChangesCtr(mem_ctx, level, in);
11732 : }
11733 :
11734 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11735 : {
11736 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
11737 0 : PyObject *mem_ctx_obj = NULL;
11738 0 : TALLOC_CTX *mem_ctx = NULL;
11739 0 : int level = 0;
11740 0 : PyObject *in = NULL;
11741 0 : union drsuapi_DsGetNCChangesCtr *out = NULL;
11742 :
11743 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
11744 : discard_const_p(char *, kwnames),
11745 : &mem_ctx_obj,
11746 : &level,
11747 : &in)) {
11748 0 : return NULL;
11749 : }
11750 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
11751 0 : if (mem_ctx == NULL) {
11752 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
11753 0 : return NULL;
11754 : }
11755 :
11756 0 : out = py_export_drsuapi_DsGetNCChangesCtr(mem_ctx, level, in);
11757 0 : if (out == NULL) {
11758 0 : return NULL;
11759 : }
11760 :
11761 0 : return pytalloc_GenericObject_reference(out);
11762 : }
11763 :
11764 : static PyMethodDef py_drsuapi_DsGetNCChangesCtr_methods[] = {
11765 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCtr_import),
11766 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
11767 : "T.__import__(mem_ctx, level, in) => ret." },
11768 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChangesCtr_export),
11769 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
11770 : "T.__export__(mem_ctx, level, in) => ret." },
11771 : { NULL, NULL, 0, NULL }
11772 : };
11773 :
11774 0 : static PyObject *py_drsuapi_DsGetNCChangesCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11775 : {
11776 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
11777 0 : return NULL;
11778 : }
11779 :
11780 :
11781 : static PyTypeObject drsuapi_DsGetNCChangesCtr_Type = {
11782 : PyVarObject_HEAD_INIT(NULL, 0)
11783 : .tp_name = "drsuapi.DsGetNCChangesCtr",
11784 : .tp_getset = NULL,
11785 : .tp_methods = py_drsuapi_DsGetNCChangesCtr_methods,
11786 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11787 : .tp_new = py_drsuapi_DsGetNCChangesCtr_new,
11788 : };
11789 :
11790 :
11791 495 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_naming_context(PyObject *obj, void *closure)
11792 : {
11793 495 : struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(obj);
11794 : PyObject *py_naming_context;
11795 495 : if (object->naming_context == NULL) {
11796 0 : Py_RETURN_NONE;
11797 : }
11798 495 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
11799 495 : return py_naming_context;
11800 : }
11801 :
11802 165 : static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
11803 : {
11804 165 : struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(py_obj);
11805 165 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
11806 165 : if (value == NULL) {
11807 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
11808 0 : return -1;
11809 : }
11810 165 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
11811 165 : if (object->naming_context == NULL) {
11812 0 : PyErr_NoMemory();
11813 0 : return -1;
11814 : }
11815 165 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
11816 165 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11817 0 : PyErr_NoMemory();
11818 0 : return -1;
11819 : }
11820 165 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
11821 165 : return 0;
11822 : }
11823 :
11824 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_dns_name(PyObject *obj, void *closure)
11825 : {
11826 0 : struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(obj);
11827 : PyObject *py_dest_dsa_dns_name;
11828 0 : if (object->dest_dsa_dns_name == NULL) {
11829 0 : Py_RETURN_NONE;
11830 : }
11831 0 : if (object->dest_dsa_dns_name == NULL) {
11832 0 : py_dest_dsa_dns_name = Py_None;
11833 0 : Py_INCREF(py_dest_dsa_dns_name);
11834 : } else {
11835 0 : py_dest_dsa_dns_name = PyUnicode_Decode(object->dest_dsa_dns_name, strlen(object->dest_dsa_dns_name), "utf-8", "ignore");
11836 : }
11837 0 : return py_dest_dsa_dns_name;
11838 : }
11839 :
11840 165 : static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_dns_name(PyObject *py_obj, PyObject *value, void *closure)
11841 : {
11842 165 : struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(py_obj);
11843 165 : if (value == NULL) {
11844 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dest_dsa_dns_name");
11845 0 : return -1;
11846 : }
11847 165 : object->dest_dsa_dns_name = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->dest_dsa_dns_name);
11848 165 : if (object->dest_dsa_dns_name == NULL) {
11849 0 : PyErr_NoMemory();
11850 0 : return -1;
11851 : }
11852 : {
11853 : const char *test_str;
11854 : const char *talloc_str;
11855 165 : PyObject *unicode = NULL;
11856 165 : if (PyUnicode_Check(value)) {
11857 165 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11858 165 : if (unicode == NULL) {
11859 0 : PyErr_NoMemory();
11860 0 : return -1;
11861 : }
11862 165 : test_str = PyBytes_AS_STRING(unicode);
11863 0 : } else if (PyBytes_Check(value)) {
11864 0 : test_str = PyBytes_AS_STRING(value);
11865 : } else {
11866 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11867 0 : return -1;
11868 : }
11869 165 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11870 165 : if (unicode != NULL) {
11871 165 : Py_DECREF(unicode);
11872 : }
11873 165 : if (talloc_str == NULL) {
11874 0 : PyErr_NoMemory();
11875 0 : return -1;
11876 : }
11877 165 : object->dest_dsa_dns_name = talloc_str;
11878 : }
11879 165 : return 0;
11880 : }
11881 :
11882 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_guid(PyObject *obj, void *closure)
11883 : {
11884 0 : struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(obj);
11885 : PyObject *py_dest_dsa_guid;
11886 0 : py_dest_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->dest_dsa_guid);
11887 0 : return py_dest_dsa_guid;
11888 : }
11889 :
11890 165 : static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
11891 : {
11892 165 : struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(py_obj);
11893 165 : if (value == NULL) {
11894 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dest_dsa_guid");
11895 0 : return -1;
11896 : }
11897 165 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
11898 165 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
11899 0 : PyErr_NoMemory();
11900 0 : return -1;
11901 : }
11902 165 : object->dest_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
11903 165 : return 0;
11904 : }
11905 :
11906 140 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_get_options(PyObject *obj, void *closure)
11907 : {
11908 140 : struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(obj);
11909 : PyObject *py_options;
11910 140 : py_options = PyLong_FromUnsignedLongLong((uint32_t)object->options);
11911 140 : return py_options;
11912 : }
11913 :
11914 305 : static int py_drsuapi_DsReplicaUpdateRefsRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
11915 : {
11916 305 : struct drsuapi_DsReplicaUpdateRefsRequest1 *object = (struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(py_obj);
11917 305 : if (value == NULL) {
11918 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
11919 0 : return -1;
11920 : }
11921 : {
11922 305 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
11923 305 : if (PyLong_Check(value)) {
11924 : unsigned long long test_var;
11925 305 : test_var = PyLong_AsUnsignedLongLong(value);
11926 305 : if (PyErr_Occurred() != NULL) {
11927 0 : return -1;
11928 : }
11929 305 : if (test_var > uint_max) {
11930 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11931 : PyLong_Type.tp_name, uint_max, test_var);
11932 0 : return -1;
11933 : }
11934 305 : object->options = test_var;
11935 : } else {
11936 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11937 : PyLong_Type.tp_name);
11938 0 : return -1;
11939 : }
11940 : }
11941 305 : return 0;
11942 : }
11943 :
11944 : static PyGetSetDef py_drsuapi_DsReplicaUpdateRefsRequest1_getsetters[] = {
11945 : {
11946 : .name = discard_const_p(char, "naming_context"),
11947 : .get = py_drsuapi_DsReplicaUpdateRefsRequest1_get_naming_context,
11948 : .set = py_drsuapi_DsReplicaUpdateRefsRequest1_set_naming_context,
11949 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
11950 : },
11951 : {
11952 : .name = discard_const_p(char, "dest_dsa_dns_name"),
11953 : .get = py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_dns_name,
11954 : .set = py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_dns_name,
11955 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11956 : },
11957 : {
11958 : .name = discard_const_p(char, "dest_dsa_guid"),
11959 : .get = py_drsuapi_DsReplicaUpdateRefsRequest1_get_dest_dsa_guid,
11960 : .set = py_drsuapi_DsReplicaUpdateRefsRequest1_set_dest_dsa_guid,
11961 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
11962 : },
11963 : {
11964 : .name = discard_const_p(char, "options"),
11965 : .get = py_drsuapi_DsReplicaUpdateRefsRequest1_get_options,
11966 : .set = py_drsuapi_DsReplicaUpdateRefsRequest1_set_options,
11967 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
11968 : },
11969 : { .name = NULL }
11970 : };
11971 :
11972 165 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11973 : {
11974 165 : return pytalloc_new(struct drsuapi_DsReplicaUpdateRefsRequest1, type);
11975 : }
11976 :
11977 :
11978 : static PyTypeObject drsuapi_DsReplicaUpdateRefsRequest1_Type = {
11979 : PyVarObject_HEAD_INIT(NULL, 0)
11980 : .tp_name = "drsuapi.DsReplicaUpdateRefsRequest1",
11981 : .tp_getset = py_drsuapi_DsReplicaUpdateRefsRequest1_getsetters,
11982 : .tp_methods = NULL,
11983 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11984 : .tp_new = py_drsuapi_DsReplicaUpdateRefsRequest1_new,
11985 : };
11986 :
11987 0 : static PyObject *py_import_drsuapi_DsReplicaUpdateRefsRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaUpdateRefsRequest *in)
11988 : {
11989 : PyObject *ret;
11990 :
11991 0 : switch (level) {
11992 0 : case 1:
11993 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaUpdateRefsRequest1_Type, mem_ctx, &in->req1);
11994 0 : return ret;
11995 :
11996 : }
11997 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
11998 0 : return NULL;
11999 : }
12000 :
12001 165 : static union drsuapi_DsReplicaUpdateRefsRequest *py_export_drsuapi_DsReplicaUpdateRefsRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
12002 : {
12003 165 : union drsuapi_DsReplicaUpdateRefsRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaUpdateRefsRequest);
12004 165 : switch (level) {
12005 165 : case 1:
12006 165 : if (in == NULL) {
12007 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
12008 0 : talloc_free(ret); return NULL;
12009 : }
12010 165 : PY_CHECK_TYPE(&drsuapi_DsReplicaUpdateRefsRequest1_Type, in, talloc_free(ret); return NULL;);
12011 165 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
12012 0 : PyErr_NoMemory();
12013 0 : talloc_free(ret); return NULL;
12014 : }
12015 165 : ret->req1 = *(struct drsuapi_DsReplicaUpdateRefsRequest1 *)pytalloc_get_ptr(in);
12016 165 : break;
12017 :
12018 0 : default:
12019 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
12020 0 : talloc_free(ret);
12021 0 : ret = NULL;
12022 : }
12023 :
12024 165 : return ret;
12025 : }
12026 :
12027 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12028 : {
12029 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
12030 0 : PyObject *mem_ctx_obj = NULL;
12031 0 : TALLOC_CTX *mem_ctx = NULL;
12032 0 : int level = 0;
12033 0 : PyObject *in_obj = NULL;
12034 0 : union drsuapi_DsReplicaUpdateRefsRequest *in = NULL;
12035 :
12036 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
12037 : discard_const_p(char *, kwnames),
12038 : &mem_ctx_obj,
12039 : &level,
12040 : &in_obj)) {
12041 0 : return NULL;
12042 : }
12043 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
12044 0 : if (mem_ctx == NULL) {
12045 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
12046 0 : return NULL;
12047 : }
12048 0 : in = (union drsuapi_DsReplicaUpdateRefsRequest *)pytalloc_get_ptr(in_obj);
12049 0 : if (in == NULL) {
12050 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaUpdateRefsRequest!");
12051 0 : return NULL;
12052 : }
12053 :
12054 0 : return py_import_drsuapi_DsReplicaUpdateRefsRequest(mem_ctx, level, in);
12055 : }
12056 :
12057 165 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12058 : {
12059 165 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
12060 165 : PyObject *mem_ctx_obj = NULL;
12061 165 : TALLOC_CTX *mem_ctx = NULL;
12062 165 : int level = 0;
12063 165 : PyObject *in = NULL;
12064 165 : union drsuapi_DsReplicaUpdateRefsRequest *out = NULL;
12065 :
12066 165 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
12067 : discard_const_p(char *, kwnames),
12068 : &mem_ctx_obj,
12069 : &level,
12070 : &in)) {
12071 0 : return NULL;
12072 : }
12073 165 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
12074 165 : if (mem_ctx == NULL) {
12075 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
12076 0 : return NULL;
12077 : }
12078 :
12079 165 : out = py_export_drsuapi_DsReplicaUpdateRefsRequest(mem_ctx, level, in);
12080 165 : if (out == NULL) {
12081 0 : return NULL;
12082 : }
12083 :
12084 165 : return pytalloc_GenericObject_reference(out);
12085 : }
12086 :
12087 : static PyMethodDef py_drsuapi_DsReplicaUpdateRefsRequest_methods[] = {
12088 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefsRequest_import),
12089 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
12090 : "T.__import__(mem_ctx, level, in) => ret." },
12091 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefsRequest_export),
12092 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
12093 : "T.__export__(mem_ctx, level, in) => ret." },
12094 : { NULL, NULL, 0, NULL }
12095 : };
12096 :
12097 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefsRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12098 : {
12099 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
12100 0 : return NULL;
12101 : }
12102 :
12103 :
12104 : static PyTypeObject drsuapi_DsReplicaUpdateRefsRequest_Type = {
12105 : PyVarObject_HEAD_INIT(NULL, 0)
12106 : .tp_name = "drsuapi.DsReplicaUpdateRefsRequest",
12107 : .tp_getset = NULL,
12108 : .tp_methods = py_drsuapi_DsReplicaUpdateRefsRequest_methods,
12109 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12110 : .tp_new = py_drsuapi_DsReplicaUpdateRefsRequest_new,
12111 : };
12112 :
12113 :
12114 0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_get_naming_context(PyObject *obj, void *closure)
12115 : {
12116 0 : struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(obj);
12117 : PyObject *py_naming_context;
12118 0 : if (object->naming_context == NULL) {
12119 0 : Py_RETURN_NONE;
12120 : }
12121 0 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
12122 0 : return py_naming_context;
12123 : }
12124 :
12125 0 : static int py_drsuapi_DsReplicaAddRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
12126 : {
12127 0 : struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(py_obj);
12128 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
12129 0 : if (value == NULL) {
12130 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
12131 0 : return -1;
12132 : }
12133 0 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
12134 0 : if (object->naming_context == NULL) {
12135 0 : PyErr_NoMemory();
12136 0 : return -1;
12137 : }
12138 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
12139 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12140 0 : PyErr_NoMemory();
12141 0 : return -1;
12142 : }
12143 0 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
12144 0 : return 0;
12145 : }
12146 :
12147 0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_get_source_dsa_address(PyObject *obj, void *closure)
12148 : {
12149 0 : struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(obj);
12150 : PyObject *py_source_dsa_address;
12151 0 : if (object->source_dsa_address == NULL) {
12152 0 : Py_RETURN_NONE;
12153 : }
12154 0 : if (object->source_dsa_address == NULL) {
12155 0 : py_source_dsa_address = Py_None;
12156 0 : Py_INCREF(py_source_dsa_address);
12157 : } else {
12158 0 : if (object->source_dsa_address == NULL) {
12159 0 : py_source_dsa_address = Py_None;
12160 0 : Py_INCREF(py_source_dsa_address);
12161 : } else {
12162 0 : py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
12163 : }
12164 : }
12165 0 : return py_source_dsa_address;
12166 : }
12167 :
12168 0 : static int py_drsuapi_DsReplicaAddRequest1_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
12169 : {
12170 0 : struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(py_obj);
12171 0 : if (value == NULL) {
12172 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_address");
12173 0 : return -1;
12174 : }
12175 0 : if (value == Py_None) {
12176 0 : object->source_dsa_address = NULL;
12177 : } else {
12178 0 : object->source_dsa_address = NULL;
12179 : {
12180 : const char *test_str;
12181 : const char *talloc_str;
12182 0 : PyObject *unicode = NULL;
12183 0 : if (PyUnicode_Check(value)) {
12184 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12185 0 : if (unicode == NULL) {
12186 0 : PyErr_NoMemory();
12187 0 : return -1;
12188 : }
12189 0 : test_str = PyBytes_AS_STRING(unicode);
12190 0 : } else if (PyBytes_Check(value)) {
12191 0 : test_str = PyBytes_AS_STRING(value);
12192 : } else {
12193 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12194 0 : return -1;
12195 : }
12196 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12197 0 : if (unicode != NULL) {
12198 0 : Py_DECREF(unicode);
12199 : }
12200 0 : if (talloc_str == NULL) {
12201 0 : PyErr_NoMemory();
12202 0 : return -1;
12203 : }
12204 0 : object->source_dsa_address = talloc_str;
12205 : }
12206 : }
12207 0 : return 0;
12208 : }
12209 :
12210 0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_get_schedule(PyObject *obj, void *closure)
12211 : {
12212 0 : struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(obj);
12213 : PyObject *py_schedule;
12214 0 : py_schedule = PyList_New(84);
12215 0 : if (py_schedule == NULL) {
12216 0 : return NULL;
12217 : }
12218 : {
12219 : int schedule_cntr_0;
12220 0 : for (schedule_cntr_0 = 0; schedule_cntr_0 < (84); schedule_cntr_0++) {
12221 : PyObject *py_schedule_0;
12222 0 : py_schedule_0 = PyLong_FromLong((uint16_t)object->schedule[schedule_cntr_0]);
12223 0 : PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
12224 : }
12225 : }
12226 0 : return py_schedule;
12227 : }
12228 :
12229 0 : static int py_drsuapi_DsReplicaAddRequest1_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
12230 : {
12231 0 : struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(py_obj);
12232 0 : if (value == NULL) {
12233 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule");
12234 0 : return -1;
12235 : }
12236 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
12237 : {
12238 : int schedule_cntr_0;
12239 0 : if (ARRAY_SIZE(object->schedule) != PyList_GET_SIZE(value)) {
12240 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));
12241 0 : return -1;
12242 : }
12243 0 : for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
12244 0 : if (PyList_GET_ITEM(value, schedule_cntr_0) == NULL) {
12245 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule[schedule_cntr_0]");
12246 0 : return -1;
12247 : }
12248 : {
12249 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->schedule[schedule_cntr_0]));
12250 0 : if (PyLong_Check(PyList_GET_ITEM(value, schedule_cntr_0))) {
12251 : unsigned long long test_var;
12252 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, schedule_cntr_0));
12253 0 : if (PyErr_Occurred() != NULL) {
12254 0 : return -1;
12255 : }
12256 0 : if (test_var > uint_max) {
12257 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12258 : PyLong_Type.tp_name, uint_max, test_var);
12259 0 : return -1;
12260 : }
12261 0 : object->schedule[schedule_cntr_0] = test_var;
12262 : } else {
12263 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12264 : PyLong_Type.tp_name);
12265 0 : return -1;
12266 : }
12267 : }
12268 : }
12269 : }
12270 0 : return 0;
12271 : }
12272 :
12273 0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_get_options(PyObject *obj, void *closure)
12274 : {
12275 0 : struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(obj);
12276 : PyObject *py_options;
12277 0 : py_options = PyLong_FromUnsignedLongLong((uint32_t)object->options);
12278 0 : return py_options;
12279 : }
12280 :
12281 0 : static int py_drsuapi_DsReplicaAddRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
12282 : {
12283 0 : struct drsuapi_DsReplicaAddRequest1 *object = (struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(py_obj);
12284 0 : if (value == NULL) {
12285 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
12286 0 : return -1;
12287 : }
12288 : {
12289 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
12290 0 : if (PyLong_Check(value)) {
12291 : unsigned long long test_var;
12292 0 : test_var = PyLong_AsUnsignedLongLong(value);
12293 0 : if (PyErr_Occurred() != NULL) {
12294 0 : return -1;
12295 : }
12296 0 : if (test_var > uint_max) {
12297 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12298 : PyLong_Type.tp_name, uint_max, test_var);
12299 0 : return -1;
12300 : }
12301 0 : object->options = test_var;
12302 : } else {
12303 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12304 : PyLong_Type.tp_name);
12305 0 : return -1;
12306 : }
12307 : }
12308 0 : return 0;
12309 : }
12310 :
12311 : static PyGetSetDef py_drsuapi_DsReplicaAddRequest1_getsetters[] = {
12312 : {
12313 : .name = discard_const_p(char, "naming_context"),
12314 : .get = py_drsuapi_DsReplicaAddRequest1_get_naming_context,
12315 : .set = py_drsuapi_DsReplicaAddRequest1_set_naming_context,
12316 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
12317 : },
12318 : {
12319 : .name = discard_const_p(char, "source_dsa_address"),
12320 : .get = py_drsuapi_DsReplicaAddRequest1_get_source_dsa_address,
12321 : .set = py_drsuapi_DsReplicaAddRequest1_set_source_dsa_address,
12322 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
12323 : },
12324 : {
12325 : .name = discard_const_p(char, "schedule"),
12326 : .get = py_drsuapi_DsReplicaAddRequest1_get_schedule,
12327 : .set = py_drsuapi_DsReplicaAddRequest1_set_schedule,
12328 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12329 : },
12330 : {
12331 : .name = discard_const_p(char, "options"),
12332 : .get = py_drsuapi_DsReplicaAddRequest1_get_options,
12333 : .set = py_drsuapi_DsReplicaAddRequest1_set_options,
12334 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
12335 : },
12336 : { .name = NULL }
12337 : };
12338 :
12339 0 : static PyObject *py_drsuapi_DsReplicaAddRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12340 : {
12341 0 : return pytalloc_new(struct drsuapi_DsReplicaAddRequest1, type);
12342 : }
12343 :
12344 :
12345 : static PyTypeObject drsuapi_DsReplicaAddRequest1_Type = {
12346 : PyVarObject_HEAD_INIT(NULL, 0)
12347 : .tp_name = "drsuapi.DsReplicaAddRequest1",
12348 : .tp_getset = py_drsuapi_DsReplicaAddRequest1_getsetters,
12349 : .tp_methods = NULL,
12350 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12351 : .tp_new = py_drsuapi_DsReplicaAddRequest1_new,
12352 : };
12353 :
12354 :
12355 0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_naming_context(PyObject *obj, void *closure)
12356 : {
12357 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
12358 : PyObject *py_naming_context;
12359 0 : if (object->naming_context == NULL) {
12360 0 : Py_RETURN_NONE;
12361 : }
12362 0 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
12363 0 : return py_naming_context;
12364 : }
12365 :
12366 0 : static int py_drsuapi_DsReplicaAddRequest2_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
12367 : {
12368 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
12369 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
12370 0 : if (value == NULL) {
12371 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
12372 0 : return -1;
12373 : }
12374 0 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
12375 0 : if (object->naming_context == NULL) {
12376 0 : PyErr_NoMemory();
12377 0 : return -1;
12378 : }
12379 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
12380 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12381 0 : PyErr_NoMemory();
12382 0 : return -1;
12383 : }
12384 0 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
12385 0 : return 0;
12386 : }
12387 :
12388 0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_source_dsa_dn(PyObject *obj, void *closure)
12389 : {
12390 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
12391 : PyObject *py_source_dsa_dn;
12392 0 : if (object->source_dsa_dn == NULL) {
12393 0 : Py_RETURN_NONE;
12394 : }
12395 0 : if (object->source_dsa_dn == NULL) {
12396 0 : py_source_dsa_dn = Py_None;
12397 0 : Py_INCREF(py_source_dsa_dn);
12398 : } else {
12399 0 : py_source_dsa_dn = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->source_dsa_dn, object->source_dsa_dn);
12400 : }
12401 0 : return py_source_dsa_dn;
12402 : }
12403 :
12404 0 : static int py_drsuapi_DsReplicaAddRequest2_set_source_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
12405 : {
12406 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
12407 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->source_dsa_dn));
12408 0 : if (value == NULL) {
12409 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_dn");
12410 0 : return -1;
12411 : }
12412 0 : if (value == Py_None) {
12413 0 : object->source_dsa_dn = NULL;
12414 : } else {
12415 0 : object->source_dsa_dn = NULL;
12416 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
12417 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12418 0 : PyErr_NoMemory();
12419 0 : return -1;
12420 : }
12421 0 : object->source_dsa_dn = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
12422 : }
12423 0 : return 0;
12424 : }
12425 :
12426 0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_transport_dn(PyObject *obj, void *closure)
12427 : {
12428 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
12429 : PyObject *py_transport_dn;
12430 0 : if (object->transport_dn == NULL) {
12431 0 : Py_RETURN_NONE;
12432 : }
12433 0 : if (object->transport_dn == NULL) {
12434 0 : py_transport_dn = Py_None;
12435 0 : Py_INCREF(py_transport_dn);
12436 : } else {
12437 0 : py_transport_dn = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->transport_dn, object->transport_dn);
12438 : }
12439 0 : return py_transport_dn;
12440 : }
12441 :
12442 0 : static int py_drsuapi_DsReplicaAddRequest2_set_transport_dn(PyObject *py_obj, PyObject *value, void *closure)
12443 : {
12444 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
12445 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->transport_dn));
12446 0 : if (value == NULL) {
12447 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport_dn");
12448 0 : return -1;
12449 : }
12450 0 : if (value == Py_None) {
12451 0 : object->transport_dn = NULL;
12452 : } else {
12453 0 : object->transport_dn = NULL;
12454 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
12455 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12456 0 : PyErr_NoMemory();
12457 0 : return -1;
12458 : }
12459 0 : object->transport_dn = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
12460 : }
12461 0 : return 0;
12462 : }
12463 :
12464 0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_source_dsa_address(PyObject *obj, void *closure)
12465 : {
12466 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
12467 : PyObject *py_source_dsa_address;
12468 0 : if (object->source_dsa_address == NULL) {
12469 0 : Py_RETURN_NONE;
12470 : }
12471 0 : if (object->source_dsa_address == NULL) {
12472 0 : py_source_dsa_address = Py_None;
12473 0 : Py_INCREF(py_source_dsa_address);
12474 : } else {
12475 0 : if (object->source_dsa_address == NULL) {
12476 0 : py_source_dsa_address = Py_None;
12477 0 : Py_INCREF(py_source_dsa_address);
12478 : } else {
12479 0 : py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
12480 : }
12481 : }
12482 0 : return py_source_dsa_address;
12483 : }
12484 :
12485 0 : static int py_drsuapi_DsReplicaAddRequest2_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
12486 : {
12487 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
12488 0 : if (value == NULL) {
12489 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_address");
12490 0 : return -1;
12491 : }
12492 0 : if (value == Py_None) {
12493 0 : object->source_dsa_address = NULL;
12494 : } else {
12495 0 : object->source_dsa_address = NULL;
12496 : {
12497 : const char *test_str;
12498 : const char *talloc_str;
12499 0 : PyObject *unicode = NULL;
12500 0 : if (PyUnicode_Check(value)) {
12501 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12502 0 : if (unicode == NULL) {
12503 0 : PyErr_NoMemory();
12504 0 : return -1;
12505 : }
12506 0 : test_str = PyBytes_AS_STRING(unicode);
12507 0 : } else if (PyBytes_Check(value)) {
12508 0 : test_str = PyBytes_AS_STRING(value);
12509 : } else {
12510 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12511 0 : return -1;
12512 : }
12513 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12514 0 : if (unicode != NULL) {
12515 0 : Py_DECREF(unicode);
12516 : }
12517 0 : if (talloc_str == NULL) {
12518 0 : PyErr_NoMemory();
12519 0 : return -1;
12520 : }
12521 0 : object->source_dsa_address = talloc_str;
12522 : }
12523 : }
12524 0 : return 0;
12525 : }
12526 :
12527 0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_schedule(PyObject *obj, void *closure)
12528 : {
12529 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
12530 : PyObject *py_schedule;
12531 0 : py_schedule = PyList_New(84);
12532 0 : if (py_schedule == NULL) {
12533 0 : return NULL;
12534 : }
12535 : {
12536 : int schedule_cntr_0;
12537 0 : for (schedule_cntr_0 = 0; schedule_cntr_0 < (84); schedule_cntr_0++) {
12538 : PyObject *py_schedule_0;
12539 0 : py_schedule_0 = PyLong_FromLong((uint16_t)object->schedule[schedule_cntr_0]);
12540 0 : PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
12541 : }
12542 : }
12543 0 : return py_schedule;
12544 : }
12545 :
12546 0 : static int py_drsuapi_DsReplicaAddRequest2_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
12547 : {
12548 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
12549 0 : if (value == NULL) {
12550 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule");
12551 0 : return -1;
12552 : }
12553 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
12554 : {
12555 : int schedule_cntr_0;
12556 0 : if (ARRAY_SIZE(object->schedule) != PyList_GET_SIZE(value)) {
12557 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));
12558 0 : return -1;
12559 : }
12560 0 : for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
12561 0 : if (PyList_GET_ITEM(value, schedule_cntr_0) == NULL) {
12562 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule[schedule_cntr_0]");
12563 0 : return -1;
12564 : }
12565 : {
12566 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->schedule[schedule_cntr_0]));
12567 0 : if (PyLong_Check(PyList_GET_ITEM(value, schedule_cntr_0))) {
12568 : unsigned long long test_var;
12569 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, schedule_cntr_0));
12570 0 : if (PyErr_Occurred() != NULL) {
12571 0 : return -1;
12572 : }
12573 0 : if (test_var > uint_max) {
12574 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12575 : PyLong_Type.tp_name, uint_max, test_var);
12576 0 : return -1;
12577 : }
12578 0 : object->schedule[schedule_cntr_0] = test_var;
12579 : } else {
12580 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12581 : PyLong_Type.tp_name);
12582 0 : return -1;
12583 : }
12584 : }
12585 : }
12586 : }
12587 0 : return 0;
12588 : }
12589 :
12590 0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_get_options(PyObject *obj, void *closure)
12591 : {
12592 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(obj);
12593 : PyObject *py_options;
12594 0 : py_options = PyLong_FromUnsignedLongLong((uint32_t)object->options);
12595 0 : return py_options;
12596 : }
12597 :
12598 0 : static int py_drsuapi_DsReplicaAddRequest2_set_options(PyObject *py_obj, PyObject *value, void *closure)
12599 : {
12600 0 : struct drsuapi_DsReplicaAddRequest2 *object = (struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(py_obj);
12601 0 : if (value == NULL) {
12602 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
12603 0 : return -1;
12604 : }
12605 : {
12606 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
12607 0 : if (PyLong_Check(value)) {
12608 : unsigned long long test_var;
12609 0 : test_var = PyLong_AsUnsignedLongLong(value);
12610 0 : if (PyErr_Occurred() != NULL) {
12611 0 : return -1;
12612 : }
12613 0 : if (test_var > uint_max) {
12614 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12615 : PyLong_Type.tp_name, uint_max, test_var);
12616 0 : return -1;
12617 : }
12618 0 : object->options = test_var;
12619 : } else {
12620 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12621 : PyLong_Type.tp_name);
12622 0 : return -1;
12623 : }
12624 : }
12625 0 : return 0;
12626 : }
12627 :
12628 : static PyGetSetDef py_drsuapi_DsReplicaAddRequest2_getsetters[] = {
12629 : {
12630 : .name = discard_const_p(char, "naming_context"),
12631 : .get = py_drsuapi_DsReplicaAddRequest2_get_naming_context,
12632 : .set = py_drsuapi_DsReplicaAddRequest2_set_naming_context,
12633 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
12634 : },
12635 : {
12636 : .name = discard_const_p(char, "source_dsa_dn"),
12637 : .get = py_drsuapi_DsReplicaAddRequest2_get_source_dsa_dn,
12638 : .set = py_drsuapi_DsReplicaAddRequest2_set_source_dsa_dn,
12639 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
12640 : },
12641 : {
12642 : .name = discard_const_p(char, "transport_dn"),
12643 : .get = py_drsuapi_DsReplicaAddRequest2_get_transport_dn,
12644 : .set = py_drsuapi_DsReplicaAddRequest2_set_transport_dn,
12645 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
12646 : },
12647 : {
12648 : .name = discard_const_p(char, "source_dsa_address"),
12649 : .get = py_drsuapi_DsReplicaAddRequest2_get_source_dsa_address,
12650 : .set = py_drsuapi_DsReplicaAddRequest2_set_source_dsa_address,
12651 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
12652 : },
12653 : {
12654 : .name = discard_const_p(char, "schedule"),
12655 : .get = py_drsuapi_DsReplicaAddRequest2_get_schedule,
12656 : .set = py_drsuapi_DsReplicaAddRequest2_set_schedule,
12657 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12658 : },
12659 : {
12660 : .name = discard_const_p(char, "options"),
12661 : .get = py_drsuapi_DsReplicaAddRequest2_get_options,
12662 : .set = py_drsuapi_DsReplicaAddRequest2_set_options,
12663 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
12664 : },
12665 : { .name = NULL }
12666 : };
12667 :
12668 0 : static PyObject *py_drsuapi_DsReplicaAddRequest2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12669 : {
12670 0 : return pytalloc_new(struct drsuapi_DsReplicaAddRequest2, type);
12671 : }
12672 :
12673 :
12674 : static PyTypeObject drsuapi_DsReplicaAddRequest2_Type = {
12675 : PyVarObject_HEAD_INIT(NULL, 0)
12676 : .tp_name = "drsuapi.DsReplicaAddRequest2",
12677 : .tp_getset = py_drsuapi_DsReplicaAddRequest2_getsetters,
12678 : .tp_methods = NULL,
12679 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12680 : .tp_new = py_drsuapi_DsReplicaAddRequest2_new,
12681 : };
12682 :
12683 0 : static PyObject *py_import_drsuapi_DsReplicaAddRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaAddRequest *in)
12684 : {
12685 : PyObject *ret;
12686 :
12687 0 : switch (level) {
12688 0 : case 1:
12689 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaAddRequest1_Type, mem_ctx, &in->req1);
12690 0 : return ret;
12691 :
12692 0 : case 2:
12693 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaAddRequest2_Type, mem_ctx, &in->req2);
12694 0 : return ret;
12695 :
12696 : }
12697 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
12698 0 : return NULL;
12699 : }
12700 :
12701 0 : static union drsuapi_DsReplicaAddRequest *py_export_drsuapi_DsReplicaAddRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
12702 : {
12703 0 : union drsuapi_DsReplicaAddRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaAddRequest);
12704 0 : switch (level) {
12705 0 : case 1:
12706 0 : if (in == NULL) {
12707 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
12708 0 : talloc_free(ret); return NULL;
12709 : }
12710 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaAddRequest1_Type, in, talloc_free(ret); return NULL;);
12711 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
12712 0 : PyErr_NoMemory();
12713 0 : talloc_free(ret); return NULL;
12714 : }
12715 0 : ret->req1 = *(struct drsuapi_DsReplicaAddRequest1 *)pytalloc_get_ptr(in);
12716 0 : break;
12717 :
12718 0 : case 2:
12719 0 : if (in == NULL) {
12720 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req2");
12721 0 : talloc_free(ret); return NULL;
12722 : }
12723 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaAddRequest2_Type, in, talloc_free(ret); return NULL;);
12724 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
12725 0 : PyErr_NoMemory();
12726 0 : talloc_free(ret); return NULL;
12727 : }
12728 0 : ret->req2 = *(struct drsuapi_DsReplicaAddRequest2 *)pytalloc_get_ptr(in);
12729 0 : break;
12730 :
12731 0 : default:
12732 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
12733 0 : talloc_free(ret);
12734 0 : ret = NULL;
12735 : }
12736 :
12737 0 : return ret;
12738 : }
12739 :
12740 0 : static PyObject *py_drsuapi_DsReplicaAddRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12741 : {
12742 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
12743 0 : PyObject *mem_ctx_obj = NULL;
12744 0 : TALLOC_CTX *mem_ctx = NULL;
12745 0 : int level = 0;
12746 0 : PyObject *in_obj = NULL;
12747 0 : union drsuapi_DsReplicaAddRequest *in = NULL;
12748 :
12749 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
12750 : discard_const_p(char *, kwnames),
12751 : &mem_ctx_obj,
12752 : &level,
12753 : &in_obj)) {
12754 0 : return NULL;
12755 : }
12756 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
12757 0 : if (mem_ctx == NULL) {
12758 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
12759 0 : return NULL;
12760 : }
12761 0 : in = (union drsuapi_DsReplicaAddRequest *)pytalloc_get_ptr(in_obj);
12762 0 : if (in == NULL) {
12763 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaAddRequest!");
12764 0 : return NULL;
12765 : }
12766 :
12767 0 : return py_import_drsuapi_DsReplicaAddRequest(mem_ctx, level, in);
12768 : }
12769 :
12770 0 : static PyObject *py_drsuapi_DsReplicaAddRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12771 : {
12772 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
12773 0 : PyObject *mem_ctx_obj = NULL;
12774 0 : TALLOC_CTX *mem_ctx = NULL;
12775 0 : int level = 0;
12776 0 : PyObject *in = NULL;
12777 0 : union drsuapi_DsReplicaAddRequest *out = NULL;
12778 :
12779 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
12780 : discard_const_p(char *, kwnames),
12781 : &mem_ctx_obj,
12782 : &level,
12783 : &in)) {
12784 0 : return NULL;
12785 : }
12786 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
12787 0 : if (mem_ctx == NULL) {
12788 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
12789 0 : return NULL;
12790 : }
12791 :
12792 0 : out = py_export_drsuapi_DsReplicaAddRequest(mem_ctx, level, in);
12793 0 : if (out == NULL) {
12794 0 : return NULL;
12795 : }
12796 :
12797 0 : return pytalloc_GenericObject_reference(out);
12798 : }
12799 :
12800 : static PyMethodDef py_drsuapi_DsReplicaAddRequest_methods[] = {
12801 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAddRequest_import),
12802 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
12803 : "T.__import__(mem_ctx, level, in) => ret." },
12804 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAddRequest_export),
12805 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
12806 : "T.__export__(mem_ctx, level, in) => ret." },
12807 : { NULL, NULL, 0, NULL }
12808 : };
12809 :
12810 0 : static PyObject *py_drsuapi_DsReplicaAddRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12811 : {
12812 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
12813 0 : return NULL;
12814 : }
12815 :
12816 :
12817 : static PyTypeObject drsuapi_DsReplicaAddRequest_Type = {
12818 : PyVarObject_HEAD_INIT(NULL, 0)
12819 : .tp_name = "drsuapi.DsReplicaAddRequest",
12820 : .tp_getset = NULL,
12821 : .tp_methods = py_drsuapi_DsReplicaAddRequest_methods,
12822 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12823 : .tp_new = py_drsuapi_DsReplicaAddRequest_new,
12824 : };
12825 :
12826 :
12827 0 : static PyObject *py_drsuapi_DsReplicaDelRequest1_get_naming_context(PyObject *obj, void *closure)
12828 : {
12829 0 : struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(obj);
12830 : PyObject *py_naming_context;
12831 0 : if (object->naming_context == NULL) {
12832 0 : Py_RETURN_NONE;
12833 : }
12834 0 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
12835 0 : return py_naming_context;
12836 : }
12837 :
12838 0 : static int py_drsuapi_DsReplicaDelRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
12839 : {
12840 0 : struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(py_obj);
12841 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
12842 0 : if (value == NULL) {
12843 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
12844 0 : return -1;
12845 : }
12846 0 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
12847 0 : if (object->naming_context == NULL) {
12848 0 : PyErr_NoMemory();
12849 0 : return -1;
12850 : }
12851 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
12852 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
12853 0 : PyErr_NoMemory();
12854 0 : return -1;
12855 : }
12856 0 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
12857 0 : return 0;
12858 : }
12859 :
12860 0 : static PyObject *py_drsuapi_DsReplicaDelRequest1_get_source_dsa_address(PyObject *obj, void *closure)
12861 : {
12862 0 : struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(obj);
12863 : PyObject *py_source_dsa_address;
12864 0 : if (object->source_dsa_address == NULL) {
12865 0 : Py_RETURN_NONE;
12866 : }
12867 0 : if (object->source_dsa_address == NULL) {
12868 0 : py_source_dsa_address = Py_None;
12869 0 : Py_INCREF(py_source_dsa_address);
12870 : } else {
12871 0 : if (object->source_dsa_address == NULL) {
12872 0 : py_source_dsa_address = Py_None;
12873 0 : Py_INCREF(py_source_dsa_address);
12874 : } else {
12875 0 : py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
12876 : }
12877 : }
12878 0 : return py_source_dsa_address;
12879 : }
12880 :
12881 0 : static int py_drsuapi_DsReplicaDelRequest1_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
12882 : {
12883 0 : struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(py_obj);
12884 0 : if (value == NULL) {
12885 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_address");
12886 0 : return -1;
12887 : }
12888 0 : if (value == Py_None) {
12889 0 : object->source_dsa_address = NULL;
12890 : } else {
12891 0 : object->source_dsa_address = NULL;
12892 : {
12893 : const char *test_str;
12894 : const char *talloc_str;
12895 0 : PyObject *unicode = NULL;
12896 0 : if (PyUnicode_Check(value)) {
12897 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12898 0 : if (unicode == NULL) {
12899 0 : PyErr_NoMemory();
12900 0 : return -1;
12901 : }
12902 0 : test_str = PyBytes_AS_STRING(unicode);
12903 0 : } else if (PyBytes_Check(value)) {
12904 0 : test_str = PyBytes_AS_STRING(value);
12905 : } else {
12906 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12907 0 : return -1;
12908 : }
12909 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12910 0 : if (unicode != NULL) {
12911 0 : Py_DECREF(unicode);
12912 : }
12913 0 : if (talloc_str == NULL) {
12914 0 : PyErr_NoMemory();
12915 0 : return -1;
12916 : }
12917 0 : object->source_dsa_address = talloc_str;
12918 : }
12919 : }
12920 0 : return 0;
12921 : }
12922 :
12923 0 : static PyObject *py_drsuapi_DsReplicaDelRequest1_get_options(PyObject *obj, void *closure)
12924 : {
12925 0 : struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(obj);
12926 : PyObject *py_options;
12927 0 : py_options = PyLong_FromUnsignedLongLong((uint32_t)object->options);
12928 0 : return py_options;
12929 : }
12930 :
12931 0 : static int py_drsuapi_DsReplicaDelRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
12932 : {
12933 0 : struct drsuapi_DsReplicaDelRequest1 *object = (struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(py_obj);
12934 0 : if (value == NULL) {
12935 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
12936 0 : return -1;
12937 : }
12938 : {
12939 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
12940 0 : if (PyLong_Check(value)) {
12941 : unsigned long long test_var;
12942 0 : test_var = PyLong_AsUnsignedLongLong(value);
12943 0 : if (PyErr_Occurred() != NULL) {
12944 0 : return -1;
12945 : }
12946 0 : if (test_var > uint_max) {
12947 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12948 : PyLong_Type.tp_name, uint_max, test_var);
12949 0 : return -1;
12950 : }
12951 0 : object->options = test_var;
12952 : } else {
12953 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12954 : PyLong_Type.tp_name);
12955 0 : return -1;
12956 : }
12957 : }
12958 0 : return 0;
12959 : }
12960 :
12961 : static PyGetSetDef py_drsuapi_DsReplicaDelRequest1_getsetters[] = {
12962 : {
12963 : .name = discard_const_p(char, "naming_context"),
12964 : .get = py_drsuapi_DsReplicaDelRequest1_get_naming_context,
12965 : .set = py_drsuapi_DsReplicaDelRequest1_set_naming_context,
12966 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
12967 : },
12968 : {
12969 : .name = discard_const_p(char, "source_dsa_address"),
12970 : .get = py_drsuapi_DsReplicaDelRequest1_get_source_dsa_address,
12971 : .set = py_drsuapi_DsReplicaDelRequest1_set_source_dsa_address,
12972 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12973 : },
12974 : {
12975 : .name = discard_const_p(char, "options"),
12976 : .get = py_drsuapi_DsReplicaDelRequest1_get_options,
12977 : .set = py_drsuapi_DsReplicaDelRequest1_set_options,
12978 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
12979 : },
12980 : { .name = NULL }
12981 : };
12982 :
12983 0 : static PyObject *py_drsuapi_DsReplicaDelRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12984 : {
12985 0 : return pytalloc_new(struct drsuapi_DsReplicaDelRequest1, type);
12986 : }
12987 :
12988 :
12989 : static PyTypeObject drsuapi_DsReplicaDelRequest1_Type = {
12990 : PyVarObject_HEAD_INIT(NULL, 0)
12991 : .tp_name = "drsuapi.DsReplicaDelRequest1",
12992 : .tp_getset = py_drsuapi_DsReplicaDelRequest1_getsetters,
12993 : .tp_methods = NULL,
12994 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12995 : .tp_new = py_drsuapi_DsReplicaDelRequest1_new,
12996 : };
12997 :
12998 0 : static PyObject *py_import_drsuapi_DsReplicaDelRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaDelRequest *in)
12999 : {
13000 : PyObject *ret;
13001 :
13002 0 : switch (level) {
13003 0 : case 1:
13004 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaDelRequest1_Type, mem_ctx, &in->req1);
13005 0 : return ret;
13006 :
13007 : }
13008 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
13009 0 : return NULL;
13010 : }
13011 :
13012 0 : static union drsuapi_DsReplicaDelRequest *py_export_drsuapi_DsReplicaDelRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
13013 : {
13014 0 : union drsuapi_DsReplicaDelRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaDelRequest);
13015 0 : switch (level) {
13016 0 : case 1:
13017 0 : if (in == NULL) {
13018 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
13019 0 : talloc_free(ret); return NULL;
13020 : }
13021 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaDelRequest1_Type, in, talloc_free(ret); return NULL;);
13022 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13023 0 : PyErr_NoMemory();
13024 0 : talloc_free(ret); return NULL;
13025 : }
13026 0 : ret->req1 = *(struct drsuapi_DsReplicaDelRequest1 *)pytalloc_get_ptr(in);
13027 0 : break;
13028 :
13029 0 : default:
13030 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
13031 0 : talloc_free(ret);
13032 0 : ret = NULL;
13033 : }
13034 :
13035 0 : return ret;
13036 : }
13037 :
13038 0 : static PyObject *py_drsuapi_DsReplicaDelRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13039 : {
13040 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
13041 0 : PyObject *mem_ctx_obj = NULL;
13042 0 : TALLOC_CTX *mem_ctx = NULL;
13043 0 : int level = 0;
13044 0 : PyObject *in_obj = NULL;
13045 0 : union drsuapi_DsReplicaDelRequest *in = NULL;
13046 :
13047 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
13048 : discard_const_p(char *, kwnames),
13049 : &mem_ctx_obj,
13050 : &level,
13051 : &in_obj)) {
13052 0 : return NULL;
13053 : }
13054 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
13055 0 : if (mem_ctx == NULL) {
13056 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
13057 0 : return NULL;
13058 : }
13059 0 : in = (union drsuapi_DsReplicaDelRequest *)pytalloc_get_ptr(in_obj);
13060 0 : if (in == NULL) {
13061 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaDelRequest!");
13062 0 : return NULL;
13063 : }
13064 :
13065 0 : return py_import_drsuapi_DsReplicaDelRequest(mem_ctx, level, in);
13066 : }
13067 :
13068 0 : static PyObject *py_drsuapi_DsReplicaDelRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13069 : {
13070 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
13071 0 : PyObject *mem_ctx_obj = NULL;
13072 0 : TALLOC_CTX *mem_ctx = NULL;
13073 0 : int level = 0;
13074 0 : PyObject *in = NULL;
13075 0 : union drsuapi_DsReplicaDelRequest *out = NULL;
13076 :
13077 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
13078 : discard_const_p(char *, kwnames),
13079 : &mem_ctx_obj,
13080 : &level,
13081 : &in)) {
13082 0 : return NULL;
13083 : }
13084 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
13085 0 : if (mem_ctx == NULL) {
13086 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
13087 0 : return NULL;
13088 : }
13089 :
13090 0 : out = py_export_drsuapi_DsReplicaDelRequest(mem_ctx, level, in);
13091 0 : if (out == NULL) {
13092 0 : return NULL;
13093 : }
13094 :
13095 0 : return pytalloc_GenericObject_reference(out);
13096 : }
13097 :
13098 : static PyMethodDef py_drsuapi_DsReplicaDelRequest_methods[] = {
13099 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDelRequest_import),
13100 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
13101 : "T.__import__(mem_ctx, level, in) => ret." },
13102 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDelRequest_export),
13103 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
13104 : "T.__export__(mem_ctx, level, in) => ret." },
13105 : { NULL, NULL, 0, NULL }
13106 : };
13107 :
13108 0 : static PyObject *py_drsuapi_DsReplicaDelRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13109 : {
13110 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
13111 0 : return NULL;
13112 : }
13113 :
13114 :
13115 : static PyTypeObject drsuapi_DsReplicaDelRequest_Type = {
13116 : PyVarObject_HEAD_INIT(NULL, 0)
13117 : .tp_name = "drsuapi.DsReplicaDelRequest",
13118 : .tp_getset = NULL,
13119 : .tp_methods = py_drsuapi_DsReplicaDelRequest_methods,
13120 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13121 : .tp_new = py_drsuapi_DsReplicaDelRequest_new,
13122 : };
13123 :
13124 :
13125 0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_naming_context(PyObject *obj, void *closure)
13126 : {
13127 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
13128 : PyObject *py_naming_context;
13129 0 : if (object->naming_context == NULL) {
13130 0 : Py_RETURN_NONE;
13131 : }
13132 0 : py_naming_context = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->naming_context, object->naming_context);
13133 0 : return py_naming_context;
13134 : }
13135 :
13136 0 : static int py_drsuapi_DsReplicaModRequest1_set_naming_context(PyObject *py_obj, PyObject *value, void *closure)
13137 : {
13138 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
13139 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->naming_context));
13140 0 : if (value == NULL) {
13141 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context");
13142 0 : return -1;
13143 : }
13144 0 : object->naming_context = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->naming_context);
13145 0 : if (object->naming_context == NULL) {
13146 0 : PyErr_NoMemory();
13147 0 : return -1;
13148 : }
13149 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
13150 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
13151 0 : PyErr_NoMemory();
13152 0 : return -1;
13153 : }
13154 0 : object->naming_context = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
13155 0 : return 0;
13156 : }
13157 :
13158 0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_source_dra(PyObject *obj, void *closure)
13159 : {
13160 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
13161 : PyObject *py_source_dra;
13162 0 : py_source_dra = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dra);
13163 0 : return py_source_dra;
13164 : }
13165 :
13166 0 : static int py_drsuapi_DsReplicaModRequest1_set_source_dra(PyObject *py_obj, PyObject *value, void *closure)
13167 : {
13168 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
13169 0 : if (value == NULL) {
13170 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dra");
13171 0 : return -1;
13172 : }
13173 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
13174 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
13175 0 : PyErr_NoMemory();
13176 0 : return -1;
13177 : }
13178 0 : object->source_dra = *(struct GUID *)pytalloc_get_ptr(value);
13179 0 : return 0;
13180 : }
13181 :
13182 0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_source_dra_address(PyObject *obj, void *closure)
13183 : {
13184 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
13185 : PyObject *py_source_dra_address;
13186 0 : if (object->source_dra_address == NULL) {
13187 0 : Py_RETURN_NONE;
13188 : }
13189 0 : if (object->source_dra_address == NULL) {
13190 0 : py_source_dra_address = Py_None;
13191 0 : Py_INCREF(py_source_dra_address);
13192 : } else {
13193 0 : if (object->source_dra_address == NULL) {
13194 0 : py_source_dra_address = Py_None;
13195 0 : Py_INCREF(py_source_dra_address);
13196 : } else {
13197 0 : py_source_dra_address = PyUnicode_Decode(object->source_dra_address, strlen(object->source_dra_address), "utf-8", "ignore");
13198 : }
13199 : }
13200 0 : return py_source_dra_address;
13201 : }
13202 :
13203 0 : static int py_drsuapi_DsReplicaModRequest1_set_source_dra_address(PyObject *py_obj, PyObject *value, void *closure)
13204 : {
13205 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
13206 0 : if (value == NULL) {
13207 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dra_address");
13208 0 : return -1;
13209 : }
13210 0 : if (value == Py_None) {
13211 0 : object->source_dra_address = NULL;
13212 : } else {
13213 0 : object->source_dra_address = NULL;
13214 : {
13215 : const char *test_str;
13216 : const char *talloc_str;
13217 0 : PyObject *unicode = NULL;
13218 0 : if (PyUnicode_Check(value)) {
13219 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
13220 0 : if (unicode == NULL) {
13221 0 : PyErr_NoMemory();
13222 0 : return -1;
13223 : }
13224 0 : test_str = PyBytes_AS_STRING(unicode);
13225 0 : } else if (PyBytes_Check(value)) {
13226 0 : test_str = PyBytes_AS_STRING(value);
13227 : } else {
13228 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
13229 0 : return -1;
13230 : }
13231 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
13232 0 : if (unicode != NULL) {
13233 0 : Py_DECREF(unicode);
13234 : }
13235 0 : if (talloc_str == NULL) {
13236 0 : PyErr_NoMemory();
13237 0 : return -1;
13238 : }
13239 0 : object->source_dra_address = talloc_str;
13240 : }
13241 : }
13242 0 : return 0;
13243 : }
13244 :
13245 0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_schedule(PyObject *obj, void *closure)
13246 : {
13247 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
13248 : PyObject *py_schedule;
13249 0 : py_schedule = PyList_New(84);
13250 0 : if (py_schedule == NULL) {
13251 0 : return NULL;
13252 : }
13253 : {
13254 : int schedule_cntr_0;
13255 0 : for (schedule_cntr_0 = 0; schedule_cntr_0 < (84); schedule_cntr_0++) {
13256 : PyObject *py_schedule_0;
13257 0 : py_schedule_0 = PyLong_FromLong((uint16_t)object->schedule[schedule_cntr_0]);
13258 0 : PyList_SetItem(py_schedule, schedule_cntr_0, py_schedule_0);
13259 : }
13260 : }
13261 0 : return py_schedule;
13262 : }
13263 :
13264 0 : static int py_drsuapi_DsReplicaModRequest1_set_schedule(PyObject *py_obj, PyObject *value, void *closure)
13265 : {
13266 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
13267 0 : if (value == NULL) {
13268 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule");
13269 0 : return -1;
13270 : }
13271 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13272 : {
13273 : int schedule_cntr_0;
13274 0 : if (ARRAY_SIZE(object->schedule) != PyList_GET_SIZE(value)) {
13275 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));
13276 0 : return -1;
13277 : }
13278 0 : for (schedule_cntr_0 = 0; schedule_cntr_0 < PyList_GET_SIZE(value); schedule_cntr_0++) {
13279 0 : if (PyList_GET_ITEM(value, schedule_cntr_0) == NULL) {
13280 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->schedule[schedule_cntr_0]");
13281 0 : return -1;
13282 : }
13283 : {
13284 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->schedule[schedule_cntr_0]));
13285 0 : if (PyLong_Check(PyList_GET_ITEM(value, schedule_cntr_0))) {
13286 : unsigned long long test_var;
13287 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, schedule_cntr_0));
13288 0 : if (PyErr_Occurred() != NULL) {
13289 0 : return -1;
13290 : }
13291 0 : if (test_var > uint_max) {
13292 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13293 : PyLong_Type.tp_name, uint_max, test_var);
13294 0 : return -1;
13295 : }
13296 0 : object->schedule[schedule_cntr_0] = test_var;
13297 : } else {
13298 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13299 : PyLong_Type.tp_name);
13300 0 : return -1;
13301 : }
13302 : }
13303 : }
13304 : }
13305 0 : return 0;
13306 : }
13307 :
13308 0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_replica_flags(PyObject *obj, void *closure)
13309 : {
13310 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
13311 : PyObject *py_replica_flags;
13312 0 : py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)object->replica_flags);
13313 0 : return py_replica_flags;
13314 : }
13315 :
13316 0 : static int py_drsuapi_DsReplicaModRequest1_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
13317 : {
13318 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
13319 0 : if (value == NULL) {
13320 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
13321 0 : return -1;
13322 : }
13323 : {
13324 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
13325 0 : if (PyLong_Check(value)) {
13326 : unsigned long long test_var;
13327 0 : test_var = PyLong_AsUnsignedLongLong(value);
13328 0 : if (PyErr_Occurred() != NULL) {
13329 0 : return -1;
13330 : }
13331 0 : if (test_var > uint_max) {
13332 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13333 : PyLong_Type.tp_name, uint_max, test_var);
13334 0 : return -1;
13335 : }
13336 0 : object->replica_flags = test_var;
13337 : } else {
13338 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13339 : PyLong_Type.tp_name);
13340 0 : return -1;
13341 : }
13342 : }
13343 0 : return 0;
13344 : }
13345 :
13346 0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_modify_fields(PyObject *obj, void *closure)
13347 : {
13348 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
13349 : PyObject *py_modify_fields;
13350 0 : py_modify_fields = PyLong_FromUnsignedLongLong((uint32_t)object->modify_fields);
13351 0 : return py_modify_fields;
13352 : }
13353 :
13354 0 : static int py_drsuapi_DsReplicaModRequest1_set_modify_fields(PyObject *py_obj, PyObject *value, void *closure)
13355 : {
13356 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
13357 0 : if (value == NULL) {
13358 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->modify_fields");
13359 0 : return -1;
13360 : }
13361 : {
13362 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->modify_fields));
13363 0 : if (PyLong_Check(value)) {
13364 : unsigned long long test_var;
13365 0 : test_var = PyLong_AsUnsignedLongLong(value);
13366 0 : if (PyErr_Occurred() != NULL) {
13367 0 : return -1;
13368 : }
13369 0 : if (test_var > uint_max) {
13370 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13371 : PyLong_Type.tp_name, uint_max, test_var);
13372 0 : return -1;
13373 : }
13374 0 : object->modify_fields = test_var;
13375 : } else {
13376 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13377 : PyLong_Type.tp_name);
13378 0 : return -1;
13379 : }
13380 : }
13381 0 : return 0;
13382 : }
13383 :
13384 0 : static PyObject *py_drsuapi_DsReplicaModRequest1_get_options(PyObject *obj, void *closure)
13385 : {
13386 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(obj);
13387 : PyObject *py_options;
13388 0 : py_options = PyLong_FromUnsignedLongLong((uint32_t)object->options);
13389 0 : return py_options;
13390 : }
13391 :
13392 0 : static int py_drsuapi_DsReplicaModRequest1_set_options(PyObject *py_obj, PyObject *value, void *closure)
13393 : {
13394 0 : struct drsuapi_DsReplicaModRequest1 *object = (struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(py_obj);
13395 0 : if (value == NULL) {
13396 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
13397 0 : return -1;
13398 : }
13399 : {
13400 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
13401 0 : if (PyLong_Check(value)) {
13402 : unsigned long long test_var;
13403 0 : test_var = PyLong_AsUnsignedLongLong(value);
13404 0 : if (PyErr_Occurred() != NULL) {
13405 0 : return -1;
13406 : }
13407 0 : if (test_var > uint_max) {
13408 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13409 : PyLong_Type.tp_name, uint_max, test_var);
13410 0 : return -1;
13411 : }
13412 0 : object->options = test_var;
13413 : } else {
13414 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13415 : PyLong_Type.tp_name);
13416 0 : return -1;
13417 : }
13418 : }
13419 0 : return 0;
13420 : }
13421 :
13422 : static PyGetSetDef py_drsuapi_DsReplicaModRequest1_getsetters[] = {
13423 : {
13424 : .name = discard_const_p(char, "naming_context"),
13425 : .get = py_drsuapi_DsReplicaModRequest1_get_naming_context,
13426 : .set = py_drsuapi_DsReplicaModRequest1_set_naming_context,
13427 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
13428 : },
13429 : {
13430 : .name = discard_const_p(char, "source_dra"),
13431 : .get = py_drsuapi_DsReplicaModRequest1_get_source_dra,
13432 : .set = py_drsuapi_DsReplicaModRequest1_set_source_dra,
13433 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
13434 : },
13435 : {
13436 : .name = discard_const_p(char, "source_dra_address"),
13437 : .get = py_drsuapi_DsReplicaModRequest1_get_source_dra_address,
13438 : .set = py_drsuapi_DsReplicaModRequest1_set_source_dra_address,
13439 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
13440 : },
13441 : {
13442 : .name = discard_const_p(char, "schedule"),
13443 : .get = py_drsuapi_DsReplicaModRequest1_get_schedule,
13444 : .set = py_drsuapi_DsReplicaModRequest1_set_schedule,
13445 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13446 : },
13447 : {
13448 : .name = discard_const_p(char, "replica_flags"),
13449 : .get = py_drsuapi_DsReplicaModRequest1_get_replica_flags,
13450 : .set = py_drsuapi_DsReplicaModRequest1_set_replica_flags,
13451 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
13452 : },
13453 : {
13454 : .name = discard_const_p(char, "modify_fields"),
13455 : .get = py_drsuapi_DsReplicaModRequest1_get_modify_fields,
13456 : .set = py_drsuapi_DsReplicaModRequest1_set_modify_fields,
13457 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13458 : },
13459 : {
13460 : .name = discard_const_p(char, "options"),
13461 : .get = py_drsuapi_DsReplicaModRequest1_get_options,
13462 : .set = py_drsuapi_DsReplicaModRequest1_set_options,
13463 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
13464 : },
13465 : { .name = NULL }
13466 : };
13467 :
13468 0 : static PyObject *py_drsuapi_DsReplicaModRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13469 : {
13470 0 : return pytalloc_new(struct drsuapi_DsReplicaModRequest1, type);
13471 : }
13472 :
13473 :
13474 : static PyTypeObject drsuapi_DsReplicaModRequest1_Type = {
13475 : PyVarObject_HEAD_INIT(NULL, 0)
13476 : .tp_name = "drsuapi.DsReplicaModRequest1",
13477 : .tp_getset = py_drsuapi_DsReplicaModRequest1_getsetters,
13478 : .tp_methods = NULL,
13479 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13480 : .tp_new = py_drsuapi_DsReplicaModRequest1_new,
13481 : };
13482 :
13483 0 : static PyObject *py_import_drsuapi_DsReplicaModRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaModRequest *in)
13484 : {
13485 : PyObject *ret;
13486 :
13487 0 : switch (level) {
13488 0 : case 1:
13489 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaModRequest1_Type, mem_ctx, &in->req1);
13490 0 : return ret;
13491 :
13492 : }
13493 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
13494 0 : return NULL;
13495 : }
13496 :
13497 0 : static union drsuapi_DsReplicaModRequest *py_export_drsuapi_DsReplicaModRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
13498 : {
13499 0 : union drsuapi_DsReplicaModRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaModRequest);
13500 0 : switch (level) {
13501 0 : case 1:
13502 0 : if (in == NULL) {
13503 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
13504 0 : talloc_free(ret); return NULL;
13505 : }
13506 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaModRequest1_Type, in, talloc_free(ret); return NULL;);
13507 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
13508 0 : PyErr_NoMemory();
13509 0 : talloc_free(ret); return NULL;
13510 : }
13511 0 : ret->req1 = *(struct drsuapi_DsReplicaModRequest1 *)pytalloc_get_ptr(in);
13512 0 : break;
13513 :
13514 0 : default:
13515 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
13516 0 : talloc_free(ret);
13517 0 : ret = NULL;
13518 : }
13519 :
13520 0 : return ret;
13521 : }
13522 :
13523 0 : static PyObject *py_drsuapi_DsReplicaModRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13524 : {
13525 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
13526 0 : PyObject *mem_ctx_obj = NULL;
13527 0 : TALLOC_CTX *mem_ctx = NULL;
13528 0 : int level = 0;
13529 0 : PyObject *in_obj = NULL;
13530 0 : union drsuapi_DsReplicaModRequest *in = NULL;
13531 :
13532 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
13533 : discard_const_p(char *, kwnames),
13534 : &mem_ctx_obj,
13535 : &level,
13536 : &in_obj)) {
13537 0 : return NULL;
13538 : }
13539 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
13540 0 : if (mem_ctx == NULL) {
13541 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
13542 0 : return NULL;
13543 : }
13544 0 : in = (union drsuapi_DsReplicaModRequest *)pytalloc_get_ptr(in_obj);
13545 0 : if (in == NULL) {
13546 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaModRequest!");
13547 0 : return NULL;
13548 : }
13549 :
13550 0 : return py_import_drsuapi_DsReplicaModRequest(mem_ctx, level, in);
13551 : }
13552 :
13553 0 : static PyObject *py_drsuapi_DsReplicaModRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13554 : {
13555 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
13556 0 : PyObject *mem_ctx_obj = NULL;
13557 0 : TALLOC_CTX *mem_ctx = NULL;
13558 0 : int level = 0;
13559 0 : PyObject *in = NULL;
13560 0 : union drsuapi_DsReplicaModRequest *out = NULL;
13561 :
13562 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
13563 : discard_const_p(char *, kwnames),
13564 : &mem_ctx_obj,
13565 : &level,
13566 : &in)) {
13567 0 : return NULL;
13568 : }
13569 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
13570 0 : if (mem_ctx == NULL) {
13571 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
13572 0 : return NULL;
13573 : }
13574 :
13575 0 : out = py_export_drsuapi_DsReplicaModRequest(mem_ctx, level, in);
13576 0 : if (out == NULL) {
13577 0 : return NULL;
13578 : }
13579 :
13580 0 : return pytalloc_GenericObject_reference(out);
13581 : }
13582 :
13583 : static PyMethodDef py_drsuapi_DsReplicaModRequest_methods[] = {
13584 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaModRequest_import),
13585 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
13586 : "T.__import__(mem_ctx, level, in) => ret." },
13587 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaModRequest_export),
13588 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
13589 : "T.__export__(mem_ctx, level, in) => ret." },
13590 : { NULL, NULL, 0, NULL }
13591 : };
13592 :
13593 0 : static PyObject *py_drsuapi_DsReplicaModRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13594 : {
13595 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
13596 0 : return NULL;
13597 : }
13598 :
13599 :
13600 : static PyTypeObject drsuapi_DsReplicaModRequest_Type = {
13601 : PyVarObject_HEAD_INIT(NULL, 0)
13602 : .tp_name = "drsuapi.DsReplicaModRequest",
13603 : .tp_getset = NULL,
13604 : .tp_methods = py_drsuapi_DsReplicaModRequest_methods,
13605 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13606 : .tp_new = py_drsuapi_DsReplicaModRequest_new,
13607 : };
13608 :
13609 :
13610 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_status(PyObject *obj, void *closure)
13611 : {
13612 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
13613 : PyObject *py_status;
13614 0 : py_status = PyErr_FromNTSTATUS(object->status);
13615 0 : return py_status;
13616 : }
13617 :
13618 0 : static int py_drsuapi_DsGetMembershipsCtr1_set_status(PyObject *py_obj, PyObject *value, void *closure)
13619 : {
13620 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
13621 0 : if (value == NULL) {
13622 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
13623 0 : return -1;
13624 : }
13625 0 : object->status = NT_STATUS(PyLong_AsLong(value));
13626 0 : return 0;
13627 : }
13628 :
13629 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_num_memberships(PyObject *obj, void *closure)
13630 : {
13631 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
13632 : PyObject *py_num_memberships;
13633 0 : py_num_memberships = PyLong_FromUnsignedLongLong((uint32_t)object->num_memberships);
13634 0 : return py_num_memberships;
13635 : }
13636 :
13637 0 : static int py_drsuapi_DsGetMembershipsCtr1_set_num_memberships(PyObject *py_obj, PyObject *value, void *closure)
13638 : {
13639 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
13640 0 : if (value == NULL) {
13641 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_memberships");
13642 0 : return -1;
13643 : }
13644 : {
13645 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_memberships));
13646 0 : if (PyLong_Check(value)) {
13647 : unsigned long long test_var;
13648 0 : test_var = PyLong_AsUnsignedLongLong(value);
13649 0 : if (PyErr_Occurred() != NULL) {
13650 0 : return -1;
13651 : }
13652 0 : if (test_var > uint_max) {
13653 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13654 : PyLong_Type.tp_name, uint_max, test_var);
13655 0 : return -1;
13656 : }
13657 0 : object->num_memberships = test_var;
13658 : } else {
13659 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13660 : PyLong_Type.tp_name);
13661 0 : return -1;
13662 : }
13663 : }
13664 0 : return 0;
13665 : }
13666 :
13667 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_num_sids(PyObject *obj, void *closure)
13668 : {
13669 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
13670 : PyObject *py_num_sids;
13671 0 : py_num_sids = PyLong_FromUnsignedLongLong((uint32_t)object->num_sids);
13672 0 : return py_num_sids;
13673 : }
13674 :
13675 0 : static int py_drsuapi_DsGetMembershipsCtr1_set_num_sids(PyObject *py_obj, PyObject *value, void *closure)
13676 : {
13677 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
13678 0 : if (value == NULL) {
13679 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_sids");
13680 0 : return -1;
13681 : }
13682 : {
13683 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_sids));
13684 0 : if (PyLong_Check(value)) {
13685 : unsigned long long test_var;
13686 0 : test_var = PyLong_AsUnsignedLongLong(value);
13687 0 : if (PyErr_Occurred() != NULL) {
13688 0 : return -1;
13689 : }
13690 0 : if (test_var > uint_max) {
13691 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13692 : PyLong_Type.tp_name, uint_max, test_var);
13693 0 : return -1;
13694 : }
13695 0 : object->num_sids = test_var;
13696 : } else {
13697 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13698 : PyLong_Type.tp_name);
13699 0 : return -1;
13700 : }
13701 : }
13702 0 : return 0;
13703 : }
13704 :
13705 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_info_array(PyObject *obj, void *closure)
13706 : {
13707 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
13708 : PyObject *py_info_array;
13709 0 : if (object->info_array == NULL) {
13710 0 : Py_RETURN_NONE;
13711 : }
13712 0 : if (object->info_array == NULL) {
13713 0 : py_info_array = Py_None;
13714 0 : Py_INCREF(py_info_array);
13715 : } else {
13716 0 : py_info_array = PyList_New(object->num_memberships);
13717 0 : if (py_info_array == NULL) {
13718 0 : return NULL;
13719 : }
13720 : {
13721 : int info_array_cntr_1;
13722 0 : for (info_array_cntr_1 = 0; info_array_cntr_1 < (object->num_memberships); info_array_cntr_1++) {
13723 : PyObject *py_info_array_1;
13724 0 : if (object->info_array[info_array_cntr_1] == NULL) {
13725 0 : py_info_array_1 = Py_None;
13726 0 : Py_INCREF(py_info_array_1);
13727 : } else {
13728 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]);
13729 : }
13730 0 : PyList_SetItem(py_info_array, info_array_cntr_1, py_info_array_1);
13731 : }
13732 : }
13733 : }
13734 0 : return py_info_array;
13735 : }
13736 :
13737 0 : static int py_drsuapi_DsGetMembershipsCtr1_set_info_array(PyObject *py_obj, PyObject *value, void *closure)
13738 : {
13739 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
13740 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info_array));
13741 0 : if (value == NULL) {
13742 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_array");
13743 0 : return -1;
13744 : }
13745 0 : if (value == Py_None) {
13746 0 : object->info_array = NULL;
13747 : } else {
13748 0 : object->info_array = NULL;
13749 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13750 : {
13751 : int info_array_cntr_1;
13752 0 : object->info_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info_array, PyList_GET_SIZE(value));
13753 0 : if (!object->info_array) { return -1;; }
13754 0 : talloc_set_name_const(object->info_array, "ARRAY: object->info_array");
13755 0 : for (info_array_cntr_1 = 0; info_array_cntr_1 < PyList_GET_SIZE(value); info_array_cntr_1++) {
13756 0 : if (PyList_GET_ITEM(value, info_array_cntr_1) == NULL) {
13757 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_array[info_array_cntr_1]");
13758 0 : return -1;
13759 : }
13760 0 : if (PyList_GET_ITEM(value, info_array_cntr_1) == Py_None) {
13761 0 : object->info_array[info_array_cntr_1] = NULL;
13762 : } else {
13763 0 : object->info_array[info_array_cntr_1] = NULL;
13764 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, PyList_GET_ITEM(value, info_array_cntr_1), return -1;);
13765 0 : if (talloc_reference(object->info_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_array_cntr_1))) == NULL) {
13766 0 : PyErr_NoMemory();
13767 0 : return -1;
13768 : }
13769 0 : object->info_array[info_array_cntr_1] = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_array_cntr_1));
13770 : }
13771 : }
13772 : }
13773 : }
13774 0 : return 0;
13775 : }
13776 :
13777 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_group_attrs(PyObject *obj, void *closure)
13778 : {
13779 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
13780 : PyObject *py_group_attrs;
13781 0 : if (object->group_attrs == NULL) {
13782 0 : Py_RETURN_NONE;
13783 : }
13784 0 : if (object->group_attrs == NULL) {
13785 0 : py_group_attrs = Py_None;
13786 0 : Py_INCREF(py_group_attrs);
13787 : } else {
13788 0 : py_group_attrs = PyList_New(object->num_memberships);
13789 0 : if (py_group_attrs == NULL) {
13790 0 : return NULL;
13791 : }
13792 : {
13793 : int group_attrs_cntr_1;
13794 0 : for (group_attrs_cntr_1 = 0; group_attrs_cntr_1 < (object->num_memberships); group_attrs_cntr_1++) {
13795 : PyObject *py_group_attrs_1;
13796 0 : py_group_attrs_1 = PyLong_FromUnsignedLongLong((uint32_t)object->group_attrs[group_attrs_cntr_1]);
13797 0 : PyList_SetItem(py_group_attrs, group_attrs_cntr_1, py_group_attrs_1);
13798 : }
13799 : }
13800 : }
13801 0 : return py_group_attrs;
13802 : }
13803 :
13804 0 : static int py_drsuapi_DsGetMembershipsCtr1_set_group_attrs(PyObject *py_obj, PyObject *value, void *closure)
13805 : {
13806 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
13807 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->group_attrs));
13808 0 : if (value == NULL) {
13809 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->group_attrs");
13810 0 : return -1;
13811 : }
13812 0 : if (value == Py_None) {
13813 0 : object->group_attrs = NULL;
13814 : } else {
13815 0 : object->group_attrs = NULL;
13816 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13817 : {
13818 : int group_attrs_cntr_1;
13819 0 : object->group_attrs = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->group_attrs, PyList_GET_SIZE(value));
13820 0 : if (!object->group_attrs) { return -1;; }
13821 0 : talloc_set_name_const(object->group_attrs, "ARRAY: object->group_attrs");
13822 0 : for (group_attrs_cntr_1 = 0; group_attrs_cntr_1 < PyList_GET_SIZE(value); group_attrs_cntr_1++) {
13823 0 : if (PyList_GET_ITEM(value, group_attrs_cntr_1) == NULL) {
13824 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->group_attrs[group_attrs_cntr_1]");
13825 0 : return -1;
13826 : }
13827 : {
13828 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->group_attrs[group_attrs_cntr_1]));
13829 0 : if (PyLong_Check(PyList_GET_ITEM(value, group_attrs_cntr_1))) {
13830 : unsigned long long test_var;
13831 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, group_attrs_cntr_1));
13832 0 : if (PyErr_Occurred() != NULL) {
13833 0 : return -1;
13834 : }
13835 0 : if (test_var > uint_max) {
13836 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13837 : PyLong_Type.tp_name, uint_max, test_var);
13838 0 : return -1;
13839 : }
13840 0 : object->group_attrs[group_attrs_cntr_1] = test_var;
13841 : } else {
13842 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13843 : PyLong_Type.tp_name);
13844 0 : return -1;
13845 : }
13846 : }
13847 : }
13848 : }
13849 : }
13850 0 : return 0;
13851 : }
13852 :
13853 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_get_sids(PyObject *obj, void *closure)
13854 : {
13855 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(obj);
13856 : PyObject *py_sids;
13857 0 : if (object->sids == NULL) {
13858 0 : Py_RETURN_NONE;
13859 : }
13860 0 : if (object->sids == NULL) {
13861 0 : py_sids = Py_None;
13862 0 : Py_INCREF(py_sids);
13863 : } else {
13864 0 : py_sids = PyList_New(object->num_sids);
13865 0 : if (py_sids == NULL) {
13866 0 : return NULL;
13867 : }
13868 : {
13869 : int sids_cntr_1;
13870 0 : for (sids_cntr_1 = 0; sids_cntr_1 < (object->num_sids); sids_cntr_1++) {
13871 : PyObject *py_sids_1;
13872 0 : if (object->sids[sids_cntr_1] == NULL) {
13873 0 : py_sids_1 = Py_None;
13874 0 : Py_INCREF(py_sids_1);
13875 : } else {
13876 0 : py_sids_1 = pytalloc_reference_ex(dom_sid_Type, object->sids[sids_cntr_1], object->sids[sids_cntr_1]);
13877 : }
13878 0 : PyList_SetItem(py_sids, sids_cntr_1, py_sids_1);
13879 : }
13880 : }
13881 : }
13882 0 : return py_sids;
13883 : }
13884 :
13885 0 : static int py_drsuapi_DsGetMembershipsCtr1_set_sids(PyObject *py_obj, PyObject *value, void *closure)
13886 : {
13887 0 : struct drsuapi_DsGetMembershipsCtr1 *object = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(py_obj);
13888 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->sids));
13889 0 : if (value == NULL) {
13890 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids");
13891 0 : return -1;
13892 : }
13893 0 : if (value == Py_None) {
13894 0 : object->sids = NULL;
13895 : } else {
13896 0 : object->sids = NULL;
13897 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13898 : {
13899 : int sids_cntr_1;
13900 0 : object->sids = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->sids, PyList_GET_SIZE(value));
13901 0 : if (!object->sids) { return -1;; }
13902 0 : talloc_set_name_const(object->sids, "ARRAY: object->sids");
13903 0 : for (sids_cntr_1 = 0; sids_cntr_1 < PyList_GET_SIZE(value); sids_cntr_1++) {
13904 0 : if (PyList_GET_ITEM(value, sids_cntr_1) == NULL) {
13905 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sids[sids_cntr_1]");
13906 0 : return -1;
13907 : }
13908 0 : if (PyList_GET_ITEM(value, sids_cntr_1) == Py_None) {
13909 0 : object->sids[sids_cntr_1] = NULL;
13910 : } else {
13911 0 : object->sids[sids_cntr_1] = NULL;
13912 0 : PY_CHECK_TYPE(dom_sid_Type, PyList_GET_ITEM(value, sids_cntr_1), return -1;);
13913 0 : if (talloc_reference(object->sids, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, sids_cntr_1))) == NULL) {
13914 0 : PyErr_NoMemory();
13915 0 : return -1;
13916 : }
13917 0 : object->sids[sids_cntr_1] = (struct dom_sid *)pytalloc_get_ptr(PyList_GET_ITEM(value, sids_cntr_1));
13918 : }
13919 : }
13920 : }
13921 : }
13922 0 : return 0;
13923 : }
13924 :
13925 : static PyGetSetDef py_drsuapi_DsGetMembershipsCtr1_getsetters[] = {
13926 : {
13927 : .name = discard_const_p(char, "status"),
13928 : .get = py_drsuapi_DsGetMembershipsCtr1_get_status,
13929 : .set = py_drsuapi_DsGetMembershipsCtr1_set_status,
13930 : .doc = discard_const_p(char, "PIDL-generated element of base type NTSTATUS")
13931 : },
13932 : {
13933 : .name = discard_const_p(char, "num_memberships"),
13934 : .get = py_drsuapi_DsGetMembershipsCtr1_get_num_memberships,
13935 : .set = py_drsuapi_DsGetMembershipsCtr1_set_num_memberships,
13936 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13937 : },
13938 : {
13939 : .name = discard_const_p(char, "num_sids"),
13940 : .get = py_drsuapi_DsGetMembershipsCtr1_get_num_sids,
13941 : .set = py_drsuapi_DsGetMembershipsCtr1_set_num_sids,
13942 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13943 : },
13944 : {
13945 : .name = discard_const_p(char, "info_array"),
13946 : .get = py_drsuapi_DsGetMembershipsCtr1_get_info_array,
13947 : .set = py_drsuapi_DsGetMembershipsCtr1_set_info_array,
13948 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
13949 : },
13950 : {
13951 : .name = discard_const_p(char, "group_attrs"),
13952 : .get = py_drsuapi_DsGetMembershipsCtr1_get_group_attrs,
13953 : .set = py_drsuapi_DsGetMembershipsCtr1_set_group_attrs,
13954 : .doc = discard_const_p(char, "PIDL-generated element of base type security_GroupAttrs")
13955 : },
13956 : {
13957 : .name = discard_const_p(char, "sids"),
13958 : .get = py_drsuapi_DsGetMembershipsCtr1_get_sids,
13959 : .set = py_drsuapi_DsGetMembershipsCtr1_set_sids,
13960 : .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
13961 : },
13962 : { .name = NULL }
13963 : };
13964 :
13965 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13966 : {
13967 0 : return pytalloc_new(struct drsuapi_DsGetMembershipsCtr1, type);
13968 : }
13969 :
13970 :
13971 : static PyTypeObject drsuapi_DsGetMembershipsCtr1_Type = {
13972 : PyVarObject_HEAD_INIT(NULL, 0)
13973 : .tp_name = "drsuapi.DsGetMembershipsCtr1",
13974 : .tp_getset = py_drsuapi_DsGetMembershipsCtr1_getsetters,
13975 : .tp_methods = NULL,
13976 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13977 : .tp_new = py_drsuapi_DsGetMembershipsCtr1_new,
13978 : };
13979 :
13980 0 : static PyObject *py_import_drsuapi_DsGetMembershipsCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMembershipsCtr *in)
13981 : {
13982 : PyObject *ret;
13983 :
13984 0 : switch (level) {
13985 0 : case 1:
13986 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsCtr1_Type, mem_ctx, &in->ctr1);
13987 0 : return ret;
13988 :
13989 : }
13990 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
13991 0 : return NULL;
13992 : }
13993 :
13994 0 : static union drsuapi_DsGetMembershipsCtr *py_export_drsuapi_DsGetMembershipsCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
13995 : {
13996 0 : union drsuapi_DsGetMembershipsCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsCtr);
13997 0 : switch (level) {
13998 0 : case 1:
13999 0 : if (in == NULL) {
14000 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
14001 0 : talloc_free(ret); return NULL;
14002 : }
14003 0 : PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, in, talloc_free(ret); return NULL;);
14004 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
14005 0 : PyErr_NoMemory();
14006 0 : talloc_free(ret); return NULL;
14007 : }
14008 0 : ret->ctr1 = *(struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(in);
14009 0 : break;
14010 :
14011 0 : default:
14012 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
14013 0 : talloc_free(ret);
14014 0 : ret = NULL;
14015 : }
14016 :
14017 0 : return ret;
14018 : }
14019 :
14020 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14021 : {
14022 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
14023 0 : PyObject *mem_ctx_obj = NULL;
14024 0 : TALLOC_CTX *mem_ctx = NULL;
14025 0 : int level = 0;
14026 0 : PyObject *in_obj = NULL;
14027 0 : union drsuapi_DsGetMembershipsCtr *in = NULL;
14028 :
14029 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
14030 : discard_const_p(char *, kwnames),
14031 : &mem_ctx_obj,
14032 : &level,
14033 : &in_obj)) {
14034 0 : return NULL;
14035 : }
14036 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
14037 0 : if (mem_ctx == NULL) {
14038 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
14039 0 : return NULL;
14040 : }
14041 0 : in = (union drsuapi_DsGetMembershipsCtr *)pytalloc_get_ptr(in_obj);
14042 0 : if (in == NULL) {
14043 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetMembershipsCtr!");
14044 0 : return NULL;
14045 : }
14046 :
14047 0 : return py_import_drsuapi_DsGetMembershipsCtr(mem_ctx, level, in);
14048 : }
14049 :
14050 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14051 : {
14052 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
14053 0 : PyObject *mem_ctx_obj = NULL;
14054 0 : TALLOC_CTX *mem_ctx = NULL;
14055 0 : int level = 0;
14056 0 : PyObject *in = NULL;
14057 0 : union drsuapi_DsGetMembershipsCtr *out = NULL;
14058 :
14059 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
14060 : discard_const_p(char *, kwnames),
14061 : &mem_ctx_obj,
14062 : &level,
14063 : &in)) {
14064 0 : return NULL;
14065 : }
14066 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
14067 0 : if (mem_ctx == NULL) {
14068 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
14069 0 : return NULL;
14070 : }
14071 :
14072 0 : out = py_export_drsuapi_DsGetMembershipsCtr(mem_ctx, level, in);
14073 0 : if (out == NULL) {
14074 0 : return NULL;
14075 : }
14076 :
14077 0 : return pytalloc_GenericObject_reference(out);
14078 : }
14079 :
14080 : static PyMethodDef py_drsuapi_DsGetMembershipsCtr_methods[] = {
14081 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMembershipsCtr_import),
14082 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
14083 : "T.__import__(mem_ctx, level, in) => ret." },
14084 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMembershipsCtr_export),
14085 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
14086 : "T.__export__(mem_ctx, level, in) => ret." },
14087 : { NULL, NULL, 0, NULL }
14088 : };
14089 :
14090 0 : static PyObject *py_drsuapi_DsGetMembershipsCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14091 : {
14092 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
14093 0 : return NULL;
14094 : }
14095 :
14096 :
14097 : static PyTypeObject drsuapi_DsGetMembershipsCtr_Type = {
14098 : PyVarObject_HEAD_INIT(NULL, 0)
14099 : .tp_name = "drsuapi.DsGetMembershipsCtr",
14100 : .tp_getset = NULL,
14101 : .tp_methods = py_drsuapi_DsGetMembershipsCtr_methods,
14102 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
14103 : .tp_new = py_drsuapi_DsGetMembershipsCtr_new,
14104 : };
14105 :
14106 :
14107 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_count(PyObject *obj, void *closure)
14108 : {
14109 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
14110 : PyObject *py_count;
14111 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
14112 0 : return py_count;
14113 : }
14114 :
14115 0 : static int py_drsuapi_DsGetMembershipsRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
14116 : {
14117 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
14118 0 : if (value == NULL) {
14119 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
14120 0 : return -1;
14121 : }
14122 : {
14123 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
14124 0 : if (PyLong_Check(value)) {
14125 : unsigned long long test_var;
14126 0 : test_var = PyLong_AsUnsignedLongLong(value);
14127 0 : if (PyErr_Occurred() != NULL) {
14128 0 : return -1;
14129 : }
14130 0 : if (test_var > uint_max) {
14131 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14132 : PyLong_Type.tp_name, uint_max, test_var);
14133 0 : return -1;
14134 : }
14135 0 : object->count = test_var;
14136 : } else {
14137 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14138 : PyLong_Type.tp_name);
14139 0 : return -1;
14140 : }
14141 : }
14142 0 : return 0;
14143 : }
14144 :
14145 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_info_array(PyObject *obj, void *closure)
14146 : {
14147 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
14148 : PyObject *py_info_array;
14149 0 : if (object->info_array == NULL) {
14150 0 : Py_RETURN_NONE;
14151 : }
14152 0 : if (object->info_array == NULL) {
14153 0 : py_info_array = Py_None;
14154 0 : Py_INCREF(py_info_array);
14155 : } else {
14156 0 : py_info_array = PyList_New(object->count);
14157 0 : if (py_info_array == NULL) {
14158 0 : return NULL;
14159 : }
14160 : {
14161 : int info_array_cntr_1;
14162 0 : for (info_array_cntr_1 = 0; info_array_cntr_1 < (object->count); info_array_cntr_1++) {
14163 : PyObject *py_info_array_1;
14164 0 : if (object->info_array[info_array_cntr_1] == NULL) {
14165 0 : py_info_array_1 = Py_None;
14166 0 : Py_INCREF(py_info_array_1);
14167 : } else {
14168 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]);
14169 : }
14170 0 : PyList_SetItem(py_info_array, info_array_cntr_1, py_info_array_1);
14171 : }
14172 : }
14173 : }
14174 0 : return py_info_array;
14175 : }
14176 :
14177 0 : static int py_drsuapi_DsGetMembershipsRequest1_set_info_array(PyObject *py_obj, PyObject *value, void *closure)
14178 : {
14179 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
14180 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info_array));
14181 0 : if (value == NULL) {
14182 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_array");
14183 0 : return -1;
14184 : }
14185 0 : if (value == Py_None) {
14186 0 : object->info_array = NULL;
14187 : } else {
14188 0 : object->info_array = NULL;
14189 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
14190 : {
14191 : int info_array_cntr_1;
14192 0 : object->info_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info_array, PyList_GET_SIZE(value));
14193 0 : if (!object->info_array) { return -1;; }
14194 0 : talloc_set_name_const(object->info_array, "ARRAY: object->info_array");
14195 0 : for (info_array_cntr_1 = 0; info_array_cntr_1 < PyList_GET_SIZE(value); info_array_cntr_1++) {
14196 0 : if (PyList_GET_ITEM(value, info_array_cntr_1) == NULL) {
14197 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_array[info_array_cntr_1]");
14198 0 : return -1;
14199 : }
14200 0 : if (PyList_GET_ITEM(value, info_array_cntr_1) == Py_None) {
14201 0 : object->info_array[info_array_cntr_1] = NULL;
14202 : } else {
14203 0 : object->info_array[info_array_cntr_1] = NULL;
14204 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, PyList_GET_ITEM(value, info_array_cntr_1), return -1;);
14205 0 : if (talloc_reference(object->info_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_array_cntr_1))) == NULL) {
14206 0 : PyErr_NoMemory();
14207 0 : return -1;
14208 : }
14209 0 : object->info_array[info_array_cntr_1] = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_array_cntr_1));
14210 : }
14211 : }
14212 : }
14213 : }
14214 0 : return 0;
14215 : }
14216 :
14217 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_flags(PyObject *obj, void *closure)
14218 : {
14219 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
14220 : PyObject *py_flags;
14221 0 : py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
14222 0 : return py_flags;
14223 : }
14224 :
14225 0 : static int py_drsuapi_DsGetMembershipsRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
14226 : {
14227 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
14228 0 : if (value == NULL) {
14229 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
14230 0 : return -1;
14231 : }
14232 : {
14233 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
14234 0 : if (PyLong_Check(value)) {
14235 : unsigned long long test_var;
14236 0 : test_var = PyLong_AsUnsignedLongLong(value);
14237 0 : if (PyErr_Occurred() != NULL) {
14238 0 : return -1;
14239 : }
14240 0 : if (test_var > uint_max) {
14241 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14242 : PyLong_Type.tp_name, uint_max, test_var);
14243 0 : return -1;
14244 : }
14245 0 : object->flags = test_var;
14246 : } else {
14247 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14248 : PyLong_Type.tp_name);
14249 0 : return -1;
14250 : }
14251 : }
14252 0 : return 0;
14253 : }
14254 :
14255 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_type(PyObject *obj, void *closure)
14256 : {
14257 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
14258 : PyObject *py_type;
14259 0 : py_type = PyLong_FromUnsignedLongLong((uint32_t)object->type);
14260 0 : return py_type;
14261 : }
14262 :
14263 0 : static int py_drsuapi_DsGetMembershipsRequest1_set_type(PyObject *py_obj, PyObject *value, void *closure)
14264 : {
14265 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
14266 0 : if (value == NULL) {
14267 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->type");
14268 0 : return -1;
14269 : }
14270 : {
14271 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->type));
14272 0 : if (PyLong_Check(value)) {
14273 : unsigned long long test_var;
14274 0 : test_var = PyLong_AsUnsignedLongLong(value);
14275 0 : if (PyErr_Occurred() != NULL) {
14276 0 : return -1;
14277 : }
14278 0 : if (test_var > uint_max) {
14279 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14280 : PyLong_Type.tp_name, uint_max, test_var);
14281 0 : return -1;
14282 : }
14283 0 : object->type = test_var;
14284 : } else {
14285 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14286 : PyLong_Type.tp_name);
14287 0 : return -1;
14288 : }
14289 : }
14290 0 : return 0;
14291 : }
14292 :
14293 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_get_domain(PyObject *obj, void *closure)
14294 : {
14295 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(obj);
14296 : PyObject *py_domain;
14297 0 : if (object->domain == NULL) {
14298 0 : Py_RETURN_NONE;
14299 : }
14300 0 : if (object->domain == NULL) {
14301 0 : py_domain = Py_None;
14302 0 : Py_INCREF(py_domain);
14303 : } else {
14304 0 : py_domain = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->domain, object->domain);
14305 : }
14306 0 : return py_domain;
14307 : }
14308 :
14309 0 : static int py_drsuapi_DsGetMembershipsRequest1_set_domain(PyObject *py_obj, PyObject *value, void *closure)
14310 : {
14311 0 : struct drsuapi_DsGetMembershipsRequest1 *object = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(py_obj);
14312 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->domain));
14313 0 : if (value == NULL) {
14314 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain");
14315 0 : return -1;
14316 : }
14317 0 : if (value == Py_None) {
14318 0 : object->domain = NULL;
14319 : } else {
14320 0 : object->domain = NULL;
14321 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
14322 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14323 0 : PyErr_NoMemory();
14324 0 : return -1;
14325 : }
14326 0 : object->domain = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
14327 : }
14328 0 : return 0;
14329 : }
14330 :
14331 : static PyGetSetDef py_drsuapi_DsGetMembershipsRequest1_getsetters[] = {
14332 : {
14333 : .name = discard_const_p(char, "count"),
14334 : .get = py_drsuapi_DsGetMembershipsRequest1_get_count,
14335 : .set = py_drsuapi_DsGetMembershipsRequest1_set_count,
14336 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
14337 : },
14338 : {
14339 : .name = discard_const_p(char, "info_array"),
14340 : .get = py_drsuapi_DsGetMembershipsRequest1_get_info_array,
14341 : .set = py_drsuapi_DsGetMembershipsRequest1_set_info_array,
14342 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
14343 : },
14344 : {
14345 : .name = discard_const_p(char, "flags"),
14346 : .get = py_drsuapi_DsGetMembershipsRequest1_get_flags,
14347 : .set = py_drsuapi_DsGetMembershipsRequest1_set_flags,
14348 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
14349 : },
14350 : {
14351 : .name = discard_const_p(char, "type"),
14352 : .get = py_drsuapi_DsGetMembershipsRequest1_get_type,
14353 : .set = py_drsuapi_DsGetMembershipsRequest1_set_type,
14354 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsMembershipType")
14355 : },
14356 : {
14357 : .name = discard_const_p(char, "domain"),
14358 : .get = py_drsuapi_DsGetMembershipsRequest1_get_domain,
14359 : .set = py_drsuapi_DsGetMembershipsRequest1_set_domain,
14360 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
14361 : },
14362 : { .name = NULL }
14363 : };
14364 :
14365 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14366 : {
14367 0 : return pytalloc_new(struct drsuapi_DsGetMembershipsRequest1, type);
14368 : }
14369 :
14370 :
14371 : static PyTypeObject drsuapi_DsGetMembershipsRequest1_Type = {
14372 : PyVarObject_HEAD_INIT(NULL, 0)
14373 : .tp_name = "drsuapi.DsGetMembershipsRequest1",
14374 : .tp_getset = py_drsuapi_DsGetMembershipsRequest1_getsetters,
14375 : .tp_methods = NULL,
14376 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
14377 : .tp_new = py_drsuapi_DsGetMembershipsRequest1_new,
14378 : };
14379 :
14380 0 : static PyObject *py_import_drsuapi_DsGetMembershipsRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMembershipsRequest *in)
14381 : {
14382 : PyObject *ret;
14383 :
14384 0 : switch (level) {
14385 0 : case 1:
14386 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsRequest1_Type, mem_ctx, &in->req1);
14387 0 : return ret;
14388 :
14389 : }
14390 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
14391 0 : return NULL;
14392 : }
14393 :
14394 0 : static union drsuapi_DsGetMembershipsRequest *py_export_drsuapi_DsGetMembershipsRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
14395 : {
14396 0 : union drsuapi_DsGetMembershipsRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsRequest);
14397 0 : switch (level) {
14398 0 : case 1:
14399 0 : if (in == NULL) {
14400 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
14401 0 : talloc_free(ret); return NULL;
14402 : }
14403 0 : PY_CHECK_TYPE(&drsuapi_DsGetMembershipsRequest1_Type, in, talloc_free(ret); return NULL;);
14404 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
14405 0 : PyErr_NoMemory();
14406 0 : talloc_free(ret); return NULL;
14407 : }
14408 0 : ret->req1 = *(struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(in);
14409 0 : break;
14410 :
14411 0 : default:
14412 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
14413 0 : talloc_free(ret);
14414 0 : ret = NULL;
14415 : }
14416 :
14417 0 : return ret;
14418 : }
14419 :
14420 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14421 : {
14422 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
14423 0 : PyObject *mem_ctx_obj = NULL;
14424 0 : TALLOC_CTX *mem_ctx = NULL;
14425 0 : int level = 0;
14426 0 : PyObject *in_obj = NULL;
14427 0 : union drsuapi_DsGetMembershipsRequest *in = NULL;
14428 :
14429 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
14430 : discard_const_p(char *, kwnames),
14431 : &mem_ctx_obj,
14432 : &level,
14433 : &in_obj)) {
14434 0 : return NULL;
14435 : }
14436 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
14437 0 : if (mem_ctx == NULL) {
14438 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
14439 0 : return NULL;
14440 : }
14441 0 : in = (union drsuapi_DsGetMembershipsRequest *)pytalloc_get_ptr(in_obj);
14442 0 : if (in == NULL) {
14443 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetMembershipsRequest!");
14444 0 : return NULL;
14445 : }
14446 :
14447 0 : return py_import_drsuapi_DsGetMembershipsRequest(mem_ctx, level, in);
14448 : }
14449 :
14450 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14451 : {
14452 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
14453 0 : PyObject *mem_ctx_obj = NULL;
14454 0 : TALLOC_CTX *mem_ctx = NULL;
14455 0 : int level = 0;
14456 0 : PyObject *in = NULL;
14457 0 : union drsuapi_DsGetMembershipsRequest *out = NULL;
14458 :
14459 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
14460 : discard_const_p(char *, kwnames),
14461 : &mem_ctx_obj,
14462 : &level,
14463 : &in)) {
14464 0 : return NULL;
14465 : }
14466 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
14467 0 : if (mem_ctx == NULL) {
14468 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
14469 0 : return NULL;
14470 : }
14471 :
14472 0 : out = py_export_drsuapi_DsGetMembershipsRequest(mem_ctx, level, in);
14473 0 : if (out == NULL) {
14474 0 : return NULL;
14475 : }
14476 :
14477 0 : return pytalloc_GenericObject_reference(out);
14478 : }
14479 :
14480 : static PyMethodDef py_drsuapi_DsGetMembershipsRequest_methods[] = {
14481 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMembershipsRequest_import),
14482 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
14483 : "T.__import__(mem_ctx, level, in) => ret." },
14484 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMembershipsRequest_export),
14485 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
14486 : "T.__export__(mem_ctx, level, in) => ret." },
14487 : { NULL, NULL, 0, NULL }
14488 : };
14489 :
14490 0 : static PyObject *py_drsuapi_DsGetMembershipsRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14491 : {
14492 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
14493 0 : return NULL;
14494 : }
14495 :
14496 :
14497 : static PyTypeObject drsuapi_DsGetMembershipsRequest_Type = {
14498 : PyVarObject_HEAD_INIT(NULL, 0)
14499 : .tp_name = "drsuapi.DsGetMembershipsRequest",
14500 : .tp_getset = NULL,
14501 : .tp_methods = py_drsuapi_DsGetMembershipsRequest_methods,
14502 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
14503 : .tp_new = py_drsuapi_DsGetMembershipsRequest_new,
14504 : };
14505 :
14506 :
14507 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_flags(PyObject *obj, void *closure)
14508 : {
14509 0 : struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(obj);
14510 : PyObject *py_flags;
14511 0 : py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
14512 0 : return py_flags;
14513 : }
14514 :
14515 0 : static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
14516 : {
14517 0 : struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(py_obj);
14518 0 : if (value == NULL) {
14519 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
14520 0 : return -1;
14521 : }
14522 : {
14523 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
14524 0 : if (PyLong_Check(value)) {
14525 : unsigned long long test_var;
14526 0 : test_var = PyLong_AsUnsignedLongLong(value);
14527 0 : if (PyErr_Occurred() != NULL) {
14528 0 : return -1;
14529 : }
14530 0 : if (test_var > uint_max) {
14531 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14532 : PyLong_Type.tp_name, uint_max, test_var);
14533 0 : return -1;
14534 : }
14535 0 : object->flags = test_var;
14536 : } else {
14537 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14538 : PyLong_Type.tp_name);
14539 0 : return -1;
14540 : }
14541 : }
14542 0 : return 0;
14543 : }
14544 :
14545 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_preferred_maximum_length(PyObject *obj, void *closure)
14546 : {
14547 0 : struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(obj);
14548 : PyObject *py_preferred_maximum_length;
14549 0 : py_preferred_maximum_length = PyLong_FromUnsignedLongLong((uint32_t)object->preferred_maximum_length);
14550 0 : return py_preferred_maximum_length;
14551 : }
14552 :
14553 0 : static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_preferred_maximum_length(PyObject *py_obj, PyObject *value, void *closure)
14554 : {
14555 0 : struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(py_obj);
14556 0 : if (value == NULL) {
14557 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->preferred_maximum_length");
14558 0 : return -1;
14559 : }
14560 : {
14561 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->preferred_maximum_length));
14562 0 : if (PyLong_Check(value)) {
14563 : unsigned long long test_var;
14564 0 : test_var = PyLong_AsUnsignedLongLong(value);
14565 0 : if (PyErr_Occurred() != NULL) {
14566 0 : return -1;
14567 : }
14568 0 : if (test_var > uint_max) {
14569 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14570 : PyLong_Type.tp_name, uint_max, test_var);
14571 0 : return -1;
14572 : }
14573 0 : object->preferred_maximum_length = test_var;
14574 : } else {
14575 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14576 : PyLong_Type.tp_name);
14577 0 : return -1;
14578 : }
14579 : }
14580 0 : return 0;
14581 : }
14582 :
14583 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_length(PyObject *obj, void *closure)
14584 : {
14585 0 : struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(obj);
14586 : PyObject *py_restart_length;
14587 0 : py_restart_length = PyLong_FromUnsignedLongLong((uint32_t)object->restart_length);
14588 0 : return py_restart_length;
14589 : }
14590 :
14591 0 : static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_length(PyObject *py_obj, PyObject *value, void *closure)
14592 : {
14593 0 : struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(py_obj);
14594 0 : if (value == NULL) {
14595 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_length");
14596 0 : return -1;
14597 : }
14598 : {
14599 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->restart_length));
14600 0 : if (PyLong_Check(value)) {
14601 : unsigned long long test_var;
14602 0 : test_var = PyLong_AsUnsignedLongLong(value);
14603 0 : if (PyErr_Occurred() != NULL) {
14604 0 : return -1;
14605 : }
14606 0 : if (test_var > uint_max) {
14607 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14608 : PyLong_Type.tp_name, uint_max, test_var);
14609 0 : return -1;
14610 : }
14611 0 : object->restart_length = test_var;
14612 : } else {
14613 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14614 : PyLong_Type.tp_name);
14615 0 : return -1;
14616 : }
14617 : }
14618 0 : return 0;
14619 : }
14620 :
14621 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_data(PyObject *obj, void *closure)
14622 : {
14623 0 : struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(obj);
14624 : PyObject *py_restart_data;
14625 0 : if (object->restart_data == NULL) {
14626 0 : Py_RETURN_NONE;
14627 : }
14628 0 : if (object->restart_data == NULL) {
14629 0 : py_restart_data = Py_None;
14630 0 : Py_INCREF(py_restart_data);
14631 : } else {
14632 0 : py_restart_data = PyList_New(object->restart_length);
14633 0 : if (py_restart_data == NULL) {
14634 0 : return NULL;
14635 : }
14636 : {
14637 : int restart_data_cntr_1;
14638 0 : for (restart_data_cntr_1 = 0; restart_data_cntr_1 < (object->restart_length); restart_data_cntr_1++) {
14639 : PyObject *py_restart_data_1;
14640 0 : py_restart_data_1 = PyLong_FromLong((uint16_t)object->restart_data[restart_data_cntr_1]);
14641 0 : PyList_SetItem(py_restart_data, restart_data_cntr_1, py_restart_data_1);
14642 : }
14643 : }
14644 : }
14645 0 : return py_restart_data;
14646 : }
14647 :
14648 0 : static int py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_data(PyObject *py_obj, PyObject *value, void *closure)
14649 : {
14650 0 : struct drsuapi_DsGetNT4ChangeLogRequest1 *object = (struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(py_obj);
14651 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->restart_data));
14652 0 : if (value == NULL) {
14653 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_data");
14654 0 : return -1;
14655 : }
14656 0 : if (value == Py_None) {
14657 0 : object->restart_data = NULL;
14658 : } else {
14659 0 : object->restart_data = NULL;
14660 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
14661 : {
14662 : int restart_data_cntr_1;
14663 0 : object->restart_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->restart_data, PyList_GET_SIZE(value));
14664 0 : if (!object->restart_data) { return -1;; }
14665 0 : talloc_set_name_const(object->restart_data, "ARRAY: object->restart_data");
14666 0 : for (restart_data_cntr_1 = 0; restart_data_cntr_1 < PyList_GET_SIZE(value); restart_data_cntr_1++) {
14667 0 : if (PyList_GET_ITEM(value, restart_data_cntr_1) == NULL) {
14668 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_data[restart_data_cntr_1]");
14669 0 : return -1;
14670 : }
14671 : {
14672 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->restart_data[restart_data_cntr_1]));
14673 0 : if (PyLong_Check(PyList_GET_ITEM(value, restart_data_cntr_1))) {
14674 : unsigned long long test_var;
14675 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, restart_data_cntr_1));
14676 0 : if (PyErr_Occurred() != NULL) {
14677 0 : return -1;
14678 : }
14679 0 : if (test_var > uint_max) {
14680 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14681 : PyLong_Type.tp_name, uint_max, test_var);
14682 0 : return -1;
14683 : }
14684 0 : object->restart_data[restart_data_cntr_1] = test_var;
14685 : } else {
14686 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14687 : PyLong_Type.tp_name);
14688 0 : return -1;
14689 : }
14690 : }
14691 : }
14692 : }
14693 : }
14694 0 : return 0;
14695 : }
14696 :
14697 : static PyGetSetDef py_drsuapi_DsGetNT4ChangeLogRequest1_getsetters[] = {
14698 : {
14699 : .name = discard_const_p(char, "flags"),
14700 : .get = py_drsuapi_DsGetNT4ChangeLogRequest1_get_flags,
14701 : .set = py_drsuapi_DsGetNT4ChangeLogRequest1_set_flags,
14702 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNT4ChangeLogFlags")
14703 : },
14704 : {
14705 : .name = discard_const_p(char, "preferred_maximum_length"),
14706 : .get = py_drsuapi_DsGetNT4ChangeLogRequest1_get_preferred_maximum_length,
14707 : .set = py_drsuapi_DsGetNT4ChangeLogRequest1_set_preferred_maximum_length,
14708 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
14709 : },
14710 : {
14711 : .name = discard_const_p(char, "restart_length"),
14712 : .get = py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_length,
14713 : .set = py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_length,
14714 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
14715 : },
14716 : {
14717 : .name = discard_const_p(char, "restart_data"),
14718 : .get = py_drsuapi_DsGetNT4ChangeLogRequest1_get_restart_data,
14719 : .set = py_drsuapi_DsGetNT4ChangeLogRequest1_set_restart_data,
14720 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
14721 : },
14722 : { .name = NULL }
14723 : };
14724 :
14725 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14726 : {
14727 0 : return pytalloc_new(struct drsuapi_DsGetNT4ChangeLogRequest1, type);
14728 : }
14729 :
14730 :
14731 : static PyTypeObject drsuapi_DsGetNT4ChangeLogRequest1_Type = {
14732 : PyVarObject_HEAD_INIT(NULL, 0)
14733 : .tp_name = "drsuapi.DsGetNT4ChangeLogRequest1",
14734 : .tp_getset = py_drsuapi_DsGetNT4ChangeLogRequest1_getsetters,
14735 : .tp_methods = NULL,
14736 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
14737 : .tp_new = py_drsuapi_DsGetNT4ChangeLogRequest1_new,
14738 : };
14739 :
14740 0 : static PyObject *py_import_drsuapi_DsGetNT4ChangeLogRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNT4ChangeLogRequest *in)
14741 : {
14742 : PyObject *ret;
14743 :
14744 0 : switch (level) {
14745 0 : case 1:
14746 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNT4ChangeLogRequest1_Type, mem_ctx, &in->req1);
14747 0 : return ret;
14748 :
14749 : }
14750 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
14751 0 : return NULL;
14752 : }
14753 :
14754 0 : static union drsuapi_DsGetNT4ChangeLogRequest *py_export_drsuapi_DsGetNT4ChangeLogRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
14755 : {
14756 0 : union drsuapi_DsGetNT4ChangeLogRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogRequest);
14757 0 : switch (level) {
14758 0 : case 1:
14759 0 : if (in == NULL) {
14760 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
14761 0 : talloc_free(ret); return NULL;
14762 : }
14763 0 : PY_CHECK_TYPE(&drsuapi_DsGetNT4ChangeLogRequest1_Type, in, talloc_free(ret); return NULL;);
14764 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
14765 0 : PyErr_NoMemory();
14766 0 : talloc_free(ret); return NULL;
14767 : }
14768 0 : ret->req1 = *(struct drsuapi_DsGetNT4ChangeLogRequest1 *)pytalloc_get_ptr(in);
14769 0 : break;
14770 :
14771 0 : default:
14772 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
14773 0 : talloc_free(ret);
14774 0 : ret = NULL;
14775 : }
14776 :
14777 0 : return ret;
14778 : }
14779 :
14780 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14781 : {
14782 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
14783 0 : PyObject *mem_ctx_obj = NULL;
14784 0 : TALLOC_CTX *mem_ctx = NULL;
14785 0 : int level = 0;
14786 0 : PyObject *in_obj = NULL;
14787 0 : union drsuapi_DsGetNT4ChangeLogRequest *in = NULL;
14788 :
14789 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
14790 : discard_const_p(char *, kwnames),
14791 : &mem_ctx_obj,
14792 : &level,
14793 : &in_obj)) {
14794 0 : return NULL;
14795 : }
14796 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
14797 0 : if (mem_ctx == NULL) {
14798 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
14799 0 : return NULL;
14800 : }
14801 0 : in = (union drsuapi_DsGetNT4ChangeLogRequest *)pytalloc_get_ptr(in_obj);
14802 0 : if (in == NULL) {
14803 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNT4ChangeLogRequest!");
14804 0 : return NULL;
14805 : }
14806 :
14807 0 : return py_import_drsuapi_DsGetNT4ChangeLogRequest(mem_ctx, level, in);
14808 : }
14809 :
14810 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14811 : {
14812 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
14813 0 : PyObject *mem_ctx_obj = NULL;
14814 0 : TALLOC_CTX *mem_ctx = NULL;
14815 0 : int level = 0;
14816 0 : PyObject *in = NULL;
14817 0 : union drsuapi_DsGetNT4ChangeLogRequest *out = NULL;
14818 :
14819 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
14820 : discard_const_p(char *, kwnames),
14821 : &mem_ctx_obj,
14822 : &level,
14823 : &in)) {
14824 0 : return NULL;
14825 : }
14826 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
14827 0 : if (mem_ctx == NULL) {
14828 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
14829 0 : return NULL;
14830 : }
14831 :
14832 0 : out = py_export_drsuapi_DsGetNT4ChangeLogRequest(mem_ctx, level, in);
14833 0 : if (out == NULL) {
14834 0 : return NULL;
14835 : }
14836 :
14837 0 : return pytalloc_GenericObject_reference(out);
14838 : }
14839 :
14840 : static PyMethodDef py_drsuapi_DsGetNT4ChangeLogRequest_methods[] = {
14841 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLogRequest_import),
14842 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
14843 : "T.__import__(mem_ctx, level, in) => ret." },
14844 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLogRequest_export),
14845 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
14846 : "T.__export__(mem_ctx, level, in) => ret." },
14847 : { NULL, NULL, 0, NULL }
14848 : };
14849 :
14850 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14851 : {
14852 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
14853 0 : return NULL;
14854 : }
14855 :
14856 :
14857 : static PyTypeObject drsuapi_DsGetNT4ChangeLogRequest_Type = {
14858 : PyVarObject_HEAD_INIT(NULL, 0)
14859 : .tp_name = "drsuapi.DsGetNT4ChangeLogRequest",
14860 : .tp_getset = NULL,
14861 : .tp_methods = py_drsuapi_DsGetNT4ChangeLogRequest_methods,
14862 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
14863 : .tp_new = py_drsuapi_DsGetNT4ChangeLogRequest_new,
14864 : };
14865 :
14866 :
14867 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_length(PyObject *obj, void *closure)
14868 : {
14869 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
14870 : PyObject *py_restart_length;
14871 0 : py_restart_length = PyLong_FromUnsignedLongLong((uint32_t)object->restart_length);
14872 0 : return py_restart_length;
14873 : }
14874 :
14875 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_length(PyObject *py_obj, PyObject *value, void *closure)
14876 : {
14877 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
14878 0 : if (value == NULL) {
14879 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_length");
14880 0 : return -1;
14881 : }
14882 : {
14883 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->restart_length));
14884 0 : if (PyLong_Check(value)) {
14885 : unsigned long long test_var;
14886 0 : test_var = PyLong_AsUnsignedLongLong(value);
14887 0 : if (PyErr_Occurred() != NULL) {
14888 0 : return -1;
14889 : }
14890 0 : if (test_var > uint_max) {
14891 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14892 : PyLong_Type.tp_name, uint_max, test_var);
14893 0 : return -1;
14894 : }
14895 0 : object->restart_length = test_var;
14896 : } else {
14897 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14898 : PyLong_Type.tp_name);
14899 0 : return -1;
14900 : }
14901 : }
14902 0 : return 0;
14903 : }
14904 :
14905 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_length(PyObject *obj, void *closure)
14906 : {
14907 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
14908 : PyObject *py_log_length;
14909 0 : py_log_length = PyLong_FromUnsignedLongLong((uint32_t)object->log_length);
14910 0 : return py_log_length;
14911 : }
14912 :
14913 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_length(PyObject *py_obj, PyObject *value, void *closure)
14914 : {
14915 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
14916 0 : if (value == NULL) {
14917 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->log_length");
14918 0 : return -1;
14919 : }
14920 : {
14921 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->log_length));
14922 0 : if (PyLong_Check(value)) {
14923 : unsigned long long test_var;
14924 0 : test_var = PyLong_AsUnsignedLongLong(value);
14925 0 : if (PyErr_Occurred() != NULL) {
14926 0 : return -1;
14927 : }
14928 0 : if (test_var > uint_max) {
14929 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14930 : PyLong_Type.tp_name, uint_max, test_var);
14931 0 : return -1;
14932 : }
14933 0 : object->log_length = test_var;
14934 : } else {
14935 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14936 : PyLong_Type.tp_name);
14937 0 : return -1;
14938 : }
14939 : }
14940 0 : return 0;
14941 : }
14942 :
14943 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_serial_number(PyObject *obj, void *closure)
14944 : {
14945 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
14946 : PyObject *py_sam_serial_number;
14947 0 : py_sam_serial_number = PyLong_FromUnsignedLongLong(object->sam_serial_number);
14948 0 : return py_sam_serial_number;
14949 : }
14950 :
14951 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_serial_number(PyObject *py_obj, PyObject *value, void *closure)
14952 : {
14953 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
14954 0 : if (value == NULL) {
14955 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sam_serial_number");
14956 0 : return -1;
14957 : }
14958 : {
14959 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sam_serial_number));
14960 0 : if (PyLong_Check(value)) {
14961 : unsigned long long test_var;
14962 0 : test_var = PyLong_AsUnsignedLongLong(value);
14963 0 : if (PyErr_Occurred() != NULL) {
14964 0 : return -1;
14965 : }
14966 0 : if (test_var > uint_max) {
14967 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14968 : PyLong_Type.tp_name, uint_max, test_var);
14969 0 : return -1;
14970 : }
14971 0 : object->sam_serial_number = test_var;
14972 : } else {
14973 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14974 : PyLong_Type.tp_name);
14975 0 : return -1;
14976 : }
14977 : }
14978 0 : return 0;
14979 : }
14980 :
14981 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_creation_time(PyObject *obj, void *closure)
14982 : {
14983 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
14984 : PyObject *py_sam_creation_time;
14985 0 : py_sam_creation_time = PyLong_FromUnsignedLongLong(object->sam_creation_time);
14986 0 : return py_sam_creation_time;
14987 : }
14988 :
14989 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_creation_time(PyObject *py_obj, PyObject *value, void *closure)
14990 : {
14991 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
14992 0 : if (value == NULL) {
14993 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sam_creation_time");
14994 0 : return -1;
14995 : }
14996 : {
14997 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->sam_creation_time));
14998 0 : if (PyLong_Check(value)) {
14999 : unsigned long long test_var;
15000 0 : test_var = PyLong_AsUnsignedLongLong(value);
15001 0 : if (PyErr_Occurred() != NULL) {
15002 0 : return -1;
15003 : }
15004 0 : if (test_var > uint_max) {
15005 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15006 : PyLong_Type.tp_name, uint_max, test_var);
15007 0 : return -1;
15008 : }
15009 0 : object->sam_creation_time = test_var;
15010 : } else {
15011 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15012 : PyLong_Type.tp_name);
15013 0 : return -1;
15014 : }
15015 : }
15016 0 : return 0;
15017 : }
15018 :
15019 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_serial_number(PyObject *obj, void *closure)
15020 : {
15021 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
15022 : PyObject *py_builtin_serial_number;
15023 0 : py_builtin_serial_number = PyLong_FromUnsignedLongLong(object->builtin_serial_number);
15024 0 : return py_builtin_serial_number;
15025 : }
15026 :
15027 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_serial_number(PyObject *py_obj, PyObject *value, void *closure)
15028 : {
15029 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
15030 0 : if (value == NULL) {
15031 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->builtin_serial_number");
15032 0 : return -1;
15033 : }
15034 : {
15035 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->builtin_serial_number));
15036 0 : if (PyLong_Check(value)) {
15037 : unsigned long long test_var;
15038 0 : test_var = PyLong_AsUnsignedLongLong(value);
15039 0 : if (PyErr_Occurred() != NULL) {
15040 0 : return -1;
15041 : }
15042 0 : if (test_var > uint_max) {
15043 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15044 : PyLong_Type.tp_name, uint_max, test_var);
15045 0 : return -1;
15046 : }
15047 0 : object->builtin_serial_number = test_var;
15048 : } else {
15049 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15050 : PyLong_Type.tp_name);
15051 0 : return -1;
15052 : }
15053 : }
15054 0 : return 0;
15055 : }
15056 :
15057 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_creation_time(PyObject *obj, void *closure)
15058 : {
15059 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
15060 : PyObject *py_builtin_creation_time;
15061 0 : py_builtin_creation_time = PyLong_FromUnsignedLongLong(object->builtin_creation_time);
15062 0 : return py_builtin_creation_time;
15063 : }
15064 :
15065 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_creation_time(PyObject *py_obj, PyObject *value, void *closure)
15066 : {
15067 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
15068 0 : if (value == NULL) {
15069 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->builtin_creation_time");
15070 0 : return -1;
15071 : }
15072 : {
15073 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->builtin_creation_time));
15074 0 : if (PyLong_Check(value)) {
15075 : unsigned long long test_var;
15076 0 : test_var = PyLong_AsUnsignedLongLong(value);
15077 0 : if (PyErr_Occurred() != NULL) {
15078 0 : return -1;
15079 : }
15080 0 : if (test_var > uint_max) {
15081 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15082 : PyLong_Type.tp_name, uint_max, test_var);
15083 0 : return -1;
15084 : }
15085 0 : object->builtin_creation_time = test_var;
15086 : } else {
15087 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15088 : PyLong_Type.tp_name);
15089 0 : return -1;
15090 : }
15091 : }
15092 0 : return 0;
15093 : }
15094 :
15095 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_serial_number(PyObject *obj, void *closure)
15096 : {
15097 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
15098 : PyObject *py_lsa_serial_number;
15099 0 : py_lsa_serial_number = PyLong_FromUnsignedLongLong(object->lsa_serial_number);
15100 0 : return py_lsa_serial_number;
15101 : }
15102 :
15103 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_serial_number(PyObject *py_obj, PyObject *value, void *closure)
15104 : {
15105 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
15106 0 : if (value == NULL) {
15107 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lsa_serial_number");
15108 0 : return -1;
15109 : }
15110 : {
15111 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lsa_serial_number));
15112 0 : if (PyLong_Check(value)) {
15113 : unsigned long long test_var;
15114 0 : test_var = PyLong_AsUnsignedLongLong(value);
15115 0 : if (PyErr_Occurred() != NULL) {
15116 0 : return -1;
15117 : }
15118 0 : if (test_var > uint_max) {
15119 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15120 : PyLong_Type.tp_name, uint_max, test_var);
15121 0 : return -1;
15122 : }
15123 0 : object->lsa_serial_number = test_var;
15124 : } else {
15125 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15126 : PyLong_Type.tp_name);
15127 0 : return -1;
15128 : }
15129 : }
15130 0 : return 0;
15131 : }
15132 :
15133 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_creation_time(PyObject *obj, void *closure)
15134 : {
15135 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
15136 : PyObject *py_lsa_creation_time;
15137 0 : py_lsa_creation_time = PyLong_FromUnsignedLongLong(object->lsa_creation_time);
15138 0 : return py_lsa_creation_time;
15139 : }
15140 :
15141 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_creation_time(PyObject *py_obj, PyObject *value, void *closure)
15142 : {
15143 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
15144 0 : if (value == NULL) {
15145 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->lsa_creation_time");
15146 0 : return -1;
15147 : }
15148 : {
15149 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->lsa_creation_time));
15150 0 : if (PyLong_Check(value)) {
15151 : unsigned long long test_var;
15152 0 : test_var = PyLong_AsUnsignedLongLong(value);
15153 0 : if (PyErr_Occurred() != NULL) {
15154 0 : return -1;
15155 : }
15156 0 : if (test_var > uint_max) {
15157 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15158 : PyLong_Type.tp_name, uint_max, test_var);
15159 0 : return -1;
15160 : }
15161 0 : object->lsa_creation_time = test_var;
15162 : } else {
15163 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15164 : PyLong_Type.tp_name);
15165 0 : return -1;
15166 : }
15167 : }
15168 0 : return 0;
15169 : }
15170 :
15171 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_status(PyObject *obj, void *closure)
15172 : {
15173 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
15174 : PyObject *py_status;
15175 0 : py_status = PyErr_FromNTSTATUS(object->status);
15176 0 : return py_status;
15177 : }
15178 :
15179 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
15180 : {
15181 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
15182 0 : if (value == NULL) {
15183 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
15184 0 : return -1;
15185 : }
15186 0 : object->status = NT_STATUS(PyLong_AsLong(value));
15187 0 : return 0;
15188 : }
15189 :
15190 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_data(PyObject *obj, void *closure)
15191 : {
15192 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
15193 : PyObject *py_restart_data;
15194 0 : if (object->restart_data == NULL) {
15195 0 : Py_RETURN_NONE;
15196 : }
15197 0 : if (object->restart_data == NULL) {
15198 0 : py_restart_data = Py_None;
15199 0 : Py_INCREF(py_restart_data);
15200 : } else {
15201 0 : py_restart_data = PyList_New(object->restart_length);
15202 0 : if (py_restart_data == NULL) {
15203 0 : return NULL;
15204 : }
15205 : {
15206 : int restart_data_cntr_1;
15207 0 : for (restart_data_cntr_1 = 0; restart_data_cntr_1 < (object->restart_length); restart_data_cntr_1++) {
15208 : PyObject *py_restart_data_1;
15209 0 : py_restart_data_1 = PyLong_FromLong((uint16_t)object->restart_data[restart_data_cntr_1]);
15210 0 : PyList_SetItem(py_restart_data, restart_data_cntr_1, py_restart_data_1);
15211 : }
15212 : }
15213 : }
15214 0 : return py_restart_data;
15215 : }
15216 :
15217 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_data(PyObject *py_obj, PyObject *value, void *closure)
15218 : {
15219 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
15220 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->restart_data));
15221 0 : if (value == NULL) {
15222 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_data");
15223 0 : return -1;
15224 : }
15225 0 : if (value == Py_None) {
15226 0 : object->restart_data = NULL;
15227 : } else {
15228 0 : object->restart_data = NULL;
15229 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
15230 : {
15231 : int restart_data_cntr_1;
15232 0 : object->restart_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->restart_data, PyList_GET_SIZE(value));
15233 0 : if (!object->restart_data) { return -1;; }
15234 0 : talloc_set_name_const(object->restart_data, "ARRAY: object->restart_data");
15235 0 : for (restart_data_cntr_1 = 0; restart_data_cntr_1 < PyList_GET_SIZE(value); restart_data_cntr_1++) {
15236 0 : if (PyList_GET_ITEM(value, restart_data_cntr_1) == NULL) {
15237 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->restart_data[restart_data_cntr_1]");
15238 0 : return -1;
15239 : }
15240 : {
15241 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->restart_data[restart_data_cntr_1]));
15242 0 : if (PyLong_Check(PyList_GET_ITEM(value, restart_data_cntr_1))) {
15243 : unsigned long long test_var;
15244 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, restart_data_cntr_1));
15245 0 : if (PyErr_Occurred() != NULL) {
15246 0 : return -1;
15247 : }
15248 0 : if (test_var > uint_max) {
15249 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15250 : PyLong_Type.tp_name, uint_max, test_var);
15251 0 : return -1;
15252 : }
15253 0 : object->restart_data[restart_data_cntr_1] = test_var;
15254 : } else {
15255 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15256 : PyLong_Type.tp_name);
15257 0 : return -1;
15258 : }
15259 : }
15260 : }
15261 : }
15262 : }
15263 0 : return 0;
15264 : }
15265 :
15266 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_data(PyObject *obj, void *closure)
15267 : {
15268 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(obj);
15269 : PyObject *py_log_data;
15270 0 : if (object->log_data == NULL) {
15271 0 : Py_RETURN_NONE;
15272 : }
15273 0 : if (object->log_data == NULL) {
15274 0 : py_log_data = Py_None;
15275 0 : Py_INCREF(py_log_data);
15276 : } else {
15277 0 : py_log_data = PyList_New(object->log_length);
15278 0 : if (py_log_data == NULL) {
15279 0 : return NULL;
15280 : }
15281 : {
15282 : int log_data_cntr_1;
15283 0 : for (log_data_cntr_1 = 0; log_data_cntr_1 < (object->log_length); log_data_cntr_1++) {
15284 : PyObject *py_log_data_1;
15285 0 : py_log_data_1 = PyLong_FromLong((uint16_t)object->log_data[log_data_cntr_1]);
15286 0 : PyList_SetItem(py_log_data, log_data_cntr_1, py_log_data_1);
15287 : }
15288 : }
15289 : }
15290 0 : return py_log_data;
15291 : }
15292 :
15293 0 : static int py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_data(PyObject *py_obj, PyObject *value, void *closure)
15294 : {
15295 0 : struct drsuapi_DsGetNT4ChangeLogInfo1 *object = (struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(py_obj);
15296 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->log_data));
15297 0 : if (value == NULL) {
15298 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->log_data");
15299 0 : return -1;
15300 : }
15301 0 : if (value == Py_None) {
15302 0 : object->log_data = NULL;
15303 : } else {
15304 0 : object->log_data = NULL;
15305 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
15306 : {
15307 : int log_data_cntr_1;
15308 0 : object->log_data = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->log_data, PyList_GET_SIZE(value));
15309 0 : if (!object->log_data) { return -1;; }
15310 0 : talloc_set_name_const(object->log_data, "ARRAY: object->log_data");
15311 0 : for (log_data_cntr_1 = 0; log_data_cntr_1 < PyList_GET_SIZE(value); log_data_cntr_1++) {
15312 0 : if (PyList_GET_ITEM(value, log_data_cntr_1) == NULL) {
15313 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->log_data[log_data_cntr_1]");
15314 0 : return -1;
15315 : }
15316 : {
15317 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->log_data[log_data_cntr_1]));
15318 0 : if (PyLong_Check(PyList_GET_ITEM(value, log_data_cntr_1))) {
15319 : unsigned long long test_var;
15320 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, log_data_cntr_1));
15321 0 : if (PyErr_Occurred() != NULL) {
15322 0 : return -1;
15323 : }
15324 0 : if (test_var > uint_max) {
15325 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15326 : PyLong_Type.tp_name, uint_max, test_var);
15327 0 : return -1;
15328 : }
15329 0 : object->log_data[log_data_cntr_1] = test_var;
15330 : } else {
15331 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15332 : PyLong_Type.tp_name);
15333 0 : return -1;
15334 : }
15335 : }
15336 : }
15337 : }
15338 : }
15339 0 : return 0;
15340 : }
15341 :
15342 : static PyGetSetDef py_drsuapi_DsGetNT4ChangeLogInfo1_getsetters[] = {
15343 : {
15344 : .name = discard_const_p(char, "restart_length"),
15345 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_length,
15346 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_length,
15347 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15348 : },
15349 : {
15350 : .name = discard_const_p(char, "log_length"),
15351 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_length,
15352 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_length,
15353 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15354 : },
15355 : {
15356 : .name = discard_const_p(char, "sam_serial_number"),
15357 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_serial_number,
15358 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_serial_number,
15359 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
15360 : },
15361 : {
15362 : .name = discard_const_p(char, "sam_creation_time"),
15363 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_sam_creation_time,
15364 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_sam_creation_time,
15365 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
15366 : },
15367 : {
15368 : .name = discard_const_p(char, "builtin_serial_number"),
15369 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_serial_number,
15370 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_serial_number,
15371 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
15372 : },
15373 : {
15374 : .name = discard_const_p(char, "builtin_creation_time"),
15375 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_builtin_creation_time,
15376 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_builtin_creation_time,
15377 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
15378 : },
15379 : {
15380 : .name = discard_const_p(char, "lsa_serial_number"),
15381 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_serial_number,
15382 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_serial_number,
15383 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
15384 : },
15385 : {
15386 : .name = discard_const_p(char, "lsa_creation_time"),
15387 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_lsa_creation_time,
15388 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_lsa_creation_time,
15389 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
15390 : },
15391 : {
15392 : .name = discard_const_p(char, "status"),
15393 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_status,
15394 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_status,
15395 : .doc = discard_const_p(char, "PIDL-generated element of base type NTSTATUS")
15396 : },
15397 : {
15398 : .name = discard_const_p(char, "restart_data"),
15399 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_restart_data,
15400 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_restart_data,
15401 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
15402 : },
15403 : {
15404 : .name = discard_const_p(char, "log_data"),
15405 : .get = py_drsuapi_DsGetNT4ChangeLogInfo1_get_log_data,
15406 : .set = py_drsuapi_DsGetNT4ChangeLogInfo1_set_log_data,
15407 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
15408 : },
15409 : { .name = NULL }
15410 : };
15411 :
15412 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15413 : {
15414 0 : return pytalloc_new(struct drsuapi_DsGetNT4ChangeLogInfo1, type);
15415 : }
15416 :
15417 :
15418 : static PyTypeObject drsuapi_DsGetNT4ChangeLogInfo1_Type = {
15419 : PyVarObject_HEAD_INIT(NULL, 0)
15420 : .tp_name = "drsuapi.DsGetNT4ChangeLogInfo1",
15421 : .tp_getset = py_drsuapi_DsGetNT4ChangeLogInfo1_getsetters,
15422 : .tp_methods = NULL,
15423 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
15424 : .tp_new = py_drsuapi_DsGetNT4ChangeLogInfo1_new,
15425 : };
15426 :
15427 0 : static PyObject *py_import_drsuapi_DsGetNT4ChangeLogInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetNT4ChangeLogInfo *in)
15428 : {
15429 : PyObject *ret;
15430 :
15431 0 : switch (level) {
15432 0 : case 1:
15433 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetNT4ChangeLogInfo1_Type, mem_ctx, &in->info1);
15434 0 : return ret;
15435 :
15436 : }
15437 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
15438 0 : return NULL;
15439 : }
15440 :
15441 0 : static union drsuapi_DsGetNT4ChangeLogInfo *py_export_drsuapi_DsGetNT4ChangeLogInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
15442 : {
15443 0 : union drsuapi_DsGetNT4ChangeLogInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogInfo);
15444 0 : switch (level) {
15445 0 : case 1:
15446 0 : if (in == NULL) {
15447 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->info1");
15448 0 : talloc_free(ret); return NULL;
15449 : }
15450 0 : PY_CHECK_TYPE(&drsuapi_DsGetNT4ChangeLogInfo1_Type, in, talloc_free(ret); return NULL;);
15451 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
15452 0 : PyErr_NoMemory();
15453 0 : talloc_free(ret); return NULL;
15454 : }
15455 0 : ret->info1 = *(struct drsuapi_DsGetNT4ChangeLogInfo1 *)pytalloc_get_ptr(in);
15456 0 : break;
15457 :
15458 0 : default:
15459 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
15460 0 : talloc_free(ret);
15461 0 : ret = NULL;
15462 : }
15463 :
15464 0 : return ret;
15465 : }
15466 :
15467 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15468 : {
15469 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
15470 0 : PyObject *mem_ctx_obj = NULL;
15471 0 : TALLOC_CTX *mem_ctx = NULL;
15472 0 : int level = 0;
15473 0 : PyObject *in_obj = NULL;
15474 0 : union drsuapi_DsGetNT4ChangeLogInfo *in = NULL;
15475 :
15476 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
15477 : discard_const_p(char *, kwnames),
15478 : &mem_ctx_obj,
15479 : &level,
15480 : &in_obj)) {
15481 0 : return NULL;
15482 : }
15483 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
15484 0 : if (mem_ctx == NULL) {
15485 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
15486 0 : return NULL;
15487 : }
15488 0 : in = (union drsuapi_DsGetNT4ChangeLogInfo *)pytalloc_get_ptr(in_obj);
15489 0 : if (in == NULL) {
15490 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetNT4ChangeLogInfo!");
15491 0 : return NULL;
15492 : }
15493 :
15494 0 : return py_import_drsuapi_DsGetNT4ChangeLogInfo(mem_ctx, level, in);
15495 : }
15496 :
15497 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15498 : {
15499 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
15500 0 : PyObject *mem_ctx_obj = NULL;
15501 0 : TALLOC_CTX *mem_ctx = NULL;
15502 0 : int level = 0;
15503 0 : PyObject *in = NULL;
15504 0 : union drsuapi_DsGetNT4ChangeLogInfo *out = NULL;
15505 :
15506 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
15507 : discard_const_p(char *, kwnames),
15508 : &mem_ctx_obj,
15509 : &level,
15510 : &in)) {
15511 0 : return NULL;
15512 : }
15513 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
15514 0 : if (mem_ctx == NULL) {
15515 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
15516 0 : return NULL;
15517 : }
15518 :
15519 0 : out = py_export_drsuapi_DsGetNT4ChangeLogInfo(mem_ctx, level, in);
15520 0 : if (out == NULL) {
15521 0 : return NULL;
15522 : }
15523 :
15524 0 : return pytalloc_GenericObject_reference(out);
15525 : }
15526 :
15527 : static PyMethodDef py_drsuapi_DsGetNT4ChangeLogInfo_methods[] = {
15528 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLogInfo_import),
15529 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
15530 : "T.__import__(mem_ctx, level, in) => ret." },
15531 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLogInfo_export),
15532 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
15533 : "T.__export__(mem_ctx, level, in) => ret." },
15534 : { NULL, NULL, 0, NULL }
15535 : };
15536 :
15537 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLogInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15538 : {
15539 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
15540 0 : return NULL;
15541 : }
15542 :
15543 :
15544 : static PyTypeObject drsuapi_DsGetNT4ChangeLogInfo_Type = {
15545 : PyVarObject_HEAD_INIT(NULL, 0)
15546 : .tp_name = "drsuapi.DsGetNT4ChangeLogInfo",
15547 : .tp_getset = NULL,
15548 : .tp_methods = py_drsuapi_DsGetNT4ChangeLogInfo_methods,
15549 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
15550 : .tp_new = py_drsuapi_DsGetNT4ChangeLogInfo_new,
15551 : };
15552 :
15553 :
15554 0 : static PyObject *py_drsuapi_DsNameString_get_str(PyObject *obj, void *closure)
15555 : {
15556 0 : struct drsuapi_DsNameString *object = (struct drsuapi_DsNameString *)pytalloc_get_ptr(obj);
15557 : PyObject *py_str;
15558 0 : if (object->str == NULL) {
15559 0 : Py_RETURN_NONE;
15560 : }
15561 0 : if (object->str == NULL) {
15562 0 : py_str = Py_None;
15563 0 : Py_INCREF(py_str);
15564 : } else {
15565 0 : if (object->str == NULL) {
15566 0 : py_str = Py_None;
15567 0 : Py_INCREF(py_str);
15568 : } else {
15569 0 : py_str = PyUnicode_Decode(object->str, strlen(object->str), "utf-8", "ignore");
15570 : }
15571 : }
15572 0 : return py_str;
15573 : }
15574 :
15575 32 : static int py_drsuapi_DsNameString_set_str(PyObject *py_obj, PyObject *value, void *closure)
15576 : {
15577 32 : struct drsuapi_DsNameString *object = (struct drsuapi_DsNameString *)pytalloc_get_ptr(py_obj);
15578 32 : if (value == NULL) {
15579 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->str");
15580 0 : return -1;
15581 : }
15582 32 : if (value == Py_None) {
15583 0 : object->str = NULL;
15584 : } else {
15585 32 : object->str = NULL;
15586 : {
15587 : const char *test_str;
15588 : const char *talloc_str;
15589 32 : PyObject *unicode = NULL;
15590 32 : if (PyUnicode_Check(value)) {
15591 32 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
15592 32 : if (unicode == NULL) {
15593 0 : PyErr_NoMemory();
15594 0 : return -1;
15595 : }
15596 32 : test_str = PyBytes_AS_STRING(unicode);
15597 0 : } else if (PyBytes_Check(value)) {
15598 0 : test_str = PyBytes_AS_STRING(value);
15599 : } else {
15600 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
15601 0 : return -1;
15602 : }
15603 32 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
15604 32 : if (unicode != NULL) {
15605 32 : Py_DECREF(unicode);
15606 : }
15607 32 : if (talloc_str == NULL) {
15608 0 : PyErr_NoMemory();
15609 0 : return -1;
15610 : }
15611 32 : object->str = talloc_str;
15612 : }
15613 : }
15614 32 : return 0;
15615 : }
15616 :
15617 : static PyGetSetDef py_drsuapi_DsNameString_getsetters[] = {
15618 : {
15619 : .name = discard_const_p(char, "str"),
15620 : .get = py_drsuapi_DsNameString_get_str,
15621 : .set = py_drsuapi_DsNameString_set_str,
15622 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
15623 : },
15624 : { .name = NULL }
15625 : };
15626 :
15627 32 : static PyObject *py_drsuapi_DsNameString_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15628 : {
15629 32 : return pytalloc_new(struct drsuapi_DsNameString, type);
15630 : }
15631 :
15632 :
15633 : static PyTypeObject drsuapi_DsNameString_Type = {
15634 : PyVarObject_HEAD_INIT(NULL, 0)
15635 : .tp_name = "drsuapi.DsNameString",
15636 : .tp_getset = py_drsuapi_DsNameString_getsetters,
15637 : .tp_methods = NULL,
15638 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
15639 : .tp_new = py_drsuapi_DsNameString_new,
15640 : };
15641 :
15642 :
15643 0 : static PyObject *py_drsuapi_DsNameRequest1_get_codepage(PyObject *obj, void *closure)
15644 : {
15645 0 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
15646 : PyObject *py_codepage;
15647 0 : py_codepage = PyLong_FromUnsignedLongLong((uint32_t)object->codepage);
15648 0 : return py_codepage;
15649 : }
15650 :
15651 24 : static int py_drsuapi_DsNameRequest1_set_codepage(PyObject *py_obj, PyObject *value, void *closure)
15652 : {
15653 24 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
15654 24 : if (value == NULL) {
15655 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->codepage");
15656 0 : return -1;
15657 : }
15658 : {
15659 24 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->codepage));
15660 24 : if (PyLong_Check(value)) {
15661 : unsigned long long test_var;
15662 24 : test_var = PyLong_AsUnsignedLongLong(value);
15663 24 : if (PyErr_Occurred() != NULL) {
15664 0 : return -1;
15665 : }
15666 24 : if (test_var > uint_max) {
15667 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15668 : PyLong_Type.tp_name, uint_max, test_var);
15669 0 : return -1;
15670 : }
15671 24 : object->codepage = test_var;
15672 : } else {
15673 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15674 : PyLong_Type.tp_name);
15675 0 : return -1;
15676 : }
15677 : }
15678 24 : return 0;
15679 : }
15680 :
15681 0 : static PyObject *py_drsuapi_DsNameRequest1_get_language(PyObject *obj, void *closure)
15682 : {
15683 0 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
15684 : PyObject *py_language;
15685 0 : py_language = PyLong_FromUnsignedLongLong((uint32_t)object->language);
15686 0 : return py_language;
15687 : }
15688 :
15689 24 : static int py_drsuapi_DsNameRequest1_set_language(PyObject *py_obj, PyObject *value, void *closure)
15690 : {
15691 24 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
15692 24 : if (value == NULL) {
15693 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->language");
15694 0 : return -1;
15695 : }
15696 : {
15697 24 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->language));
15698 24 : if (PyLong_Check(value)) {
15699 : unsigned long long test_var;
15700 24 : test_var = PyLong_AsUnsignedLongLong(value);
15701 24 : if (PyErr_Occurred() != NULL) {
15702 0 : return -1;
15703 : }
15704 24 : if (test_var > uint_max) {
15705 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15706 : PyLong_Type.tp_name, uint_max, test_var);
15707 0 : return -1;
15708 : }
15709 24 : object->language = test_var;
15710 : } else {
15711 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15712 : PyLong_Type.tp_name);
15713 0 : return -1;
15714 : }
15715 : }
15716 24 : return 0;
15717 : }
15718 :
15719 0 : static PyObject *py_drsuapi_DsNameRequest1_get_format_flags(PyObject *obj, void *closure)
15720 : {
15721 0 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
15722 : PyObject *py_format_flags;
15723 0 : py_format_flags = PyLong_FromUnsignedLongLong((uint32_t)object->format_flags);
15724 0 : return py_format_flags;
15725 : }
15726 :
15727 25 : static int py_drsuapi_DsNameRequest1_set_format_flags(PyObject *py_obj, PyObject *value, void *closure)
15728 : {
15729 25 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
15730 25 : if (value == NULL) {
15731 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->format_flags");
15732 0 : return -1;
15733 : }
15734 : {
15735 25 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->format_flags));
15736 25 : if (PyLong_Check(value)) {
15737 : unsigned long long test_var;
15738 25 : test_var = PyLong_AsUnsignedLongLong(value);
15739 25 : if (PyErr_Occurred() != NULL) {
15740 0 : return -1;
15741 : }
15742 25 : if (test_var > uint_max) {
15743 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15744 : PyLong_Type.tp_name, uint_max, test_var);
15745 0 : return -1;
15746 : }
15747 25 : object->format_flags = test_var;
15748 : } else {
15749 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15750 : PyLong_Type.tp_name);
15751 0 : return -1;
15752 : }
15753 : }
15754 25 : return 0;
15755 : }
15756 :
15757 0 : static PyObject *py_drsuapi_DsNameRequest1_get_format_offered(PyObject *obj, void *closure)
15758 : {
15759 0 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
15760 : PyObject *py_format_offered;
15761 0 : py_format_offered = PyLong_FromUnsignedLongLong((uint32_t)object->format_offered);
15762 0 : return py_format_offered;
15763 : }
15764 :
15765 24 : static int py_drsuapi_DsNameRequest1_set_format_offered(PyObject *py_obj, PyObject *value, void *closure)
15766 : {
15767 24 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
15768 24 : if (value == NULL) {
15769 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->format_offered");
15770 0 : return -1;
15771 : }
15772 : {
15773 24 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->format_offered));
15774 24 : if (PyLong_Check(value)) {
15775 : unsigned long long test_var;
15776 24 : test_var = PyLong_AsUnsignedLongLong(value);
15777 24 : if (PyErr_Occurred() != NULL) {
15778 0 : return -1;
15779 : }
15780 24 : if (test_var > uint_max) {
15781 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15782 : PyLong_Type.tp_name, uint_max, test_var);
15783 0 : return -1;
15784 : }
15785 24 : object->format_offered = test_var;
15786 : } else {
15787 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15788 : PyLong_Type.tp_name);
15789 0 : return -1;
15790 : }
15791 : }
15792 24 : return 0;
15793 : }
15794 :
15795 0 : static PyObject *py_drsuapi_DsNameRequest1_get_format_desired(PyObject *obj, void *closure)
15796 : {
15797 0 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
15798 : PyObject *py_format_desired;
15799 0 : py_format_desired = PyLong_FromUnsignedLongLong((uint32_t)object->format_desired);
15800 0 : return py_format_desired;
15801 : }
15802 :
15803 24 : static int py_drsuapi_DsNameRequest1_set_format_desired(PyObject *py_obj, PyObject *value, void *closure)
15804 : {
15805 24 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
15806 24 : if (value == NULL) {
15807 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->format_desired");
15808 0 : return -1;
15809 : }
15810 : {
15811 24 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->format_desired));
15812 24 : if (PyLong_Check(value)) {
15813 : unsigned long long test_var;
15814 24 : test_var = PyLong_AsUnsignedLongLong(value);
15815 24 : if (PyErr_Occurred() != NULL) {
15816 0 : return -1;
15817 : }
15818 24 : if (test_var > uint_max) {
15819 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15820 : PyLong_Type.tp_name, uint_max, test_var);
15821 0 : return -1;
15822 : }
15823 24 : object->format_desired = test_var;
15824 : } else {
15825 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15826 : PyLong_Type.tp_name);
15827 0 : return -1;
15828 : }
15829 : }
15830 24 : return 0;
15831 : }
15832 :
15833 0 : static PyObject *py_drsuapi_DsNameRequest1_get_count(PyObject *obj, void *closure)
15834 : {
15835 0 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
15836 : PyObject *py_count;
15837 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
15838 0 : return py_count;
15839 : }
15840 :
15841 24 : static int py_drsuapi_DsNameRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
15842 : {
15843 24 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
15844 24 : if (value == NULL) {
15845 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
15846 0 : return -1;
15847 : }
15848 : {
15849 24 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
15850 24 : if (PyLong_Check(value)) {
15851 : unsigned long long test_var;
15852 24 : test_var = PyLong_AsUnsignedLongLong(value);
15853 24 : if (PyErr_Occurred() != NULL) {
15854 0 : return -1;
15855 : }
15856 24 : if (test_var > uint_max) {
15857 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15858 : PyLong_Type.tp_name, uint_max, test_var);
15859 0 : return -1;
15860 : }
15861 24 : object->count = test_var;
15862 : } else {
15863 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15864 : PyLong_Type.tp_name);
15865 0 : return -1;
15866 : }
15867 : }
15868 24 : return 0;
15869 : }
15870 :
15871 0 : static PyObject *py_drsuapi_DsNameRequest1_get_names(PyObject *obj, void *closure)
15872 : {
15873 0 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(obj);
15874 : PyObject *py_names;
15875 0 : if (object->names == NULL) {
15876 0 : Py_RETURN_NONE;
15877 : }
15878 0 : if (object->names == NULL) {
15879 0 : py_names = Py_None;
15880 0 : Py_INCREF(py_names);
15881 : } else {
15882 0 : py_names = PyList_New(object->count);
15883 0 : if (py_names == NULL) {
15884 0 : return NULL;
15885 : }
15886 : {
15887 : int names_cntr_1;
15888 0 : for (names_cntr_1 = 0; names_cntr_1 < (object->count); names_cntr_1++) {
15889 : PyObject *py_names_1;
15890 0 : py_names_1 = pytalloc_reference_ex(&drsuapi_DsNameString_Type, object->names, &object->names[names_cntr_1]);
15891 0 : PyList_SetItem(py_names, names_cntr_1, py_names_1);
15892 : }
15893 : }
15894 : }
15895 0 : return py_names;
15896 : }
15897 :
15898 24 : static int py_drsuapi_DsNameRequest1_set_names(PyObject *py_obj, PyObject *value, void *closure)
15899 : {
15900 24 : struct drsuapi_DsNameRequest1 *object = (struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(py_obj);
15901 24 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->names));
15902 24 : if (value == NULL) {
15903 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->names");
15904 0 : return -1;
15905 : }
15906 24 : if (value == Py_None) {
15907 0 : object->names = NULL;
15908 : } else {
15909 24 : object->names = NULL;
15910 24 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
15911 : {
15912 : int names_cntr_1;
15913 24 : object->names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->names, PyList_GET_SIZE(value));
15914 24 : if (!object->names) { return -1;; }
15915 24 : talloc_set_name_const(object->names, "ARRAY: object->names");
15916 48 : for (names_cntr_1 = 0; names_cntr_1 < PyList_GET_SIZE(value); names_cntr_1++) {
15917 24 : if (PyList_GET_ITEM(value, names_cntr_1) == NULL) {
15918 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->names[names_cntr_1]");
15919 0 : return -1;
15920 : }
15921 24 : PY_CHECK_TYPE(&drsuapi_DsNameString_Type, PyList_GET_ITEM(value, names_cntr_1), return -1;);
15922 24 : if (talloc_reference(object->names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, names_cntr_1))) == NULL) {
15923 0 : PyErr_NoMemory();
15924 0 : return -1;
15925 : }
15926 24 : object->names[names_cntr_1] = *(struct drsuapi_DsNameString *)pytalloc_get_ptr(PyList_GET_ITEM(value, names_cntr_1));
15927 : }
15928 : }
15929 : }
15930 24 : return 0;
15931 : }
15932 :
15933 : static PyGetSetDef py_drsuapi_DsNameRequest1_getsetters[] = {
15934 : {
15935 : .name = discard_const_p(char, "codepage"),
15936 : .get = py_drsuapi_DsNameRequest1_get_codepage,
15937 : .set = py_drsuapi_DsNameRequest1_set_codepage,
15938 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15939 : },
15940 : {
15941 : .name = discard_const_p(char, "language"),
15942 : .get = py_drsuapi_DsNameRequest1_get_language,
15943 : .set = py_drsuapi_DsNameRequest1_set_language,
15944 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15945 : },
15946 : {
15947 : .name = discard_const_p(char, "format_flags"),
15948 : .get = py_drsuapi_DsNameRequest1_get_format_flags,
15949 : .set = py_drsuapi_DsNameRequest1_set_format_flags,
15950 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameFlags")
15951 : },
15952 : {
15953 : .name = discard_const_p(char, "format_offered"),
15954 : .get = py_drsuapi_DsNameRequest1_get_format_offered,
15955 : .set = py_drsuapi_DsNameRequest1_set_format_offered,
15956 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameFormat")
15957 : },
15958 : {
15959 : .name = discard_const_p(char, "format_desired"),
15960 : .get = py_drsuapi_DsNameRequest1_get_format_desired,
15961 : .set = py_drsuapi_DsNameRequest1_set_format_desired,
15962 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameFormat")
15963 : },
15964 : {
15965 : .name = discard_const_p(char, "count"),
15966 : .get = py_drsuapi_DsNameRequest1_get_count,
15967 : .set = py_drsuapi_DsNameRequest1_set_count,
15968 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15969 : },
15970 : {
15971 : .name = discard_const_p(char, "names"),
15972 : .get = py_drsuapi_DsNameRequest1_get_names,
15973 : .set = py_drsuapi_DsNameRequest1_set_names,
15974 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameString")
15975 : },
15976 : { .name = NULL }
15977 : };
15978 :
15979 24 : static PyObject *py_drsuapi_DsNameRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15980 : {
15981 24 : return pytalloc_new(struct drsuapi_DsNameRequest1, type);
15982 : }
15983 :
15984 :
15985 : static PyTypeObject drsuapi_DsNameRequest1_Type = {
15986 : PyVarObject_HEAD_INIT(NULL, 0)
15987 : .tp_name = "drsuapi.DsNameRequest1",
15988 : .tp_getset = py_drsuapi_DsNameRequest1_getsetters,
15989 : .tp_methods = NULL,
15990 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
15991 : .tp_new = py_drsuapi_DsNameRequest1_new,
15992 : };
15993 :
15994 0 : static PyObject *py_import_drsuapi_DsNameRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsNameRequest *in)
15995 : {
15996 : PyObject *ret;
15997 :
15998 0 : switch (level) {
15999 0 : case 1:
16000 0 : ret = pytalloc_reference_ex(&drsuapi_DsNameRequest1_Type, mem_ctx, &in->req1);
16001 0 : return ret;
16002 :
16003 : }
16004 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
16005 0 : return NULL;
16006 : }
16007 :
16008 24 : static union drsuapi_DsNameRequest *py_export_drsuapi_DsNameRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
16009 : {
16010 24 : union drsuapi_DsNameRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsNameRequest);
16011 24 : switch (level) {
16012 24 : case 1:
16013 24 : if (in == NULL) {
16014 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
16015 0 : talloc_free(ret); return NULL;
16016 : }
16017 24 : PY_CHECK_TYPE(&drsuapi_DsNameRequest1_Type, in, talloc_free(ret); return NULL;);
16018 24 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
16019 0 : PyErr_NoMemory();
16020 0 : talloc_free(ret); return NULL;
16021 : }
16022 24 : ret->req1 = *(struct drsuapi_DsNameRequest1 *)pytalloc_get_ptr(in);
16023 24 : break;
16024 :
16025 0 : default:
16026 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
16027 0 : talloc_free(ret);
16028 0 : ret = NULL;
16029 : }
16030 :
16031 24 : return ret;
16032 : }
16033 :
16034 0 : static PyObject *py_drsuapi_DsNameRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16035 : {
16036 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
16037 0 : PyObject *mem_ctx_obj = NULL;
16038 0 : TALLOC_CTX *mem_ctx = NULL;
16039 0 : int level = 0;
16040 0 : PyObject *in_obj = NULL;
16041 0 : union drsuapi_DsNameRequest *in = NULL;
16042 :
16043 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
16044 : discard_const_p(char *, kwnames),
16045 : &mem_ctx_obj,
16046 : &level,
16047 : &in_obj)) {
16048 0 : return NULL;
16049 : }
16050 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
16051 0 : if (mem_ctx == NULL) {
16052 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
16053 0 : return NULL;
16054 : }
16055 0 : in = (union drsuapi_DsNameRequest *)pytalloc_get_ptr(in_obj);
16056 0 : if (in == NULL) {
16057 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsNameRequest!");
16058 0 : return NULL;
16059 : }
16060 :
16061 0 : return py_import_drsuapi_DsNameRequest(mem_ctx, level, in);
16062 : }
16063 :
16064 24 : static PyObject *py_drsuapi_DsNameRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16065 : {
16066 24 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
16067 24 : PyObject *mem_ctx_obj = NULL;
16068 24 : TALLOC_CTX *mem_ctx = NULL;
16069 24 : int level = 0;
16070 24 : PyObject *in = NULL;
16071 24 : union drsuapi_DsNameRequest *out = NULL;
16072 :
16073 24 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
16074 : discard_const_p(char *, kwnames),
16075 : &mem_ctx_obj,
16076 : &level,
16077 : &in)) {
16078 0 : return NULL;
16079 : }
16080 24 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
16081 24 : if (mem_ctx == NULL) {
16082 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
16083 0 : return NULL;
16084 : }
16085 :
16086 24 : out = py_export_drsuapi_DsNameRequest(mem_ctx, level, in);
16087 24 : if (out == NULL) {
16088 0 : return NULL;
16089 : }
16090 :
16091 24 : return pytalloc_GenericObject_reference(out);
16092 : }
16093 :
16094 : static PyMethodDef py_drsuapi_DsNameRequest_methods[] = {
16095 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsNameRequest_import),
16096 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
16097 : "T.__import__(mem_ctx, level, in) => ret." },
16098 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsNameRequest_export),
16099 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
16100 : "T.__export__(mem_ctx, level, in) => ret." },
16101 : { NULL, NULL, 0, NULL }
16102 : };
16103 :
16104 0 : static PyObject *py_drsuapi_DsNameRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16105 : {
16106 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
16107 0 : return NULL;
16108 : }
16109 :
16110 :
16111 : static PyTypeObject drsuapi_DsNameRequest_Type = {
16112 : PyVarObject_HEAD_INIT(NULL, 0)
16113 : .tp_name = "drsuapi.DsNameRequest",
16114 : .tp_getset = NULL,
16115 : .tp_methods = py_drsuapi_DsNameRequest_methods,
16116 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
16117 : .tp_new = py_drsuapi_DsNameRequest_new,
16118 : };
16119 :
16120 :
16121 41 : static PyObject *py_drsuapi_DsNameInfo1_get_status(PyObject *obj, void *closure)
16122 : {
16123 41 : struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(obj);
16124 : PyObject *py_status;
16125 41 : py_status = PyLong_FromUnsignedLongLong((uint32_t)object->status);
16126 41 : return py_status;
16127 : }
16128 :
16129 0 : static int py_drsuapi_DsNameInfo1_set_status(PyObject *py_obj, PyObject *value, void *closure)
16130 : {
16131 0 : struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(py_obj);
16132 0 : if (value == NULL) {
16133 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
16134 0 : return -1;
16135 : }
16136 : {
16137 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->status));
16138 0 : if (PyLong_Check(value)) {
16139 : unsigned long long test_var;
16140 0 : test_var = PyLong_AsUnsignedLongLong(value);
16141 0 : if (PyErr_Occurred() != NULL) {
16142 0 : return -1;
16143 : }
16144 0 : if (test_var > uint_max) {
16145 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16146 : PyLong_Type.tp_name, uint_max, test_var);
16147 0 : return -1;
16148 : }
16149 0 : object->status = test_var;
16150 : } else {
16151 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16152 : PyLong_Type.tp_name);
16153 0 : return -1;
16154 : }
16155 : }
16156 0 : return 0;
16157 : }
16158 :
16159 0 : static PyObject *py_drsuapi_DsNameInfo1_get_dns_domain_name(PyObject *obj, void *closure)
16160 : {
16161 0 : struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(obj);
16162 : PyObject *py_dns_domain_name;
16163 0 : if (object->dns_domain_name == NULL) {
16164 0 : Py_RETURN_NONE;
16165 : }
16166 0 : if (object->dns_domain_name == NULL) {
16167 0 : py_dns_domain_name = Py_None;
16168 0 : Py_INCREF(py_dns_domain_name);
16169 : } else {
16170 0 : if (object->dns_domain_name == NULL) {
16171 0 : py_dns_domain_name = Py_None;
16172 0 : Py_INCREF(py_dns_domain_name);
16173 : } else {
16174 0 : py_dns_domain_name = PyUnicode_Decode(object->dns_domain_name, strlen(object->dns_domain_name), "utf-8", "ignore");
16175 : }
16176 : }
16177 0 : return py_dns_domain_name;
16178 : }
16179 :
16180 0 : static int py_drsuapi_DsNameInfo1_set_dns_domain_name(PyObject *py_obj, PyObject *value, void *closure)
16181 : {
16182 0 : struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(py_obj);
16183 0 : if (value == NULL) {
16184 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_domain_name");
16185 0 : return -1;
16186 : }
16187 0 : if (value == Py_None) {
16188 0 : object->dns_domain_name = NULL;
16189 : } else {
16190 0 : object->dns_domain_name = NULL;
16191 : {
16192 : const char *test_str;
16193 : const char *talloc_str;
16194 0 : PyObject *unicode = NULL;
16195 0 : if (PyUnicode_Check(value)) {
16196 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16197 0 : if (unicode == NULL) {
16198 0 : PyErr_NoMemory();
16199 0 : return -1;
16200 : }
16201 0 : test_str = PyBytes_AS_STRING(unicode);
16202 0 : } else if (PyBytes_Check(value)) {
16203 0 : test_str = PyBytes_AS_STRING(value);
16204 : } else {
16205 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16206 0 : return -1;
16207 : }
16208 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16209 0 : if (unicode != NULL) {
16210 0 : Py_DECREF(unicode);
16211 : }
16212 0 : if (talloc_str == NULL) {
16213 0 : PyErr_NoMemory();
16214 0 : return -1;
16215 : }
16216 0 : object->dns_domain_name = talloc_str;
16217 : }
16218 : }
16219 0 : return 0;
16220 : }
16221 :
16222 12 : static PyObject *py_drsuapi_DsNameInfo1_get_result_name(PyObject *obj, void *closure)
16223 : {
16224 12 : struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(obj);
16225 : PyObject *py_result_name;
16226 12 : if (object->result_name == NULL) {
16227 0 : Py_RETURN_NONE;
16228 : }
16229 12 : if (object->result_name == NULL) {
16230 0 : py_result_name = Py_None;
16231 0 : Py_INCREF(py_result_name);
16232 : } else {
16233 12 : if (object->result_name == NULL) {
16234 0 : py_result_name = Py_None;
16235 0 : Py_INCREF(py_result_name);
16236 : } else {
16237 12 : py_result_name = PyUnicode_Decode(object->result_name, strlen(object->result_name), "utf-8", "ignore");
16238 : }
16239 : }
16240 12 : return py_result_name;
16241 : }
16242 :
16243 0 : static int py_drsuapi_DsNameInfo1_set_result_name(PyObject *py_obj, PyObject *value, void *closure)
16244 : {
16245 0 : struct drsuapi_DsNameInfo1 *object = (struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(py_obj);
16246 0 : if (value == NULL) {
16247 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->result_name");
16248 0 : return -1;
16249 : }
16250 0 : if (value == Py_None) {
16251 0 : object->result_name = NULL;
16252 : } else {
16253 0 : object->result_name = NULL;
16254 : {
16255 : const char *test_str;
16256 : const char *talloc_str;
16257 0 : PyObject *unicode = NULL;
16258 0 : if (PyUnicode_Check(value)) {
16259 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16260 0 : if (unicode == NULL) {
16261 0 : PyErr_NoMemory();
16262 0 : return -1;
16263 : }
16264 0 : test_str = PyBytes_AS_STRING(unicode);
16265 0 : } else if (PyBytes_Check(value)) {
16266 0 : test_str = PyBytes_AS_STRING(value);
16267 : } else {
16268 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16269 0 : return -1;
16270 : }
16271 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16272 0 : if (unicode != NULL) {
16273 0 : Py_DECREF(unicode);
16274 : }
16275 0 : if (talloc_str == NULL) {
16276 0 : PyErr_NoMemory();
16277 0 : return -1;
16278 : }
16279 0 : object->result_name = talloc_str;
16280 : }
16281 : }
16282 0 : return 0;
16283 : }
16284 :
16285 : static PyGetSetDef py_drsuapi_DsNameInfo1_getsetters[] = {
16286 : {
16287 : .name = discard_const_p(char, "status"),
16288 : .get = py_drsuapi_DsNameInfo1_get_status,
16289 : .set = py_drsuapi_DsNameInfo1_set_status,
16290 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameStatus")
16291 : },
16292 : {
16293 : .name = discard_const_p(char, "dns_domain_name"),
16294 : .get = py_drsuapi_DsNameInfo1_get_dns_domain_name,
16295 : .set = py_drsuapi_DsNameInfo1_set_dns_domain_name,
16296 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
16297 : },
16298 : {
16299 : .name = discard_const_p(char, "result_name"),
16300 : .get = py_drsuapi_DsNameInfo1_get_result_name,
16301 : .set = py_drsuapi_DsNameInfo1_set_result_name,
16302 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
16303 : },
16304 : { .name = NULL }
16305 : };
16306 :
16307 0 : static PyObject *py_drsuapi_DsNameInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16308 : {
16309 0 : return pytalloc_new(struct drsuapi_DsNameInfo1, type);
16310 : }
16311 :
16312 :
16313 : static PyTypeObject drsuapi_DsNameInfo1_Type = {
16314 : PyVarObject_HEAD_INIT(NULL, 0)
16315 : .tp_name = "drsuapi.DsNameInfo1",
16316 : .tp_getset = py_drsuapi_DsNameInfo1_getsetters,
16317 : .tp_methods = NULL,
16318 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
16319 : .tp_new = py_drsuapi_DsNameInfo1_new,
16320 : };
16321 :
16322 :
16323 23 : static PyObject *py_drsuapi_DsNameCtr1_get_count(PyObject *obj, void *closure)
16324 : {
16325 23 : struct drsuapi_DsNameCtr1 *object = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(obj);
16326 : PyObject *py_count;
16327 23 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
16328 23 : return py_count;
16329 : }
16330 :
16331 0 : static int py_drsuapi_DsNameCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
16332 : {
16333 0 : struct drsuapi_DsNameCtr1 *object = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(py_obj);
16334 0 : if (value == NULL) {
16335 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
16336 0 : return -1;
16337 : }
16338 : {
16339 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
16340 0 : if (PyLong_Check(value)) {
16341 : unsigned long long test_var;
16342 0 : test_var = PyLong_AsUnsignedLongLong(value);
16343 0 : if (PyErr_Occurred() != NULL) {
16344 0 : return -1;
16345 : }
16346 0 : if (test_var > uint_max) {
16347 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16348 : PyLong_Type.tp_name, uint_max, test_var);
16349 0 : return -1;
16350 : }
16351 0 : object->count = test_var;
16352 : } else {
16353 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16354 : PyLong_Type.tp_name);
16355 0 : return -1;
16356 : }
16357 : }
16358 0 : return 0;
16359 : }
16360 :
16361 53 : static PyObject *py_drsuapi_DsNameCtr1_get_array(PyObject *obj, void *closure)
16362 : {
16363 53 : struct drsuapi_DsNameCtr1 *object = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(obj);
16364 : PyObject *py_array;
16365 53 : if (object->array == NULL) {
16366 0 : Py_RETURN_NONE;
16367 : }
16368 53 : if (object->array == NULL) {
16369 0 : py_array = Py_None;
16370 0 : Py_INCREF(py_array);
16371 : } else {
16372 53 : py_array = PyList_New(object->count);
16373 53 : if (py_array == NULL) {
16374 0 : return NULL;
16375 : }
16376 : {
16377 : int array_cntr_1;
16378 106 : for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
16379 : PyObject *py_array_1;
16380 53 : py_array_1 = pytalloc_reference_ex(&drsuapi_DsNameInfo1_Type, object->array, &object->array[array_cntr_1]);
16381 53 : PyList_SetItem(py_array, array_cntr_1, py_array_1);
16382 : }
16383 : }
16384 : }
16385 53 : return py_array;
16386 : }
16387 :
16388 0 : static int py_drsuapi_DsNameCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
16389 : {
16390 0 : struct drsuapi_DsNameCtr1 *object = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(py_obj);
16391 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
16392 0 : if (value == NULL) {
16393 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
16394 0 : return -1;
16395 : }
16396 0 : if (value == Py_None) {
16397 0 : object->array = NULL;
16398 : } else {
16399 0 : object->array = NULL;
16400 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
16401 : {
16402 : int array_cntr_1;
16403 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
16404 0 : if (!object->array) { return -1;; }
16405 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
16406 0 : for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
16407 0 : if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
16408 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
16409 0 : return -1;
16410 : }
16411 0 : PY_CHECK_TYPE(&drsuapi_DsNameInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
16412 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
16413 0 : PyErr_NoMemory();
16414 0 : return -1;
16415 : }
16416 0 : object->array[array_cntr_1] = *(struct drsuapi_DsNameInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
16417 : }
16418 : }
16419 : }
16420 0 : return 0;
16421 : }
16422 :
16423 : static PyGetSetDef py_drsuapi_DsNameCtr1_getsetters[] = {
16424 : {
16425 : .name = discard_const_p(char, "count"),
16426 : .get = py_drsuapi_DsNameCtr1_get_count,
16427 : .set = py_drsuapi_DsNameCtr1_set_count,
16428 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16429 : },
16430 : {
16431 : .name = discard_const_p(char, "array"),
16432 : .get = py_drsuapi_DsNameCtr1_get_array,
16433 : .set = py_drsuapi_DsNameCtr1_set_array,
16434 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameInfo1")
16435 : },
16436 : { .name = NULL }
16437 : };
16438 :
16439 0 : static PyObject *py_drsuapi_DsNameCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16440 : {
16441 0 : return pytalloc_new(struct drsuapi_DsNameCtr1, type);
16442 : }
16443 :
16444 :
16445 : static PyTypeObject drsuapi_DsNameCtr1_Type = {
16446 : PyVarObject_HEAD_INIT(NULL, 0)
16447 : .tp_name = "drsuapi.DsNameCtr1",
16448 : .tp_getset = py_drsuapi_DsNameCtr1_getsetters,
16449 : .tp_methods = NULL,
16450 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
16451 : .tp_new = py_drsuapi_DsNameCtr1_new,
16452 : };
16453 :
16454 24 : static PyObject *py_import_drsuapi_DsNameCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsNameCtr *in)
16455 : {
16456 : PyObject *ret;
16457 :
16458 24 : switch (level) {
16459 24 : case 1:
16460 24 : if (in->ctr1 == NULL) {
16461 0 : ret = Py_None;
16462 0 : Py_INCREF(ret);
16463 : } else {
16464 24 : ret = pytalloc_reference_ex(&drsuapi_DsNameCtr1_Type, in->ctr1, in->ctr1);
16465 : }
16466 24 : return ret;
16467 :
16468 : }
16469 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
16470 0 : return NULL;
16471 : }
16472 :
16473 0 : static union drsuapi_DsNameCtr *py_export_drsuapi_DsNameCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
16474 : {
16475 0 : union drsuapi_DsNameCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsNameCtr);
16476 0 : switch (level) {
16477 0 : case 1:
16478 0 : if (in == NULL) {
16479 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
16480 0 : talloc_free(ret); return NULL;
16481 : }
16482 0 : if (in == Py_None) {
16483 0 : ret->ctr1 = NULL;
16484 : } else {
16485 0 : ret->ctr1 = NULL;
16486 0 : PY_CHECK_TYPE(&drsuapi_DsNameCtr1_Type, in, talloc_free(ret); return NULL;);
16487 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
16488 0 : PyErr_NoMemory();
16489 0 : talloc_free(ret); return NULL;
16490 : }
16491 0 : ret->ctr1 = (struct drsuapi_DsNameCtr1 *)pytalloc_get_ptr(in);
16492 : }
16493 0 : break;
16494 :
16495 0 : default:
16496 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
16497 0 : talloc_free(ret);
16498 0 : ret = NULL;
16499 : }
16500 :
16501 0 : return ret;
16502 : }
16503 :
16504 24 : static PyObject *py_drsuapi_DsNameCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16505 : {
16506 24 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
16507 24 : PyObject *mem_ctx_obj = NULL;
16508 24 : TALLOC_CTX *mem_ctx = NULL;
16509 24 : int level = 0;
16510 24 : PyObject *in_obj = NULL;
16511 24 : union drsuapi_DsNameCtr *in = NULL;
16512 :
16513 24 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
16514 : discard_const_p(char *, kwnames),
16515 : &mem_ctx_obj,
16516 : &level,
16517 : &in_obj)) {
16518 0 : return NULL;
16519 : }
16520 24 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
16521 24 : if (mem_ctx == NULL) {
16522 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
16523 0 : return NULL;
16524 : }
16525 24 : in = (union drsuapi_DsNameCtr *)pytalloc_get_ptr(in_obj);
16526 24 : if (in == NULL) {
16527 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsNameCtr!");
16528 0 : return NULL;
16529 : }
16530 :
16531 24 : return py_import_drsuapi_DsNameCtr(mem_ctx, level, in);
16532 : }
16533 :
16534 0 : static PyObject *py_drsuapi_DsNameCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16535 : {
16536 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
16537 0 : PyObject *mem_ctx_obj = NULL;
16538 0 : TALLOC_CTX *mem_ctx = NULL;
16539 0 : int level = 0;
16540 0 : PyObject *in = NULL;
16541 0 : union drsuapi_DsNameCtr *out = NULL;
16542 :
16543 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
16544 : discard_const_p(char *, kwnames),
16545 : &mem_ctx_obj,
16546 : &level,
16547 : &in)) {
16548 0 : return NULL;
16549 : }
16550 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
16551 0 : if (mem_ctx == NULL) {
16552 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
16553 0 : return NULL;
16554 : }
16555 :
16556 0 : out = py_export_drsuapi_DsNameCtr(mem_ctx, level, in);
16557 0 : if (out == NULL) {
16558 0 : return NULL;
16559 : }
16560 :
16561 0 : return pytalloc_GenericObject_reference(out);
16562 : }
16563 :
16564 : static PyMethodDef py_drsuapi_DsNameCtr_methods[] = {
16565 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsNameCtr_import),
16566 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
16567 : "T.__import__(mem_ctx, level, in) => ret." },
16568 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsNameCtr_export),
16569 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
16570 : "T.__export__(mem_ctx, level, in) => ret." },
16571 : { NULL, NULL, 0, NULL }
16572 : };
16573 :
16574 0 : static PyObject *py_drsuapi_DsNameCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16575 : {
16576 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
16577 0 : return NULL;
16578 : }
16579 :
16580 :
16581 : static PyTypeObject drsuapi_DsNameCtr_Type = {
16582 : PyVarObject_HEAD_INIT(NULL, 0)
16583 : .tp_name = "drsuapi.DsNameCtr",
16584 : .tp_getset = NULL,
16585 : .tp_methods = py_drsuapi_DsNameCtr_methods,
16586 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
16587 : .tp_new = py_drsuapi_DsNameCtr_new,
16588 : };
16589 :
16590 :
16591 0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_operation(PyObject *obj, void *closure)
16592 : {
16593 0 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
16594 : PyObject *py_operation;
16595 0 : py_operation = PyLong_FromUnsignedLongLong((uint32_t)object->operation);
16596 0 : return py_operation;
16597 : }
16598 :
16599 5 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_operation(PyObject *py_obj, PyObject *value, void *closure)
16600 : {
16601 5 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
16602 5 : if (value == NULL) {
16603 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->operation");
16604 0 : return -1;
16605 : }
16606 : {
16607 5 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->operation));
16608 5 : if (PyLong_Check(value)) {
16609 : unsigned long long test_var;
16610 5 : test_var = PyLong_AsUnsignedLongLong(value);
16611 5 : if (PyErr_Occurred() != NULL) {
16612 0 : return -1;
16613 : }
16614 5 : if (test_var > uint_max) {
16615 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16616 : PyLong_Type.tp_name, uint_max, test_var);
16617 0 : return -1;
16618 : }
16619 5 : object->operation = test_var;
16620 : } else {
16621 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16622 : PyLong_Type.tp_name);
16623 0 : return -1;
16624 : }
16625 : }
16626 5 : return 0;
16627 : }
16628 :
16629 0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_unknown1(PyObject *obj, void *closure)
16630 : {
16631 0 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
16632 : PyObject *py_unknown1;
16633 0 : py_unknown1 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown1);
16634 0 : return py_unknown1;
16635 : }
16636 :
16637 1 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_unknown1(PyObject *py_obj, PyObject *value, void *closure)
16638 : {
16639 1 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
16640 1 : if (value == NULL) {
16641 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown1");
16642 0 : return -1;
16643 : }
16644 : {
16645 1 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown1));
16646 1 : if (PyLong_Check(value)) {
16647 : unsigned long long test_var;
16648 1 : test_var = PyLong_AsUnsignedLongLong(value);
16649 1 : if (PyErr_Occurred() != NULL) {
16650 0 : return -1;
16651 : }
16652 1 : if (test_var > uint_max) {
16653 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16654 : PyLong_Type.tp_name, uint_max, test_var);
16655 0 : return -1;
16656 : }
16657 1 : object->unknown1 = test_var;
16658 : } else {
16659 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16660 : PyLong_Type.tp_name);
16661 0 : return -1;
16662 : }
16663 : }
16664 1 : return 0;
16665 : }
16666 :
16667 0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_object_dn(PyObject *obj, void *closure)
16668 : {
16669 0 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
16670 : PyObject *py_object_dn;
16671 0 : if (object->object_dn == NULL) {
16672 0 : Py_RETURN_NONE;
16673 : }
16674 0 : if (object->object_dn == NULL) {
16675 0 : py_object_dn = Py_None;
16676 0 : Py_INCREF(py_object_dn);
16677 : } else {
16678 0 : if (object->object_dn == NULL) {
16679 0 : py_object_dn = Py_None;
16680 0 : Py_INCREF(py_object_dn);
16681 : } else {
16682 0 : py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
16683 : }
16684 : }
16685 0 : return py_object_dn;
16686 : }
16687 :
16688 5 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
16689 : {
16690 5 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
16691 5 : if (value == NULL) {
16692 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
16693 0 : return -1;
16694 : }
16695 5 : if (value == Py_None) {
16696 0 : object->object_dn = NULL;
16697 : } else {
16698 5 : object->object_dn = NULL;
16699 : {
16700 : const char *test_str;
16701 : const char *talloc_str;
16702 5 : PyObject *unicode = NULL;
16703 5 : if (PyUnicode_Check(value)) {
16704 5 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16705 5 : if (unicode == NULL) {
16706 0 : PyErr_NoMemory();
16707 0 : return -1;
16708 : }
16709 5 : test_str = PyBytes_AS_STRING(unicode);
16710 0 : } else if (PyBytes_Check(value)) {
16711 0 : test_str = PyBytes_AS_STRING(value);
16712 : } else {
16713 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16714 0 : return -1;
16715 : }
16716 5 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16717 5 : if (unicode != NULL) {
16718 5 : Py_DECREF(unicode);
16719 : }
16720 5 : if (talloc_str == NULL) {
16721 0 : PyErr_NoMemory();
16722 0 : return -1;
16723 : }
16724 5 : object->object_dn = talloc_str;
16725 : }
16726 : }
16727 5 : return 0;
16728 : }
16729 :
16730 7 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_count(PyObject *obj, void *closure)
16731 : {
16732 7 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
16733 : PyObject *py_count;
16734 7 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
16735 7 : return py_count;
16736 : }
16737 :
16738 12 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_count(PyObject *py_obj, PyObject *value, void *closure)
16739 : {
16740 12 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
16741 12 : if (value == NULL) {
16742 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
16743 0 : return -1;
16744 : }
16745 : {
16746 12 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
16747 12 : if (PyLong_Check(value)) {
16748 : unsigned long long test_var;
16749 12 : test_var = PyLong_AsUnsignedLongLong(value);
16750 12 : if (PyErr_Occurred() != NULL) {
16751 0 : return -1;
16752 : }
16753 12 : if (test_var > uint_max) {
16754 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16755 : PyLong_Type.tp_name, uint_max, test_var);
16756 0 : return -1;
16757 : }
16758 12 : object->count = test_var;
16759 : } else {
16760 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16761 : PyLong_Type.tp_name);
16762 0 : return -1;
16763 : }
16764 : }
16765 12 : return 0;
16766 : }
16767 :
16768 0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_get_spn_names(PyObject *obj, void *closure)
16769 : {
16770 0 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(obj);
16771 : PyObject *py_spn_names;
16772 0 : if (object->spn_names == NULL) {
16773 0 : Py_RETURN_NONE;
16774 : }
16775 0 : if (object->spn_names == NULL) {
16776 0 : py_spn_names = Py_None;
16777 0 : Py_INCREF(py_spn_names);
16778 : } else {
16779 0 : py_spn_names = PyList_New(object->count);
16780 0 : if (py_spn_names == NULL) {
16781 0 : return NULL;
16782 : }
16783 : {
16784 : int spn_names_cntr_1;
16785 0 : for (spn_names_cntr_1 = 0; spn_names_cntr_1 < (object->count); spn_names_cntr_1++) {
16786 : PyObject *py_spn_names_1;
16787 0 : py_spn_names_1 = pytalloc_reference_ex(&drsuapi_DsNameString_Type, object->spn_names, &object->spn_names[spn_names_cntr_1]);
16788 0 : PyList_SetItem(py_spn_names, spn_names_cntr_1, py_spn_names_1);
16789 : }
16790 : }
16791 : }
16792 0 : return py_spn_names;
16793 : }
16794 :
16795 2 : static int py_drsuapi_DsWriteAccountSpnRequest1_set_spn_names(PyObject *py_obj, PyObject *value, void *closure)
16796 : {
16797 2 : struct drsuapi_DsWriteAccountSpnRequest1 *object = (struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(py_obj);
16798 2 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->spn_names));
16799 2 : if (value == NULL) {
16800 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->spn_names");
16801 0 : return -1;
16802 : }
16803 2 : if (value == Py_None) {
16804 0 : object->spn_names = NULL;
16805 : } else {
16806 2 : object->spn_names = NULL;
16807 2 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
16808 : {
16809 : int spn_names_cntr_1;
16810 2 : object->spn_names = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->spn_names, PyList_GET_SIZE(value));
16811 2 : if (!object->spn_names) { return -1;; }
16812 2 : talloc_set_name_const(object->spn_names, "ARRAY: object->spn_names");
16813 10 : for (spn_names_cntr_1 = 0; spn_names_cntr_1 < PyList_GET_SIZE(value); spn_names_cntr_1++) {
16814 8 : if (PyList_GET_ITEM(value, spn_names_cntr_1) == NULL) {
16815 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->spn_names[spn_names_cntr_1]");
16816 0 : return -1;
16817 : }
16818 8 : PY_CHECK_TYPE(&drsuapi_DsNameString_Type, PyList_GET_ITEM(value, spn_names_cntr_1), return -1;);
16819 8 : if (talloc_reference(object->spn_names, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, spn_names_cntr_1))) == NULL) {
16820 0 : PyErr_NoMemory();
16821 0 : return -1;
16822 : }
16823 8 : object->spn_names[spn_names_cntr_1] = *(struct drsuapi_DsNameString *)pytalloc_get_ptr(PyList_GET_ITEM(value, spn_names_cntr_1));
16824 : }
16825 : }
16826 : }
16827 2 : return 0;
16828 : }
16829 :
16830 : static PyGetSetDef py_drsuapi_DsWriteAccountSpnRequest1_getsetters[] = {
16831 : {
16832 : .name = discard_const_p(char, "operation"),
16833 : .get = py_drsuapi_DsWriteAccountSpnRequest1_get_operation,
16834 : .set = py_drsuapi_DsWriteAccountSpnRequest1_set_operation,
16835 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsSpnOperation")
16836 : },
16837 : {
16838 : .name = discard_const_p(char, "unknown1"),
16839 : .get = py_drsuapi_DsWriteAccountSpnRequest1_get_unknown1,
16840 : .set = py_drsuapi_DsWriteAccountSpnRequest1_set_unknown1,
16841 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16842 : },
16843 : {
16844 : .name = discard_const_p(char, "object_dn"),
16845 : .get = py_drsuapi_DsWriteAccountSpnRequest1_get_object_dn,
16846 : .set = py_drsuapi_DsWriteAccountSpnRequest1_set_object_dn,
16847 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
16848 : },
16849 : {
16850 : .name = discard_const_p(char, "count"),
16851 : .get = py_drsuapi_DsWriteAccountSpnRequest1_get_count,
16852 : .set = py_drsuapi_DsWriteAccountSpnRequest1_set_count,
16853 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16854 : },
16855 : {
16856 : .name = discard_const_p(char, "spn_names"),
16857 : .get = py_drsuapi_DsWriteAccountSpnRequest1_get_spn_names,
16858 : .set = py_drsuapi_DsWriteAccountSpnRequest1_set_spn_names,
16859 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameString")
16860 : },
16861 : { .name = NULL }
16862 : };
16863 :
16864 5 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16865 : {
16866 5 : return pytalloc_new(struct drsuapi_DsWriteAccountSpnRequest1, type);
16867 : }
16868 :
16869 :
16870 : static PyTypeObject drsuapi_DsWriteAccountSpnRequest1_Type = {
16871 : PyVarObject_HEAD_INIT(NULL, 0)
16872 : .tp_name = "drsuapi.DsWriteAccountSpnRequest1",
16873 : .tp_getset = py_drsuapi_DsWriteAccountSpnRequest1_getsetters,
16874 : .tp_methods = NULL,
16875 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
16876 : .tp_new = py_drsuapi_DsWriteAccountSpnRequest1_new,
16877 : };
16878 :
16879 0 : static PyObject *py_import_drsuapi_DsWriteAccountSpnRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsWriteAccountSpnRequest *in)
16880 : {
16881 : PyObject *ret;
16882 :
16883 0 : switch (level) {
16884 0 : case 1:
16885 0 : ret = pytalloc_reference_ex(&drsuapi_DsWriteAccountSpnRequest1_Type, mem_ctx, &in->req1);
16886 0 : return ret;
16887 :
16888 : }
16889 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
16890 0 : return NULL;
16891 : }
16892 :
16893 2 : static union drsuapi_DsWriteAccountSpnRequest *py_export_drsuapi_DsWriteAccountSpnRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
16894 : {
16895 2 : union drsuapi_DsWriteAccountSpnRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnRequest);
16896 2 : switch (level) {
16897 2 : case 1:
16898 2 : if (in == NULL) {
16899 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
16900 0 : talloc_free(ret); return NULL;
16901 : }
16902 2 : PY_CHECK_TYPE(&drsuapi_DsWriteAccountSpnRequest1_Type, in, talloc_free(ret); return NULL;);
16903 2 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
16904 0 : PyErr_NoMemory();
16905 0 : talloc_free(ret); return NULL;
16906 : }
16907 2 : ret->req1 = *(struct drsuapi_DsWriteAccountSpnRequest1 *)pytalloc_get_ptr(in);
16908 2 : break;
16909 :
16910 0 : default:
16911 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
16912 0 : talloc_free(ret);
16913 0 : ret = NULL;
16914 : }
16915 :
16916 2 : return ret;
16917 : }
16918 :
16919 0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16920 : {
16921 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
16922 0 : PyObject *mem_ctx_obj = NULL;
16923 0 : TALLOC_CTX *mem_ctx = NULL;
16924 0 : int level = 0;
16925 0 : PyObject *in_obj = NULL;
16926 0 : union drsuapi_DsWriteAccountSpnRequest *in = NULL;
16927 :
16928 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
16929 : discard_const_p(char *, kwnames),
16930 : &mem_ctx_obj,
16931 : &level,
16932 : &in_obj)) {
16933 0 : return NULL;
16934 : }
16935 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
16936 0 : if (mem_ctx == NULL) {
16937 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
16938 0 : return NULL;
16939 : }
16940 0 : in = (union drsuapi_DsWriteAccountSpnRequest *)pytalloc_get_ptr(in_obj);
16941 0 : if (in == NULL) {
16942 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsWriteAccountSpnRequest!");
16943 0 : return NULL;
16944 : }
16945 :
16946 0 : return py_import_drsuapi_DsWriteAccountSpnRequest(mem_ctx, level, in);
16947 : }
16948 :
16949 2 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16950 : {
16951 2 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
16952 2 : PyObject *mem_ctx_obj = NULL;
16953 2 : TALLOC_CTX *mem_ctx = NULL;
16954 2 : int level = 0;
16955 2 : PyObject *in = NULL;
16956 2 : union drsuapi_DsWriteAccountSpnRequest *out = NULL;
16957 :
16958 2 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
16959 : discard_const_p(char *, kwnames),
16960 : &mem_ctx_obj,
16961 : &level,
16962 : &in)) {
16963 0 : return NULL;
16964 : }
16965 2 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
16966 2 : if (mem_ctx == NULL) {
16967 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
16968 0 : return NULL;
16969 : }
16970 :
16971 2 : out = py_export_drsuapi_DsWriteAccountSpnRequest(mem_ctx, level, in);
16972 2 : if (out == NULL) {
16973 0 : return NULL;
16974 : }
16975 :
16976 2 : return pytalloc_GenericObject_reference(out);
16977 : }
16978 :
16979 : static PyMethodDef py_drsuapi_DsWriteAccountSpnRequest_methods[] = {
16980 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpnRequest_import),
16981 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
16982 : "T.__import__(mem_ctx, level, in) => ret." },
16983 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpnRequest_export),
16984 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
16985 : "T.__export__(mem_ctx, level, in) => ret." },
16986 : { NULL, NULL, 0, NULL }
16987 : };
16988 :
16989 0 : static PyObject *py_drsuapi_DsWriteAccountSpnRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
16990 : {
16991 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
16992 0 : return NULL;
16993 : }
16994 :
16995 :
16996 : static PyTypeObject drsuapi_DsWriteAccountSpnRequest_Type = {
16997 : PyVarObject_HEAD_INIT(NULL, 0)
16998 : .tp_name = "drsuapi.DsWriteAccountSpnRequest",
16999 : .tp_getset = NULL,
17000 : .tp_methods = py_drsuapi_DsWriteAccountSpnRequest_methods,
17001 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17002 : .tp_new = py_drsuapi_DsWriteAccountSpnRequest_new,
17003 : };
17004 :
17005 :
17006 1 : static PyObject *py_drsuapi_DsWriteAccountSpnResult1_get_status(PyObject *obj, void *closure)
17007 : {
17008 1 : struct drsuapi_DsWriteAccountSpnResult1 *object = (struct drsuapi_DsWriteAccountSpnResult1 *)pytalloc_get_ptr(obj);
17009 : PyObject *py_status;
17010 1 : py_status = PyErr_FromWERROR(object->status);
17011 1 : return py_status;
17012 : }
17013 :
17014 0 : static int py_drsuapi_DsWriteAccountSpnResult1_set_status(PyObject *py_obj, PyObject *value, void *closure)
17015 : {
17016 0 : struct drsuapi_DsWriteAccountSpnResult1 *object = (struct drsuapi_DsWriteAccountSpnResult1 *)pytalloc_get_ptr(py_obj);
17017 0 : if (value == NULL) {
17018 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
17019 0 : return -1;
17020 : }
17021 0 : object->status = W_ERROR(PyLong_AsLong(value));
17022 0 : return 0;
17023 : }
17024 :
17025 : static PyGetSetDef py_drsuapi_DsWriteAccountSpnResult1_getsetters[] = {
17026 : {
17027 : .name = discard_const_p(char, "status"),
17028 : .get = py_drsuapi_DsWriteAccountSpnResult1_get_status,
17029 : .set = py_drsuapi_DsWriteAccountSpnResult1_set_status,
17030 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
17031 : },
17032 : { .name = NULL }
17033 : };
17034 :
17035 0 : static PyObject *py_drsuapi_DsWriteAccountSpnResult1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17036 : {
17037 0 : return pytalloc_new(struct drsuapi_DsWriteAccountSpnResult1, type);
17038 : }
17039 :
17040 :
17041 : static PyTypeObject drsuapi_DsWriteAccountSpnResult1_Type = {
17042 : PyVarObject_HEAD_INIT(NULL, 0)
17043 : .tp_name = "drsuapi.DsWriteAccountSpnResult1",
17044 : .tp_getset = py_drsuapi_DsWriteAccountSpnResult1_getsetters,
17045 : .tp_methods = NULL,
17046 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17047 : .tp_new = py_drsuapi_DsWriteAccountSpnResult1_new,
17048 : };
17049 :
17050 2 : static PyObject *py_import_drsuapi_DsWriteAccountSpnResult(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsWriteAccountSpnResult *in)
17051 : {
17052 : PyObject *ret;
17053 :
17054 2 : switch (level) {
17055 2 : case 1:
17056 2 : ret = pytalloc_reference_ex(&drsuapi_DsWriteAccountSpnResult1_Type, mem_ctx, &in->res1);
17057 2 : return ret;
17058 :
17059 : }
17060 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
17061 0 : return NULL;
17062 : }
17063 :
17064 0 : static union drsuapi_DsWriteAccountSpnResult *py_export_drsuapi_DsWriteAccountSpnResult(TALLOC_CTX *mem_ctx, int level, PyObject *in)
17065 : {
17066 0 : union drsuapi_DsWriteAccountSpnResult *ret = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnResult);
17067 0 : switch (level) {
17068 0 : case 1:
17069 0 : if (in == NULL) {
17070 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->res1");
17071 0 : talloc_free(ret); return NULL;
17072 : }
17073 0 : PY_CHECK_TYPE(&drsuapi_DsWriteAccountSpnResult1_Type, in, talloc_free(ret); return NULL;);
17074 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
17075 0 : PyErr_NoMemory();
17076 0 : talloc_free(ret); return NULL;
17077 : }
17078 0 : ret->res1 = *(struct drsuapi_DsWriteAccountSpnResult1 *)pytalloc_get_ptr(in);
17079 0 : break;
17080 :
17081 0 : default:
17082 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
17083 0 : talloc_free(ret);
17084 0 : ret = NULL;
17085 : }
17086 :
17087 0 : return ret;
17088 : }
17089 :
17090 2 : static PyObject *py_drsuapi_DsWriteAccountSpnResult_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17091 : {
17092 2 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
17093 2 : PyObject *mem_ctx_obj = NULL;
17094 2 : TALLOC_CTX *mem_ctx = NULL;
17095 2 : int level = 0;
17096 2 : PyObject *in_obj = NULL;
17097 2 : union drsuapi_DsWriteAccountSpnResult *in = NULL;
17098 :
17099 2 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
17100 : discard_const_p(char *, kwnames),
17101 : &mem_ctx_obj,
17102 : &level,
17103 : &in_obj)) {
17104 0 : return NULL;
17105 : }
17106 2 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
17107 2 : if (mem_ctx == NULL) {
17108 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
17109 0 : return NULL;
17110 : }
17111 2 : in = (union drsuapi_DsWriteAccountSpnResult *)pytalloc_get_ptr(in_obj);
17112 2 : if (in == NULL) {
17113 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsWriteAccountSpnResult!");
17114 0 : return NULL;
17115 : }
17116 :
17117 2 : return py_import_drsuapi_DsWriteAccountSpnResult(mem_ctx, level, in);
17118 : }
17119 :
17120 0 : static PyObject *py_drsuapi_DsWriteAccountSpnResult_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17121 : {
17122 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
17123 0 : PyObject *mem_ctx_obj = NULL;
17124 0 : TALLOC_CTX *mem_ctx = NULL;
17125 0 : int level = 0;
17126 0 : PyObject *in = NULL;
17127 0 : union drsuapi_DsWriteAccountSpnResult *out = NULL;
17128 :
17129 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
17130 : discard_const_p(char *, kwnames),
17131 : &mem_ctx_obj,
17132 : &level,
17133 : &in)) {
17134 0 : return NULL;
17135 : }
17136 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
17137 0 : if (mem_ctx == NULL) {
17138 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
17139 0 : return NULL;
17140 : }
17141 :
17142 0 : out = py_export_drsuapi_DsWriteAccountSpnResult(mem_ctx, level, in);
17143 0 : if (out == NULL) {
17144 0 : return NULL;
17145 : }
17146 :
17147 0 : return pytalloc_GenericObject_reference(out);
17148 : }
17149 :
17150 : static PyMethodDef py_drsuapi_DsWriteAccountSpnResult_methods[] = {
17151 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpnResult_import),
17152 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
17153 : "T.__import__(mem_ctx, level, in) => ret." },
17154 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpnResult_export),
17155 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
17156 : "T.__export__(mem_ctx, level, in) => ret." },
17157 : { NULL, NULL, 0, NULL }
17158 : };
17159 :
17160 0 : static PyObject *py_drsuapi_DsWriteAccountSpnResult_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17161 : {
17162 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
17163 0 : return NULL;
17164 : }
17165 :
17166 :
17167 : static PyTypeObject drsuapi_DsWriteAccountSpnResult_Type = {
17168 : PyVarObject_HEAD_INIT(NULL, 0)
17169 : .tp_name = "drsuapi.DsWriteAccountSpnResult",
17170 : .tp_getset = NULL,
17171 : .tp_methods = py_drsuapi_DsWriteAccountSpnResult_methods,
17172 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17173 : .tp_new = py_drsuapi_DsWriteAccountSpnResult_new,
17174 : };
17175 :
17176 :
17177 0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_server_dn(PyObject *obj, void *closure)
17178 : {
17179 0 : struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(obj);
17180 : PyObject *py_server_dn;
17181 0 : if (object->server_dn == NULL) {
17182 0 : Py_RETURN_NONE;
17183 : }
17184 0 : if (object->server_dn == NULL) {
17185 0 : py_server_dn = Py_None;
17186 0 : Py_INCREF(py_server_dn);
17187 : } else {
17188 0 : if (object->server_dn == NULL) {
17189 0 : py_server_dn = Py_None;
17190 0 : Py_INCREF(py_server_dn);
17191 : } else {
17192 0 : py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
17193 : }
17194 : }
17195 0 : return py_server_dn;
17196 : }
17197 :
17198 3 : static int py_drsuapi_DsRemoveDSServerRequest1_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
17199 : {
17200 3 : struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(py_obj);
17201 3 : if (value == NULL) {
17202 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_dn");
17203 0 : return -1;
17204 : }
17205 3 : if (value == Py_None) {
17206 0 : object->server_dn = NULL;
17207 : } else {
17208 3 : object->server_dn = NULL;
17209 : {
17210 : const char *test_str;
17211 : const char *talloc_str;
17212 3 : PyObject *unicode = NULL;
17213 3 : if (PyUnicode_Check(value)) {
17214 3 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17215 3 : if (unicode == NULL) {
17216 0 : PyErr_NoMemory();
17217 0 : return -1;
17218 : }
17219 3 : test_str = PyBytes_AS_STRING(unicode);
17220 0 : } else if (PyBytes_Check(value)) {
17221 0 : test_str = PyBytes_AS_STRING(value);
17222 : } else {
17223 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
17224 0 : return -1;
17225 : }
17226 3 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
17227 3 : if (unicode != NULL) {
17228 3 : Py_DECREF(unicode);
17229 : }
17230 3 : if (talloc_str == NULL) {
17231 0 : PyErr_NoMemory();
17232 0 : return -1;
17233 : }
17234 3 : object->server_dn = talloc_str;
17235 : }
17236 : }
17237 3 : return 0;
17238 : }
17239 :
17240 0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_domain_dn(PyObject *obj, void *closure)
17241 : {
17242 0 : struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(obj);
17243 : PyObject *py_domain_dn;
17244 0 : if (object->domain_dn == NULL) {
17245 0 : Py_RETURN_NONE;
17246 : }
17247 0 : if (object->domain_dn == NULL) {
17248 0 : py_domain_dn = Py_None;
17249 0 : Py_INCREF(py_domain_dn);
17250 : } else {
17251 0 : if (object->domain_dn == NULL) {
17252 0 : py_domain_dn = Py_None;
17253 0 : Py_INCREF(py_domain_dn);
17254 : } else {
17255 0 : py_domain_dn = PyUnicode_Decode(object->domain_dn, strlen(object->domain_dn), "utf-8", "ignore");
17256 : }
17257 : }
17258 0 : return py_domain_dn;
17259 : }
17260 :
17261 3 : static int py_drsuapi_DsRemoveDSServerRequest1_set_domain_dn(PyObject *py_obj, PyObject *value, void *closure)
17262 : {
17263 3 : struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(py_obj);
17264 3 : if (value == NULL) {
17265 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_dn");
17266 0 : return -1;
17267 : }
17268 3 : if (value == Py_None) {
17269 0 : object->domain_dn = NULL;
17270 : } else {
17271 3 : object->domain_dn = NULL;
17272 : {
17273 : const char *test_str;
17274 : const char *talloc_str;
17275 3 : PyObject *unicode = NULL;
17276 3 : if (PyUnicode_Check(value)) {
17277 3 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17278 3 : if (unicode == NULL) {
17279 0 : PyErr_NoMemory();
17280 0 : return -1;
17281 : }
17282 3 : test_str = PyBytes_AS_STRING(unicode);
17283 0 : } else if (PyBytes_Check(value)) {
17284 0 : test_str = PyBytes_AS_STRING(value);
17285 : } else {
17286 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
17287 0 : return -1;
17288 : }
17289 3 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
17290 3 : if (unicode != NULL) {
17291 3 : Py_DECREF(unicode);
17292 : }
17293 3 : if (talloc_str == NULL) {
17294 0 : PyErr_NoMemory();
17295 0 : return -1;
17296 : }
17297 3 : object->domain_dn = talloc_str;
17298 : }
17299 : }
17300 3 : return 0;
17301 : }
17302 :
17303 0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest1_get_commit(PyObject *obj, void *closure)
17304 : {
17305 0 : struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(obj);
17306 : PyObject *py_commit;
17307 0 : py_commit = PyLong_FromUnsignedLongLong((uint32_t)object->commit);
17308 0 : return py_commit;
17309 : }
17310 :
17311 3 : static int py_drsuapi_DsRemoveDSServerRequest1_set_commit(PyObject *py_obj, PyObject *value, void *closure)
17312 : {
17313 3 : struct drsuapi_DsRemoveDSServerRequest1 *object = (struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(py_obj);
17314 3 : if (value == NULL) {
17315 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->commit");
17316 0 : return -1;
17317 : }
17318 : {
17319 3 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->commit));
17320 3 : if (PyLong_Check(value)) {
17321 : unsigned long long test_var;
17322 3 : test_var = PyLong_AsUnsignedLongLong(value);
17323 3 : if (PyErr_Occurred() != NULL) {
17324 0 : return -1;
17325 : }
17326 3 : if (test_var > uint_max) {
17327 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17328 : PyLong_Type.tp_name, uint_max, test_var);
17329 0 : return -1;
17330 : }
17331 3 : object->commit = test_var;
17332 : } else {
17333 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17334 : PyLong_Type.tp_name);
17335 0 : return -1;
17336 : }
17337 : }
17338 3 : return 0;
17339 : }
17340 :
17341 : static PyGetSetDef py_drsuapi_DsRemoveDSServerRequest1_getsetters[] = {
17342 : {
17343 : .name = discard_const_p(char, "server_dn"),
17344 : .get = py_drsuapi_DsRemoveDSServerRequest1_get_server_dn,
17345 : .set = py_drsuapi_DsRemoveDSServerRequest1_set_server_dn,
17346 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
17347 : },
17348 : {
17349 : .name = discard_const_p(char, "domain_dn"),
17350 : .get = py_drsuapi_DsRemoveDSServerRequest1_get_domain_dn,
17351 : .set = py_drsuapi_DsRemoveDSServerRequest1_set_domain_dn,
17352 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
17353 : },
17354 : {
17355 : .name = discard_const_p(char, "commit"),
17356 : .get = py_drsuapi_DsRemoveDSServerRequest1_get_commit,
17357 : .set = py_drsuapi_DsRemoveDSServerRequest1_set_commit,
17358 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17359 : },
17360 : { .name = NULL }
17361 : };
17362 :
17363 3 : static PyObject *py_drsuapi_DsRemoveDSServerRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17364 : {
17365 3 : return pytalloc_new(struct drsuapi_DsRemoveDSServerRequest1, type);
17366 : }
17367 :
17368 :
17369 : static PyTypeObject drsuapi_DsRemoveDSServerRequest1_Type = {
17370 : PyVarObject_HEAD_INIT(NULL, 0)
17371 : .tp_name = "drsuapi.DsRemoveDSServerRequest1",
17372 : .tp_getset = py_drsuapi_DsRemoveDSServerRequest1_getsetters,
17373 : .tp_methods = NULL,
17374 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17375 : .tp_new = py_drsuapi_DsRemoveDSServerRequest1_new,
17376 : };
17377 :
17378 0 : static PyObject *py_import_drsuapi_DsRemoveDSServerRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsRemoveDSServerRequest *in)
17379 : {
17380 : PyObject *ret;
17381 :
17382 0 : switch (level) {
17383 0 : case 1:
17384 0 : ret = pytalloc_reference_ex(&drsuapi_DsRemoveDSServerRequest1_Type, mem_ctx, &in->req1);
17385 0 : return ret;
17386 :
17387 : }
17388 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
17389 0 : return NULL;
17390 : }
17391 :
17392 3 : static union drsuapi_DsRemoveDSServerRequest *py_export_drsuapi_DsRemoveDSServerRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
17393 : {
17394 3 : union drsuapi_DsRemoveDSServerRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerRequest);
17395 3 : switch (level) {
17396 3 : case 1:
17397 3 : if (in == NULL) {
17398 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
17399 0 : talloc_free(ret); return NULL;
17400 : }
17401 3 : PY_CHECK_TYPE(&drsuapi_DsRemoveDSServerRequest1_Type, in, talloc_free(ret); return NULL;);
17402 3 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
17403 0 : PyErr_NoMemory();
17404 0 : talloc_free(ret); return NULL;
17405 : }
17406 3 : ret->req1 = *(struct drsuapi_DsRemoveDSServerRequest1 *)pytalloc_get_ptr(in);
17407 3 : break;
17408 :
17409 0 : default:
17410 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
17411 0 : talloc_free(ret);
17412 0 : ret = NULL;
17413 : }
17414 :
17415 3 : return ret;
17416 : }
17417 :
17418 0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17419 : {
17420 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
17421 0 : PyObject *mem_ctx_obj = NULL;
17422 0 : TALLOC_CTX *mem_ctx = NULL;
17423 0 : int level = 0;
17424 0 : PyObject *in_obj = NULL;
17425 0 : union drsuapi_DsRemoveDSServerRequest *in = NULL;
17426 :
17427 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
17428 : discard_const_p(char *, kwnames),
17429 : &mem_ctx_obj,
17430 : &level,
17431 : &in_obj)) {
17432 0 : return NULL;
17433 : }
17434 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
17435 0 : if (mem_ctx == NULL) {
17436 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
17437 0 : return NULL;
17438 : }
17439 0 : in = (union drsuapi_DsRemoveDSServerRequest *)pytalloc_get_ptr(in_obj);
17440 0 : if (in == NULL) {
17441 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsRemoveDSServerRequest!");
17442 0 : return NULL;
17443 : }
17444 :
17445 0 : return py_import_drsuapi_DsRemoveDSServerRequest(mem_ctx, level, in);
17446 : }
17447 :
17448 3 : static PyObject *py_drsuapi_DsRemoveDSServerRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17449 : {
17450 3 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
17451 3 : PyObject *mem_ctx_obj = NULL;
17452 3 : TALLOC_CTX *mem_ctx = NULL;
17453 3 : int level = 0;
17454 3 : PyObject *in = NULL;
17455 3 : union drsuapi_DsRemoveDSServerRequest *out = NULL;
17456 :
17457 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
17458 : discard_const_p(char *, kwnames),
17459 : &mem_ctx_obj,
17460 : &level,
17461 : &in)) {
17462 0 : return NULL;
17463 : }
17464 3 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
17465 3 : if (mem_ctx == NULL) {
17466 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
17467 0 : return NULL;
17468 : }
17469 :
17470 3 : out = py_export_drsuapi_DsRemoveDSServerRequest(mem_ctx, level, in);
17471 3 : if (out == NULL) {
17472 0 : return NULL;
17473 : }
17474 :
17475 3 : return pytalloc_GenericObject_reference(out);
17476 : }
17477 :
17478 : static PyMethodDef py_drsuapi_DsRemoveDSServerRequest_methods[] = {
17479 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServerRequest_import),
17480 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
17481 : "T.__import__(mem_ctx, level, in) => ret." },
17482 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServerRequest_export),
17483 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
17484 : "T.__export__(mem_ctx, level, in) => ret." },
17485 : { NULL, NULL, 0, NULL }
17486 : };
17487 :
17488 0 : static PyObject *py_drsuapi_DsRemoveDSServerRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17489 : {
17490 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
17491 0 : return NULL;
17492 : }
17493 :
17494 :
17495 : static PyTypeObject drsuapi_DsRemoveDSServerRequest_Type = {
17496 : PyVarObject_HEAD_INIT(NULL, 0)
17497 : .tp_name = "drsuapi.DsRemoveDSServerRequest",
17498 : .tp_getset = NULL,
17499 : .tp_methods = py_drsuapi_DsRemoveDSServerRequest_methods,
17500 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17501 : .tp_new = py_drsuapi_DsRemoveDSServerRequest_new,
17502 : };
17503 :
17504 :
17505 0 : static PyObject *py_drsuapi_DsRemoveDSServerResult1_get_last_dc_in_domain(PyObject *obj, void *closure)
17506 : {
17507 0 : struct drsuapi_DsRemoveDSServerResult1 *object = (struct drsuapi_DsRemoveDSServerResult1 *)pytalloc_get_ptr(obj);
17508 : PyObject *py_last_dc_in_domain;
17509 0 : py_last_dc_in_domain = PyLong_FromUnsignedLongLong((uint32_t)object->last_dc_in_domain);
17510 0 : return py_last_dc_in_domain;
17511 : }
17512 :
17513 0 : static int py_drsuapi_DsRemoveDSServerResult1_set_last_dc_in_domain(PyObject *py_obj, PyObject *value, void *closure)
17514 : {
17515 0 : struct drsuapi_DsRemoveDSServerResult1 *object = (struct drsuapi_DsRemoveDSServerResult1 *)pytalloc_get_ptr(py_obj);
17516 0 : if (value == NULL) {
17517 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_dc_in_domain");
17518 0 : return -1;
17519 : }
17520 : {
17521 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_dc_in_domain));
17522 0 : if (PyLong_Check(value)) {
17523 : unsigned long long test_var;
17524 0 : test_var = PyLong_AsUnsignedLongLong(value);
17525 0 : if (PyErr_Occurred() != NULL) {
17526 0 : return -1;
17527 : }
17528 0 : if (test_var > uint_max) {
17529 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17530 : PyLong_Type.tp_name, uint_max, test_var);
17531 0 : return -1;
17532 : }
17533 0 : object->last_dc_in_domain = test_var;
17534 : } else {
17535 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17536 : PyLong_Type.tp_name);
17537 0 : return -1;
17538 : }
17539 : }
17540 0 : return 0;
17541 : }
17542 :
17543 : static PyGetSetDef py_drsuapi_DsRemoveDSServerResult1_getsetters[] = {
17544 : {
17545 : .name = discard_const_p(char, "last_dc_in_domain"),
17546 : .get = py_drsuapi_DsRemoveDSServerResult1_get_last_dc_in_domain,
17547 : .set = py_drsuapi_DsRemoveDSServerResult1_set_last_dc_in_domain,
17548 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17549 : },
17550 : { .name = NULL }
17551 : };
17552 :
17553 0 : static PyObject *py_drsuapi_DsRemoveDSServerResult1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17554 : {
17555 0 : return pytalloc_new(struct drsuapi_DsRemoveDSServerResult1, type);
17556 : }
17557 :
17558 :
17559 : static PyTypeObject drsuapi_DsRemoveDSServerResult1_Type = {
17560 : PyVarObject_HEAD_INIT(NULL, 0)
17561 : .tp_name = "drsuapi.DsRemoveDSServerResult1",
17562 : .tp_getset = py_drsuapi_DsRemoveDSServerResult1_getsetters,
17563 : .tp_methods = NULL,
17564 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17565 : .tp_new = py_drsuapi_DsRemoveDSServerResult1_new,
17566 : };
17567 :
17568 3 : static PyObject *py_import_drsuapi_DsRemoveDSServerResult(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsRemoveDSServerResult *in)
17569 : {
17570 : PyObject *ret;
17571 :
17572 3 : switch (level) {
17573 3 : case 1:
17574 3 : ret = pytalloc_reference_ex(&drsuapi_DsRemoveDSServerResult1_Type, mem_ctx, &in->res1);
17575 3 : return ret;
17576 :
17577 : }
17578 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
17579 0 : return NULL;
17580 : }
17581 :
17582 0 : static union drsuapi_DsRemoveDSServerResult *py_export_drsuapi_DsRemoveDSServerResult(TALLOC_CTX *mem_ctx, int level, PyObject *in)
17583 : {
17584 0 : union drsuapi_DsRemoveDSServerResult *ret = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerResult);
17585 0 : switch (level) {
17586 0 : case 1:
17587 0 : if (in == NULL) {
17588 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->res1");
17589 0 : talloc_free(ret); return NULL;
17590 : }
17591 0 : PY_CHECK_TYPE(&drsuapi_DsRemoveDSServerResult1_Type, in, talloc_free(ret); return NULL;);
17592 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
17593 0 : PyErr_NoMemory();
17594 0 : talloc_free(ret); return NULL;
17595 : }
17596 0 : ret->res1 = *(struct drsuapi_DsRemoveDSServerResult1 *)pytalloc_get_ptr(in);
17597 0 : break;
17598 :
17599 0 : default:
17600 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
17601 0 : talloc_free(ret);
17602 0 : ret = NULL;
17603 : }
17604 :
17605 0 : return ret;
17606 : }
17607 :
17608 3 : static PyObject *py_drsuapi_DsRemoveDSServerResult_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17609 : {
17610 3 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
17611 3 : PyObject *mem_ctx_obj = NULL;
17612 3 : TALLOC_CTX *mem_ctx = NULL;
17613 3 : int level = 0;
17614 3 : PyObject *in_obj = NULL;
17615 3 : union drsuapi_DsRemoveDSServerResult *in = NULL;
17616 :
17617 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
17618 : discard_const_p(char *, kwnames),
17619 : &mem_ctx_obj,
17620 : &level,
17621 : &in_obj)) {
17622 0 : return NULL;
17623 : }
17624 3 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
17625 3 : if (mem_ctx == NULL) {
17626 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
17627 0 : return NULL;
17628 : }
17629 3 : in = (union drsuapi_DsRemoveDSServerResult *)pytalloc_get_ptr(in_obj);
17630 3 : if (in == NULL) {
17631 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsRemoveDSServerResult!");
17632 0 : return NULL;
17633 : }
17634 :
17635 3 : return py_import_drsuapi_DsRemoveDSServerResult(mem_ctx, level, in);
17636 : }
17637 :
17638 0 : static PyObject *py_drsuapi_DsRemoveDSServerResult_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17639 : {
17640 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
17641 0 : PyObject *mem_ctx_obj = NULL;
17642 0 : TALLOC_CTX *mem_ctx = NULL;
17643 0 : int level = 0;
17644 0 : PyObject *in = NULL;
17645 0 : union drsuapi_DsRemoveDSServerResult *out = NULL;
17646 :
17647 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
17648 : discard_const_p(char *, kwnames),
17649 : &mem_ctx_obj,
17650 : &level,
17651 : &in)) {
17652 0 : return NULL;
17653 : }
17654 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
17655 0 : if (mem_ctx == NULL) {
17656 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
17657 0 : return NULL;
17658 : }
17659 :
17660 0 : out = py_export_drsuapi_DsRemoveDSServerResult(mem_ctx, level, in);
17661 0 : if (out == NULL) {
17662 0 : return NULL;
17663 : }
17664 :
17665 0 : return pytalloc_GenericObject_reference(out);
17666 : }
17667 :
17668 : static PyMethodDef py_drsuapi_DsRemoveDSServerResult_methods[] = {
17669 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServerResult_import),
17670 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
17671 : "T.__import__(mem_ctx, level, in) => ret." },
17672 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServerResult_export),
17673 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
17674 : "T.__export__(mem_ctx, level, in) => ret." },
17675 : { NULL, NULL, 0, NULL }
17676 : };
17677 :
17678 0 : static PyObject *py_drsuapi_DsRemoveDSServerResult_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17679 : {
17680 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
17681 0 : return NULL;
17682 : }
17683 :
17684 :
17685 : static PyTypeObject drsuapi_DsRemoveDSServerResult_Type = {
17686 : PyVarObject_HEAD_INIT(NULL, 0)
17687 : .tp_name = "drsuapi.DsRemoveDSServerResult",
17688 : .tp_getset = NULL,
17689 : .tp_methods = py_drsuapi_DsRemoveDSServerResult_methods,
17690 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17691 : .tp_new = py_drsuapi_DsRemoveDSServerResult_new,
17692 : };
17693 :
17694 :
17695 0 : static PyObject *py_drsuapi_DsGetDCInfoRequest1_get_domain_name(PyObject *obj, void *closure)
17696 : {
17697 0 : struct drsuapi_DsGetDCInfoRequest1 *object = (struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(obj);
17698 : PyObject *py_domain_name;
17699 0 : if (object->domain_name == NULL) {
17700 0 : Py_RETURN_NONE;
17701 : }
17702 0 : if (object->domain_name == NULL) {
17703 0 : py_domain_name = Py_None;
17704 0 : Py_INCREF(py_domain_name);
17705 : } else {
17706 0 : if (object->domain_name == NULL) {
17707 0 : py_domain_name = Py_None;
17708 0 : Py_INCREF(py_domain_name);
17709 : } else {
17710 0 : py_domain_name = PyUnicode_Decode(object->domain_name, strlen(object->domain_name), "utf-8", "ignore");
17711 : }
17712 : }
17713 0 : return py_domain_name;
17714 : }
17715 :
17716 0 : static int py_drsuapi_DsGetDCInfoRequest1_set_domain_name(PyObject *py_obj, PyObject *value, void *closure)
17717 : {
17718 0 : struct drsuapi_DsGetDCInfoRequest1 *object = (struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(py_obj);
17719 0 : if (value == NULL) {
17720 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->domain_name");
17721 0 : return -1;
17722 : }
17723 0 : if (value == Py_None) {
17724 0 : object->domain_name = NULL;
17725 : } else {
17726 0 : object->domain_name = NULL;
17727 : {
17728 : const char *test_str;
17729 : const char *talloc_str;
17730 0 : PyObject *unicode = NULL;
17731 0 : if (PyUnicode_Check(value)) {
17732 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17733 0 : if (unicode == NULL) {
17734 0 : PyErr_NoMemory();
17735 0 : return -1;
17736 : }
17737 0 : test_str = PyBytes_AS_STRING(unicode);
17738 0 : } else if (PyBytes_Check(value)) {
17739 0 : test_str = PyBytes_AS_STRING(value);
17740 : } else {
17741 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
17742 0 : return -1;
17743 : }
17744 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
17745 0 : if (unicode != NULL) {
17746 0 : Py_DECREF(unicode);
17747 : }
17748 0 : if (talloc_str == NULL) {
17749 0 : PyErr_NoMemory();
17750 0 : return -1;
17751 : }
17752 0 : object->domain_name = talloc_str;
17753 : }
17754 : }
17755 0 : return 0;
17756 : }
17757 :
17758 0 : static PyObject *py_drsuapi_DsGetDCInfoRequest1_get_level(PyObject *obj, void *closure)
17759 : {
17760 0 : struct drsuapi_DsGetDCInfoRequest1 *object = (struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(obj);
17761 : PyObject *py_level;
17762 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->level);
17763 0 : return py_level;
17764 : }
17765 :
17766 0 : static int py_drsuapi_DsGetDCInfoRequest1_set_level(PyObject *py_obj, PyObject *value, void *closure)
17767 : {
17768 0 : struct drsuapi_DsGetDCInfoRequest1 *object = (struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(py_obj);
17769 0 : if (value == NULL) {
17770 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->level");
17771 0 : return -1;
17772 : }
17773 : {
17774 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->level));
17775 0 : if (PyLong_Check(value)) {
17776 : unsigned long long test_var;
17777 0 : test_var = PyLong_AsUnsignedLongLong(value);
17778 0 : if (PyErr_Occurred() != NULL) {
17779 0 : return -1;
17780 : }
17781 0 : if (test_var > uint_max) {
17782 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17783 : PyLong_Type.tp_name, uint_max, test_var);
17784 0 : return -1;
17785 : }
17786 0 : object->level = test_var;
17787 : } else {
17788 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17789 : PyLong_Type.tp_name);
17790 0 : return -1;
17791 : }
17792 : }
17793 0 : return 0;
17794 : }
17795 :
17796 : static PyGetSetDef py_drsuapi_DsGetDCInfoRequest1_getsetters[] = {
17797 : {
17798 : .name = discard_const_p(char, "domain_name"),
17799 : .get = py_drsuapi_DsGetDCInfoRequest1_get_domain_name,
17800 : .set = py_drsuapi_DsGetDCInfoRequest1_set_domain_name,
17801 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
17802 : },
17803 : {
17804 : .name = discard_const_p(char, "level"),
17805 : .get = py_drsuapi_DsGetDCInfoRequest1_get_level,
17806 : .set = py_drsuapi_DsGetDCInfoRequest1_set_level,
17807 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfoCtrLevels")
17808 : },
17809 : { .name = NULL }
17810 : };
17811 :
17812 0 : static PyObject *py_drsuapi_DsGetDCInfoRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17813 : {
17814 0 : return pytalloc_new(struct drsuapi_DsGetDCInfoRequest1, type);
17815 : }
17816 :
17817 :
17818 : static PyTypeObject drsuapi_DsGetDCInfoRequest1_Type = {
17819 : PyVarObject_HEAD_INIT(NULL, 0)
17820 : .tp_name = "drsuapi.DsGetDCInfoRequest1",
17821 : .tp_getset = py_drsuapi_DsGetDCInfoRequest1_getsetters,
17822 : .tp_methods = NULL,
17823 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17824 : .tp_new = py_drsuapi_DsGetDCInfoRequest1_new,
17825 : };
17826 :
17827 0 : static PyObject *py_import_drsuapi_DsGetDCInfoRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetDCInfoRequest *in)
17828 : {
17829 : PyObject *ret;
17830 :
17831 0 : switch (level) {
17832 0 : case 1:
17833 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoRequest1_Type, mem_ctx, &in->req1);
17834 0 : return ret;
17835 :
17836 : }
17837 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
17838 0 : return NULL;
17839 : }
17840 :
17841 0 : static union drsuapi_DsGetDCInfoRequest *py_export_drsuapi_DsGetDCInfoRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
17842 : {
17843 0 : union drsuapi_DsGetDCInfoRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoRequest);
17844 0 : switch (level) {
17845 0 : case 1:
17846 0 : if (in == NULL) {
17847 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
17848 0 : talloc_free(ret); return NULL;
17849 : }
17850 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCInfoRequest1_Type, in, talloc_free(ret); return NULL;);
17851 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
17852 0 : PyErr_NoMemory();
17853 0 : talloc_free(ret); return NULL;
17854 : }
17855 0 : ret->req1 = *(struct drsuapi_DsGetDCInfoRequest1 *)pytalloc_get_ptr(in);
17856 0 : break;
17857 :
17858 0 : default:
17859 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
17860 0 : talloc_free(ret);
17861 0 : ret = NULL;
17862 : }
17863 :
17864 0 : return ret;
17865 : }
17866 :
17867 0 : static PyObject *py_drsuapi_DsGetDCInfoRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17868 : {
17869 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
17870 0 : PyObject *mem_ctx_obj = NULL;
17871 0 : TALLOC_CTX *mem_ctx = NULL;
17872 0 : int level = 0;
17873 0 : PyObject *in_obj = NULL;
17874 0 : union drsuapi_DsGetDCInfoRequest *in = NULL;
17875 :
17876 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
17877 : discard_const_p(char *, kwnames),
17878 : &mem_ctx_obj,
17879 : &level,
17880 : &in_obj)) {
17881 0 : return NULL;
17882 : }
17883 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
17884 0 : if (mem_ctx == NULL) {
17885 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
17886 0 : return NULL;
17887 : }
17888 0 : in = (union drsuapi_DsGetDCInfoRequest *)pytalloc_get_ptr(in_obj);
17889 0 : if (in == NULL) {
17890 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetDCInfoRequest!");
17891 0 : return NULL;
17892 : }
17893 :
17894 0 : return py_import_drsuapi_DsGetDCInfoRequest(mem_ctx, level, in);
17895 : }
17896 :
17897 0 : static PyObject *py_drsuapi_DsGetDCInfoRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17898 : {
17899 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
17900 0 : PyObject *mem_ctx_obj = NULL;
17901 0 : TALLOC_CTX *mem_ctx = NULL;
17902 0 : int level = 0;
17903 0 : PyObject *in = NULL;
17904 0 : union drsuapi_DsGetDCInfoRequest *out = NULL;
17905 :
17906 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
17907 : discard_const_p(char *, kwnames),
17908 : &mem_ctx_obj,
17909 : &level,
17910 : &in)) {
17911 0 : return NULL;
17912 : }
17913 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
17914 0 : if (mem_ctx == NULL) {
17915 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
17916 0 : return NULL;
17917 : }
17918 :
17919 0 : out = py_export_drsuapi_DsGetDCInfoRequest(mem_ctx, level, in);
17920 0 : if (out == NULL) {
17921 0 : return NULL;
17922 : }
17923 :
17924 0 : return pytalloc_GenericObject_reference(out);
17925 : }
17926 :
17927 : static PyMethodDef py_drsuapi_DsGetDCInfoRequest_methods[] = {
17928 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDCInfoRequest_import),
17929 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
17930 : "T.__import__(mem_ctx, level, in) => ret." },
17931 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDCInfoRequest_export),
17932 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
17933 : "T.__export__(mem_ctx, level, in) => ret." },
17934 : { NULL, NULL, 0, NULL }
17935 : };
17936 :
17937 0 : static PyObject *py_drsuapi_DsGetDCInfoRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17938 : {
17939 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
17940 0 : return NULL;
17941 : }
17942 :
17943 :
17944 : static PyTypeObject drsuapi_DsGetDCInfoRequest_Type = {
17945 : PyVarObject_HEAD_INIT(NULL, 0)
17946 : .tp_name = "drsuapi.DsGetDCInfoRequest",
17947 : .tp_getset = NULL,
17948 : .tp_methods = py_drsuapi_DsGetDCInfoRequest_methods,
17949 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17950 : .tp_new = py_drsuapi_DsGetDCInfoRequest_new,
17951 : };
17952 :
17953 :
17954 0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_netbios_name(PyObject *obj, void *closure)
17955 : {
17956 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
17957 : PyObject *py_netbios_name;
17958 0 : if (object->netbios_name == NULL) {
17959 0 : Py_RETURN_NONE;
17960 : }
17961 0 : if (object->netbios_name == NULL) {
17962 0 : py_netbios_name = Py_None;
17963 0 : Py_INCREF(py_netbios_name);
17964 : } else {
17965 0 : if (object->netbios_name == NULL) {
17966 0 : py_netbios_name = Py_None;
17967 0 : Py_INCREF(py_netbios_name);
17968 : } else {
17969 0 : py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
17970 : }
17971 : }
17972 0 : return py_netbios_name;
17973 : }
17974 :
17975 0 : static int py_drsuapi_DsGetDCInfo1_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
17976 : {
17977 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
17978 0 : if (value == NULL) {
17979 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
17980 0 : return -1;
17981 : }
17982 0 : if (value == Py_None) {
17983 0 : object->netbios_name = NULL;
17984 : } else {
17985 0 : object->netbios_name = NULL;
17986 : {
17987 : const char *test_str;
17988 : const char *talloc_str;
17989 0 : PyObject *unicode = NULL;
17990 0 : if (PyUnicode_Check(value)) {
17991 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17992 0 : if (unicode == NULL) {
17993 0 : PyErr_NoMemory();
17994 0 : return -1;
17995 : }
17996 0 : test_str = PyBytes_AS_STRING(unicode);
17997 0 : } else if (PyBytes_Check(value)) {
17998 0 : test_str = PyBytes_AS_STRING(value);
17999 : } else {
18000 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18001 0 : return -1;
18002 : }
18003 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18004 0 : if (unicode != NULL) {
18005 0 : Py_DECREF(unicode);
18006 : }
18007 0 : if (talloc_str == NULL) {
18008 0 : PyErr_NoMemory();
18009 0 : return -1;
18010 : }
18011 0 : object->netbios_name = talloc_str;
18012 : }
18013 : }
18014 0 : return 0;
18015 : }
18016 :
18017 0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_dns_name(PyObject *obj, void *closure)
18018 : {
18019 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
18020 : PyObject *py_dns_name;
18021 0 : if (object->dns_name == NULL) {
18022 0 : Py_RETURN_NONE;
18023 : }
18024 0 : if (object->dns_name == NULL) {
18025 0 : py_dns_name = Py_None;
18026 0 : Py_INCREF(py_dns_name);
18027 : } else {
18028 0 : if (object->dns_name == NULL) {
18029 0 : py_dns_name = Py_None;
18030 0 : Py_INCREF(py_dns_name);
18031 : } else {
18032 0 : py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
18033 : }
18034 : }
18035 0 : return py_dns_name;
18036 : }
18037 :
18038 0 : static int py_drsuapi_DsGetDCInfo1_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
18039 : {
18040 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
18041 0 : if (value == NULL) {
18042 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
18043 0 : return -1;
18044 : }
18045 0 : if (value == Py_None) {
18046 0 : object->dns_name = NULL;
18047 : } else {
18048 0 : object->dns_name = NULL;
18049 : {
18050 : const char *test_str;
18051 : const char *talloc_str;
18052 0 : PyObject *unicode = NULL;
18053 0 : if (PyUnicode_Check(value)) {
18054 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18055 0 : if (unicode == NULL) {
18056 0 : PyErr_NoMemory();
18057 0 : return -1;
18058 : }
18059 0 : test_str = PyBytes_AS_STRING(unicode);
18060 0 : } else if (PyBytes_Check(value)) {
18061 0 : test_str = PyBytes_AS_STRING(value);
18062 : } else {
18063 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18064 0 : return -1;
18065 : }
18066 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18067 0 : if (unicode != NULL) {
18068 0 : Py_DECREF(unicode);
18069 : }
18070 0 : if (talloc_str == NULL) {
18071 0 : PyErr_NoMemory();
18072 0 : return -1;
18073 : }
18074 0 : object->dns_name = talloc_str;
18075 : }
18076 : }
18077 0 : return 0;
18078 : }
18079 :
18080 0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_site_name(PyObject *obj, void *closure)
18081 : {
18082 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
18083 : PyObject *py_site_name;
18084 0 : if (object->site_name == NULL) {
18085 0 : Py_RETURN_NONE;
18086 : }
18087 0 : if (object->site_name == NULL) {
18088 0 : py_site_name = Py_None;
18089 0 : Py_INCREF(py_site_name);
18090 : } else {
18091 0 : if (object->site_name == NULL) {
18092 0 : py_site_name = Py_None;
18093 0 : Py_INCREF(py_site_name);
18094 : } else {
18095 0 : py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
18096 : }
18097 : }
18098 0 : return py_site_name;
18099 : }
18100 :
18101 0 : static int py_drsuapi_DsGetDCInfo1_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
18102 : {
18103 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
18104 0 : if (value == NULL) {
18105 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_name");
18106 0 : return -1;
18107 : }
18108 0 : if (value == Py_None) {
18109 0 : object->site_name = NULL;
18110 : } else {
18111 0 : object->site_name = NULL;
18112 : {
18113 : const char *test_str;
18114 : const char *talloc_str;
18115 0 : PyObject *unicode = NULL;
18116 0 : if (PyUnicode_Check(value)) {
18117 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18118 0 : if (unicode == NULL) {
18119 0 : PyErr_NoMemory();
18120 0 : return -1;
18121 : }
18122 0 : test_str = PyBytes_AS_STRING(unicode);
18123 0 : } else if (PyBytes_Check(value)) {
18124 0 : test_str = PyBytes_AS_STRING(value);
18125 : } else {
18126 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18127 0 : return -1;
18128 : }
18129 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18130 0 : if (unicode != NULL) {
18131 0 : Py_DECREF(unicode);
18132 : }
18133 0 : if (talloc_str == NULL) {
18134 0 : PyErr_NoMemory();
18135 0 : return -1;
18136 : }
18137 0 : object->site_name = talloc_str;
18138 : }
18139 : }
18140 0 : return 0;
18141 : }
18142 :
18143 0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_computer_dn(PyObject *obj, void *closure)
18144 : {
18145 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
18146 : PyObject *py_computer_dn;
18147 0 : if (object->computer_dn == NULL) {
18148 0 : Py_RETURN_NONE;
18149 : }
18150 0 : if (object->computer_dn == NULL) {
18151 0 : py_computer_dn = Py_None;
18152 0 : Py_INCREF(py_computer_dn);
18153 : } else {
18154 0 : if (object->computer_dn == NULL) {
18155 0 : py_computer_dn = Py_None;
18156 0 : Py_INCREF(py_computer_dn);
18157 : } else {
18158 0 : py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
18159 : }
18160 : }
18161 0 : return py_computer_dn;
18162 : }
18163 :
18164 0 : static int py_drsuapi_DsGetDCInfo1_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
18165 : {
18166 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
18167 0 : if (value == NULL) {
18168 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_dn");
18169 0 : return -1;
18170 : }
18171 0 : if (value == Py_None) {
18172 0 : object->computer_dn = NULL;
18173 : } else {
18174 0 : object->computer_dn = NULL;
18175 : {
18176 : const char *test_str;
18177 : const char *talloc_str;
18178 0 : PyObject *unicode = NULL;
18179 0 : if (PyUnicode_Check(value)) {
18180 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18181 0 : if (unicode == NULL) {
18182 0 : PyErr_NoMemory();
18183 0 : return -1;
18184 : }
18185 0 : test_str = PyBytes_AS_STRING(unicode);
18186 0 : } else if (PyBytes_Check(value)) {
18187 0 : test_str = PyBytes_AS_STRING(value);
18188 : } else {
18189 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18190 0 : return -1;
18191 : }
18192 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18193 0 : if (unicode != NULL) {
18194 0 : Py_DECREF(unicode);
18195 : }
18196 0 : if (talloc_str == NULL) {
18197 0 : PyErr_NoMemory();
18198 0 : return -1;
18199 : }
18200 0 : object->computer_dn = talloc_str;
18201 : }
18202 : }
18203 0 : return 0;
18204 : }
18205 :
18206 0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_server_dn(PyObject *obj, void *closure)
18207 : {
18208 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
18209 : PyObject *py_server_dn;
18210 0 : if (object->server_dn == NULL) {
18211 0 : Py_RETURN_NONE;
18212 : }
18213 0 : if (object->server_dn == NULL) {
18214 0 : py_server_dn = Py_None;
18215 0 : Py_INCREF(py_server_dn);
18216 : } else {
18217 0 : if (object->server_dn == NULL) {
18218 0 : py_server_dn = Py_None;
18219 0 : Py_INCREF(py_server_dn);
18220 : } else {
18221 0 : py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
18222 : }
18223 : }
18224 0 : return py_server_dn;
18225 : }
18226 :
18227 0 : static int py_drsuapi_DsGetDCInfo1_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
18228 : {
18229 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
18230 0 : if (value == NULL) {
18231 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_dn");
18232 0 : return -1;
18233 : }
18234 0 : if (value == Py_None) {
18235 0 : object->server_dn = NULL;
18236 : } else {
18237 0 : object->server_dn = NULL;
18238 : {
18239 : const char *test_str;
18240 : const char *talloc_str;
18241 0 : PyObject *unicode = NULL;
18242 0 : if (PyUnicode_Check(value)) {
18243 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18244 0 : if (unicode == NULL) {
18245 0 : PyErr_NoMemory();
18246 0 : return -1;
18247 : }
18248 0 : test_str = PyBytes_AS_STRING(unicode);
18249 0 : } else if (PyBytes_Check(value)) {
18250 0 : test_str = PyBytes_AS_STRING(value);
18251 : } else {
18252 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18253 0 : return -1;
18254 : }
18255 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18256 0 : if (unicode != NULL) {
18257 0 : Py_DECREF(unicode);
18258 : }
18259 0 : if (talloc_str == NULL) {
18260 0 : PyErr_NoMemory();
18261 0 : return -1;
18262 : }
18263 0 : object->server_dn = talloc_str;
18264 : }
18265 : }
18266 0 : return 0;
18267 : }
18268 :
18269 0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_is_pdc(PyObject *obj, void *closure)
18270 : {
18271 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
18272 : PyObject *py_is_pdc;
18273 0 : py_is_pdc = PyLong_FromUnsignedLongLong((uint32_t)object->is_pdc);
18274 0 : return py_is_pdc;
18275 : }
18276 :
18277 0 : static int py_drsuapi_DsGetDCInfo1_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
18278 : {
18279 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
18280 0 : if (value == NULL) {
18281 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_pdc");
18282 0 : return -1;
18283 : }
18284 : {
18285 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_pdc));
18286 0 : if (PyLong_Check(value)) {
18287 : unsigned long long test_var;
18288 0 : test_var = PyLong_AsUnsignedLongLong(value);
18289 0 : if (PyErr_Occurred() != NULL) {
18290 0 : return -1;
18291 : }
18292 0 : if (test_var > uint_max) {
18293 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18294 : PyLong_Type.tp_name, uint_max, test_var);
18295 0 : return -1;
18296 : }
18297 0 : object->is_pdc = test_var;
18298 : } else {
18299 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18300 : PyLong_Type.tp_name);
18301 0 : return -1;
18302 : }
18303 : }
18304 0 : return 0;
18305 : }
18306 :
18307 0 : static PyObject *py_drsuapi_DsGetDCInfo1_get_is_enabled(PyObject *obj, void *closure)
18308 : {
18309 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(obj);
18310 : PyObject *py_is_enabled;
18311 0 : py_is_enabled = PyLong_FromUnsignedLongLong((uint32_t)object->is_enabled);
18312 0 : return py_is_enabled;
18313 : }
18314 :
18315 0 : static int py_drsuapi_DsGetDCInfo1_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
18316 : {
18317 0 : struct drsuapi_DsGetDCInfo1 *object = (struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(py_obj);
18318 0 : if (value == NULL) {
18319 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_enabled");
18320 0 : return -1;
18321 : }
18322 : {
18323 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_enabled));
18324 0 : if (PyLong_Check(value)) {
18325 : unsigned long long test_var;
18326 0 : test_var = PyLong_AsUnsignedLongLong(value);
18327 0 : if (PyErr_Occurred() != NULL) {
18328 0 : return -1;
18329 : }
18330 0 : if (test_var > uint_max) {
18331 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18332 : PyLong_Type.tp_name, uint_max, test_var);
18333 0 : return -1;
18334 : }
18335 0 : object->is_enabled = test_var;
18336 : } else {
18337 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18338 : PyLong_Type.tp_name);
18339 0 : return -1;
18340 : }
18341 : }
18342 0 : return 0;
18343 : }
18344 :
18345 : static PyGetSetDef py_drsuapi_DsGetDCInfo1_getsetters[] = {
18346 : {
18347 : .name = discard_const_p(char, "netbios_name"),
18348 : .get = py_drsuapi_DsGetDCInfo1_get_netbios_name,
18349 : .set = py_drsuapi_DsGetDCInfo1_set_netbios_name,
18350 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
18351 : },
18352 : {
18353 : .name = discard_const_p(char, "dns_name"),
18354 : .get = py_drsuapi_DsGetDCInfo1_get_dns_name,
18355 : .set = py_drsuapi_DsGetDCInfo1_set_dns_name,
18356 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
18357 : },
18358 : {
18359 : .name = discard_const_p(char, "site_name"),
18360 : .get = py_drsuapi_DsGetDCInfo1_get_site_name,
18361 : .set = py_drsuapi_DsGetDCInfo1_set_site_name,
18362 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
18363 : },
18364 : {
18365 : .name = discard_const_p(char, "computer_dn"),
18366 : .get = py_drsuapi_DsGetDCInfo1_get_computer_dn,
18367 : .set = py_drsuapi_DsGetDCInfo1_set_computer_dn,
18368 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
18369 : },
18370 : {
18371 : .name = discard_const_p(char, "server_dn"),
18372 : .get = py_drsuapi_DsGetDCInfo1_get_server_dn,
18373 : .set = py_drsuapi_DsGetDCInfo1_set_server_dn,
18374 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
18375 : },
18376 : {
18377 : .name = discard_const_p(char, "is_pdc"),
18378 : .get = py_drsuapi_DsGetDCInfo1_get_is_pdc,
18379 : .set = py_drsuapi_DsGetDCInfo1_set_is_pdc,
18380 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18381 : },
18382 : {
18383 : .name = discard_const_p(char, "is_enabled"),
18384 : .get = py_drsuapi_DsGetDCInfo1_get_is_enabled,
18385 : .set = py_drsuapi_DsGetDCInfo1_set_is_enabled,
18386 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18387 : },
18388 : { .name = NULL }
18389 : };
18390 :
18391 0 : static PyObject *py_drsuapi_DsGetDCInfo1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
18392 : {
18393 0 : return pytalloc_new(struct drsuapi_DsGetDCInfo1, type);
18394 : }
18395 :
18396 :
18397 : static PyTypeObject drsuapi_DsGetDCInfo1_Type = {
18398 : PyVarObject_HEAD_INIT(NULL, 0)
18399 : .tp_name = "drsuapi.DsGetDCInfo1",
18400 : .tp_getset = py_drsuapi_DsGetDCInfo1_getsetters,
18401 : .tp_methods = NULL,
18402 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
18403 : .tp_new = py_drsuapi_DsGetDCInfo1_new,
18404 : };
18405 :
18406 :
18407 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr1_get_count(PyObject *obj, void *closure)
18408 : {
18409 0 : struct drsuapi_DsGetDCInfoCtr1 *object = (struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(obj);
18410 : PyObject *py_count;
18411 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
18412 0 : return py_count;
18413 : }
18414 :
18415 0 : static int py_drsuapi_DsGetDCInfoCtr1_set_count(PyObject *py_obj, PyObject *value, void *closure)
18416 : {
18417 0 : struct drsuapi_DsGetDCInfoCtr1 *object = (struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(py_obj);
18418 0 : if (value == NULL) {
18419 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
18420 0 : return -1;
18421 : }
18422 : {
18423 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
18424 0 : if (PyLong_Check(value)) {
18425 : unsigned long long test_var;
18426 0 : test_var = PyLong_AsUnsignedLongLong(value);
18427 0 : if (PyErr_Occurred() != NULL) {
18428 0 : return -1;
18429 : }
18430 0 : if (test_var > uint_max) {
18431 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18432 : PyLong_Type.tp_name, uint_max, test_var);
18433 0 : return -1;
18434 : }
18435 0 : object->count = test_var;
18436 : } else {
18437 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18438 : PyLong_Type.tp_name);
18439 0 : return -1;
18440 : }
18441 : }
18442 0 : return 0;
18443 : }
18444 :
18445 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr1_get_array(PyObject *obj, void *closure)
18446 : {
18447 0 : struct drsuapi_DsGetDCInfoCtr1 *object = (struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(obj);
18448 : PyObject *py_array;
18449 0 : if (object->array == NULL) {
18450 0 : Py_RETURN_NONE;
18451 : }
18452 0 : if (object->array == NULL) {
18453 0 : py_array = Py_None;
18454 0 : Py_INCREF(py_array);
18455 : } else {
18456 0 : py_array = PyList_New(object->count);
18457 0 : if (py_array == NULL) {
18458 0 : return NULL;
18459 : }
18460 : {
18461 : int array_cntr_1;
18462 0 : for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
18463 : PyObject *py_array_1;
18464 0 : py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo1_Type, object->array, &object->array[array_cntr_1]);
18465 0 : PyList_SetItem(py_array, array_cntr_1, py_array_1);
18466 : }
18467 : }
18468 : }
18469 0 : return py_array;
18470 : }
18471 :
18472 0 : static int py_drsuapi_DsGetDCInfoCtr1_set_array(PyObject *py_obj, PyObject *value, void *closure)
18473 : {
18474 0 : struct drsuapi_DsGetDCInfoCtr1 *object = (struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(py_obj);
18475 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
18476 0 : if (value == NULL) {
18477 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
18478 0 : return -1;
18479 : }
18480 0 : if (value == Py_None) {
18481 0 : object->array = NULL;
18482 : } else {
18483 0 : object->array = NULL;
18484 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
18485 : {
18486 : int array_cntr_1;
18487 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
18488 0 : if (!object->array) { return -1;; }
18489 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
18490 0 : for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
18491 0 : if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
18492 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
18493 0 : return -1;
18494 : }
18495 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCInfo1_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
18496 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
18497 0 : PyErr_NoMemory();
18498 0 : return -1;
18499 : }
18500 0 : object->array[array_cntr_1] = *(struct drsuapi_DsGetDCInfo1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
18501 : }
18502 : }
18503 : }
18504 0 : return 0;
18505 : }
18506 :
18507 : static PyGetSetDef py_drsuapi_DsGetDCInfoCtr1_getsetters[] = {
18508 : {
18509 : .name = discard_const_p(char, "count"),
18510 : .get = py_drsuapi_DsGetDCInfoCtr1_get_count,
18511 : .set = py_drsuapi_DsGetDCInfoCtr1_set_count,
18512 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18513 : },
18514 : {
18515 : .name = discard_const_p(char, "array"),
18516 : .get = py_drsuapi_DsGetDCInfoCtr1_get_array,
18517 : .set = py_drsuapi_DsGetDCInfoCtr1_set_array,
18518 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfo1")
18519 : },
18520 : { .name = NULL }
18521 : };
18522 :
18523 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
18524 : {
18525 0 : return pytalloc_new(struct drsuapi_DsGetDCInfoCtr1, type);
18526 : }
18527 :
18528 :
18529 : static PyTypeObject drsuapi_DsGetDCInfoCtr1_Type = {
18530 : PyVarObject_HEAD_INIT(NULL, 0)
18531 : .tp_name = "drsuapi.DsGetDCInfoCtr1",
18532 : .tp_getset = py_drsuapi_DsGetDCInfoCtr1_getsetters,
18533 : .tp_methods = NULL,
18534 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
18535 : .tp_new = py_drsuapi_DsGetDCInfoCtr1_new,
18536 : };
18537 :
18538 :
18539 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_netbios_name(PyObject *obj, void *closure)
18540 : {
18541 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
18542 : PyObject *py_netbios_name;
18543 0 : if (object->netbios_name == NULL) {
18544 0 : Py_RETURN_NONE;
18545 : }
18546 0 : if (object->netbios_name == NULL) {
18547 0 : py_netbios_name = Py_None;
18548 0 : Py_INCREF(py_netbios_name);
18549 : } else {
18550 0 : if (object->netbios_name == NULL) {
18551 0 : py_netbios_name = Py_None;
18552 0 : Py_INCREF(py_netbios_name);
18553 : } else {
18554 0 : py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
18555 : }
18556 : }
18557 0 : return py_netbios_name;
18558 : }
18559 :
18560 0 : static int py_drsuapi_DsGetDCInfo2_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
18561 : {
18562 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
18563 0 : if (value == NULL) {
18564 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
18565 0 : return -1;
18566 : }
18567 0 : if (value == Py_None) {
18568 0 : object->netbios_name = NULL;
18569 : } else {
18570 0 : object->netbios_name = NULL;
18571 : {
18572 : const char *test_str;
18573 : const char *talloc_str;
18574 0 : PyObject *unicode = NULL;
18575 0 : if (PyUnicode_Check(value)) {
18576 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18577 0 : if (unicode == NULL) {
18578 0 : PyErr_NoMemory();
18579 0 : return -1;
18580 : }
18581 0 : test_str = PyBytes_AS_STRING(unicode);
18582 0 : } else if (PyBytes_Check(value)) {
18583 0 : test_str = PyBytes_AS_STRING(value);
18584 : } else {
18585 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18586 0 : return -1;
18587 : }
18588 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18589 0 : if (unicode != NULL) {
18590 0 : Py_DECREF(unicode);
18591 : }
18592 0 : if (talloc_str == NULL) {
18593 0 : PyErr_NoMemory();
18594 0 : return -1;
18595 : }
18596 0 : object->netbios_name = talloc_str;
18597 : }
18598 : }
18599 0 : return 0;
18600 : }
18601 :
18602 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_dns_name(PyObject *obj, void *closure)
18603 : {
18604 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
18605 : PyObject *py_dns_name;
18606 0 : if (object->dns_name == NULL) {
18607 0 : Py_RETURN_NONE;
18608 : }
18609 0 : if (object->dns_name == NULL) {
18610 0 : py_dns_name = Py_None;
18611 0 : Py_INCREF(py_dns_name);
18612 : } else {
18613 0 : if (object->dns_name == NULL) {
18614 0 : py_dns_name = Py_None;
18615 0 : Py_INCREF(py_dns_name);
18616 : } else {
18617 0 : py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
18618 : }
18619 : }
18620 0 : return py_dns_name;
18621 : }
18622 :
18623 0 : static int py_drsuapi_DsGetDCInfo2_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
18624 : {
18625 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
18626 0 : if (value == NULL) {
18627 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
18628 0 : return -1;
18629 : }
18630 0 : if (value == Py_None) {
18631 0 : object->dns_name = NULL;
18632 : } else {
18633 0 : object->dns_name = NULL;
18634 : {
18635 : const char *test_str;
18636 : const char *talloc_str;
18637 0 : PyObject *unicode = NULL;
18638 0 : if (PyUnicode_Check(value)) {
18639 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18640 0 : if (unicode == NULL) {
18641 0 : PyErr_NoMemory();
18642 0 : return -1;
18643 : }
18644 0 : test_str = PyBytes_AS_STRING(unicode);
18645 0 : } else if (PyBytes_Check(value)) {
18646 0 : test_str = PyBytes_AS_STRING(value);
18647 : } else {
18648 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18649 0 : return -1;
18650 : }
18651 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18652 0 : if (unicode != NULL) {
18653 0 : Py_DECREF(unicode);
18654 : }
18655 0 : if (talloc_str == NULL) {
18656 0 : PyErr_NoMemory();
18657 0 : return -1;
18658 : }
18659 0 : object->dns_name = talloc_str;
18660 : }
18661 : }
18662 0 : return 0;
18663 : }
18664 :
18665 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_site_name(PyObject *obj, void *closure)
18666 : {
18667 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
18668 : PyObject *py_site_name;
18669 0 : if (object->site_name == NULL) {
18670 0 : Py_RETURN_NONE;
18671 : }
18672 0 : if (object->site_name == NULL) {
18673 0 : py_site_name = Py_None;
18674 0 : Py_INCREF(py_site_name);
18675 : } else {
18676 0 : if (object->site_name == NULL) {
18677 0 : py_site_name = Py_None;
18678 0 : Py_INCREF(py_site_name);
18679 : } else {
18680 0 : py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
18681 : }
18682 : }
18683 0 : return py_site_name;
18684 : }
18685 :
18686 0 : static int py_drsuapi_DsGetDCInfo2_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
18687 : {
18688 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
18689 0 : if (value == NULL) {
18690 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_name");
18691 0 : return -1;
18692 : }
18693 0 : if (value == Py_None) {
18694 0 : object->site_name = NULL;
18695 : } else {
18696 0 : object->site_name = NULL;
18697 : {
18698 : const char *test_str;
18699 : const char *talloc_str;
18700 0 : PyObject *unicode = NULL;
18701 0 : if (PyUnicode_Check(value)) {
18702 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18703 0 : if (unicode == NULL) {
18704 0 : PyErr_NoMemory();
18705 0 : return -1;
18706 : }
18707 0 : test_str = PyBytes_AS_STRING(unicode);
18708 0 : } else if (PyBytes_Check(value)) {
18709 0 : test_str = PyBytes_AS_STRING(value);
18710 : } else {
18711 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18712 0 : return -1;
18713 : }
18714 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18715 0 : if (unicode != NULL) {
18716 0 : Py_DECREF(unicode);
18717 : }
18718 0 : if (talloc_str == NULL) {
18719 0 : PyErr_NoMemory();
18720 0 : return -1;
18721 : }
18722 0 : object->site_name = talloc_str;
18723 : }
18724 : }
18725 0 : return 0;
18726 : }
18727 :
18728 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_site_dn(PyObject *obj, void *closure)
18729 : {
18730 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
18731 : PyObject *py_site_dn;
18732 0 : if (object->site_dn == NULL) {
18733 0 : Py_RETURN_NONE;
18734 : }
18735 0 : if (object->site_dn == NULL) {
18736 0 : py_site_dn = Py_None;
18737 0 : Py_INCREF(py_site_dn);
18738 : } else {
18739 0 : if (object->site_dn == NULL) {
18740 0 : py_site_dn = Py_None;
18741 0 : Py_INCREF(py_site_dn);
18742 : } else {
18743 0 : py_site_dn = PyUnicode_Decode(object->site_dn, strlen(object->site_dn), "utf-8", "ignore");
18744 : }
18745 : }
18746 0 : return py_site_dn;
18747 : }
18748 :
18749 0 : static int py_drsuapi_DsGetDCInfo2_set_site_dn(PyObject *py_obj, PyObject *value, void *closure)
18750 : {
18751 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
18752 0 : if (value == NULL) {
18753 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_dn");
18754 0 : return -1;
18755 : }
18756 0 : if (value == Py_None) {
18757 0 : object->site_dn = NULL;
18758 : } else {
18759 0 : object->site_dn = NULL;
18760 : {
18761 : const char *test_str;
18762 : const char *talloc_str;
18763 0 : PyObject *unicode = NULL;
18764 0 : if (PyUnicode_Check(value)) {
18765 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18766 0 : if (unicode == NULL) {
18767 0 : PyErr_NoMemory();
18768 0 : return -1;
18769 : }
18770 0 : test_str = PyBytes_AS_STRING(unicode);
18771 0 : } else if (PyBytes_Check(value)) {
18772 0 : test_str = PyBytes_AS_STRING(value);
18773 : } else {
18774 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18775 0 : return -1;
18776 : }
18777 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18778 0 : if (unicode != NULL) {
18779 0 : Py_DECREF(unicode);
18780 : }
18781 0 : if (talloc_str == NULL) {
18782 0 : PyErr_NoMemory();
18783 0 : return -1;
18784 : }
18785 0 : object->site_dn = talloc_str;
18786 : }
18787 : }
18788 0 : return 0;
18789 : }
18790 :
18791 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_computer_dn(PyObject *obj, void *closure)
18792 : {
18793 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
18794 : PyObject *py_computer_dn;
18795 0 : if (object->computer_dn == NULL) {
18796 0 : Py_RETURN_NONE;
18797 : }
18798 0 : if (object->computer_dn == NULL) {
18799 0 : py_computer_dn = Py_None;
18800 0 : Py_INCREF(py_computer_dn);
18801 : } else {
18802 0 : if (object->computer_dn == NULL) {
18803 0 : py_computer_dn = Py_None;
18804 0 : Py_INCREF(py_computer_dn);
18805 : } else {
18806 0 : py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
18807 : }
18808 : }
18809 0 : return py_computer_dn;
18810 : }
18811 :
18812 0 : static int py_drsuapi_DsGetDCInfo2_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
18813 : {
18814 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
18815 0 : if (value == NULL) {
18816 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_dn");
18817 0 : return -1;
18818 : }
18819 0 : if (value == Py_None) {
18820 0 : object->computer_dn = NULL;
18821 : } else {
18822 0 : object->computer_dn = NULL;
18823 : {
18824 : const char *test_str;
18825 : const char *talloc_str;
18826 0 : PyObject *unicode = NULL;
18827 0 : if (PyUnicode_Check(value)) {
18828 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18829 0 : if (unicode == NULL) {
18830 0 : PyErr_NoMemory();
18831 0 : return -1;
18832 : }
18833 0 : test_str = PyBytes_AS_STRING(unicode);
18834 0 : } else if (PyBytes_Check(value)) {
18835 0 : test_str = PyBytes_AS_STRING(value);
18836 : } else {
18837 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18838 0 : return -1;
18839 : }
18840 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18841 0 : if (unicode != NULL) {
18842 0 : Py_DECREF(unicode);
18843 : }
18844 0 : if (talloc_str == NULL) {
18845 0 : PyErr_NoMemory();
18846 0 : return -1;
18847 : }
18848 0 : object->computer_dn = talloc_str;
18849 : }
18850 : }
18851 0 : return 0;
18852 : }
18853 :
18854 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_server_dn(PyObject *obj, void *closure)
18855 : {
18856 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
18857 : PyObject *py_server_dn;
18858 0 : if (object->server_dn == NULL) {
18859 0 : Py_RETURN_NONE;
18860 : }
18861 0 : if (object->server_dn == NULL) {
18862 0 : py_server_dn = Py_None;
18863 0 : Py_INCREF(py_server_dn);
18864 : } else {
18865 0 : if (object->server_dn == NULL) {
18866 0 : py_server_dn = Py_None;
18867 0 : Py_INCREF(py_server_dn);
18868 : } else {
18869 0 : py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
18870 : }
18871 : }
18872 0 : return py_server_dn;
18873 : }
18874 :
18875 0 : static int py_drsuapi_DsGetDCInfo2_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
18876 : {
18877 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
18878 0 : if (value == NULL) {
18879 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_dn");
18880 0 : return -1;
18881 : }
18882 0 : if (value == Py_None) {
18883 0 : object->server_dn = NULL;
18884 : } else {
18885 0 : object->server_dn = NULL;
18886 : {
18887 : const char *test_str;
18888 : const char *talloc_str;
18889 0 : PyObject *unicode = NULL;
18890 0 : if (PyUnicode_Check(value)) {
18891 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18892 0 : if (unicode == NULL) {
18893 0 : PyErr_NoMemory();
18894 0 : return -1;
18895 : }
18896 0 : test_str = PyBytes_AS_STRING(unicode);
18897 0 : } else if (PyBytes_Check(value)) {
18898 0 : test_str = PyBytes_AS_STRING(value);
18899 : } else {
18900 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18901 0 : return -1;
18902 : }
18903 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18904 0 : if (unicode != NULL) {
18905 0 : Py_DECREF(unicode);
18906 : }
18907 0 : if (talloc_str == NULL) {
18908 0 : PyErr_NoMemory();
18909 0 : return -1;
18910 : }
18911 0 : object->server_dn = talloc_str;
18912 : }
18913 : }
18914 0 : return 0;
18915 : }
18916 :
18917 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_ntds_dn(PyObject *obj, void *closure)
18918 : {
18919 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
18920 : PyObject *py_ntds_dn;
18921 0 : if (object->ntds_dn == NULL) {
18922 0 : Py_RETURN_NONE;
18923 : }
18924 0 : if (object->ntds_dn == NULL) {
18925 0 : py_ntds_dn = Py_None;
18926 0 : Py_INCREF(py_ntds_dn);
18927 : } else {
18928 0 : if (object->ntds_dn == NULL) {
18929 0 : py_ntds_dn = Py_None;
18930 0 : Py_INCREF(py_ntds_dn);
18931 : } else {
18932 0 : py_ntds_dn = PyUnicode_Decode(object->ntds_dn, strlen(object->ntds_dn), "utf-8", "ignore");
18933 : }
18934 : }
18935 0 : return py_ntds_dn;
18936 : }
18937 :
18938 0 : static int py_drsuapi_DsGetDCInfo2_set_ntds_dn(PyObject *py_obj, PyObject *value, void *closure)
18939 : {
18940 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
18941 0 : if (value == NULL) {
18942 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntds_dn");
18943 0 : return -1;
18944 : }
18945 0 : if (value == Py_None) {
18946 0 : object->ntds_dn = NULL;
18947 : } else {
18948 0 : object->ntds_dn = NULL;
18949 : {
18950 : const char *test_str;
18951 : const char *talloc_str;
18952 0 : PyObject *unicode = NULL;
18953 0 : if (PyUnicode_Check(value)) {
18954 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18955 0 : if (unicode == NULL) {
18956 0 : PyErr_NoMemory();
18957 0 : return -1;
18958 : }
18959 0 : test_str = PyBytes_AS_STRING(unicode);
18960 0 : } else if (PyBytes_Check(value)) {
18961 0 : test_str = PyBytes_AS_STRING(value);
18962 : } else {
18963 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18964 0 : return -1;
18965 : }
18966 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18967 0 : if (unicode != NULL) {
18968 0 : Py_DECREF(unicode);
18969 : }
18970 0 : if (talloc_str == NULL) {
18971 0 : PyErr_NoMemory();
18972 0 : return -1;
18973 : }
18974 0 : object->ntds_dn = talloc_str;
18975 : }
18976 : }
18977 0 : return 0;
18978 : }
18979 :
18980 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_is_pdc(PyObject *obj, void *closure)
18981 : {
18982 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
18983 : PyObject *py_is_pdc;
18984 0 : py_is_pdc = PyLong_FromUnsignedLongLong((uint32_t)object->is_pdc);
18985 0 : return py_is_pdc;
18986 : }
18987 :
18988 0 : static int py_drsuapi_DsGetDCInfo2_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
18989 : {
18990 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
18991 0 : if (value == NULL) {
18992 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_pdc");
18993 0 : return -1;
18994 : }
18995 : {
18996 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_pdc));
18997 0 : if (PyLong_Check(value)) {
18998 : unsigned long long test_var;
18999 0 : test_var = PyLong_AsUnsignedLongLong(value);
19000 0 : if (PyErr_Occurred() != NULL) {
19001 0 : return -1;
19002 : }
19003 0 : if (test_var > uint_max) {
19004 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19005 : PyLong_Type.tp_name, uint_max, test_var);
19006 0 : return -1;
19007 : }
19008 0 : object->is_pdc = test_var;
19009 : } else {
19010 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19011 : PyLong_Type.tp_name);
19012 0 : return -1;
19013 : }
19014 : }
19015 0 : return 0;
19016 : }
19017 :
19018 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_is_enabled(PyObject *obj, void *closure)
19019 : {
19020 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
19021 : PyObject *py_is_enabled;
19022 0 : py_is_enabled = PyLong_FromUnsignedLongLong((uint32_t)object->is_enabled);
19023 0 : return py_is_enabled;
19024 : }
19025 :
19026 0 : static int py_drsuapi_DsGetDCInfo2_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
19027 : {
19028 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
19029 0 : if (value == NULL) {
19030 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_enabled");
19031 0 : return -1;
19032 : }
19033 : {
19034 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_enabled));
19035 0 : if (PyLong_Check(value)) {
19036 : unsigned long long test_var;
19037 0 : test_var = PyLong_AsUnsignedLongLong(value);
19038 0 : if (PyErr_Occurred() != NULL) {
19039 0 : return -1;
19040 : }
19041 0 : if (test_var > uint_max) {
19042 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19043 : PyLong_Type.tp_name, uint_max, test_var);
19044 0 : return -1;
19045 : }
19046 0 : object->is_enabled = test_var;
19047 : } else {
19048 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19049 : PyLong_Type.tp_name);
19050 0 : return -1;
19051 : }
19052 : }
19053 0 : return 0;
19054 : }
19055 :
19056 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_is_gc(PyObject *obj, void *closure)
19057 : {
19058 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
19059 : PyObject *py_is_gc;
19060 0 : py_is_gc = PyLong_FromUnsignedLongLong((uint32_t)object->is_gc);
19061 0 : return py_is_gc;
19062 : }
19063 :
19064 0 : static int py_drsuapi_DsGetDCInfo2_set_is_gc(PyObject *py_obj, PyObject *value, void *closure)
19065 : {
19066 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
19067 0 : if (value == NULL) {
19068 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_gc");
19069 0 : return -1;
19070 : }
19071 : {
19072 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_gc));
19073 0 : if (PyLong_Check(value)) {
19074 : unsigned long long test_var;
19075 0 : test_var = PyLong_AsUnsignedLongLong(value);
19076 0 : if (PyErr_Occurred() != NULL) {
19077 0 : return -1;
19078 : }
19079 0 : if (test_var > uint_max) {
19080 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19081 : PyLong_Type.tp_name, uint_max, test_var);
19082 0 : return -1;
19083 : }
19084 0 : object->is_gc = test_var;
19085 : } else {
19086 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19087 : PyLong_Type.tp_name);
19088 0 : return -1;
19089 : }
19090 : }
19091 0 : return 0;
19092 : }
19093 :
19094 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_site_guid(PyObject *obj, void *closure)
19095 : {
19096 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
19097 : PyObject *py_site_guid;
19098 0 : py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
19099 0 : return py_site_guid;
19100 : }
19101 :
19102 0 : static int py_drsuapi_DsGetDCInfo2_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
19103 : {
19104 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
19105 0 : if (value == NULL) {
19106 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
19107 0 : return -1;
19108 : }
19109 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
19110 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19111 0 : PyErr_NoMemory();
19112 0 : return -1;
19113 : }
19114 0 : object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
19115 0 : return 0;
19116 : }
19117 :
19118 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_computer_guid(PyObject *obj, void *closure)
19119 : {
19120 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
19121 : PyObject *py_computer_guid;
19122 0 : py_computer_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->computer_guid);
19123 0 : return py_computer_guid;
19124 : }
19125 :
19126 0 : static int py_drsuapi_DsGetDCInfo2_set_computer_guid(PyObject *py_obj, PyObject *value, void *closure)
19127 : {
19128 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
19129 0 : if (value == NULL) {
19130 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_guid");
19131 0 : return -1;
19132 : }
19133 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
19134 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19135 0 : PyErr_NoMemory();
19136 0 : return -1;
19137 : }
19138 0 : object->computer_guid = *(struct GUID *)pytalloc_get_ptr(value);
19139 0 : return 0;
19140 : }
19141 :
19142 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_server_guid(PyObject *obj, void *closure)
19143 : {
19144 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
19145 : PyObject *py_server_guid;
19146 0 : py_server_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->server_guid);
19147 0 : return py_server_guid;
19148 : }
19149 :
19150 0 : static int py_drsuapi_DsGetDCInfo2_set_server_guid(PyObject *py_obj, PyObject *value, void *closure)
19151 : {
19152 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
19153 0 : if (value == NULL) {
19154 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_guid");
19155 0 : return -1;
19156 : }
19157 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
19158 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19159 0 : PyErr_NoMemory();
19160 0 : return -1;
19161 : }
19162 0 : object->server_guid = *(struct GUID *)pytalloc_get_ptr(value);
19163 0 : return 0;
19164 : }
19165 :
19166 0 : static PyObject *py_drsuapi_DsGetDCInfo2_get_ntds_guid(PyObject *obj, void *closure)
19167 : {
19168 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(obj);
19169 : PyObject *py_ntds_guid;
19170 0 : py_ntds_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->ntds_guid);
19171 0 : return py_ntds_guid;
19172 : }
19173 :
19174 0 : static int py_drsuapi_DsGetDCInfo2_set_ntds_guid(PyObject *py_obj, PyObject *value, void *closure)
19175 : {
19176 0 : struct drsuapi_DsGetDCInfo2 *object = (struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(py_obj);
19177 0 : if (value == NULL) {
19178 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntds_guid");
19179 0 : return -1;
19180 : }
19181 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
19182 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19183 0 : PyErr_NoMemory();
19184 0 : return -1;
19185 : }
19186 0 : object->ntds_guid = *(struct GUID *)pytalloc_get_ptr(value);
19187 0 : return 0;
19188 : }
19189 :
19190 : static PyGetSetDef py_drsuapi_DsGetDCInfo2_getsetters[] = {
19191 : {
19192 : .name = discard_const_p(char, "netbios_name"),
19193 : .get = py_drsuapi_DsGetDCInfo2_get_netbios_name,
19194 : .set = py_drsuapi_DsGetDCInfo2_set_netbios_name,
19195 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
19196 : },
19197 : {
19198 : .name = discard_const_p(char, "dns_name"),
19199 : .get = py_drsuapi_DsGetDCInfo2_get_dns_name,
19200 : .set = py_drsuapi_DsGetDCInfo2_set_dns_name,
19201 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
19202 : },
19203 : {
19204 : .name = discard_const_p(char, "site_name"),
19205 : .get = py_drsuapi_DsGetDCInfo2_get_site_name,
19206 : .set = py_drsuapi_DsGetDCInfo2_set_site_name,
19207 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
19208 : },
19209 : {
19210 : .name = discard_const_p(char, "site_dn"),
19211 : .get = py_drsuapi_DsGetDCInfo2_get_site_dn,
19212 : .set = py_drsuapi_DsGetDCInfo2_set_site_dn,
19213 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
19214 : },
19215 : {
19216 : .name = discard_const_p(char, "computer_dn"),
19217 : .get = py_drsuapi_DsGetDCInfo2_get_computer_dn,
19218 : .set = py_drsuapi_DsGetDCInfo2_set_computer_dn,
19219 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
19220 : },
19221 : {
19222 : .name = discard_const_p(char, "server_dn"),
19223 : .get = py_drsuapi_DsGetDCInfo2_get_server_dn,
19224 : .set = py_drsuapi_DsGetDCInfo2_set_server_dn,
19225 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
19226 : },
19227 : {
19228 : .name = discard_const_p(char, "ntds_dn"),
19229 : .get = py_drsuapi_DsGetDCInfo2_get_ntds_dn,
19230 : .set = py_drsuapi_DsGetDCInfo2_set_ntds_dn,
19231 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
19232 : },
19233 : {
19234 : .name = discard_const_p(char, "is_pdc"),
19235 : .get = py_drsuapi_DsGetDCInfo2_get_is_pdc,
19236 : .set = py_drsuapi_DsGetDCInfo2_set_is_pdc,
19237 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19238 : },
19239 : {
19240 : .name = discard_const_p(char, "is_enabled"),
19241 : .get = py_drsuapi_DsGetDCInfo2_get_is_enabled,
19242 : .set = py_drsuapi_DsGetDCInfo2_set_is_enabled,
19243 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19244 : },
19245 : {
19246 : .name = discard_const_p(char, "is_gc"),
19247 : .get = py_drsuapi_DsGetDCInfo2_get_is_gc,
19248 : .set = py_drsuapi_DsGetDCInfo2_set_is_gc,
19249 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19250 : },
19251 : {
19252 : .name = discard_const_p(char, "site_guid"),
19253 : .get = py_drsuapi_DsGetDCInfo2_get_site_guid,
19254 : .set = py_drsuapi_DsGetDCInfo2_set_site_guid,
19255 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
19256 : },
19257 : {
19258 : .name = discard_const_p(char, "computer_guid"),
19259 : .get = py_drsuapi_DsGetDCInfo2_get_computer_guid,
19260 : .set = py_drsuapi_DsGetDCInfo2_set_computer_guid,
19261 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
19262 : },
19263 : {
19264 : .name = discard_const_p(char, "server_guid"),
19265 : .get = py_drsuapi_DsGetDCInfo2_get_server_guid,
19266 : .set = py_drsuapi_DsGetDCInfo2_set_server_guid,
19267 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
19268 : },
19269 : {
19270 : .name = discard_const_p(char, "ntds_guid"),
19271 : .get = py_drsuapi_DsGetDCInfo2_get_ntds_guid,
19272 : .set = py_drsuapi_DsGetDCInfo2_set_ntds_guid,
19273 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
19274 : },
19275 : { .name = NULL }
19276 : };
19277 :
19278 0 : static PyObject *py_drsuapi_DsGetDCInfo2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19279 : {
19280 0 : return pytalloc_new(struct drsuapi_DsGetDCInfo2, type);
19281 : }
19282 :
19283 :
19284 : static PyTypeObject drsuapi_DsGetDCInfo2_Type = {
19285 : PyVarObject_HEAD_INIT(NULL, 0)
19286 : .tp_name = "drsuapi.DsGetDCInfo2",
19287 : .tp_getset = py_drsuapi_DsGetDCInfo2_getsetters,
19288 : .tp_methods = NULL,
19289 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19290 : .tp_new = py_drsuapi_DsGetDCInfo2_new,
19291 : };
19292 :
19293 :
19294 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr2_get_count(PyObject *obj, void *closure)
19295 : {
19296 0 : struct drsuapi_DsGetDCInfoCtr2 *object = (struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(obj);
19297 : PyObject *py_count;
19298 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
19299 0 : return py_count;
19300 : }
19301 :
19302 0 : static int py_drsuapi_DsGetDCInfoCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
19303 : {
19304 0 : struct drsuapi_DsGetDCInfoCtr2 *object = (struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(py_obj);
19305 0 : if (value == NULL) {
19306 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
19307 0 : return -1;
19308 : }
19309 : {
19310 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
19311 0 : if (PyLong_Check(value)) {
19312 : unsigned long long test_var;
19313 0 : test_var = PyLong_AsUnsignedLongLong(value);
19314 0 : if (PyErr_Occurred() != NULL) {
19315 0 : return -1;
19316 : }
19317 0 : if (test_var > uint_max) {
19318 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19319 : PyLong_Type.tp_name, uint_max, test_var);
19320 0 : return -1;
19321 : }
19322 0 : object->count = test_var;
19323 : } else {
19324 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19325 : PyLong_Type.tp_name);
19326 0 : return -1;
19327 : }
19328 : }
19329 0 : return 0;
19330 : }
19331 :
19332 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr2_get_array(PyObject *obj, void *closure)
19333 : {
19334 0 : struct drsuapi_DsGetDCInfoCtr2 *object = (struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(obj);
19335 : PyObject *py_array;
19336 0 : if (object->array == NULL) {
19337 0 : Py_RETURN_NONE;
19338 : }
19339 0 : if (object->array == NULL) {
19340 0 : py_array = Py_None;
19341 0 : Py_INCREF(py_array);
19342 : } else {
19343 0 : py_array = PyList_New(object->count);
19344 0 : if (py_array == NULL) {
19345 0 : return NULL;
19346 : }
19347 : {
19348 : int array_cntr_1;
19349 0 : for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
19350 : PyObject *py_array_1;
19351 0 : py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo2_Type, object->array, &object->array[array_cntr_1]);
19352 0 : PyList_SetItem(py_array, array_cntr_1, py_array_1);
19353 : }
19354 : }
19355 : }
19356 0 : return py_array;
19357 : }
19358 :
19359 0 : static int py_drsuapi_DsGetDCInfoCtr2_set_array(PyObject *py_obj, PyObject *value, void *closure)
19360 : {
19361 0 : struct drsuapi_DsGetDCInfoCtr2 *object = (struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(py_obj);
19362 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
19363 0 : if (value == NULL) {
19364 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
19365 0 : return -1;
19366 : }
19367 0 : if (value == Py_None) {
19368 0 : object->array = NULL;
19369 : } else {
19370 0 : object->array = NULL;
19371 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
19372 : {
19373 : int array_cntr_1;
19374 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
19375 0 : if (!object->array) { return -1;; }
19376 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
19377 0 : for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
19378 0 : if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
19379 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
19380 0 : return -1;
19381 : }
19382 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCInfo2_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
19383 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
19384 0 : PyErr_NoMemory();
19385 0 : return -1;
19386 : }
19387 0 : object->array[array_cntr_1] = *(struct drsuapi_DsGetDCInfo2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
19388 : }
19389 : }
19390 : }
19391 0 : return 0;
19392 : }
19393 :
19394 : static PyGetSetDef py_drsuapi_DsGetDCInfoCtr2_getsetters[] = {
19395 : {
19396 : .name = discard_const_p(char, "count"),
19397 : .get = py_drsuapi_DsGetDCInfoCtr2_get_count,
19398 : .set = py_drsuapi_DsGetDCInfoCtr2_set_count,
19399 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19400 : },
19401 : {
19402 : .name = discard_const_p(char, "array"),
19403 : .get = py_drsuapi_DsGetDCInfoCtr2_get_array,
19404 : .set = py_drsuapi_DsGetDCInfoCtr2_set_array,
19405 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfo2")
19406 : },
19407 : { .name = NULL }
19408 : };
19409 :
19410 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19411 : {
19412 0 : return pytalloc_new(struct drsuapi_DsGetDCInfoCtr2, type);
19413 : }
19414 :
19415 :
19416 : static PyTypeObject drsuapi_DsGetDCInfoCtr2_Type = {
19417 : PyVarObject_HEAD_INIT(NULL, 0)
19418 : .tp_name = "drsuapi.DsGetDCInfoCtr2",
19419 : .tp_getset = py_drsuapi_DsGetDCInfoCtr2_getsetters,
19420 : .tp_methods = NULL,
19421 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19422 : .tp_new = py_drsuapi_DsGetDCInfoCtr2_new,
19423 : };
19424 :
19425 :
19426 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_netbios_name(PyObject *obj, void *closure)
19427 : {
19428 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19429 : PyObject *py_netbios_name;
19430 0 : if (object->netbios_name == NULL) {
19431 0 : Py_RETURN_NONE;
19432 : }
19433 0 : if (object->netbios_name == NULL) {
19434 0 : py_netbios_name = Py_None;
19435 0 : Py_INCREF(py_netbios_name);
19436 : } else {
19437 0 : if (object->netbios_name == NULL) {
19438 0 : py_netbios_name = Py_None;
19439 0 : Py_INCREF(py_netbios_name);
19440 : } else {
19441 0 : py_netbios_name = PyUnicode_Decode(object->netbios_name, strlen(object->netbios_name), "utf-8", "ignore");
19442 : }
19443 : }
19444 0 : return py_netbios_name;
19445 : }
19446 :
19447 0 : static int py_drsuapi_DsGetDCInfo3_set_netbios_name(PyObject *py_obj, PyObject *value, void *closure)
19448 : {
19449 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19450 0 : if (value == NULL) {
19451 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->netbios_name");
19452 0 : return -1;
19453 : }
19454 0 : if (value == Py_None) {
19455 0 : object->netbios_name = NULL;
19456 : } else {
19457 0 : object->netbios_name = NULL;
19458 : {
19459 : const char *test_str;
19460 : const char *talloc_str;
19461 0 : PyObject *unicode = NULL;
19462 0 : if (PyUnicode_Check(value)) {
19463 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19464 0 : if (unicode == NULL) {
19465 0 : PyErr_NoMemory();
19466 0 : return -1;
19467 : }
19468 0 : test_str = PyBytes_AS_STRING(unicode);
19469 0 : } else if (PyBytes_Check(value)) {
19470 0 : test_str = PyBytes_AS_STRING(value);
19471 : } else {
19472 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19473 0 : return -1;
19474 : }
19475 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19476 0 : if (unicode != NULL) {
19477 0 : Py_DECREF(unicode);
19478 : }
19479 0 : if (talloc_str == NULL) {
19480 0 : PyErr_NoMemory();
19481 0 : return -1;
19482 : }
19483 0 : object->netbios_name = talloc_str;
19484 : }
19485 : }
19486 0 : return 0;
19487 : }
19488 :
19489 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_dns_name(PyObject *obj, void *closure)
19490 : {
19491 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19492 : PyObject *py_dns_name;
19493 0 : if (object->dns_name == NULL) {
19494 0 : Py_RETURN_NONE;
19495 : }
19496 0 : if (object->dns_name == NULL) {
19497 0 : py_dns_name = Py_None;
19498 0 : Py_INCREF(py_dns_name);
19499 : } else {
19500 0 : if (object->dns_name == NULL) {
19501 0 : py_dns_name = Py_None;
19502 0 : Py_INCREF(py_dns_name);
19503 : } else {
19504 0 : py_dns_name = PyUnicode_Decode(object->dns_name, strlen(object->dns_name), "utf-8", "ignore");
19505 : }
19506 : }
19507 0 : return py_dns_name;
19508 : }
19509 :
19510 0 : static int py_drsuapi_DsGetDCInfo3_set_dns_name(PyObject *py_obj, PyObject *value, void *closure)
19511 : {
19512 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19513 0 : if (value == NULL) {
19514 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dns_name");
19515 0 : return -1;
19516 : }
19517 0 : if (value == Py_None) {
19518 0 : object->dns_name = NULL;
19519 : } else {
19520 0 : object->dns_name = NULL;
19521 : {
19522 : const char *test_str;
19523 : const char *talloc_str;
19524 0 : PyObject *unicode = NULL;
19525 0 : if (PyUnicode_Check(value)) {
19526 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19527 0 : if (unicode == NULL) {
19528 0 : PyErr_NoMemory();
19529 0 : return -1;
19530 : }
19531 0 : test_str = PyBytes_AS_STRING(unicode);
19532 0 : } else if (PyBytes_Check(value)) {
19533 0 : test_str = PyBytes_AS_STRING(value);
19534 : } else {
19535 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19536 0 : return -1;
19537 : }
19538 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19539 0 : if (unicode != NULL) {
19540 0 : Py_DECREF(unicode);
19541 : }
19542 0 : if (talloc_str == NULL) {
19543 0 : PyErr_NoMemory();
19544 0 : return -1;
19545 : }
19546 0 : object->dns_name = talloc_str;
19547 : }
19548 : }
19549 0 : return 0;
19550 : }
19551 :
19552 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_site_name(PyObject *obj, void *closure)
19553 : {
19554 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19555 : PyObject *py_site_name;
19556 0 : if (object->site_name == NULL) {
19557 0 : Py_RETURN_NONE;
19558 : }
19559 0 : if (object->site_name == NULL) {
19560 0 : py_site_name = Py_None;
19561 0 : Py_INCREF(py_site_name);
19562 : } else {
19563 0 : if (object->site_name == NULL) {
19564 0 : py_site_name = Py_None;
19565 0 : Py_INCREF(py_site_name);
19566 : } else {
19567 0 : py_site_name = PyUnicode_Decode(object->site_name, strlen(object->site_name), "utf-8", "ignore");
19568 : }
19569 : }
19570 0 : return py_site_name;
19571 : }
19572 :
19573 0 : static int py_drsuapi_DsGetDCInfo3_set_site_name(PyObject *py_obj, PyObject *value, void *closure)
19574 : {
19575 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19576 0 : if (value == NULL) {
19577 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_name");
19578 0 : return -1;
19579 : }
19580 0 : if (value == Py_None) {
19581 0 : object->site_name = NULL;
19582 : } else {
19583 0 : object->site_name = NULL;
19584 : {
19585 : const char *test_str;
19586 : const char *talloc_str;
19587 0 : PyObject *unicode = NULL;
19588 0 : if (PyUnicode_Check(value)) {
19589 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19590 0 : if (unicode == NULL) {
19591 0 : PyErr_NoMemory();
19592 0 : return -1;
19593 : }
19594 0 : test_str = PyBytes_AS_STRING(unicode);
19595 0 : } else if (PyBytes_Check(value)) {
19596 0 : test_str = PyBytes_AS_STRING(value);
19597 : } else {
19598 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19599 0 : return -1;
19600 : }
19601 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19602 0 : if (unicode != NULL) {
19603 0 : Py_DECREF(unicode);
19604 : }
19605 0 : if (talloc_str == NULL) {
19606 0 : PyErr_NoMemory();
19607 0 : return -1;
19608 : }
19609 0 : object->site_name = talloc_str;
19610 : }
19611 : }
19612 0 : return 0;
19613 : }
19614 :
19615 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_site_dn(PyObject *obj, void *closure)
19616 : {
19617 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19618 : PyObject *py_site_dn;
19619 0 : if (object->site_dn == NULL) {
19620 0 : Py_RETURN_NONE;
19621 : }
19622 0 : if (object->site_dn == NULL) {
19623 0 : py_site_dn = Py_None;
19624 0 : Py_INCREF(py_site_dn);
19625 : } else {
19626 0 : if (object->site_dn == NULL) {
19627 0 : py_site_dn = Py_None;
19628 0 : Py_INCREF(py_site_dn);
19629 : } else {
19630 0 : py_site_dn = PyUnicode_Decode(object->site_dn, strlen(object->site_dn), "utf-8", "ignore");
19631 : }
19632 : }
19633 0 : return py_site_dn;
19634 : }
19635 :
19636 0 : static int py_drsuapi_DsGetDCInfo3_set_site_dn(PyObject *py_obj, PyObject *value, void *closure)
19637 : {
19638 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19639 0 : if (value == NULL) {
19640 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_dn");
19641 0 : return -1;
19642 : }
19643 0 : if (value == Py_None) {
19644 0 : object->site_dn = NULL;
19645 : } else {
19646 0 : object->site_dn = NULL;
19647 : {
19648 : const char *test_str;
19649 : const char *talloc_str;
19650 0 : PyObject *unicode = NULL;
19651 0 : if (PyUnicode_Check(value)) {
19652 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19653 0 : if (unicode == NULL) {
19654 0 : PyErr_NoMemory();
19655 0 : return -1;
19656 : }
19657 0 : test_str = PyBytes_AS_STRING(unicode);
19658 0 : } else if (PyBytes_Check(value)) {
19659 0 : test_str = PyBytes_AS_STRING(value);
19660 : } else {
19661 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19662 0 : return -1;
19663 : }
19664 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19665 0 : if (unicode != NULL) {
19666 0 : Py_DECREF(unicode);
19667 : }
19668 0 : if (talloc_str == NULL) {
19669 0 : PyErr_NoMemory();
19670 0 : return -1;
19671 : }
19672 0 : object->site_dn = talloc_str;
19673 : }
19674 : }
19675 0 : return 0;
19676 : }
19677 :
19678 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_computer_dn(PyObject *obj, void *closure)
19679 : {
19680 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19681 : PyObject *py_computer_dn;
19682 0 : if (object->computer_dn == NULL) {
19683 0 : Py_RETURN_NONE;
19684 : }
19685 0 : if (object->computer_dn == NULL) {
19686 0 : py_computer_dn = Py_None;
19687 0 : Py_INCREF(py_computer_dn);
19688 : } else {
19689 0 : if (object->computer_dn == NULL) {
19690 0 : py_computer_dn = Py_None;
19691 0 : Py_INCREF(py_computer_dn);
19692 : } else {
19693 0 : py_computer_dn = PyUnicode_Decode(object->computer_dn, strlen(object->computer_dn), "utf-8", "ignore");
19694 : }
19695 : }
19696 0 : return py_computer_dn;
19697 : }
19698 :
19699 0 : static int py_drsuapi_DsGetDCInfo3_set_computer_dn(PyObject *py_obj, PyObject *value, void *closure)
19700 : {
19701 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19702 0 : if (value == NULL) {
19703 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_dn");
19704 0 : return -1;
19705 : }
19706 0 : if (value == Py_None) {
19707 0 : object->computer_dn = NULL;
19708 : } else {
19709 0 : object->computer_dn = NULL;
19710 : {
19711 : const char *test_str;
19712 : const char *talloc_str;
19713 0 : PyObject *unicode = NULL;
19714 0 : if (PyUnicode_Check(value)) {
19715 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19716 0 : if (unicode == NULL) {
19717 0 : PyErr_NoMemory();
19718 0 : return -1;
19719 : }
19720 0 : test_str = PyBytes_AS_STRING(unicode);
19721 0 : } else if (PyBytes_Check(value)) {
19722 0 : test_str = PyBytes_AS_STRING(value);
19723 : } else {
19724 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19725 0 : return -1;
19726 : }
19727 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19728 0 : if (unicode != NULL) {
19729 0 : Py_DECREF(unicode);
19730 : }
19731 0 : if (talloc_str == NULL) {
19732 0 : PyErr_NoMemory();
19733 0 : return -1;
19734 : }
19735 0 : object->computer_dn = talloc_str;
19736 : }
19737 : }
19738 0 : return 0;
19739 : }
19740 :
19741 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_server_dn(PyObject *obj, void *closure)
19742 : {
19743 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19744 : PyObject *py_server_dn;
19745 0 : if (object->server_dn == NULL) {
19746 0 : Py_RETURN_NONE;
19747 : }
19748 0 : if (object->server_dn == NULL) {
19749 0 : py_server_dn = Py_None;
19750 0 : Py_INCREF(py_server_dn);
19751 : } else {
19752 0 : if (object->server_dn == NULL) {
19753 0 : py_server_dn = Py_None;
19754 0 : Py_INCREF(py_server_dn);
19755 : } else {
19756 0 : py_server_dn = PyUnicode_Decode(object->server_dn, strlen(object->server_dn), "utf-8", "ignore");
19757 : }
19758 : }
19759 0 : return py_server_dn;
19760 : }
19761 :
19762 0 : static int py_drsuapi_DsGetDCInfo3_set_server_dn(PyObject *py_obj, PyObject *value, void *closure)
19763 : {
19764 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19765 0 : if (value == NULL) {
19766 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_dn");
19767 0 : return -1;
19768 : }
19769 0 : if (value == Py_None) {
19770 0 : object->server_dn = NULL;
19771 : } else {
19772 0 : object->server_dn = NULL;
19773 : {
19774 : const char *test_str;
19775 : const char *talloc_str;
19776 0 : PyObject *unicode = NULL;
19777 0 : if (PyUnicode_Check(value)) {
19778 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19779 0 : if (unicode == NULL) {
19780 0 : PyErr_NoMemory();
19781 0 : return -1;
19782 : }
19783 0 : test_str = PyBytes_AS_STRING(unicode);
19784 0 : } else if (PyBytes_Check(value)) {
19785 0 : test_str = PyBytes_AS_STRING(value);
19786 : } else {
19787 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19788 0 : return -1;
19789 : }
19790 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19791 0 : if (unicode != NULL) {
19792 0 : Py_DECREF(unicode);
19793 : }
19794 0 : if (talloc_str == NULL) {
19795 0 : PyErr_NoMemory();
19796 0 : return -1;
19797 : }
19798 0 : object->server_dn = talloc_str;
19799 : }
19800 : }
19801 0 : return 0;
19802 : }
19803 :
19804 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_ntds_dn(PyObject *obj, void *closure)
19805 : {
19806 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19807 : PyObject *py_ntds_dn;
19808 0 : if (object->ntds_dn == NULL) {
19809 0 : Py_RETURN_NONE;
19810 : }
19811 0 : if (object->ntds_dn == NULL) {
19812 0 : py_ntds_dn = Py_None;
19813 0 : Py_INCREF(py_ntds_dn);
19814 : } else {
19815 0 : if (object->ntds_dn == NULL) {
19816 0 : py_ntds_dn = Py_None;
19817 0 : Py_INCREF(py_ntds_dn);
19818 : } else {
19819 0 : py_ntds_dn = PyUnicode_Decode(object->ntds_dn, strlen(object->ntds_dn), "utf-8", "ignore");
19820 : }
19821 : }
19822 0 : return py_ntds_dn;
19823 : }
19824 :
19825 0 : static int py_drsuapi_DsGetDCInfo3_set_ntds_dn(PyObject *py_obj, PyObject *value, void *closure)
19826 : {
19827 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19828 0 : if (value == NULL) {
19829 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntds_dn");
19830 0 : return -1;
19831 : }
19832 0 : if (value == Py_None) {
19833 0 : object->ntds_dn = NULL;
19834 : } else {
19835 0 : object->ntds_dn = NULL;
19836 : {
19837 : const char *test_str;
19838 : const char *talloc_str;
19839 0 : PyObject *unicode = NULL;
19840 0 : if (PyUnicode_Check(value)) {
19841 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19842 0 : if (unicode == NULL) {
19843 0 : PyErr_NoMemory();
19844 0 : return -1;
19845 : }
19846 0 : test_str = PyBytes_AS_STRING(unicode);
19847 0 : } else if (PyBytes_Check(value)) {
19848 0 : test_str = PyBytes_AS_STRING(value);
19849 : } else {
19850 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19851 0 : return -1;
19852 : }
19853 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19854 0 : if (unicode != NULL) {
19855 0 : Py_DECREF(unicode);
19856 : }
19857 0 : if (talloc_str == NULL) {
19858 0 : PyErr_NoMemory();
19859 0 : return -1;
19860 : }
19861 0 : object->ntds_dn = talloc_str;
19862 : }
19863 : }
19864 0 : return 0;
19865 : }
19866 :
19867 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_is_pdc(PyObject *obj, void *closure)
19868 : {
19869 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19870 : PyObject *py_is_pdc;
19871 0 : py_is_pdc = PyLong_FromUnsignedLongLong((uint32_t)object->is_pdc);
19872 0 : return py_is_pdc;
19873 : }
19874 :
19875 0 : static int py_drsuapi_DsGetDCInfo3_set_is_pdc(PyObject *py_obj, PyObject *value, void *closure)
19876 : {
19877 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19878 0 : if (value == NULL) {
19879 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_pdc");
19880 0 : return -1;
19881 : }
19882 : {
19883 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_pdc));
19884 0 : if (PyLong_Check(value)) {
19885 : unsigned long long test_var;
19886 0 : test_var = PyLong_AsUnsignedLongLong(value);
19887 0 : if (PyErr_Occurred() != NULL) {
19888 0 : return -1;
19889 : }
19890 0 : if (test_var > uint_max) {
19891 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19892 : PyLong_Type.tp_name, uint_max, test_var);
19893 0 : return -1;
19894 : }
19895 0 : object->is_pdc = test_var;
19896 : } else {
19897 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19898 : PyLong_Type.tp_name);
19899 0 : return -1;
19900 : }
19901 : }
19902 0 : return 0;
19903 : }
19904 :
19905 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_is_enabled(PyObject *obj, void *closure)
19906 : {
19907 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19908 : PyObject *py_is_enabled;
19909 0 : py_is_enabled = PyLong_FromUnsignedLongLong((uint32_t)object->is_enabled);
19910 0 : return py_is_enabled;
19911 : }
19912 :
19913 0 : static int py_drsuapi_DsGetDCInfo3_set_is_enabled(PyObject *py_obj, PyObject *value, void *closure)
19914 : {
19915 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19916 0 : if (value == NULL) {
19917 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_enabled");
19918 0 : return -1;
19919 : }
19920 : {
19921 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_enabled));
19922 0 : if (PyLong_Check(value)) {
19923 : unsigned long long test_var;
19924 0 : test_var = PyLong_AsUnsignedLongLong(value);
19925 0 : if (PyErr_Occurred() != NULL) {
19926 0 : return -1;
19927 : }
19928 0 : if (test_var > uint_max) {
19929 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19930 : PyLong_Type.tp_name, uint_max, test_var);
19931 0 : return -1;
19932 : }
19933 0 : object->is_enabled = test_var;
19934 : } else {
19935 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19936 : PyLong_Type.tp_name);
19937 0 : return -1;
19938 : }
19939 : }
19940 0 : return 0;
19941 : }
19942 :
19943 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_is_gc(PyObject *obj, void *closure)
19944 : {
19945 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19946 : PyObject *py_is_gc;
19947 0 : py_is_gc = PyLong_FromUnsignedLongLong((uint32_t)object->is_gc);
19948 0 : return py_is_gc;
19949 : }
19950 :
19951 0 : static int py_drsuapi_DsGetDCInfo3_set_is_gc(PyObject *py_obj, PyObject *value, void *closure)
19952 : {
19953 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19954 0 : if (value == NULL) {
19955 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_gc");
19956 0 : return -1;
19957 : }
19958 : {
19959 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_gc));
19960 0 : if (PyLong_Check(value)) {
19961 : unsigned long long test_var;
19962 0 : test_var = PyLong_AsUnsignedLongLong(value);
19963 0 : if (PyErr_Occurred() != NULL) {
19964 0 : return -1;
19965 : }
19966 0 : if (test_var > uint_max) {
19967 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19968 : PyLong_Type.tp_name, uint_max, test_var);
19969 0 : return -1;
19970 : }
19971 0 : object->is_gc = test_var;
19972 : } else {
19973 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19974 : PyLong_Type.tp_name);
19975 0 : return -1;
19976 : }
19977 : }
19978 0 : return 0;
19979 : }
19980 :
19981 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_is_rodc(PyObject *obj, void *closure)
19982 : {
19983 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
19984 : PyObject *py_is_rodc;
19985 0 : py_is_rodc = PyLong_FromUnsignedLongLong((uint32_t)object->is_rodc);
19986 0 : return py_is_rodc;
19987 : }
19988 :
19989 0 : static int py_drsuapi_DsGetDCInfo3_set_is_rodc(PyObject *py_obj, PyObject *value, void *closure)
19990 : {
19991 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
19992 0 : if (value == NULL) {
19993 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_rodc");
19994 0 : return -1;
19995 : }
19996 : {
19997 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_rodc));
19998 0 : if (PyLong_Check(value)) {
19999 : unsigned long long test_var;
20000 0 : test_var = PyLong_AsUnsignedLongLong(value);
20001 0 : if (PyErr_Occurred() != NULL) {
20002 0 : return -1;
20003 : }
20004 0 : if (test_var > uint_max) {
20005 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20006 : PyLong_Type.tp_name, uint_max, test_var);
20007 0 : return -1;
20008 : }
20009 0 : object->is_rodc = test_var;
20010 : } else {
20011 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20012 : PyLong_Type.tp_name);
20013 0 : return -1;
20014 : }
20015 : }
20016 0 : return 0;
20017 : }
20018 :
20019 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_site_guid(PyObject *obj, void *closure)
20020 : {
20021 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
20022 : PyObject *py_site_guid;
20023 0 : py_site_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->site_guid);
20024 0 : return py_site_guid;
20025 : }
20026 :
20027 0 : static int py_drsuapi_DsGetDCInfo3_set_site_guid(PyObject *py_obj, PyObject *value, void *closure)
20028 : {
20029 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
20030 0 : if (value == NULL) {
20031 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_guid");
20032 0 : return -1;
20033 : }
20034 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
20035 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
20036 0 : PyErr_NoMemory();
20037 0 : return -1;
20038 : }
20039 0 : object->site_guid = *(struct GUID *)pytalloc_get_ptr(value);
20040 0 : return 0;
20041 : }
20042 :
20043 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_computer_guid(PyObject *obj, void *closure)
20044 : {
20045 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
20046 : PyObject *py_computer_guid;
20047 0 : py_computer_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->computer_guid);
20048 0 : return py_computer_guid;
20049 : }
20050 :
20051 0 : static int py_drsuapi_DsGetDCInfo3_set_computer_guid(PyObject *py_obj, PyObject *value, void *closure)
20052 : {
20053 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
20054 0 : if (value == NULL) {
20055 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->computer_guid");
20056 0 : return -1;
20057 : }
20058 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
20059 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
20060 0 : PyErr_NoMemory();
20061 0 : return -1;
20062 : }
20063 0 : object->computer_guid = *(struct GUID *)pytalloc_get_ptr(value);
20064 0 : return 0;
20065 : }
20066 :
20067 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_server_guid(PyObject *obj, void *closure)
20068 : {
20069 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
20070 : PyObject *py_server_guid;
20071 0 : py_server_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->server_guid);
20072 0 : return py_server_guid;
20073 : }
20074 :
20075 0 : static int py_drsuapi_DsGetDCInfo3_set_server_guid(PyObject *py_obj, PyObject *value, void *closure)
20076 : {
20077 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
20078 0 : if (value == NULL) {
20079 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->server_guid");
20080 0 : return -1;
20081 : }
20082 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
20083 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
20084 0 : PyErr_NoMemory();
20085 0 : return -1;
20086 : }
20087 0 : object->server_guid = *(struct GUID *)pytalloc_get_ptr(value);
20088 0 : return 0;
20089 : }
20090 :
20091 0 : static PyObject *py_drsuapi_DsGetDCInfo3_get_ntds_guid(PyObject *obj, void *closure)
20092 : {
20093 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(obj);
20094 : PyObject *py_ntds_guid;
20095 0 : py_ntds_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->ntds_guid);
20096 0 : return py_ntds_guid;
20097 : }
20098 :
20099 0 : static int py_drsuapi_DsGetDCInfo3_set_ntds_guid(PyObject *py_obj, PyObject *value, void *closure)
20100 : {
20101 0 : struct drsuapi_DsGetDCInfo3 *object = (struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(py_obj);
20102 0 : if (value == NULL) {
20103 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ntds_guid");
20104 0 : return -1;
20105 : }
20106 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
20107 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
20108 0 : PyErr_NoMemory();
20109 0 : return -1;
20110 : }
20111 0 : object->ntds_guid = *(struct GUID *)pytalloc_get_ptr(value);
20112 0 : return 0;
20113 : }
20114 :
20115 : static PyGetSetDef py_drsuapi_DsGetDCInfo3_getsetters[] = {
20116 : {
20117 : .name = discard_const_p(char, "netbios_name"),
20118 : .get = py_drsuapi_DsGetDCInfo3_get_netbios_name,
20119 : .set = py_drsuapi_DsGetDCInfo3_set_netbios_name,
20120 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
20121 : },
20122 : {
20123 : .name = discard_const_p(char, "dns_name"),
20124 : .get = py_drsuapi_DsGetDCInfo3_get_dns_name,
20125 : .set = py_drsuapi_DsGetDCInfo3_set_dns_name,
20126 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
20127 : },
20128 : {
20129 : .name = discard_const_p(char, "site_name"),
20130 : .get = py_drsuapi_DsGetDCInfo3_get_site_name,
20131 : .set = py_drsuapi_DsGetDCInfo3_set_site_name,
20132 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
20133 : },
20134 : {
20135 : .name = discard_const_p(char, "site_dn"),
20136 : .get = py_drsuapi_DsGetDCInfo3_get_site_dn,
20137 : .set = py_drsuapi_DsGetDCInfo3_set_site_dn,
20138 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
20139 : },
20140 : {
20141 : .name = discard_const_p(char, "computer_dn"),
20142 : .get = py_drsuapi_DsGetDCInfo3_get_computer_dn,
20143 : .set = py_drsuapi_DsGetDCInfo3_set_computer_dn,
20144 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
20145 : },
20146 : {
20147 : .name = discard_const_p(char, "server_dn"),
20148 : .get = py_drsuapi_DsGetDCInfo3_get_server_dn,
20149 : .set = py_drsuapi_DsGetDCInfo3_set_server_dn,
20150 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
20151 : },
20152 : {
20153 : .name = discard_const_p(char, "ntds_dn"),
20154 : .get = py_drsuapi_DsGetDCInfo3_get_ntds_dn,
20155 : .set = py_drsuapi_DsGetDCInfo3_set_ntds_dn,
20156 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
20157 : },
20158 : {
20159 : .name = discard_const_p(char, "is_pdc"),
20160 : .get = py_drsuapi_DsGetDCInfo3_get_is_pdc,
20161 : .set = py_drsuapi_DsGetDCInfo3_set_is_pdc,
20162 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20163 : },
20164 : {
20165 : .name = discard_const_p(char, "is_enabled"),
20166 : .get = py_drsuapi_DsGetDCInfo3_get_is_enabled,
20167 : .set = py_drsuapi_DsGetDCInfo3_set_is_enabled,
20168 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20169 : },
20170 : {
20171 : .name = discard_const_p(char, "is_gc"),
20172 : .get = py_drsuapi_DsGetDCInfo3_get_is_gc,
20173 : .set = py_drsuapi_DsGetDCInfo3_set_is_gc,
20174 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20175 : },
20176 : {
20177 : .name = discard_const_p(char, "is_rodc"),
20178 : .get = py_drsuapi_DsGetDCInfo3_get_is_rodc,
20179 : .set = py_drsuapi_DsGetDCInfo3_set_is_rodc,
20180 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20181 : },
20182 : {
20183 : .name = discard_const_p(char, "site_guid"),
20184 : .get = py_drsuapi_DsGetDCInfo3_get_site_guid,
20185 : .set = py_drsuapi_DsGetDCInfo3_set_site_guid,
20186 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
20187 : },
20188 : {
20189 : .name = discard_const_p(char, "computer_guid"),
20190 : .get = py_drsuapi_DsGetDCInfo3_get_computer_guid,
20191 : .set = py_drsuapi_DsGetDCInfo3_set_computer_guid,
20192 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
20193 : },
20194 : {
20195 : .name = discard_const_p(char, "server_guid"),
20196 : .get = py_drsuapi_DsGetDCInfo3_get_server_guid,
20197 : .set = py_drsuapi_DsGetDCInfo3_set_server_guid,
20198 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
20199 : },
20200 : {
20201 : .name = discard_const_p(char, "ntds_guid"),
20202 : .get = py_drsuapi_DsGetDCInfo3_get_ntds_guid,
20203 : .set = py_drsuapi_DsGetDCInfo3_set_ntds_guid,
20204 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
20205 : },
20206 : { .name = NULL }
20207 : };
20208 :
20209 0 : static PyObject *py_drsuapi_DsGetDCInfo3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
20210 : {
20211 0 : return pytalloc_new(struct drsuapi_DsGetDCInfo3, type);
20212 : }
20213 :
20214 :
20215 : static PyTypeObject drsuapi_DsGetDCInfo3_Type = {
20216 : PyVarObject_HEAD_INIT(NULL, 0)
20217 : .tp_name = "drsuapi.DsGetDCInfo3",
20218 : .tp_getset = py_drsuapi_DsGetDCInfo3_getsetters,
20219 : .tp_methods = NULL,
20220 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
20221 : .tp_new = py_drsuapi_DsGetDCInfo3_new,
20222 : };
20223 :
20224 :
20225 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr3_get_count(PyObject *obj, void *closure)
20226 : {
20227 0 : struct drsuapi_DsGetDCInfoCtr3 *object = (struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(obj);
20228 : PyObject *py_count;
20229 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
20230 0 : return py_count;
20231 : }
20232 :
20233 0 : static int py_drsuapi_DsGetDCInfoCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
20234 : {
20235 0 : struct drsuapi_DsGetDCInfoCtr3 *object = (struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(py_obj);
20236 0 : if (value == NULL) {
20237 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
20238 0 : return -1;
20239 : }
20240 : {
20241 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
20242 0 : if (PyLong_Check(value)) {
20243 : unsigned long long test_var;
20244 0 : test_var = PyLong_AsUnsignedLongLong(value);
20245 0 : if (PyErr_Occurred() != NULL) {
20246 0 : return -1;
20247 : }
20248 0 : if (test_var > uint_max) {
20249 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20250 : PyLong_Type.tp_name, uint_max, test_var);
20251 0 : return -1;
20252 : }
20253 0 : object->count = test_var;
20254 : } else {
20255 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20256 : PyLong_Type.tp_name);
20257 0 : return -1;
20258 : }
20259 : }
20260 0 : return 0;
20261 : }
20262 :
20263 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr3_get_array(PyObject *obj, void *closure)
20264 : {
20265 0 : struct drsuapi_DsGetDCInfoCtr3 *object = (struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(obj);
20266 : PyObject *py_array;
20267 0 : if (object->array == NULL) {
20268 0 : Py_RETURN_NONE;
20269 : }
20270 0 : if (object->array == NULL) {
20271 0 : py_array = Py_None;
20272 0 : Py_INCREF(py_array);
20273 : } else {
20274 0 : py_array = PyList_New(object->count);
20275 0 : if (py_array == NULL) {
20276 0 : return NULL;
20277 : }
20278 : {
20279 : int array_cntr_1;
20280 0 : for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
20281 : PyObject *py_array_1;
20282 0 : py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCInfo3_Type, object->array, &object->array[array_cntr_1]);
20283 0 : PyList_SetItem(py_array, array_cntr_1, py_array_1);
20284 : }
20285 : }
20286 : }
20287 0 : return py_array;
20288 : }
20289 :
20290 0 : static int py_drsuapi_DsGetDCInfoCtr3_set_array(PyObject *py_obj, PyObject *value, void *closure)
20291 : {
20292 0 : struct drsuapi_DsGetDCInfoCtr3 *object = (struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(py_obj);
20293 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
20294 0 : if (value == NULL) {
20295 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
20296 0 : return -1;
20297 : }
20298 0 : if (value == Py_None) {
20299 0 : object->array = NULL;
20300 : } else {
20301 0 : object->array = NULL;
20302 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
20303 : {
20304 : int array_cntr_1;
20305 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
20306 0 : if (!object->array) { return -1;; }
20307 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
20308 0 : for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
20309 0 : if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
20310 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
20311 0 : return -1;
20312 : }
20313 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCInfo3_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
20314 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
20315 0 : PyErr_NoMemory();
20316 0 : return -1;
20317 : }
20318 0 : object->array[array_cntr_1] = *(struct drsuapi_DsGetDCInfo3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
20319 : }
20320 : }
20321 : }
20322 0 : return 0;
20323 : }
20324 :
20325 : static PyGetSetDef py_drsuapi_DsGetDCInfoCtr3_getsetters[] = {
20326 : {
20327 : .name = discard_const_p(char, "count"),
20328 : .get = py_drsuapi_DsGetDCInfoCtr3_get_count,
20329 : .set = py_drsuapi_DsGetDCInfoCtr3_set_count,
20330 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20331 : },
20332 : {
20333 : .name = discard_const_p(char, "array"),
20334 : .get = py_drsuapi_DsGetDCInfoCtr3_get_array,
20335 : .set = py_drsuapi_DsGetDCInfoCtr3_set_array,
20336 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfo3")
20337 : },
20338 : { .name = NULL }
20339 : };
20340 :
20341 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
20342 : {
20343 0 : return pytalloc_new(struct drsuapi_DsGetDCInfoCtr3, type);
20344 : }
20345 :
20346 :
20347 : static PyTypeObject drsuapi_DsGetDCInfoCtr3_Type = {
20348 : PyVarObject_HEAD_INIT(NULL, 0)
20349 : .tp_name = "drsuapi.DsGetDCInfoCtr3",
20350 : .tp_getset = py_drsuapi_DsGetDCInfoCtr3_getsetters,
20351 : .tp_methods = NULL,
20352 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
20353 : .tp_new = py_drsuapi_DsGetDCInfoCtr3_new,
20354 : };
20355 :
20356 :
20357 0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_client_ip_address(PyObject *obj, void *closure)
20358 : {
20359 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
20360 : PyObject *py_client_ip_address;
20361 0 : py_client_ip_address = PyString_FromStringOrNULL(object->client_ip_address);
20362 0 : return py_client_ip_address;
20363 : }
20364 :
20365 0 : static int py_drsuapi_DsGetDCConnection01_set_client_ip_address(PyObject *py_obj, PyObject *value, void *closure)
20366 : {
20367 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
20368 0 : if (value == NULL) {
20369 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_ip_address");
20370 0 : return -1;
20371 : }
20372 : {
20373 : const char *test_str;
20374 : const char *talloc_str;
20375 0 : PyObject *unicode = NULL;
20376 0 : if (PyUnicode_Check(value)) {
20377 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20378 0 : if (unicode == NULL) {
20379 0 : PyErr_NoMemory();
20380 0 : return -1;
20381 : }
20382 0 : test_str = PyBytes_AS_STRING(unicode);
20383 0 : } else if (PyBytes_Check(value)) {
20384 0 : test_str = PyBytes_AS_STRING(value);
20385 : } else {
20386 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20387 0 : return -1;
20388 : }
20389 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20390 0 : if (unicode != NULL) {
20391 0 : Py_DECREF(unicode);
20392 : }
20393 0 : if (talloc_str == NULL) {
20394 0 : PyErr_NoMemory();
20395 0 : return -1;
20396 : }
20397 0 : object->client_ip_address = talloc_str;
20398 : }
20399 0 : return 0;
20400 : }
20401 :
20402 0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown2(PyObject *obj, void *closure)
20403 : {
20404 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
20405 : PyObject *py_unknown2;
20406 0 : py_unknown2 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown2);
20407 0 : return py_unknown2;
20408 : }
20409 :
20410 0 : static int py_drsuapi_DsGetDCConnection01_set_unknown2(PyObject *py_obj, PyObject *value, void *closure)
20411 : {
20412 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
20413 0 : if (value == NULL) {
20414 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown2");
20415 0 : return -1;
20416 : }
20417 : {
20418 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown2));
20419 0 : if (PyLong_Check(value)) {
20420 : unsigned long long test_var;
20421 0 : test_var = PyLong_AsUnsignedLongLong(value);
20422 0 : if (PyErr_Occurred() != NULL) {
20423 0 : return -1;
20424 : }
20425 0 : if (test_var > uint_max) {
20426 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20427 : PyLong_Type.tp_name, uint_max, test_var);
20428 0 : return -1;
20429 : }
20430 0 : object->unknown2 = test_var;
20431 : } else {
20432 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20433 : PyLong_Type.tp_name);
20434 0 : return -1;
20435 : }
20436 : }
20437 0 : return 0;
20438 : }
20439 :
20440 0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_connection_time(PyObject *obj, void *closure)
20441 : {
20442 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
20443 : PyObject *py_connection_time;
20444 0 : py_connection_time = PyLong_FromUnsignedLongLong((uint32_t)object->connection_time);
20445 0 : return py_connection_time;
20446 : }
20447 :
20448 0 : static int py_drsuapi_DsGetDCConnection01_set_connection_time(PyObject *py_obj, PyObject *value, void *closure)
20449 : {
20450 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
20451 0 : if (value == NULL) {
20452 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->connection_time");
20453 0 : return -1;
20454 : }
20455 : {
20456 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->connection_time));
20457 0 : if (PyLong_Check(value)) {
20458 : unsigned long long test_var;
20459 0 : test_var = PyLong_AsUnsignedLongLong(value);
20460 0 : if (PyErr_Occurred() != NULL) {
20461 0 : return -1;
20462 : }
20463 0 : if (test_var > uint_max) {
20464 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20465 : PyLong_Type.tp_name, uint_max, test_var);
20466 0 : return -1;
20467 : }
20468 0 : object->connection_time = test_var;
20469 : } else {
20470 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20471 : PyLong_Type.tp_name);
20472 0 : return -1;
20473 : }
20474 : }
20475 0 : return 0;
20476 : }
20477 :
20478 0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown4(PyObject *obj, void *closure)
20479 : {
20480 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
20481 : PyObject *py_unknown4;
20482 0 : py_unknown4 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown4);
20483 0 : return py_unknown4;
20484 : }
20485 :
20486 0 : static int py_drsuapi_DsGetDCConnection01_set_unknown4(PyObject *py_obj, PyObject *value, void *closure)
20487 : {
20488 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
20489 0 : if (value == NULL) {
20490 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown4");
20491 0 : return -1;
20492 : }
20493 : {
20494 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown4));
20495 0 : if (PyLong_Check(value)) {
20496 : unsigned long long test_var;
20497 0 : test_var = PyLong_AsUnsignedLongLong(value);
20498 0 : if (PyErr_Occurred() != NULL) {
20499 0 : return -1;
20500 : }
20501 0 : if (test_var > uint_max) {
20502 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20503 : PyLong_Type.tp_name, uint_max, test_var);
20504 0 : return -1;
20505 : }
20506 0 : object->unknown4 = test_var;
20507 : } else {
20508 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20509 : PyLong_Type.tp_name);
20510 0 : return -1;
20511 : }
20512 : }
20513 0 : return 0;
20514 : }
20515 :
20516 0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown5(PyObject *obj, void *closure)
20517 : {
20518 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
20519 : PyObject *py_unknown5;
20520 0 : py_unknown5 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown5);
20521 0 : return py_unknown5;
20522 : }
20523 :
20524 0 : static int py_drsuapi_DsGetDCConnection01_set_unknown5(PyObject *py_obj, PyObject *value, void *closure)
20525 : {
20526 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
20527 0 : if (value == NULL) {
20528 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown5");
20529 0 : return -1;
20530 : }
20531 : {
20532 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown5));
20533 0 : if (PyLong_Check(value)) {
20534 : unsigned long long test_var;
20535 0 : test_var = PyLong_AsUnsignedLongLong(value);
20536 0 : if (PyErr_Occurred() != NULL) {
20537 0 : return -1;
20538 : }
20539 0 : if (test_var > uint_max) {
20540 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20541 : PyLong_Type.tp_name, uint_max, test_var);
20542 0 : return -1;
20543 : }
20544 0 : object->unknown5 = test_var;
20545 : } else {
20546 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20547 : PyLong_Type.tp_name);
20548 0 : return -1;
20549 : }
20550 : }
20551 0 : return 0;
20552 : }
20553 :
20554 0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_unknown6(PyObject *obj, void *closure)
20555 : {
20556 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
20557 : PyObject *py_unknown6;
20558 0 : py_unknown6 = PyLong_FromUnsignedLongLong((uint32_t)object->unknown6);
20559 0 : return py_unknown6;
20560 : }
20561 :
20562 0 : static int py_drsuapi_DsGetDCConnection01_set_unknown6(PyObject *py_obj, PyObject *value, void *closure)
20563 : {
20564 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
20565 0 : if (value == NULL) {
20566 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unknown6");
20567 0 : return -1;
20568 : }
20569 : {
20570 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unknown6));
20571 0 : if (PyLong_Check(value)) {
20572 : unsigned long long test_var;
20573 0 : test_var = PyLong_AsUnsignedLongLong(value);
20574 0 : if (PyErr_Occurred() != NULL) {
20575 0 : return -1;
20576 : }
20577 0 : if (test_var > uint_max) {
20578 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20579 : PyLong_Type.tp_name, uint_max, test_var);
20580 0 : return -1;
20581 : }
20582 0 : object->unknown6 = test_var;
20583 : } else {
20584 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20585 : PyLong_Type.tp_name);
20586 0 : return -1;
20587 : }
20588 : }
20589 0 : return 0;
20590 : }
20591 :
20592 0 : static PyObject *py_drsuapi_DsGetDCConnection01_get_client_account(PyObject *obj, void *closure)
20593 : {
20594 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(obj);
20595 : PyObject *py_client_account;
20596 0 : if (object->client_account == NULL) {
20597 0 : Py_RETURN_NONE;
20598 : }
20599 0 : if (object->client_account == NULL) {
20600 0 : py_client_account = Py_None;
20601 0 : Py_INCREF(py_client_account);
20602 : } else {
20603 0 : if (object->client_account == NULL) {
20604 0 : py_client_account = Py_None;
20605 0 : Py_INCREF(py_client_account);
20606 : } else {
20607 0 : py_client_account = PyUnicode_Decode(object->client_account, strlen(object->client_account), "utf-8", "ignore");
20608 : }
20609 : }
20610 0 : return py_client_account;
20611 : }
20612 :
20613 0 : static int py_drsuapi_DsGetDCConnection01_set_client_account(PyObject *py_obj, PyObject *value, void *closure)
20614 : {
20615 0 : struct drsuapi_DsGetDCConnection01 *object = (struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(py_obj);
20616 0 : if (value == NULL) {
20617 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_account");
20618 0 : return -1;
20619 : }
20620 0 : if (value == Py_None) {
20621 0 : object->client_account = NULL;
20622 : } else {
20623 0 : object->client_account = NULL;
20624 : {
20625 : const char *test_str;
20626 : const char *talloc_str;
20627 0 : PyObject *unicode = NULL;
20628 0 : if (PyUnicode_Check(value)) {
20629 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20630 0 : if (unicode == NULL) {
20631 0 : PyErr_NoMemory();
20632 0 : return -1;
20633 : }
20634 0 : test_str = PyBytes_AS_STRING(unicode);
20635 0 : } else if (PyBytes_Check(value)) {
20636 0 : test_str = PyBytes_AS_STRING(value);
20637 : } else {
20638 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20639 0 : return -1;
20640 : }
20641 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20642 0 : if (unicode != NULL) {
20643 0 : Py_DECREF(unicode);
20644 : }
20645 0 : if (talloc_str == NULL) {
20646 0 : PyErr_NoMemory();
20647 0 : return -1;
20648 : }
20649 0 : object->client_account = talloc_str;
20650 : }
20651 : }
20652 0 : return 0;
20653 : }
20654 :
20655 : static PyGetSetDef py_drsuapi_DsGetDCConnection01_getsetters[] = {
20656 : {
20657 : .name = discard_const_p(char, "client_ip_address"),
20658 : .get = py_drsuapi_DsGetDCConnection01_get_client_ip_address,
20659 : .set = py_drsuapi_DsGetDCConnection01_set_client_ip_address,
20660 : .doc = discard_const_p(char, "PIDL-generated element of base type ipv4address")
20661 : },
20662 : {
20663 : .name = discard_const_p(char, "unknown2"),
20664 : .get = py_drsuapi_DsGetDCConnection01_get_unknown2,
20665 : .set = py_drsuapi_DsGetDCConnection01_set_unknown2,
20666 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20667 : },
20668 : {
20669 : .name = discard_const_p(char, "connection_time"),
20670 : .get = py_drsuapi_DsGetDCConnection01_get_connection_time,
20671 : .set = py_drsuapi_DsGetDCConnection01_set_connection_time,
20672 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20673 : },
20674 : {
20675 : .name = discard_const_p(char, "unknown4"),
20676 : .get = py_drsuapi_DsGetDCConnection01_get_unknown4,
20677 : .set = py_drsuapi_DsGetDCConnection01_set_unknown4,
20678 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20679 : },
20680 : {
20681 : .name = discard_const_p(char, "unknown5"),
20682 : .get = py_drsuapi_DsGetDCConnection01_get_unknown5,
20683 : .set = py_drsuapi_DsGetDCConnection01_set_unknown5,
20684 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20685 : },
20686 : {
20687 : .name = discard_const_p(char, "unknown6"),
20688 : .get = py_drsuapi_DsGetDCConnection01_get_unknown6,
20689 : .set = py_drsuapi_DsGetDCConnection01_set_unknown6,
20690 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20691 : },
20692 : {
20693 : .name = discard_const_p(char, "client_account"),
20694 : .get = py_drsuapi_DsGetDCConnection01_get_client_account,
20695 : .set = py_drsuapi_DsGetDCConnection01_set_client_account,
20696 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
20697 : },
20698 : { .name = NULL }
20699 : };
20700 :
20701 0 : static PyObject *py_drsuapi_DsGetDCConnection01_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
20702 : {
20703 0 : return pytalloc_new(struct drsuapi_DsGetDCConnection01, type);
20704 : }
20705 :
20706 :
20707 : static PyTypeObject drsuapi_DsGetDCConnection01_Type = {
20708 : PyVarObject_HEAD_INIT(NULL, 0)
20709 : .tp_name = "drsuapi.DsGetDCConnection01",
20710 : .tp_getset = py_drsuapi_DsGetDCConnection01_getsetters,
20711 : .tp_methods = NULL,
20712 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
20713 : .tp_new = py_drsuapi_DsGetDCConnection01_new,
20714 : };
20715 :
20716 :
20717 0 : static PyObject *py_drsuapi_DsGetDCConnectionCtr01_get_count(PyObject *obj, void *closure)
20718 : {
20719 0 : struct drsuapi_DsGetDCConnectionCtr01 *object = (struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(obj);
20720 : PyObject *py_count;
20721 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
20722 0 : return py_count;
20723 : }
20724 :
20725 0 : static int py_drsuapi_DsGetDCConnectionCtr01_set_count(PyObject *py_obj, PyObject *value, void *closure)
20726 : {
20727 0 : struct drsuapi_DsGetDCConnectionCtr01 *object = (struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(py_obj);
20728 0 : if (value == NULL) {
20729 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
20730 0 : return -1;
20731 : }
20732 : {
20733 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
20734 0 : if (PyLong_Check(value)) {
20735 : unsigned long long test_var;
20736 0 : test_var = PyLong_AsUnsignedLongLong(value);
20737 0 : if (PyErr_Occurred() != NULL) {
20738 0 : return -1;
20739 : }
20740 0 : if (test_var > uint_max) {
20741 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20742 : PyLong_Type.tp_name, uint_max, test_var);
20743 0 : return -1;
20744 : }
20745 0 : object->count = test_var;
20746 : } else {
20747 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20748 : PyLong_Type.tp_name);
20749 0 : return -1;
20750 : }
20751 : }
20752 0 : return 0;
20753 : }
20754 :
20755 0 : static PyObject *py_drsuapi_DsGetDCConnectionCtr01_get_array(PyObject *obj, void *closure)
20756 : {
20757 0 : struct drsuapi_DsGetDCConnectionCtr01 *object = (struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(obj);
20758 : PyObject *py_array;
20759 0 : if (object->array == NULL) {
20760 0 : Py_RETURN_NONE;
20761 : }
20762 0 : if (object->array == NULL) {
20763 0 : py_array = Py_None;
20764 0 : Py_INCREF(py_array);
20765 : } else {
20766 0 : py_array = PyList_New(object->count);
20767 0 : if (py_array == NULL) {
20768 0 : return NULL;
20769 : }
20770 : {
20771 : int array_cntr_1;
20772 0 : for (array_cntr_1 = 0; array_cntr_1 < (object->count); array_cntr_1++) {
20773 : PyObject *py_array_1;
20774 0 : py_array_1 = pytalloc_reference_ex(&drsuapi_DsGetDCConnection01_Type, object->array, &object->array[array_cntr_1]);
20775 0 : PyList_SetItem(py_array, array_cntr_1, py_array_1);
20776 : }
20777 : }
20778 : }
20779 0 : return py_array;
20780 : }
20781 :
20782 0 : static int py_drsuapi_DsGetDCConnectionCtr01_set_array(PyObject *py_obj, PyObject *value, void *closure)
20783 : {
20784 0 : struct drsuapi_DsGetDCConnectionCtr01 *object = (struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(py_obj);
20785 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->array));
20786 0 : if (value == NULL) {
20787 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
20788 0 : return -1;
20789 : }
20790 0 : if (value == Py_None) {
20791 0 : object->array = NULL;
20792 : } else {
20793 0 : object->array = NULL;
20794 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
20795 : {
20796 : int array_cntr_1;
20797 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
20798 0 : if (!object->array) { return -1;; }
20799 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
20800 0 : for (array_cntr_1 = 0; array_cntr_1 < PyList_GET_SIZE(value); array_cntr_1++) {
20801 0 : if (PyList_GET_ITEM(value, array_cntr_1) == NULL) {
20802 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_1]");
20803 0 : return -1;
20804 : }
20805 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCConnection01_Type, PyList_GET_ITEM(value, array_cntr_1), return -1;);
20806 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_1))) == NULL) {
20807 0 : PyErr_NoMemory();
20808 0 : return -1;
20809 : }
20810 0 : object->array[array_cntr_1] = *(struct drsuapi_DsGetDCConnection01 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_1));
20811 : }
20812 : }
20813 : }
20814 0 : return 0;
20815 : }
20816 :
20817 : static PyGetSetDef py_drsuapi_DsGetDCConnectionCtr01_getsetters[] = {
20818 : {
20819 : .name = discard_const_p(char, "count"),
20820 : .get = py_drsuapi_DsGetDCConnectionCtr01_get_count,
20821 : .set = py_drsuapi_DsGetDCConnectionCtr01_set_count,
20822 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
20823 : },
20824 : {
20825 : .name = discard_const_p(char, "array"),
20826 : .get = py_drsuapi_DsGetDCConnectionCtr01_get_array,
20827 : .set = py_drsuapi_DsGetDCConnectionCtr01_set_array,
20828 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCConnection01")
20829 : },
20830 : { .name = NULL }
20831 : };
20832 :
20833 0 : static PyObject *py_drsuapi_DsGetDCConnectionCtr01_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
20834 : {
20835 0 : return pytalloc_new(struct drsuapi_DsGetDCConnectionCtr01, type);
20836 : }
20837 :
20838 :
20839 : static PyTypeObject drsuapi_DsGetDCConnectionCtr01_Type = {
20840 : PyVarObject_HEAD_INIT(NULL, 0)
20841 : .tp_name = "drsuapi.DsGetDCConnectionCtr01",
20842 : .tp_getset = py_drsuapi_DsGetDCConnectionCtr01_getsetters,
20843 : .tp_methods = NULL,
20844 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
20845 : .tp_new = py_drsuapi_DsGetDCConnectionCtr01_new,
20846 : };
20847 :
20848 0 : static PyObject *py_import_drsuapi_DsGetDCInfoCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetDCInfoCtr *in)
20849 : {
20850 : PyObject *ret;
20851 :
20852 0 : switch (level) {
20853 0 : case DRSUAPI_DC_INFO_CTR_1:
20854 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr1_Type, mem_ctx, &in->ctr1);
20855 0 : return ret;
20856 :
20857 0 : case DRSUAPI_DC_INFO_CTR_2:
20858 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr2_Type, mem_ctx, &in->ctr2);
20859 0 : return ret;
20860 :
20861 0 : case DRSUAPI_DC_INFO_CTR_3:
20862 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetDCInfoCtr3_Type, mem_ctx, &in->ctr3);
20863 0 : return ret;
20864 :
20865 0 : case DRSUAPI_DC_CONNECTION_CTR_01:
20866 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetDCConnectionCtr01_Type, mem_ctx, &in->ctr01);
20867 0 : return ret;
20868 :
20869 : }
20870 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
20871 0 : return NULL;
20872 : }
20873 :
20874 0 : static union drsuapi_DsGetDCInfoCtr *py_export_drsuapi_DsGetDCInfoCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
20875 : {
20876 0 : union drsuapi_DsGetDCInfoCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoCtr);
20877 0 : switch (level) {
20878 0 : case DRSUAPI_DC_INFO_CTR_1:
20879 0 : if (in == NULL) {
20880 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
20881 0 : talloc_free(ret); return NULL;
20882 : }
20883 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr1_Type, in, talloc_free(ret); return NULL;);
20884 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
20885 0 : PyErr_NoMemory();
20886 0 : talloc_free(ret); return NULL;
20887 : }
20888 0 : ret->ctr1 = *(struct drsuapi_DsGetDCInfoCtr1 *)pytalloc_get_ptr(in);
20889 0 : break;
20890 :
20891 0 : case DRSUAPI_DC_INFO_CTR_2:
20892 0 : if (in == NULL) {
20893 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
20894 0 : talloc_free(ret); return NULL;
20895 : }
20896 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr2_Type, in, talloc_free(ret); return NULL;);
20897 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
20898 0 : PyErr_NoMemory();
20899 0 : talloc_free(ret); return NULL;
20900 : }
20901 0 : ret->ctr2 = *(struct drsuapi_DsGetDCInfoCtr2 *)pytalloc_get_ptr(in);
20902 0 : break;
20903 :
20904 0 : case DRSUAPI_DC_INFO_CTR_3:
20905 0 : if (in == NULL) {
20906 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
20907 0 : talloc_free(ret); return NULL;
20908 : }
20909 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCInfoCtr3_Type, in, talloc_free(ret); return NULL;);
20910 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
20911 0 : PyErr_NoMemory();
20912 0 : talloc_free(ret); return NULL;
20913 : }
20914 0 : ret->ctr3 = *(struct drsuapi_DsGetDCInfoCtr3 *)pytalloc_get_ptr(in);
20915 0 : break;
20916 :
20917 0 : case DRSUAPI_DC_CONNECTION_CTR_01:
20918 0 : if (in == NULL) {
20919 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr01");
20920 0 : talloc_free(ret); return NULL;
20921 : }
20922 0 : PY_CHECK_TYPE(&drsuapi_DsGetDCConnectionCtr01_Type, in, talloc_free(ret); return NULL;);
20923 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
20924 0 : PyErr_NoMemory();
20925 0 : talloc_free(ret); return NULL;
20926 : }
20927 0 : ret->ctr01 = *(struct drsuapi_DsGetDCConnectionCtr01 *)pytalloc_get_ptr(in);
20928 0 : break;
20929 :
20930 0 : default:
20931 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
20932 0 : talloc_free(ret);
20933 0 : ret = NULL;
20934 : }
20935 :
20936 0 : return ret;
20937 : }
20938 :
20939 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
20940 : {
20941 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
20942 0 : PyObject *mem_ctx_obj = NULL;
20943 0 : TALLOC_CTX *mem_ctx = NULL;
20944 0 : int level = 0;
20945 0 : PyObject *in_obj = NULL;
20946 0 : union drsuapi_DsGetDCInfoCtr *in = NULL;
20947 :
20948 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
20949 : discard_const_p(char *, kwnames),
20950 : &mem_ctx_obj,
20951 : &level,
20952 : &in_obj)) {
20953 0 : return NULL;
20954 : }
20955 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
20956 0 : if (mem_ctx == NULL) {
20957 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
20958 0 : return NULL;
20959 : }
20960 0 : in = (union drsuapi_DsGetDCInfoCtr *)pytalloc_get_ptr(in_obj);
20961 0 : if (in == NULL) {
20962 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetDCInfoCtr!");
20963 0 : return NULL;
20964 : }
20965 :
20966 0 : return py_import_drsuapi_DsGetDCInfoCtr(mem_ctx, level, in);
20967 : }
20968 :
20969 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
20970 : {
20971 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
20972 0 : PyObject *mem_ctx_obj = NULL;
20973 0 : TALLOC_CTX *mem_ctx = NULL;
20974 0 : int level = 0;
20975 0 : PyObject *in = NULL;
20976 0 : union drsuapi_DsGetDCInfoCtr *out = NULL;
20977 :
20978 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
20979 : discard_const_p(char *, kwnames),
20980 : &mem_ctx_obj,
20981 : &level,
20982 : &in)) {
20983 0 : return NULL;
20984 : }
20985 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
20986 0 : if (mem_ctx == NULL) {
20987 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
20988 0 : return NULL;
20989 : }
20990 :
20991 0 : out = py_export_drsuapi_DsGetDCInfoCtr(mem_ctx, level, in);
20992 0 : if (out == NULL) {
20993 0 : return NULL;
20994 : }
20995 :
20996 0 : return pytalloc_GenericObject_reference(out);
20997 : }
20998 :
20999 : static PyMethodDef py_drsuapi_DsGetDCInfoCtr_methods[] = {
21000 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDCInfoCtr_import),
21001 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
21002 : "T.__import__(mem_ctx, level, in) => ret." },
21003 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDCInfoCtr_export),
21004 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
21005 : "T.__export__(mem_ctx, level, in) => ret." },
21006 : { NULL, NULL, 0, NULL }
21007 : };
21008 :
21009 0 : static PyObject *py_drsuapi_DsGetDCInfoCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21010 : {
21011 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
21012 0 : return NULL;
21013 : }
21014 :
21015 :
21016 : static PyTypeObject drsuapi_DsGetDCInfoCtr_Type = {
21017 : PyVarObject_HEAD_INIT(NULL, 0)
21018 : .tp_name = "drsuapi.DsGetDCInfoCtr",
21019 : .tp_getset = NULL,
21020 : .tp_methods = py_drsuapi_DsGetDCInfoCtr_methods,
21021 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21022 : .tp_new = py_drsuapi_DsGetDCInfoCtr_new,
21023 : };
21024 :
21025 :
21026 0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_get_next_object(PyObject *obj, void *closure)
21027 : {
21028 0 : struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(obj);
21029 : PyObject *py_next_object;
21030 0 : if (object->next_object == NULL) {
21031 0 : Py_RETURN_NONE;
21032 : }
21033 0 : if (object->next_object == NULL) {
21034 0 : py_next_object = Py_None;
21035 0 : Py_INCREF(py_next_object);
21036 : } else {
21037 0 : py_next_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, object->next_object, object->next_object);
21038 : }
21039 0 : return py_next_object;
21040 : }
21041 :
21042 0 : static int py_drsuapi_DsReplicaObjectListItem_set_next_object(PyObject *py_obj, PyObject *value, void *closure)
21043 : {
21044 0 : struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
21045 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next_object));
21046 0 : if (value == NULL) {
21047 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next_object");
21048 0 : return -1;
21049 : }
21050 0 : if (value == Py_None) {
21051 0 : object->next_object = NULL;
21052 : } else {
21053 0 : object->next_object = NULL;
21054 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_Type, value, return -1;);
21055 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
21056 0 : PyErr_NoMemory();
21057 0 : return -1;
21058 : }
21059 0 : object->next_object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
21060 : }
21061 0 : return 0;
21062 : }
21063 :
21064 0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_get_object(PyObject *obj, void *closure)
21065 : {
21066 0 : struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(obj);
21067 : PyObject *py_object;
21068 0 : py_object = pytalloc_reference_ex(&drsuapi_DsReplicaObject_Type, pytalloc_get_mem_ctx(obj), &object->object);
21069 0 : return py_object;
21070 : }
21071 :
21072 84 : static int py_drsuapi_DsReplicaObjectListItem_set_object(PyObject *py_obj, PyObject *value, void *closure)
21073 : {
21074 84 : struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
21075 84 : if (value == NULL) {
21076 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object");
21077 0 : return -1;
21078 : }
21079 84 : PY_CHECK_TYPE(&drsuapi_DsReplicaObject_Type, value, return -1;);
21080 84 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
21081 0 : PyErr_NoMemory();
21082 0 : return -1;
21083 : }
21084 84 : object->object = *(struct drsuapi_DsReplicaObject *)pytalloc_get_ptr(value);
21085 84 : return 0;
21086 : }
21087 :
21088 : static PyGetSetDef py_drsuapi_DsReplicaObjectListItem_getsetters[] = {
21089 : {
21090 : .name = discard_const_p(char, "next_object"),
21091 : .get = py_drsuapi_DsReplicaObjectListItem_get_next_object,
21092 : .set = py_drsuapi_DsReplicaObjectListItem_set_next_object,
21093 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItem")
21094 : },
21095 : {
21096 : .name = discard_const_p(char, "object"),
21097 : .get = py_drsuapi_DsReplicaObjectListItem_get_object,
21098 : .set = py_drsuapi_DsReplicaObjectListItem_set_object,
21099 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObject")
21100 : },
21101 : { .name = NULL }
21102 : };
21103 :
21104 84 : static PyObject *py_drsuapi_DsReplicaObjectListItem_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21105 : {
21106 84 : return pytalloc_new(struct drsuapi_DsReplicaObjectListItem, type);
21107 : }
21108 :
21109 0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
21110 : {
21111 0 : struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
21112 0 : PyObject *ret = NULL;
21113 : DATA_BLOB blob;
21114 : enum ndr_err_code err;
21115 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
21116 0 : if (tmp_ctx == NULL) {
21117 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
21118 0 : return NULL;
21119 : }
21120 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_drsuapi_DsReplicaObjectListItem);
21121 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
21122 0 : TALLOC_FREE(tmp_ctx);
21123 0 : PyErr_SetNdrError(err);
21124 0 : return NULL;
21125 : }
21126 :
21127 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
21128 0 : TALLOC_FREE(tmp_ctx);
21129 0 : return ret;
21130 : }
21131 :
21132 0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
21133 : {
21134 0 : struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
21135 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
21136 0 : Py_ssize_t blob_length = 0;
21137 : enum ndr_err_code err;
21138 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
21139 0 : PyObject *allow_remaining_obj = NULL;
21140 0 : bool allow_remaining = false;
21141 :
21142 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
21143 : discard_const_p(char *, kwnames),
21144 : &blob.data, &blob_length,
21145 : &allow_remaining_obj)) {
21146 0 : return NULL;
21147 : }
21148 0 : blob.length = blob_length;
21149 :
21150 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
21151 0 : allow_remaining = true;
21152 : }
21153 :
21154 0 : if (allow_remaining) {
21155 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItem);
21156 : } else {
21157 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_drsuapi_DsReplicaObjectListItem);
21158 : }
21159 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
21160 0 : PyErr_SetNdrError(err);
21161 0 : return NULL;
21162 : }
21163 :
21164 0 : Py_RETURN_NONE;
21165 : }
21166 :
21167 0 : static PyObject *py_drsuapi_DsReplicaObjectListItem_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
21168 : {
21169 0 : struct drsuapi_DsReplicaObjectListItem *object = (struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(py_obj);
21170 : PyObject *ret;
21171 : char *retstr;
21172 :
21173 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_drsuapi_DsReplicaObjectListItem, "drsuapi_DsReplicaObjectListItem", object);
21174 0 : ret = PyUnicode_FromString(retstr);
21175 0 : talloc_free(retstr);
21176 :
21177 0 : return ret;
21178 : }
21179 :
21180 : static PyMethodDef py_drsuapi_DsReplicaObjectListItem_methods[] = {
21181 : { "__ndr_pack__", (PyCFunction)py_drsuapi_DsReplicaObjectListItem_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
21182 : { "__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" },
21183 : { "__ndr_print__", (PyCFunction)py_drsuapi_DsReplicaObjectListItem_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
21184 : { NULL, NULL, 0, NULL }
21185 : };
21186 :
21187 :
21188 : static PyTypeObject drsuapi_DsReplicaObjectListItem_Type = {
21189 : PyVarObject_HEAD_INIT(NULL, 0)
21190 : .tp_name = "drsuapi.DsReplicaObjectListItem",
21191 : .tp_getset = py_drsuapi_DsReplicaObjectListItem_getsetters,
21192 : .tp_methods = py_drsuapi_DsReplicaObjectListItem_methods,
21193 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21194 : .tp_new = py_drsuapi_DsReplicaObjectListItem_new,
21195 : };
21196 :
21197 :
21198 84 : static PyObject *py_drsuapi_DsAddEntryRequest2_get_first_object(PyObject *obj, void *closure)
21199 : {
21200 84 : struct drsuapi_DsAddEntryRequest2 *object = (struct drsuapi_DsAddEntryRequest2 *)pytalloc_get_ptr(obj);
21201 : PyObject *py_first_object;
21202 84 : py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, pytalloc_get_mem_ctx(obj), &object->first_object);
21203 84 : return py_first_object;
21204 : }
21205 :
21206 84 : static int py_drsuapi_DsAddEntryRequest2_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
21207 : {
21208 84 : struct drsuapi_DsAddEntryRequest2 *object = (struct drsuapi_DsAddEntryRequest2 *)pytalloc_get_ptr(py_obj);
21209 84 : if (value == NULL) {
21210 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_object");
21211 0 : return -1;
21212 : }
21213 84 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_Type, value, return -1;);
21214 84 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
21215 0 : PyErr_NoMemory();
21216 0 : return -1;
21217 : }
21218 84 : object->first_object = *(struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
21219 84 : return 0;
21220 : }
21221 :
21222 : static PyGetSetDef py_drsuapi_DsAddEntryRequest2_getsetters[] = {
21223 : {
21224 : .name = discard_const_p(char, "first_object"),
21225 : .get = py_drsuapi_DsAddEntryRequest2_get_first_object,
21226 : .set = py_drsuapi_DsAddEntryRequest2_set_first_object,
21227 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItem")
21228 : },
21229 : { .name = NULL }
21230 : };
21231 :
21232 84 : static PyObject *py_drsuapi_DsAddEntryRequest2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21233 : {
21234 84 : return pytalloc_new(struct drsuapi_DsAddEntryRequest2, type);
21235 : }
21236 :
21237 :
21238 : static PyTypeObject drsuapi_DsAddEntryRequest2_Type = {
21239 : PyVarObject_HEAD_INIT(NULL, 0)
21240 : .tp_name = "drsuapi.DsAddEntryRequest2",
21241 : .tp_getset = py_drsuapi_DsAddEntryRequest2_getsetters,
21242 : .tp_methods = NULL,
21243 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21244 : .tp_new = py_drsuapi_DsAddEntryRequest2_new,
21245 : };
21246 :
21247 :
21248 0 : static PyObject *py_drsuapi_SecBuffer_get_buf_size(PyObject *obj, void *closure)
21249 : {
21250 0 : struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(obj);
21251 : PyObject *py_buf_size;
21252 0 : py_buf_size = PyLong_FromUnsignedLongLong((uint32_t)object->buf_size);
21253 0 : return py_buf_size;
21254 : }
21255 :
21256 0 : static int py_drsuapi_SecBuffer_set_buf_size(PyObject *py_obj, PyObject *value, void *closure)
21257 : {
21258 0 : struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(py_obj);
21259 0 : if (value == NULL) {
21260 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buf_size");
21261 0 : return -1;
21262 : }
21263 : {
21264 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buf_size));
21265 0 : if (PyLong_Check(value)) {
21266 : unsigned long long test_var;
21267 0 : test_var = PyLong_AsUnsignedLongLong(value);
21268 0 : if (PyErr_Occurred() != NULL) {
21269 0 : return -1;
21270 : }
21271 0 : if (test_var > uint_max) {
21272 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21273 : PyLong_Type.tp_name, uint_max, test_var);
21274 0 : return -1;
21275 : }
21276 0 : object->buf_size = test_var;
21277 : } else {
21278 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21279 : PyLong_Type.tp_name);
21280 0 : return -1;
21281 : }
21282 : }
21283 0 : return 0;
21284 : }
21285 :
21286 0 : static PyObject *py_drsuapi_SecBuffer_get_buf_type(PyObject *obj, void *closure)
21287 : {
21288 0 : struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(obj);
21289 : PyObject *py_buf_type;
21290 0 : py_buf_type = PyLong_FromUnsignedLongLong((uint32_t)object->buf_type);
21291 0 : return py_buf_type;
21292 : }
21293 :
21294 0 : static int py_drsuapi_SecBuffer_set_buf_type(PyObject *py_obj, PyObject *value, void *closure)
21295 : {
21296 0 : struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(py_obj);
21297 0 : if (value == NULL) {
21298 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buf_type");
21299 0 : return -1;
21300 : }
21301 : {
21302 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buf_type));
21303 0 : if (PyLong_Check(value)) {
21304 : unsigned long long test_var;
21305 0 : test_var = PyLong_AsUnsignedLongLong(value);
21306 0 : if (PyErr_Occurred() != NULL) {
21307 0 : return -1;
21308 : }
21309 0 : if (test_var > uint_max) {
21310 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21311 : PyLong_Type.tp_name, uint_max, test_var);
21312 0 : return -1;
21313 : }
21314 0 : object->buf_type = test_var;
21315 : } else {
21316 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21317 : PyLong_Type.tp_name);
21318 0 : return -1;
21319 : }
21320 : }
21321 0 : return 0;
21322 : }
21323 :
21324 0 : static PyObject *py_drsuapi_SecBuffer_get_buffer(PyObject *obj, void *closure)
21325 : {
21326 0 : struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(obj);
21327 : PyObject *py_buffer;
21328 0 : if (object->buffer == NULL) {
21329 0 : Py_RETURN_NONE;
21330 : }
21331 0 : if (object->buffer == NULL) {
21332 0 : py_buffer = Py_None;
21333 0 : Py_INCREF(py_buffer);
21334 : } else {
21335 0 : py_buffer = PyList_New(object->buf_size);
21336 0 : if (py_buffer == NULL) {
21337 0 : return NULL;
21338 : }
21339 : {
21340 : int buffer_cntr_1;
21341 0 : for (buffer_cntr_1 = 0; buffer_cntr_1 < (object->buf_size); buffer_cntr_1++) {
21342 : PyObject *py_buffer_1;
21343 0 : py_buffer_1 = PyLong_FromLong((uint16_t)object->buffer[buffer_cntr_1]);
21344 0 : PyList_SetItem(py_buffer, buffer_cntr_1, py_buffer_1);
21345 : }
21346 : }
21347 : }
21348 0 : return py_buffer;
21349 : }
21350 :
21351 0 : static int py_drsuapi_SecBuffer_set_buffer(PyObject *py_obj, PyObject *value, void *closure)
21352 : {
21353 0 : struct drsuapi_SecBuffer *object = (struct drsuapi_SecBuffer *)pytalloc_get_ptr(py_obj);
21354 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->buffer));
21355 0 : if (value == NULL) {
21356 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffer");
21357 0 : return -1;
21358 : }
21359 0 : if (value == Py_None) {
21360 0 : object->buffer = NULL;
21361 : } else {
21362 0 : object->buffer = NULL;
21363 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
21364 : {
21365 : int buffer_cntr_1;
21366 0 : object->buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffer, PyList_GET_SIZE(value));
21367 0 : if (!object->buffer) { return -1;; }
21368 0 : talloc_set_name_const(object->buffer, "ARRAY: object->buffer");
21369 0 : for (buffer_cntr_1 = 0; buffer_cntr_1 < PyList_GET_SIZE(value); buffer_cntr_1++) {
21370 0 : if (PyList_GET_ITEM(value, buffer_cntr_1) == NULL) {
21371 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffer[buffer_cntr_1]");
21372 0 : return -1;
21373 : }
21374 : {
21375 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buffer[buffer_cntr_1]));
21376 0 : if (PyLong_Check(PyList_GET_ITEM(value, buffer_cntr_1))) {
21377 : unsigned long long test_var;
21378 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, buffer_cntr_1));
21379 0 : if (PyErr_Occurred() != NULL) {
21380 0 : return -1;
21381 : }
21382 0 : if (test_var > uint_max) {
21383 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21384 : PyLong_Type.tp_name, uint_max, test_var);
21385 0 : return -1;
21386 : }
21387 0 : object->buffer[buffer_cntr_1] = test_var;
21388 : } else {
21389 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21390 : PyLong_Type.tp_name);
21391 0 : return -1;
21392 : }
21393 : }
21394 : }
21395 : }
21396 : }
21397 0 : return 0;
21398 : }
21399 :
21400 : static PyGetSetDef py_drsuapi_SecBuffer_getsetters[] = {
21401 : {
21402 : .name = discard_const_p(char, "buf_size"),
21403 : .get = py_drsuapi_SecBuffer_get_buf_size,
21404 : .set = py_drsuapi_SecBuffer_set_buf_size,
21405 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21406 : },
21407 : {
21408 : .name = discard_const_p(char, "buf_type"),
21409 : .get = py_drsuapi_SecBuffer_get_buf_type,
21410 : .set = py_drsuapi_SecBuffer_set_buf_type,
21411 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SecBufferType")
21412 : },
21413 : {
21414 : .name = discard_const_p(char, "buffer"),
21415 : .get = py_drsuapi_SecBuffer_get_buffer,
21416 : .set = py_drsuapi_SecBuffer_set_buffer,
21417 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21418 : },
21419 : { .name = NULL }
21420 : };
21421 :
21422 0 : static PyObject *py_drsuapi_SecBuffer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21423 : {
21424 0 : return pytalloc_new(struct drsuapi_SecBuffer, type);
21425 : }
21426 :
21427 :
21428 : static PyTypeObject drsuapi_SecBuffer_Type = {
21429 : PyVarObject_HEAD_INIT(NULL, 0)
21430 : .tp_name = "drsuapi.SecBuffer",
21431 : .tp_getset = py_drsuapi_SecBuffer_getsetters,
21432 : .tp_methods = NULL,
21433 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21434 : .tp_new = py_drsuapi_SecBuffer_new,
21435 : };
21436 :
21437 :
21438 0 : static PyObject *py_drsuapi_SecBufferDesc_get_version(PyObject *obj, void *closure)
21439 : {
21440 0 : struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(obj);
21441 : PyObject *py_version;
21442 0 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
21443 0 : return py_version;
21444 : }
21445 :
21446 0 : static int py_drsuapi_SecBufferDesc_set_version(PyObject *py_obj, PyObject *value, void *closure)
21447 : {
21448 0 : struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(py_obj);
21449 0 : if (value == NULL) {
21450 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
21451 0 : return -1;
21452 : }
21453 : {
21454 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
21455 0 : if (PyLong_Check(value)) {
21456 : unsigned long long test_var;
21457 0 : test_var = PyLong_AsUnsignedLongLong(value);
21458 0 : if (PyErr_Occurred() != NULL) {
21459 0 : return -1;
21460 : }
21461 0 : if (test_var > uint_max) {
21462 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21463 : PyLong_Type.tp_name, uint_max, test_var);
21464 0 : return -1;
21465 : }
21466 0 : object->version = test_var;
21467 : } else {
21468 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21469 : PyLong_Type.tp_name);
21470 0 : return -1;
21471 : }
21472 : }
21473 0 : return 0;
21474 : }
21475 :
21476 0 : static PyObject *py_drsuapi_SecBufferDesc_get_buff_count(PyObject *obj, void *closure)
21477 : {
21478 0 : struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(obj);
21479 : PyObject *py_buff_count;
21480 0 : py_buff_count = PyLong_FromUnsignedLongLong((uint32_t)object->buff_count);
21481 0 : return py_buff_count;
21482 : }
21483 :
21484 0 : static int py_drsuapi_SecBufferDesc_set_buff_count(PyObject *py_obj, PyObject *value, void *closure)
21485 : {
21486 0 : struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(py_obj);
21487 0 : if (value == NULL) {
21488 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buff_count");
21489 0 : return -1;
21490 : }
21491 : {
21492 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->buff_count));
21493 0 : if (PyLong_Check(value)) {
21494 : unsigned long long test_var;
21495 0 : test_var = PyLong_AsUnsignedLongLong(value);
21496 0 : if (PyErr_Occurred() != NULL) {
21497 0 : return -1;
21498 : }
21499 0 : if (test_var > uint_max) {
21500 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21501 : PyLong_Type.tp_name, uint_max, test_var);
21502 0 : return -1;
21503 : }
21504 0 : object->buff_count = test_var;
21505 : } else {
21506 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21507 : PyLong_Type.tp_name);
21508 0 : return -1;
21509 : }
21510 : }
21511 0 : return 0;
21512 : }
21513 :
21514 0 : static PyObject *py_drsuapi_SecBufferDesc_get_buffers(PyObject *obj, void *closure)
21515 : {
21516 0 : struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(obj);
21517 : PyObject *py_buffers;
21518 0 : if (object->buffers == NULL) {
21519 0 : Py_RETURN_NONE;
21520 : }
21521 0 : if (object->buffers == NULL) {
21522 0 : py_buffers = Py_None;
21523 0 : Py_INCREF(py_buffers);
21524 : } else {
21525 0 : py_buffers = PyList_New(object->buff_count);
21526 0 : if (py_buffers == NULL) {
21527 0 : return NULL;
21528 : }
21529 : {
21530 : int buffers_cntr_1;
21531 0 : for (buffers_cntr_1 = 0; buffers_cntr_1 < (object->buff_count); buffers_cntr_1++) {
21532 : PyObject *py_buffers_1;
21533 0 : py_buffers_1 = pytalloc_reference_ex(&drsuapi_SecBuffer_Type, object->buffers, &object->buffers[buffers_cntr_1]);
21534 0 : PyList_SetItem(py_buffers, buffers_cntr_1, py_buffers_1);
21535 : }
21536 : }
21537 : }
21538 0 : return py_buffers;
21539 : }
21540 :
21541 0 : static int py_drsuapi_SecBufferDesc_set_buffers(PyObject *py_obj, PyObject *value, void *closure)
21542 : {
21543 0 : struct drsuapi_SecBufferDesc *object = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(py_obj);
21544 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->buffers));
21545 0 : if (value == NULL) {
21546 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffers");
21547 0 : return -1;
21548 : }
21549 0 : if (value == Py_None) {
21550 0 : object->buffers = NULL;
21551 : } else {
21552 0 : object->buffers = NULL;
21553 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
21554 : {
21555 : int buffers_cntr_1;
21556 0 : object->buffers = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->buffers, PyList_GET_SIZE(value));
21557 0 : if (!object->buffers) { return -1;; }
21558 0 : talloc_set_name_const(object->buffers, "ARRAY: object->buffers");
21559 0 : for (buffers_cntr_1 = 0; buffers_cntr_1 < PyList_GET_SIZE(value); buffers_cntr_1++) {
21560 0 : if (PyList_GET_ITEM(value, buffers_cntr_1) == NULL) {
21561 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->buffers[buffers_cntr_1]");
21562 0 : return -1;
21563 : }
21564 0 : PY_CHECK_TYPE(&drsuapi_SecBuffer_Type, PyList_GET_ITEM(value, buffers_cntr_1), return -1;);
21565 0 : if (talloc_reference(object->buffers, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, buffers_cntr_1))) == NULL) {
21566 0 : PyErr_NoMemory();
21567 0 : return -1;
21568 : }
21569 0 : object->buffers[buffers_cntr_1] = *(struct drsuapi_SecBuffer *)pytalloc_get_ptr(PyList_GET_ITEM(value, buffers_cntr_1));
21570 : }
21571 : }
21572 : }
21573 0 : return 0;
21574 : }
21575 :
21576 : static PyGetSetDef py_drsuapi_SecBufferDesc_getsetters[] = {
21577 : {
21578 : .name = discard_const_p(char, "version"),
21579 : .get = py_drsuapi_SecBufferDesc_get_version,
21580 : .set = py_drsuapi_SecBufferDesc_set_version,
21581 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21582 : },
21583 : {
21584 : .name = discard_const_p(char, "buff_count"),
21585 : .get = py_drsuapi_SecBufferDesc_get_buff_count,
21586 : .set = py_drsuapi_SecBufferDesc_set_buff_count,
21587 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21588 : },
21589 : {
21590 : .name = discard_const_p(char, "buffers"),
21591 : .get = py_drsuapi_SecBufferDesc_get_buffers,
21592 : .set = py_drsuapi_SecBufferDesc_set_buffers,
21593 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SecBuffer")
21594 : },
21595 : { .name = NULL }
21596 : };
21597 :
21598 0 : static PyObject *py_drsuapi_SecBufferDesc_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21599 : {
21600 0 : return pytalloc_new(struct drsuapi_SecBufferDesc, type);
21601 : }
21602 :
21603 :
21604 : static PyTypeObject drsuapi_SecBufferDesc_Type = {
21605 : PyVarObject_HEAD_INIT(NULL, 0)
21606 : .tp_name = "drsuapi.SecBufferDesc",
21607 : .tp_getset = py_drsuapi_SecBufferDesc_getsetters,
21608 : .tp_methods = NULL,
21609 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21610 : .tp_new = py_drsuapi_SecBufferDesc_new,
21611 : };
21612 :
21613 :
21614 0 : static PyObject *py_drsuapi_DsAddEntryRequest3_get_first_object(PyObject *obj, void *closure)
21615 : {
21616 0 : struct drsuapi_DsAddEntryRequest3 *object = (struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(obj);
21617 : PyObject *py_first_object;
21618 0 : py_first_object = pytalloc_reference_ex(&drsuapi_DsReplicaObjectListItem_Type, pytalloc_get_mem_ctx(obj), &object->first_object);
21619 0 : return py_first_object;
21620 : }
21621 :
21622 0 : static int py_drsuapi_DsAddEntryRequest3_set_first_object(PyObject *py_obj, PyObject *value, void *closure)
21623 : {
21624 0 : struct drsuapi_DsAddEntryRequest3 *object = (struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(py_obj);
21625 0 : if (value == NULL) {
21626 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_object");
21627 0 : return -1;
21628 : }
21629 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectListItem_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->first_object = *(struct drsuapi_DsReplicaObjectListItem *)pytalloc_get_ptr(value);
21635 0 : return 0;
21636 : }
21637 :
21638 0 : static PyObject *py_drsuapi_DsAddEntryRequest3_get_client_creds(PyObject *obj, void *closure)
21639 : {
21640 0 : struct drsuapi_DsAddEntryRequest3 *object = (struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(obj);
21641 : PyObject *py_client_creds;
21642 0 : if (object->client_creds == NULL) {
21643 0 : Py_RETURN_NONE;
21644 : }
21645 0 : if (object->client_creds == NULL) {
21646 0 : py_client_creds = Py_None;
21647 0 : Py_INCREF(py_client_creds);
21648 : } else {
21649 0 : py_client_creds = pytalloc_reference_ex(&drsuapi_SecBufferDesc_Type, object->client_creds, object->client_creds);
21650 : }
21651 0 : return py_client_creds;
21652 : }
21653 :
21654 0 : static int py_drsuapi_DsAddEntryRequest3_set_client_creds(PyObject *py_obj, PyObject *value, void *closure)
21655 : {
21656 0 : struct drsuapi_DsAddEntryRequest3 *object = (struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(py_obj);
21657 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->client_creds));
21658 0 : if (value == NULL) {
21659 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_creds");
21660 0 : return -1;
21661 : }
21662 0 : if (value == Py_None) {
21663 0 : object->client_creds = NULL;
21664 : } else {
21665 0 : object->client_creds = NULL;
21666 0 : PY_CHECK_TYPE(&drsuapi_SecBufferDesc_Type, value, return -1;);
21667 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
21668 0 : PyErr_NoMemory();
21669 0 : return -1;
21670 : }
21671 0 : object->client_creds = (struct drsuapi_SecBufferDesc *)pytalloc_get_ptr(value);
21672 : }
21673 0 : return 0;
21674 : }
21675 :
21676 : static PyGetSetDef py_drsuapi_DsAddEntryRequest3_getsetters[] = {
21677 : {
21678 : .name = discard_const_p(char, "first_object"),
21679 : .get = py_drsuapi_DsAddEntryRequest3_get_first_object,
21680 : .set = py_drsuapi_DsAddEntryRequest3_set_first_object,
21681 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectListItem")
21682 : },
21683 : {
21684 : .name = discard_const_p(char, "client_creds"),
21685 : .get = py_drsuapi_DsAddEntryRequest3_get_client_creds,
21686 : .set = py_drsuapi_DsAddEntryRequest3_set_client_creds,
21687 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_SecBufferDesc")
21688 : },
21689 : { .name = NULL }
21690 : };
21691 :
21692 0 : static PyObject *py_drsuapi_DsAddEntryRequest3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21693 : {
21694 0 : return pytalloc_new(struct drsuapi_DsAddEntryRequest3, type);
21695 : }
21696 :
21697 :
21698 : static PyTypeObject drsuapi_DsAddEntryRequest3_Type = {
21699 : PyVarObject_HEAD_INIT(NULL, 0)
21700 : .tp_name = "drsuapi.DsAddEntryRequest3",
21701 : .tp_getset = py_drsuapi_DsAddEntryRequest3_getsetters,
21702 : .tp_methods = NULL,
21703 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21704 : .tp_new = py_drsuapi_DsAddEntryRequest3_new,
21705 : };
21706 :
21707 0 : static PyObject *py_import_drsuapi_DsAddEntryRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryRequest *in)
21708 : {
21709 : PyObject *ret;
21710 :
21711 0 : switch (level) {
21712 0 : case 2:
21713 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryRequest2_Type, mem_ctx, &in->req2);
21714 0 : return ret;
21715 :
21716 0 : case 3:
21717 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryRequest3_Type, mem_ctx, &in->req3);
21718 0 : return ret;
21719 :
21720 : }
21721 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
21722 0 : return NULL;
21723 : }
21724 :
21725 84 : static union drsuapi_DsAddEntryRequest *py_export_drsuapi_DsAddEntryRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
21726 : {
21727 84 : union drsuapi_DsAddEntryRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryRequest);
21728 84 : switch (level) {
21729 84 : case 2:
21730 84 : if (in == NULL) {
21731 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req2");
21732 0 : talloc_free(ret); return NULL;
21733 : }
21734 84 : PY_CHECK_TYPE(&drsuapi_DsAddEntryRequest2_Type, in, talloc_free(ret); return NULL;);
21735 84 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
21736 0 : PyErr_NoMemory();
21737 0 : talloc_free(ret); return NULL;
21738 : }
21739 84 : ret->req2 = *(struct drsuapi_DsAddEntryRequest2 *)pytalloc_get_ptr(in);
21740 84 : break;
21741 :
21742 0 : case 3:
21743 0 : if (in == NULL) {
21744 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req3");
21745 0 : talloc_free(ret); return NULL;
21746 : }
21747 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryRequest3_Type, in, talloc_free(ret); return NULL;);
21748 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
21749 0 : PyErr_NoMemory();
21750 0 : talloc_free(ret); return NULL;
21751 : }
21752 0 : ret->req3 = *(struct drsuapi_DsAddEntryRequest3 *)pytalloc_get_ptr(in);
21753 0 : break;
21754 :
21755 0 : default:
21756 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
21757 0 : talloc_free(ret);
21758 0 : ret = NULL;
21759 : }
21760 :
21761 84 : return ret;
21762 : }
21763 :
21764 0 : static PyObject *py_drsuapi_DsAddEntryRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21765 : {
21766 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
21767 0 : PyObject *mem_ctx_obj = NULL;
21768 0 : TALLOC_CTX *mem_ctx = NULL;
21769 0 : int level = 0;
21770 0 : PyObject *in_obj = NULL;
21771 0 : union drsuapi_DsAddEntryRequest *in = NULL;
21772 :
21773 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
21774 : discard_const_p(char *, kwnames),
21775 : &mem_ctx_obj,
21776 : &level,
21777 : &in_obj)) {
21778 0 : return NULL;
21779 : }
21780 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
21781 0 : if (mem_ctx == NULL) {
21782 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
21783 0 : return NULL;
21784 : }
21785 0 : in = (union drsuapi_DsAddEntryRequest *)pytalloc_get_ptr(in_obj);
21786 0 : if (in == NULL) {
21787 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsAddEntryRequest!");
21788 0 : return NULL;
21789 : }
21790 :
21791 0 : return py_import_drsuapi_DsAddEntryRequest(mem_ctx, level, in);
21792 : }
21793 :
21794 84 : static PyObject *py_drsuapi_DsAddEntryRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21795 : {
21796 84 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
21797 84 : PyObject *mem_ctx_obj = NULL;
21798 84 : TALLOC_CTX *mem_ctx = NULL;
21799 84 : int level = 0;
21800 84 : PyObject *in = NULL;
21801 84 : union drsuapi_DsAddEntryRequest *out = NULL;
21802 :
21803 84 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
21804 : discard_const_p(char *, kwnames),
21805 : &mem_ctx_obj,
21806 : &level,
21807 : &in)) {
21808 0 : return NULL;
21809 : }
21810 84 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
21811 84 : if (mem_ctx == NULL) {
21812 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
21813 0 : return NULL;
21814 : }
21815 :
21816 84 : out = py_export_drsuapi_DsAddEntryRequest(mem_ctx, level, in);
21817 84 : if (out == NULL) {
21818 0 : return NULL;
21819 : }
21820 :
21821 84 : return pytalloc_GenericObject_reference(out);
21822 : }
21823 :
21824 : static PyMethodDef py_drsuapi_DsAddEntryRequest_methods[] = {
21825 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryRequest_import),
21826 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
21827 : "T.__import__(mem_ctx, level, in) => ret." },
21828 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryRequest_export),
21829 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
21830 : "T.__export__(mem_ctx, level, in) => ret." },
21831 : { NULL, NULL, 0, NULL }
21832 : };
21833 :
21834 0 : static PyObject *py_drsuapi_DsAddEntryRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21835 : {
21836 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
21837 0 : return NULL;
21838 : }
21839 :
21840 :
21841 : static PyTypeObject drsuapi_DsAddEntryRequest_Type = {
21842 : PyVarObject_HEAD_INIT(NULL, 0)
21843 : .tp_name = "drsuapi.DsAddEntryRequest",
21844 : .tp_getset = NULL,
21845 : .tp_methods = py_drsuapi_DsAddEntryRequest_methods,
21846 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21847 : .tp_new = py_drsuapi_DsAddEntryRequest_new,
21848 : };
21849 :
21850 :
21851 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_dsid(PyObject *obj, void *closure)
21852 : {
21853 0 : struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(obj);
21854 : PyObject *py_dsid;
21855 0 : py_dsid = PyLong_FromUnsignedLongLong((uint32_t)object->dsid);
21856 0 : return py_dsid;
21857 : }
21858 :
21859 0 : static int py_drsuapi_DsAddEntryErrorInfoX_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
21860 : {
21861 0 : struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(py_obj);
21862 0 : if (value == NULL) {
21863 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
21864 0 : return -1;
21865 : }
21866 : {
21867 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
21868 0 : if (PyLong_Check(value)) {
21869 : unsigned long long test_var;
21870 0 : test_var = PyLong_AsUnsignedLongLong(value);
21871 0 : if (PyErr_Occurred() != NULL) {
21872 0 : return -1;
21873 : }
21874 0 : if (test_var > uint_max) {
21875 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21876 : PyLong_Type.tp_name, uint_max, test_var);
21877 0 : return -1;
21878 : }
21879 0 : object->dsid = test_var;
21880 : } else {
21881 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21882 : PyLong_Type.tp_name);
21883 0 : return -1;
21884 : }
21885 : }
21886 0 : return 0;
21887 : }
21888 :
21889 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_extended_err(PyObject *obj, void *closure)
21890 : {
21891 0 : struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(obj);
21892 : PyObject *py_extended_err;
21893 0 : py_extended_err = PyErr_FromWERROR(object->extended_err);
21894 0 : return py_extended_err;
21895 : }
21896 :
21897 0 : static int py_drsuapi_DsAddEntryErrorInfoX_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
21898 : {
21899 0 : struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(py_obj);
21900 0 : if (value == NULL) {
21901 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
21902 0 : return -1;
21903 : }
21904 0 : object->extended_err = W_ERROR(PyLong_AsLong(value));
21905 0 : return 0;
21906 : }
21907 :
21908 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_extended_data(PyObject *obj, void *closure)
21909 : {
21910 0 : struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(obj);
21911 : PyObject *py_extended_data;
21912 0 : py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)object->extended_data);
21913 0 : return py_extended_data;
21914 : }
21915 :
21916 0 : static int py_drsuapi_DsAddEntryErrorInfoX_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
21917 : {
21918 0 : struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(py_obj);
21919 0 : if (value == NULL) {
21920 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
21921 0 : return -1;
21922 : }
21923 : {
21924 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
21925 0 : if (PyLong_Check(value)) {
21926 : unsigned long long test_var;
21927 0 : test_var = PyLong_AsUnsignedLongLong(value);
21928 0 : if (PyErr_Occurred() != NULL) {
21929 0 : return -1;
21930 : }
21931 0 : if (test_var > uint_max) {
21932 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21933 : PyLong_Type.tp_name, uint_max, test_var);
21934 0 : return -1;
21935 : }
21936 0 : object->extended_data = test_var;
21937 : } else {
21938 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21939 : PyLong_Type.tp_name);
21940 0 : return -1;
21941 : }
21942 : }
21943 0 : return 0;
21944 : }
21945 :
21946 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_get_problem(PyObject *obj, void *closure)
21947 : {
21948 0 : struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(obj);
21949 : PyObject *py_problem;
21950 0 : py_problem = PyLong_FromLong((uint16_t)object->problem);
21951 0 : return py_problem;
21952 : }
21953 :
21954 0 : static int py_drsuapi_DsAddEntryErrorInfoX_set_problem(PyObject *py_obj, PyObject *value, void *closure)
21955 : {
21956 0 : struct drsuapi_DsAddEntryErrorInfoX *object = (struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(py_obj);
21957 0 : if (value == NULL) {
21958 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->problem");
21959 0 : return -1;
21960 : }
21961 : {
21962 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->problem));
21963 0 : if (PyLong_Check(value)) {
21964 : unsigned long long test_var;
21965 0 : test_var = PyLong_AsUnsignedLongLong(value);
21966 0 : if (PyErr_Occurred() != NULL) {
21967 0 : return -1;
21968 : }
21969 0 : if (test_var > uint_max) {
21970 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21971 : PyLong_Type.tp_name, uint_max, test_var);
21972 0 : return -1;
21973 : }
21974 0 : object->problem = test_var;
21975 : } else {
21976 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21977 : PyLong_Type.tp_name);
21978 0 : return -1;
21979 : }
21980 : }
21981 0 : return 0;
21982 : }
21983 :
21984 : static PyGetSetDef py_drsuapi_DsAddEntryErrorInfoX_getsetters[] = {
21985 : {
21986 : .name = discard_const_p(char, "dsid"),
21987 : .get = py_drsuapi_DsAddEntryErrorInfoX_get_dsid,
21988 : .set = py_drsuapi_DsAddEntryErrorInfoX_set_dsid,
21989 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21990 : },
21991 : {
21992 : .name = discard_const_p(char, "extended_err"),
21993 : .get = py_drsuapi_DsAddEntryErrorInfoX_get_extended_err,
21994 : .set = py_drsuapi_DsAddEntryErrorInfoX_set_extended_err,
21995 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
21996 : },
21997 : {
21998 : .name = discard_const_p(char, "extended_data"),
21999 : .get = py_drsuapi_DsAddEntryErrorInfoX_get_extended_data,
22000 : .set = py_drsuapi_DsAddEntryErrorInfoX_set_extended_data,
22001 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22002 : },
22003 : {
22004 : .name = discard_const_p(char, "problem"),
22005 : .get = py_drsuapi_DsAddEntryErrorInfoX_get_problem,
22006 : .set = py_drsuapi_DsAddEntryErrorInfoX_set_problem,
22007 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
22008 : },
22009 : { .name = NULL }
22010 : };
22011 :
22012 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfoX_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22013 : {
22014 0 : return pytalloc_new(struct drsuapi_DsAddEntryErrorInfoX, type);
22015 : }
22016 :
22017 :
22018 : static PyTypeObject drsuapi_DsAddEntryErrorInfoX_Type = {
22019 : PyVarObject_HEAD_INIT(NULL, 0)
22020 : .tp_name = "drsuapi.DsAddEntryErrorInfoX",
22021 : .tp_getset = py_drsuapi_DsAddEntryErrorInfoX_getsetters,
22022 : .tp_methods = NULL,
22023 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22024 : .tp_new = py_drsuapi_DsAddEntryErrorInfoX_new,
22025 : };
22026 :
22027 :
22028 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_dsid(PyObject *obj, void *closure)
22029 : {
22030 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
22031 : PyObject *py_dsid;
22032 0 : py_dsid = PyLong_FromUnsignedLongLong((uint32_t)object->dsid);
22033 0 : return py_dsid;
22034 : }
22035 :
22036 0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
22037 : {
22038 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
22039 0 : if (value == NULL) {
22040 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
22041 0 : return -1;
22042 : }
22043 : {
22044 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
22045 0 : if (PyLong_Check(value)) {
22046 : unsigned long long test_var;
22047 0 : test_var = PyLong_AsUnsignedLongLong(value);
22048 0 : if (PyErr_Occurred() != NULL) {
22049 0 : return -1;
22050 : }
22051 0 : if (test_var > uint_max) {
22052 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22053 : PyLong_Type.tp_name, uint_max, test_var);
22054 0 : return -1;
22055 : }
22056 0 : object->dsid = test_var;
22057 : } else {
22058 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22059 : PyLong_Type.tp_name);
22060 0 : return -1;
22061 : }
22062 : }
22063 0 : return 0;
22064 : }
22065 :
22066 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_err(PyObject *obj, void *closure)
22067 : {
22068 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
22069 : PyObject *py_extended_err;
22070 0 : py_extended_err = PyErr_FromWERROR(object->extended_err);
22071 0 : return py_extended_err;
22072 : }
22073 :
22074 0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
22075 : {
22076 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
22077 0 : if (value == NULL) {
22078 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
22079 0 : return -1;
22080 : }
22081 0 : object->extended_err = W_ERROR(PyLong_AsLong(value));
22082 0 : return 0;
22083 : }
22084 :
22085 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_data(PyObject *obj, void *closure)
22086 : {
22087 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
22088 : PyObject *py_extended_data;
22089 0 : py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)object->extended_data);
22090 0 : return py_extended_data;
22091 : }
22092 :
22093 0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
22094 : {
22095 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
22096 0 : if (value == NULL) {
22097 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
22098 0 : return -1;
22099 : }
22100 : {
22101 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
22102 0 : if (PyLong_Check(value)) {
22103 : unsigned long long test_var;
22104 0 : test_var = PyLong_AsUnsignedLongLong(value);
22105 0 : if (PyErr_Occurred() != NULL) {
22106 0 : return -1;
22107 : }
22108 0 : if (test_var > uint_max) {
22109 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22110 : PyLong_Type.tp_name, uint_max, test_var);
22111 0 : return -1;
22112 : }
22113 0 : object->extended_data = test_var;
22114 : } else {
22115 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22116 : PyLong_Type.tp_name);
22117 0 : return -1;
22118 : }
22119 : }
22120 0 : return 0;
22121 : }
22122 :
22123 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_problem(PyObject *obj, void *closure)
22124 : {
22125 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
22126 : PyObject *py_problem;
22127 0 : py_problem = PyLong_FromLong((uint16_t)object->problem);
22128 0 : return py_problem;
22129 : }
22130 :
22131 0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_problem(PyObject *py_obj, PyObject *value, void *closure)
22132 : {
22133 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
22134 0 : if (value == NULL) {
22135 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->problem");
22136 0 : return -1;
22137 : }
22138 : {
22139 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->problem));
22140 0 : if (PyLong_Check(value)) {
22141 : unsigned long long test_var;
22142 0 : test_var = PyLong_AsUnsignedLongLong(value);
22143 0 : if (PyErr_Occurred() != NULL) {
22144 0 : return -1;
22145 : }
22146 0 : if (test_var > uint_max) {
22147 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22148 : PyLong_Type.tp_name, uint_max, test_var);
22149 0 : return -1;
22150 : }
22151 0 : object->problem = test_var;
22152 : } else {
22153 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22154 : PyLong_Type.tp_name);
22155 0 : return -1;
22156 : }
22157 : }
22158 0 : return 0;
22159 : }
22160 :
22161 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_attid(PyObject *obj, void *closure)
22162 : {
22163 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
22164 : PyObject *py_attid;
22165 0 : py_attid = PyLong_FromUnsignedLongLong((uint32_t)object->attid);
22166 0 : return py_attid;
22167 : }
22168 :
22169 0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_attid(PyObject *py_obj, PyObject *value, void *closure)
22170 : {
22171 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
22172 0 : if (value == NULL) {
22173 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attid");
22174 0 : return -1;
22175 : }
22176 : {
22177 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->attid));
22178 0 : if (PyLong_Check(value)) {
22179 : unsigned long long test_var;
22180 0 : test_var = PyLong_AsUnsignedLongLong(value);
22181 0 : if (PyErr_Occurred() != NULL) {
22182 0 : return -1;
22183 : }
22184 0 : if (test_var > uint_max) {
22185 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22186 : PyLong_Type.tp_name, uint_max, test_var);
22187 0 : return -1;
22188 : }
22189 0 : object->attid = test_var;
22190 : } else {
22191 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22192 : PyLong_Type.tp_name);
22193 0 : return -1;
22194 : }
22195 : }
22196 0 : return 0;
22197 : }
22198 :
22199 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_is_val_returned(PyObject *obj, void *closure)
22200 : {
22201 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
22202 : PyObject *py_is_val_returned;
22203 0 : py_is_val_returned = PyLong_FromUnsignedLongLong((uint32_t)object->is_val_returned);
22204 0 : return py_is_val_returned;
22205 : }
22206 :
22207 0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_is_val_returned(PyObject *py_obj, PyObject *value, void *closure)
22208 : {
22209 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
22210 0 : if (value == NULL) {
22211 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_val_returned");
22212 0 : return -1;
22213 : }
22214 : {
22215 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_val_returned));
22216 0 : if (PyLong_Check(value)) {
22217 : unsigned long long test_var;
22218 0 : test_var = PyLong_AsUnsignedLongLong(value);
22219 0 : if (PyErr_Occurred() != NULL) {
22220 0 : return -1;
22221 : }
22222 0 : if (test_var > uint_max) {
22223 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22224 : PyLong_Type.tp_name, uint_max, test_var);
22225 0 : return -1;
22226 : }
22227 0 : object->is_val_returned = test_var;
22228 : } else {
22229 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22230 : PyLong_Type.tp_name);
22231 0 : return -1;
22232 : }
22233 : }
22234 0 : return 0;
22235 : }
22236 :
22237 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_get_attr_val(PyObject *obj, void *closure)
22238 : {
22239 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(obj);
22240 : PyObject *py_attr_val;
22241 0 : py_attr_val = pytalloc_reference_ex(&drsuapi_DsAttributeValue_Type, pytalloc_get_mem_ctx(obj), &object->attr_val);
22242 0 : return py_attr_val;
22243 : }
22244 :
22245 0 : static int py_drsuapi_DsAddEntry_AttrErr_V1_set_attr_val(PyObject *py_obj, PyObject *value, void *closure)
22246 : {
22247 0 : struct drsuapi_DsAddEntry_AttrErr_V1 *object = (struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(py_obj);
22248 0 : if (value == NULL) {
22249 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attr_val");
22250 0 : return -1;
22251 : }
22252 0 : PY_CHECK_TYPE(&drsuapi_DsAttributeValue_Type, value, return -1;);
22253 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22254 0 : PyErr_NoMemory();
22255 0 : return -1;
22256 : }
22257 0 : object->attr_val = *(struct drsuapi_DsAttributeValue *)pytalloc_get_ptr(value);
22258 0 : return 0;
22259 : }
22260 :
22261 : static PyGetSetDef py_drsuapi_DsAddEntry_AttrErr_V1_getsetters[] = {
22262 : {
22263 : .name = discard_const_p(char, "dsid"),
22264 : .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_dsid,
22265 : .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_dsid,
22266 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22267 : },
22268 : {
22269 : .name = discard_const_p(char, "extended_err"),
22270 : .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_err,
22271 : .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_err,
22272 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
22273 : },
22274 : {
22275 : .name = discard_const_p(char, "extended_data"),
22276 : .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_extended_data,
22277 : .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_extended_data,
22278 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22279 : },
22280 : {
22281 : .name = discard_const_p(char, "problem"),
22282 : .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_problem,
22283 : .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_problem,
22284 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
22285 : },
22286 : {
22287 : .name = discard_const_p(char, "attid"),
22288 : .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_attid,
22289 : .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_attid,
22290 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeId")
22291 : },
22292 : {
22293 : .name = discard_const_p(char, "is_val_returned"),
22294 : .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_is_val_returned,
22295 : .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_is_val_returned,
22296 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22297 : },
22298 : {
22299 : .name = discard_const_p(char, "attr_val"),
22300 : .get = py_drsuapi_DsAddEntry_AttrErr_V1_get_attr_val,
22301 : .set = py_drsuapi_DsAddEntry_AttrErr_V1_set_attr_val,
22302 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAttributeValue")
22303 : },
22304 : { .name = NULL }
22305 : };
22306 :
22307 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErr_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22308 : {
22309 0 : return pytalloc_new(struct drsuapi_DsAddEntry_AttrErr_V1, type);
22310 : }
22311 :
22312 :
22313 : static PyTypeObject drsuapi_DsAddEntry_AttrErr_V1_Type = {
22314 : PyVarObject_HEAD_INIT(NULL, 0)
22315 : .tp_name = "drsuapi.DsAddEntry_AttrErr_V1",
22316 : .tp_getset = py_drsuapi_DsAddEntry_AttrErr_V1_getsetters,
22317 : .tp_methods = NULL,
22318 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22319 : .tp_new = py_drsuapi_DsAddEntry_AttrErr_V1_new,
22320 : };
22321 :
22322 :
22323 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_next(PyObject *obj, void *closure)
22324 : {
22325 0 : struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(obj);
22326 : PyObject *py_next;
22327 0 : if (object->next == NULL) {
22328 0 : Py_RETURN_NONE;
22329 : }
22330 0 : if (object->next == NULL) {
22331 0 : py_next = Py_None;
22332 0 : Py_INCREF(py_next);
22333 : } else {
22334 0 : py_next = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, object->next, object->next);
22335 : }
22336 0 : return py_next;
22337 : }
22338 :
22339 0 : static int py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
22340 : {
22341 0 : struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(py_obj);
22342 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next));
22343 0 : if (value == NULL) {
22344 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next");
22345 0 : return -1;
22346 : }
22347 0 : if (value == Py_None) {
22348 0 : object->next = NULL;
22349 : } else {
22350 0 : object->next = NULL;
22351 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, value, return -1;);
22352 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22353 0 : PyErr_NoMemory();
22354 0 : return -1;
22355 : }
22356 0 : object->next = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(value);
22357 : }
22358 0 : return 0;
22359 : }
22360 :
22361 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_err_data(PyObject *obj, void *closure)
22362 : {
22363 0 : struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(obj);
22364 : PyObject *py_err_data;
22365 0 : py_err_data = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErr_V1_Type, pytalloc_get_mem_ctx(obj), &object->err_data);
22366 0 : return py_err_data;
22367 : }
22368 :
22369 0 : static int py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_err_data(PyObject *py_obj, PyObject *value, void *closure)
22370 : {
22371 0 : struct drsuapi_DsAddEntry_AttrErrListItem_V1 *object = (struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(py_obj);
22372 0 : if (value == NULL) {
22373 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->err_data");
22374 0 : return -1;
22375 : }
22376 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErr_V1_Type, value, return -1;);
22377 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22378 0 : PyErr_NoMemory();
22379 0 : return -1;
22380 : }
22381 0 : object->err_data = *(struct drsuapi_DsAddEntry_AttrErr_V1 *)pytalloc_get_ptr(value);
22382 0 : return 0;
22383 : }
22384 :
22385 : static PyGetSetDef py_drsuapi_DsAddEntry_AttrErrListItem_V1_getsetters[] = {
22386 : {
22387 : .name = discard_const_p(char, "next"),
22388 : .get = py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_next,
22389 : .set = py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_next,
22390 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_AttrErrListItem_V1")
22391 : },
22392 : {
22393 : .name = discard_const_p(char, "err_data"),
22394 : .get = py_drsuapi_DsAddEntry_AttrErrListItem_V1_get_err_data,
22395 : .set = py_drsuapi_DsAddEntry_AttrErrListItem_V1_set_err_data,
22396 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_AttrErr_V1")
22397 : },
22398 : { .name = NULL }
22399 : };
22400 :
22401 0 : static PyObject *py_drsuapi_DsAddEntry_AttrErrListItem_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22402 : {
22403 0 : return pytalloc_new(struct drsuapi_DsAddEntry_AttrErrListItem_V1, type);
22404 : }
22405 :
22406 :
22407 : static PyTypeObject drsuapi_DsAddEntry_AttrErrListItem_V1_Type = {
22408 : PyVarObject_HEAD_INIT(NULL, 0)
22409 : .tp_name = "drsuapi.DsAddEntry_AttrErrListItem_V1",
22410 : .tp_getset = py_drsuapi_DsAddEntry_AttrErrListItem_V1_getsetters,
22411 : .tp_methods = NULL,
22412 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22413 : .tp_new = py_drsuapi_DsAddEntry_AttrErrListItem_V1_new,
22414 : };
22415 :
22416 :
22417 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_id(PyObject *obj, void *closure)
22418 : {
22419 0 : struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(obj);
22420 : PyObject *py_id;
22421 0 : if (object->id == NULL) {
22422 0 : Py_RETURN_NONE;
22423 : }
22424 0 : if (object->id == NULL) {
22425 0 : py_id = Py_None;
22426 0 : Py_INCREF(py_id);
22427 : } else {
22428 0 : py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
22429 : }
22430 0 : return py_id;
22431 : }
22432 :
22433 0 : static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_id(PyObject *py_obj, PyObject *value, void *closure)
22434 : {
22435 0 : struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(py_obj);
22436 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id));
22437 0 : if (value == NULL) {
22438 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id");
22439 0 : return -1;
22440 : }
22441 0 : if (value == Py_None) {
22442 0 : object->id = NULL;
22443 : } else {
22444 0 : object->id = NULL;
22445 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
22446 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22447 0 : PyErr_NoMemory();
22448 0 : return -1;
22449 : }
22450 0 : object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
22451 : }
22452 0 : return 0;
22453 : }
22454 :
22455 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_count(PyObject *obj, void *closure)
22456 : {
22457 0 : struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(obj);
22458 : PyObject *py_count;
22459 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
22460 0 : return py_count;
22461 : }
22462 :
22463 0 : static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_count(PyObject *py_obj, PyObject *value, void *closure)
22464 : {
22465 0 : struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(py_obj);
22466 0 : if (value == NULL) {
22467 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
22468 0 : return -1;
22469 : }
22470 : {
22471 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
22472 0 : if (PyLong_Check(value)) {
22473 : unsigned long long test_var;
22474 0 : test_var = PyLong_AsUnsignedLongLong(value);
22475 0 : if (PyErr_Occurred() != NULL) {
22476 0 : return -1;
22477 : }
22478 0 : if (test_var > uint_max) {
22479 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22480 : PyLong_Type.tp_name, uint_max, test_var);
22481 0 : return -1;
22482 : }
22483 0 : object->count = test_var;
22484 : } else {
22485 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22486 : PyLong_Type.tp_name);
22487 0 : return -1;
22488 : }
22489 : }
22490 0 : return 0;
22491 : }
22492 :
22493 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_first(PyObject *obj, void *closure)
22494 : {
22495 0 : struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(obj);
22496 : PyObject *py_first;
22497 0 : py_first = pytalloc_reference_ex(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, pytalloc_get_mem_ctx(obj), &object->first);
22498 0 : return py_first;
22499 : }
22500 :
22501 0 : static int py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_first(PyObject *py_obj, PyObject *value, void *closure)
22502 : {
22503 0 : struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(py_obj);
22504 0 : if (value == NULL) {
22505 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first");
22506 0 : return -1;
22507 : }
22508 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type, value, return -1;);
22509 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22510 0 : PyErr_NoMemory();
22511 0 : return -1;
22512 : }
22513 0 : object->first = *(struct drsuapi_DsAddEntry_AttrErrListItem_V1 *)pytalloc_get_ptr(value);
22514 0 : return 0;
22515 : }
22516 :
22517 : static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Attr_V1_getsetters[] = {
22518 : {
22519 : .name = discard_const_p(char, "id"),
22520 : .get = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_id,
22521 : .set = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_id,
22522 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
22523 : },
22524 : {
22525 : .name = discard_const_p(char, "count"),
22526 : .get = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_count,
22527 : .set = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_count,
22528 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22529 : },
22530 : {
22531 : .name = discard_const_p(char, "first"),
22532 : .get = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_get_first,
22533 : .set = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_set_first,
22534 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_AttrErrListItem_V1")
22535 : },
22536 : { .name = NULL }
22537 : };
22538 :
22539 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Attr_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22540 : {
22541 0 : return pytalloc_new(struct drsuapi_DsAddEntryErrorInfo_Attr_V1, type);
22542 : }
22543 :
22544 :
22545 : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Attr_V1_Type = {
22546 : PyVarObject_HEAD_INIT(NULL, 0)
22547 : .tp_name = "drsuapi.DsAddEntryErrorInfo_Attr_V1",
22548 : .tp_getset = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_getsetters,
22549 : .tp_methods = NULL,
22550 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22551 : .tp_new = py_drsuapi_DsAddEntryErrorInfo_Attr_V1_new,
22552 : };
22553 :
22554 :
22555 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_dsid(PyObject *obj, void *closure)
22556 : {
22557 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
22558 : PyObject *py_dsid;
22559 0 : py_dsid = PyLong_FromUnsignedLongLong((uint32_t)object->dsid);
22560 0 : return py_dsid;
22561 : }
22562 :
22563 0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
22564 : {
22565 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
22566 0 : if (value == NULL) {
22567 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
22568 0 : return -1;
22569 : }
22570 : {
22571 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
22572 0 : if (PyLong_Check(value)) {
22573 : unsigned long long test_var;
22574 0 : test_var = PyLong_AsUnsignedLongLong(value);
22575 0 : if (PyErr_Occurred() != NULL) {
22576 0 : return -1;
22577 : }
22578 0 : if (test_var > uint_max) {
22579 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22580 : PyLong_Type.tp_name, uint_max, test_var);
22581 0 : return -1;
22582 : }
22583 0 : object->dsid = test_var;
22584 : } else {
22585 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22586 : PyLong_Type.tp_name);
22587 0 : return -1;
22588 : }
22589 : }
22590 0 : return 0;
22591 : }
22592 :
22593 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_err(PyObject *obj, void *closure)
22594 : {
22595 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
22596 : PyObject *py_extended_err;
22597 0 : py_extended_err = PyErr_FromWERROR(object->extended_err);
22598 0 : return py_extended_err;
22599 : }
22600 :
22601 0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
22602 : {
22603 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
22604 0 : if (value == NULL) {
22605 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
22606 0 : return -1;
22607 : }
22608 0 : object->extended_err = W_ERROR(PyLong_AsLong(value));
22609 0 : return 0;
22610 : }
22611 :
22612 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_data(PyObject *obj, void *closure)
22613 : {
22614 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
22615 : PyObject *py_extended_data;
22616 0 : py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)object->extended_data);
22617 0 : return py_extended_data;
22618 : }
22619 :
22620 0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
22621 : {
22622 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
22623 0 : if (value == NULL) {
22624 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
22625 0 : return -1;
22626 : }
22627 : {
22628 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
22629 0 : if (PyLong_Check(value)) {
22630 : unsigned long long test_var;
22631 0 : test_var = PyLong_AsUnsignedLongLong(value);
22632 0 : if (PyErr_Occurred() != NULL) {
22633 0 : return -1;
22634 : }
22635 0 : if (test_var > uint_max) {
22636 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22637 : PyLong_Type.tp_name, uint_max, test_var);
22638 0 : return -1;
22639 : }
22640 0 : object->extended_data = test_var;
22641 : } else {
22642 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22643 : PyLong_Type.tp_name);
22644 0 : return -1;
22645 : }
22646 : }
22647 0 : return 0;
22648 : }
22649 :
22650 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_problem(PyObject *obj, void *closure)
22651 : {
22652 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
22653 : PyObject *py_problem;
22654 0 : py_problem = PyLong_FromLong((uint16_t)object->problem);
22655 0 : return py_problem;
22656 : }
22657 :
22658 0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_problem(PyObject *py_obj, PyObject *value, void *closure)
22659 : {
22660 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
22661 0 : if (value == NULL) {
22662 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->problem");
22663 0 : return -1;
22664 : }
22665 : {
22666 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->problem));
22667 0 : if (PyLong_Check(value)) {
22668 : unsigned long long test_var;
22669 0 : test_var = PyLong_AsUnsignedLongLong(value);
22670 0 : if (PyErr_Occurred() != NULL) {
22671 0 : return -1;
22672 : }
22673 0 : if (test_var > uint_max) {
22674 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22675 : PyLong_Type.tp_name, uint_max, test_var);
22676 0 : return -1;
22677 : }
22678 0 : object->problem = test_var;
22679 : } else {
22680 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22681 : PyLong_Type.tp_name);
22682 0 : return -1;
22683 : }
22684 : }
22685 0 : return 0;
22686 : }
22687 :
22688 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_id_matched(PyObject *obj, void *closure)
22689 : {
22690 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(obj);
22691 : PyObject *py_id_matched;
22692 0 : if (object->id_matched == NULL) {
22693 0 : Py_RETURN_NONE;
22694 : }
22695 0 : if (object->id_matched == NULL) {
22696 0 : py_id_matched = Py_None;
22697 0 : Py_INCREF(py_id_matched);
22698 : } else {
22699 0 : py_id_matched = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id_matched, object->id_matched);
22700 : }
22701 0 : return py_id_matched;
22702 : }
22703 :
22704 0 : static int py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_id_matched(PyObject *py_obj, PyObject *value, void *closure)
22705 : {
22706 0 : struct drsuapi_DsAddEntryErrorInfo_Name_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(py_obj);
22707 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id_matched));
22708 0 : if (value == NULL) {
22709 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id_matched");
22710 0 : return -1;
22711 : }
22712 0 : if (value == Py_None) {
22713 0 : object->id_matched = NULL;
22714 : } else {
22715 0 : object->id_matched = NULL;
22716 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
22717 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22718 0 : PyErr_NoMemory();
22719 0 : return -1;
22720 : }
22721 0 : object->id_matched = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
22722 : }
22723 0 : return 0;
22724 : }
22725 :
22726 : static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Name_V1_getsetters[] = {
22727 : {
22728 : .name = discard_const_p(char, "dsid"),
22729 : .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_dsid,
22730 : .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_dsid,
22731 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22732 : },
22733 : {
22734 : .name = discard_const_p(char, "extended_err"),
22735 : .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_err,
22736 : .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_err,
22737 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
22738 : },
22739 : {
22740 : .name = discard_const_p(char, "extended_data"),
22741 : .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_extended_data,
22742 : .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_extended_data,
22743 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22744 : },
22745 : {
22746 : .name = discard_const_p(char, "problem"),
22747 : .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_problem,
22748 : .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_problem,
22749 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
22750 : },
22751 : {
22752 : .name = discard_const_p(char, "id_matched"),
22753 : .get = py_drsuapi_DsAddEntryErrorInfo_Name_V1_get_id_matched,
22754 : .set = py_drsuapi_DsAddEntryErrorInfo_Name_V1_set_id_matched,
22755 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
22756 : },
22757 : { .name = NULL }
22758 : };
22759 :
22760 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Name_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22761 : {
22762 0 : return pytalloc_new(struct drsuapi_DsAddEntryErrorInfo_Name_V1, type);
22763 : }
22764 :
22765 :
22766 : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Name_V1_Type = {
22767 : PyVarObject_HEAD_INIT(NULL, 0)
22768 : .tp_name = "drsuapi.DsAddEntryErrorInfo_Name_V1",
22769 : .tp_getset = py_drsuapi_DsAddEntryErrorInfo_Name_V1_getsetters,
22770 : .tp_methods = NULL,
22771 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22772 : .tp_new = py_drsuapi_DsAddEntryErrorInfo_Name_V1_new,
22773 : };
22774 :
22775 :
22776 0 : static PyObject *py_drsuapi_NameResOp_V1_get_name_res(PyObject *obj, void *closure)
22777 : {
22778 0 : struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(obj);
22779 : PyObject *py_name_res;
22780 0 : py_name_res = PyLong_FromLong((uint16_t)object->name_res);
22781 0 : return py_name_res;
22782 : }
22783 :
22784 0 : static int py_drsuapi_NameResOp_V1_set_name_res(PyObject *py_obj, PyObject *value, void *closure)
22785 : {
22786 0 : struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(py_obj);
22787 0 : if (value == NULL) {
22788 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->name_res");
22789 0 : return -1;
22790 : }
22791 : {
22792 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->name_res));
22793 0 : if (PyLong_Check(value)) {
22794 : unsigned long long test_var;
22795 0 : test_var = PyLong_AsUnsignedLongLong(value);
22796 0 : if (PyErr_Occurred() != NULL) {
22797 0 : return -1;
22798 : }
22799 0 : if (test_var > uint_max) {
22800 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22801 : PyLong_Type.tp_name, uint_max, test_var);
22802 0 : return -1;
22803 : }
22804 0 : object->name_res = test_var;
22805 : } else {
22806 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22807 : PyLong_Type.tp_name);
22808 0 : return -1;
22809 : }
22810 : }
22811 0 : return 0;
22812 : }
22813 :
22814 0 : static PyObject *py_drsuapi_NameResOp_V1_get_unused_pad(PyObject *obj, void *closure)
22815 : {
22816 0 : struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(obj);
22817 : PyObject *py_unused_pad;
22818 0 : py_unused_pad = PyLong_FromLong((uint16_t)object->unused_pad);
22819 0 : return py_unused_pad;
22820 : }
22821 :
22822 0 : static int py_drsuapi_NameResOp_V1_set_unused_pad(PyObject *py_obj, PyObject *value, void *closure)
22823 : {
22824 0 : struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(py_obj);
22825 0 : if (value == NULL) {
22826 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->unused_pad");
22827 0 : return -1;
22828 : }
22829 : {
22830 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->unused_pad));
22831 0 : if (PyLong_Check(value)) {
22832 : unsigned long long test_var;
22833 0 : test_var = PyLong_AsUnsignedLongLong(value);
22834 0 : if (PyErr_Occurred() != NULL) {
22835 0 : return -1;
22836 : }
22837 0 : if (test_var > uint_max) {
22838 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22839 : PyLong_Type.tp_name, uint_max, test_var);
22840 0 : return -1;
22841 : }
22842 0 : object->unused_pad = test_var;
22843 : } else {
22844 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22845 : PyLong_Type.tp_name);
22846 0 : return -1;
22847 : }
22848 : }
22849 0 : return 0;
22850 : }
22851 :
22852 0 : static PyObject *py_drsuapi_NameResOp_V1_get_next_rdn(PyObject *obj, void *closure)
22853 : {
22854 0 : struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(obj);
22855 : PyObject *py_next_rdn;
22856 0 : py_next_rdn = PyLong_FromLong((uint16_t)object->next_rdn);
22857 0 : return py_next_rdn;
22858 : }
22859 :
22860 0 : static int py_drsuapi_NameResOp_V1_set_next_rdn(PyObject *py_obj, PyObject *value, void *closure)
22861 : {
22862 0 : struct drsuapi_NameResOp_V1 *object = (struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(py_obj);
22863 0 : if (value == NULL) {
22864 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next_rdn");
22865 0 : return -1;
22866 : }
22867 : {
22868 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->next_rdn));
22869 0 : if (PyLong_Check(value)) {
22870 : unsigned long long test_var;
22871 0 : test_var = PyLong_AsUnsignedLongLong(value);
22872 0 : if (PyErr_Occurred() != NULL) {
22873 0 : return -1;
22874 : }
22875 0 : if (test_var > uint_max) {
22876 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22877 : PyLong_Type.tp_name, uint_max, test_var);
22878 0 : return -1;
22879 : }
22880 0 : object->next_rdn = test_var;
22881 : } else {
22882 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22883 : PyLong_Type.tp_name);
22884 0 : return -1;
22885 : }
22886 : }
22887 0 : return 0;
22888 : }
22889 :
22890 : static PyGetSetDef py_drsuapi_NameResOp_V1_getsetters[] = {
22891 : {
22892 : .name = discard_const_p(char, "name_res"),
22893 : .get = py_drsuapi_NameResOp_V1_get_name_res,
22894 : .set = py_drsuapi_NameResOp_V1_set_name_res,
22895 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22896 : },
22897 : {
22898 : .name = discard_const_p(char, "unused_pad"),
22899 : .get = py_drsuapi_NameResOp_V1_get_unused_pad,
22900 : .set = py_drsuapi_NameResOp_V1_set_unused_pad,
22901 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22902 : },
22903 : {
22904 : .name = discard_const_p(char, "next_rdn"),
22905 : .get = py_drsuapi_NameResOp_V1_get_next_rdn,
22906 : .set = py_drsuapi_NameResOp_V1_set_next_rdn,
22907 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
22908 : },
22909 : { .name = NULL }
22910 : };
22911 :
22912 0 : static PyObject *py_drsuapi_NameResOp_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22913 : {
22914 0 : return pytalloc_new(struct drsuapi_NameResOp_V1, type);
22915 : }
22916 :
22917 :
22918 : static PyTypeObject drsuapi_NameResOp_V1_Type = {
22919 : PyVarObject_HEAD_INIT(NULL, 0)
22920 : .tp_name = "drsuapi.NameResOp_V1",
22921 : .tp_getset = py_drsuapi_NameResOp_V1_getsetters,
22922 : .tp_methods = NULL,
22923 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22924 : .tp_new = py_drsuapi_NameResOp_V1_new,
22925 : };
22926 :
22927 :
22928 0 : static PyObject *py_drsuapi_DsaAddressListItem_V1_get_next(PyObject *obj, void *closure)
22929 : {
22930 0 : struct drsuapi_DsaAddressListItem_V1 *object = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(obj);
22931 : PyObject *py_next;
22932 0 : if (object->next == NULL) {
22933 0 : Py_RETURN_NONE;
22934 : }
22935 0 : if (object->next == NULL) {
22936 0 : py_next = Py_None;
22937 0 : Py_INCREF(py_next);
22938 : } else {
22939 0 : py_next = pytalloc_reference_ex(&drsuapi_DsaAddressListItem_V1_Type, object->next, object->next);
22940 : }
22941 0 : return py_next;
22942 : }
22943 :
22944 0 : static int py_drsuapi_DsaAddressListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
22945 : {
22946 0 : struct drsuapi_DsaAddressListItem_V1 *object = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(py_obj);
22947 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next));
22948 0 : if (value == NULL) {
22949 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next");
22950 0 : return -1;
22951 : }
22952 0 : if (value == Py_None) {
22953 0 : object->next = NULL;
22954 : } else {
22955 0 : object->next = NULL;
22956 0 : PY_CHECK_TYPE(&drsuapi_DsaAddressListItem_V1_Type, value, return -1;);
22957 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22958 0 : PyErr_NoMemory();
22959 0 : return -1;
22960 : }
22961 0 : object->next = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(value);
22962 : }
22963 0 : return 0;
22964 : }
22965 :
22966 0 : static PyObject *py_drsuapi_DsaAddressListItem_V1_get_address(PyObject *obj, void *closure)
22967 : {
22968 0 : struct drsuapi_DsaAddressListItem_V1 *object = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(obj);
22969 : PyObject *py_address;
22970 0 : if (object->address == NULL) {
22971 0 : Py_RETURN_NONE;
22972 : }
22973 0 : if (object->address == NULL) {
22974 0 : py_address = Py_None;
22975 0 : Py_INCREF(py_address);
22976 : } else {
22977 0 : py_address = pytalloc_reference_ex(lsa_String_Type, object->address, object->address);
22978 : }
22979 0 : return py_address;
22980 : }
22981 :
22982 0 : static int py_drsuapi_DsaAddressListItem_V1_set_address(PyObject *py_obj, PyObject *value, void *closure)
22983 : {
22984 0 : struct drsuapi_DsaAddressListItem_V1 *object = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(py_obj);
22985 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->address));
22986 0 : if (value == NULL) {
22987 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->address");
22988 0 : return -1;
22989 : }
22990 0 : if (value == Py_None) {
22991 0 : object->address = NULL;
22992 : } else {
22993 0 : object->address = NULL;
22994 0 : PY_CHECK_TYPE(lsa_String_Type, value, return -1;);
22995 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22996 0 : PyErr_NoMemory();
22997 0 : return -1;
22998 : }
22999 0 : object->address = (struct lsa_String *)pytalloc_get_ptr(value);
23000 : }
23001 0 : return 0;
23002 : }
23003 :
23004 : static PyGetSetDef py_drsuapi_DsaAddressListItem_V1_getsetters[] = {
23005 : {
23006 : .name = discard_const_p(char, "next"),
23007 : .get = py_drsuapi_DsaAddressListItem_V1_get_next,
23008 : .set = py_drsuapi_DsaAddressListItem_V1_set_next,
23009 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsaAddressListItem_V1")
23010 : },
23011 : {
23012 : .name = discard_const_p(char, "address"),
23013 : .get = py_drsuapi_DsaAddressListItem_V1_get_address,
23014 : .set = py_drsuapi_DsaAddressListItem_V1_set_address,
23015 : .doc = discard_const_p(char, "PIDL-generated element of base type lsa_String")
23016 : },
23017 : { .name = NULL }
23018 : };
23019 :
23020 0 : static PyObject *py_drsuapi_DsaAddressListItem_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23021 : {
23022 0 : return pytalloc_new(struct drsuapi_DsaAddressListItem_V1, type);
23023 : }
23024 :
23025 :
23026 : static PyTypeObject drsuapi_DsaAddressListItem_V1_Type = {
23027 : PyVarObject_HEAD_INIT(NULL, 0)
23028 : .tp_name = "drsuapi.DsaAddressListItem_V1",
23029 : .tp_getset = py_drsuapi_DsaAddressListItem_V1_getsetters,
23030 : .tp_methods = NULL,
23031 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23032 : .tp_new = py_drsuapi_DsaAddressListItem_V1_new,
23033 : };
23034 :
23035 :
23036 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_id_target(PyObject *obj, void *closure)
23037 : {
23038 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23039 : PyObject *py_id_target;
23040 0 : if (object->id_target == NULL) {
23041 0 : Py_RETURN_NONE;
23042 : }
23043 0 : if (object->id_target == NULL) {
23044 0 : py_id_target = Py_None;
23045 0 : Py_INCREF(py_id_target);
23046 : } else {
23047 0 : py_id_target = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id_target, object->id_target);
23048 : }
23049 0 : return py_id_target;
23050 : }
23051 :
23052 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_id_target(PyObject *py_obj, PyObject *value, void *closure)
23053 : {
23054 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23055 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id_target));
23056 0 : if (value == NULL) {
23057 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id_target");
23058 0 : return -1;
23059 : }
23060 0 : if (value == Py_None) {
23061 0 : object->id_target = NULL;
23062 : } else {
23063 0 : object->id_target = NULL;
23064 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
23065 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23066 0 : PyErr_NoMemory();
23067 0 : return -1;
23068 : }
23069 0 : object->id_target = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
23070 : }
23071 0 : return 0;
23072 : }
23073 :
23074 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_op_state(PyObject *obj, void *closure)
23075 : {
23076 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23077 : PyObject *py_op_state;
23078 0 : py_op_state = pytalloc_reference_ex(&drsuapi_NameResOp_V1_Type, pytalloc_get_mem_ctx(obj), &object->op_state);
23079 0 : return py_op_state;
23080 : }
23081 :
23082 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_op_state(PyObject *py_obj, PyObject *value, void *closure)
23083 : {
23084 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23085 0 : if (value == NULL) {
23086 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->op_state");
23087 0 : return -1;
23088 : }
23089 0 : PY_CHECK_TYPE(&drsuapi_NameResOp_V1_Type, value, return -1;);
23090 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23091 0 : PyErr_NoMemory();
23092 0 : return -1;
23093 : }
23094 0 : object->op_state = *(struct drsuapi_NameResOp_V1 *)pytalloc_get_ptr(value);
23095 0 : return 0;
23096 : }
23097 :
23098 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_alias(PyObject *obj, void *closure)
23099 : {
23100 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23101 : PyObject *py_rdn_alias;
23102 0 : py_rdn_alias = PyLong_FromLong((uint16_t)object->rdn_alias);
23103 0 : return py_rdn_alias;
23104 : }
23105 :
23106 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_alias(PyObject *py_obj, PyObject *value, void *closure)
23107 : {
23108 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23109 0 : if (value == NULL) {
23110 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rdn_alias");
23111 0 : return -1;
23112 : }
23113 : {
23114 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rdn_alias));
23115 0 : if (PyLong_Check(value)) {
23116 : unsigned long long test_var;
23117 0 : test_var = PyLong_AsUnsignedLongLong(value);
23118 0 : if (PyErr_Occurred() != NULL) {
23119 0 : return -1;
23120 : }
23121 0 : if (test_var > uint_max) {
23122 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23123 : PyLong_Type.tp_name, uint_max, test_var);
23124 0 : return -1;
23125 : }
23126 0 : object->rdn_alias = test_var;
23127 : } else {
23128 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23129 : PyLong_Type.tp_name);
23130 0 : return -1;
23131 : }
23132 : }
23133 0 : return 0;
23134 : }
23135 :
23136 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_internal(PyObject *obj, void *closure)
23137 : {
23138 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23139 : PyObject *py_rdn_internal;
23140 0 : py_rdn_internal = PyLong_FromLong((uint16_t)object->rdn_internal);
23141 0 : return py_rdn_internal;
23142 : }
23143 :
23144 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_internal(PyObject *py_obj, PyObject *value, void *closure)
23145 : {
23146 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23147 0 : if (value == NULL) {
23148 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rdn_internal");
23149 0 : return -1;
23150 : }
23151 : {
23152 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->rdn_internal));
23153 0 : if (PyLong_Check(value)) {
23154 : unsigned long long test_var;
23155 0 : test_var = PyLong_AsUnsignedLongLong(value);
23156 0 : if (PyErr_Occurred() != NULL) {
23157 0 : return -1;
23158 : }
23159 0 : if (test_var > uint_max) {
23160 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23161 : PyLong_Type.tp_name, uint_max, test_var);
23162 0 : return -1;
23163 : }
23164 0 : object->rdn_internal = test_var;
23165 : } else {
23166 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23167 : PyLong_Type.tp_name);
23168 0 : return -1;
23169 : }
23170 : }
23171 0 : return 0;
23172 : }
23173 :
23174 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_ref_type(PyObject *obj, void *closure)
23175 : {
23176 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23177 : PyObject *py_ref_type;
23178 0 : py_ref_type = PyLong_FromLong((uint16_t)object->ref_type);
23179 0 : return py_ref_type;
23180 : }
23181 :
23182 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_ref_type(PyObject *py_obj, PyObject *value, void *closure)
23183 : {
23184 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23185 0 : if (value == NULL) {
23186 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ref_type");
23187 0 : return -1;
23188 : }
23189 : {
23190 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ref_type));
23191 0 : if (PyLong_Check(value)) {
23192 : unsigned long long test_var;
23193 0 : test_var = PyLong_AsUnsignedLongLong(value);
23194 0 : if (PyErr_Occurred() != NULL) {
23195 0 : return -1;
23196 : }
23197 0 : if (test_var > uint_max) {
23198 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23199 : PyLong_Type.tp_name, uint_max, test_var);
23200 0 : return -1;
23201 : }
23202 0 : object->ref_type = test_var;
23203 : } else {
23204 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23205 : PyLong_Type.tp_name);
23206 0 : return -1;
23207 : }
23208 : }
23209 0 : return 0;
23210 : }
23211 :
23212 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list_count(PyObject *obj, void *closure)
23213 : {
23214 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23215 : PyObject *py_addr_list_count;
23216 0 : py_addr_list_count = PyLong_FromLong((uint16_t)object->addr_list_count);
23217 0 : return py_addr_list_count;
23218 : }
23219 :
23220 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list_count(PyObject *py_obj, PyObject *value, void *closure)
23221 : {
23222 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23223 0 : if (value == NULL) {
23224 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_list_count");
23225 0 : return -1;
23226 : }
23227 : {
23228 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->addr_list_count));
23229 0 : if (PyLong_Check(value)) {
23230 : unsigned long long test_var;
23231 0 : test_var = PyLong_AsUnsignedLongLong(value);
23232 0 : if (PyErr_Occurred() != NULL) {
23233 0 : return -1;
23234 : }
23235 0 : if (test_var > uint_max) {
23236 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23237 : PyLong_Type.tp_name, uint_max, test_var);
23238 0 : return -1;
23239 : }
23240 0 : object->addr_list_count = test_var;
23241 : } else {
23242 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23243 : PyLong_Type.tp_name);
23244 0 : return -1;
23245 : }
23246 : }
23247 0 : return 0;
23248 : }
23249 :
23250 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list(PyObject *obj, void *closure)
23251 : {
23252 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23253 : PyObject *py_addr_list;
23254 0 : if (object->addr_list == NULL) {
23255 0 : Py_RETURN_NONE;
23256 : }
23257 0 : if (object->addr_list == NULL) {
23258 0 : py_addr_list = Py_None;
23259 0 : Py_INCREF(py_addr_list);
23260 : } else {
23261 0 : py_addr_list = pytalloc_reference_ex(&drsuapi_DsaAddressListItem_V1_Type, object->addr_list, object->addr_list);
23262 : }
23263 0 : return py_addr_list;
23264 : }
23265 :
23266 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list(PyObject *py_obj, PyObject *value, void *closure)
23267 : {
23268 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23269 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->addr_list));
23270 0 : if (value == NULL) {
23271 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->addr_list");
23272 0 : return -1;
23273 : }
23274 0 : if (value == Py_None) {
23275 0 : object->addr_list = NULL;
23276 : } else {
23277 0 : object->addr_list = NULL;
23278 0 : PY_CHECK_TYPE(&drsuapi_DsaAddressListItem_V1_Type, value, return -1;);
23279 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23280 0 : PyErr_NoMemory();
23281 0 : return -1;
23282 : }
23283 0 : object->addr_list = (struct drsuapi_DsaAddressListItem_V1 *)pytalloc_get_ptr(value);
23284 : }
23285 0 : return 0;
23286 : }
23287 :
23288 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_next(PyObject *obj, void *closure)
23289 : {
23290 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23291 : PyObject *py_next;
23292 0 : if (object->next == NULL) {
23293 0 : Py_RETURN_NONE;
23294 : }
23295 0 : if (object->next == NULL) {
23296 0 : py_next = Py_None;
23297 0 : Py_INCREF(py_next);
23298 : } else {
23299 0 : py_next = pytalloc_reference_ex(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, object->next, object->next);
23300 : }
23301 0 : return py_next;
23302 : }
23303 :
23304 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_next(PyObject *py_obj, PyObject *value, void *closure)
23305 : {
23306 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23307 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->next));
23308 0 : if (value == NULL) {
23309 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->next");
23310 0 : return -1;
23311 : }
23312 0 : if (value == Py_None) {
23313 0 : object->next = NULL;
23314 : } else {
23315 0 : object->next = NULL;
23316 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, value, return -1;);
23317 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23318 0 : PyErr_NoMemory();
23319 0 : return -1;
23320 : }
23321 0 : object->next = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(value);
23322 : }
23323 0 : return 0;
23324 : }
23325 :
23326 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_is_choice_set(PyObject *obj, void *closure)
23327 : {
23328 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23329 : PyObject *py_is_choice_set;
23330 0 : py_is_choice_set = PyLong_FromUnsignedLongLong((uint32_t)object->is_choice_set);
23331 0 : return py_is_choice_set;
23332 : }
23333 :
23334 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_is_choice_set(PyObject *py_obj, PyObject *value, void *closure)
23335 : {
23336 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23337 0 : if (value == NULL) {
23338 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->is_choice_set");
23339 0 : return -1;
23340 : }
23341 : {
23342 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->is_choice_set));
23343 0 : if (PyLong_Check(value)) {
23344 : unsigned long long test_var;
23345 0 : test_var = PyLong_AsUnsignedLongLong(value);
23346 0 : if (PyErr_Occurred() != NULL) {
23347 0 : return -1;
23348 : }
23349 0 : if (test_var > uint_max) {
23350 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23351 : PyLong_Type.tp_name, uint_max, test_var);
23352 0 : return -1;
23353 : }
23354 0 : object->is_choice_set = test_var;
23355 : } else {
23356 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23357 : PyLong_Type.tp_name);
23358 0 : return -1;
23359 : }
23360 : }
23361 0 : return 0;
23362 : }
23363 :
23364 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_get_choice(PyObject *obj, void *closure)
23365 : {
23366 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(obj);
23367 : PyObject *py_choice;
23368 0 : py_choice = PyLong_FromLong((uint16_t)object->choice);
23369 0 : return py_choice;
23370 : }
23371 :
23372 0 : static int py_drsuapi_DsAddEntry_RefErrListItem_V1_set_choice(PyObject *py_obj, PyObject *value, void *closure)
23373 : {
23374 0 : struct drsuapi_DsAddEntry_RefErrListItem_V1 *object = (struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(py_obj);
23375 0 : if (value == NULL) {
23376 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->choice");
23377 0 : return -1;
23378 : }
23379 : {
23380 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->choice));
23381 0 : if (PyLong_Check(value)) {
23382 : unsigned long long test_var;
23383 0 : test_var = PyLong_AsUnsignedLongLong(value);
23384 0 : if (PyErr_Occurred() != NULL) {
23385 0 : return -1;
23386 : }
23387 0 : if (test_var > uint_max) {
23388 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23389 : PyLong_Type.tp_name, uint_max, test_var);
23390 0 : return -1;
23391 : }
23392 0 : object->choice = test_var;
23393 : } else {
23394 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23395 : PyLong_Type.tp_name);
23396 0 : return -1;
23397 : }
23398 : }
23399 0 : return 0;
23400 : }
23401 :
23402 : static PyGetSetDef py_drsuapi_DsAddEntry_RefErrListItem_V1_getsetters[] = {
23403 : {
23404 : .name = discard_const_p(char, "id_target"),
23405 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_id_target,
23406 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_id_target,
23407 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
23408 : },
23409 : {
23410 : .name = discard_const_p(char, "op_state"),
23411 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_op_state,
23412 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_op_state,
23413 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_NameResOp_V1")
23414 : },
23415 : {
23416 : .name = discard_const_p(char, "rdn_alias"),
23417 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_alias,
23418 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_alias,
23419 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
23420 : },
23421 : {
23422 : .name = discard_const_p(char, "rdn_internal"),
23423 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_rdn_internal,
23424 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_rdn_internal,
23425 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
23426 : },
23427 : {
23428 : .name = discard_const_p(char, "ref_type"),
23429 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_ref_type,
23430 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_ref_type,
23431 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_RefType")
23432 : },
23433 : {
23434 : .name = discard_const_p(char, "addr_list_count"),
23435 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list_count,
23436 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list_count,
23437 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
23438 : },
23439 : {
23440 : .name = discard_const_p(char, "addr_list"),
23441 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_addr_list,
23442 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_addr_list,
23443 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsaAddressListItem_V1")
23444 : },
23445 : {
23446 : .name = discard_const_p(char, "next"),
23447 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_next,
23448 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_next,
23449 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_RefErrListItem_V1")
23450 : },
23451 : {
23452 : .name = discard_const_p(char, "is_choice_set"),
23453 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_is_choice_set,
23454 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_is_choice_set,
23455 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23456 : },
23457 : {
23458 : .name = discard_const_p(char, "choice"),
23459 : .get = py_drsuapi_DsAddEntry_RefErrListItem_V1_get_choice,
23460 : .set = py_drsuapi_DsAddEntry_RefErrListItem_V1_set_choice,
23461 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_ChoiceType")
23462 : },
23463 : { .name = NULL }
23464 : };
23465 :
23466 0 : static PyObject *py_drsuapi_DsAddEntry_RefErrListItem_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23467 : {
23468 0 : return pytalloc_new(struct drsuapi_DsAddEntry_RefErrListItem_V1, type);
23469 : }
23470 :
23471 :
23472 : static PyTypeObject drsuapi_DsAddEntry_RefErrListItem_V1_Type = {
23473 : PyVarObject_HEAD_INIT(NULL, 0)
23474 : .tp_name = "drsuapi.DsAddEntry_RefErrListItem_V1",
23475 : .tp_getset = py_drsuapi_DsAddEntry_RefErrListItem_V1_getsetters,
23476 : .tp_methods = NULL,
23477 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23478 : .tp_new = py_drsuapi_DsAddEntry_RefErrListItem_V1_new,
23479 : };
23480 :
23481 :
23482 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_dsid(PyObject *obj, void *closure)
23483 : {
23484 0 : struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(obj);
23485 : PyObject *py_dsid;
23486 0 : py_dsid = PyLong_FromUnsignedLongLong((uint32_t)object->dsid);
23487 0 : return py_dsid;
23488 : }
23489 :
23490 0 : static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
23491 : {
23492 0 : struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(py_obj);
23493 0 : if (value == NULL) {
23494 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
23495 0 : return -1;
23496 : }
23497 : {
23498 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
23499 0 : if (PyLong_Check(value)) {
23500 : unsigned long long test_var;
23501 0 : test_var = PyLong_AsUnsignedLongLong(value);
23502 0 : if (PyErr_Occurred() != NULL) {
23503 0 : return -1;
23504 : }
23505 0 : if (test_var > uint_max) {
23506 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23507 : PyLong_Type.tp_name, uint_max, test_var);
23508 0 : return -1;
23509 : }
23510 0 : object->dsid = test_var;
23511 : } else {
23512 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23513 : PyLong_Type.tp_name);
23514 0 : return -1;
23515 : }
23516 : }
23517 0 : return 0;
23518 : }
23519 :
23520 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_err(PyObject *obj, void *closure)
23521 : {
23522 0 : struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(obj);
23523 : PyObject *py_extended_err;
23524 0 : py_extended_err = PyErr_FromWERROR(object->extended_err);
23525 0 : return py_extended_err;
23526 : }
23527 :
23528 0 : static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
23529 : {
23530 0 : struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(py_obj);
23531 0 : if (value == NULL) {
23532 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
23533 0 : return -1;
23534 : }
23535 0 : object->extended_err = W_ERROR(PyLong_AsLong(value));
23536 0 : return 0;
23537 : }
23538 :
23539 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_data(PyObject *obj, void *closure)
23540 : {
23541 0 : struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(obj);
23542 : PyObject *py_extended_data;
23543 0 : py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)object->extended_data);
23544 0 : return py_extended_data;
23545 : }
23546 :
23547 0 : static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
23548 : {
23549 0 : struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(py_obj);
23550 0 : if (value == NULL) {
23551 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
23552 0 : return -1;
23553 : }
23554 : {
23555 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
23556 0 : if (PyLong_Check(value)) {
23557 : unsigned long long test_var;
23558 0 : test_var = PyLong_AsUnsignedLongLong(value);
23559 0 : if (PyErr_Occurred() != NULL) {
23560 0 : return -1;
23561 : }
23562 0 : if (test_var > uint_max) {
23563 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23564 : PyLong_Type.tp_name, uint_max, test_var);
23565 0 : return -1;
23566 : }
23567 0 : object->extended_data = test_var;
23568 : } else {
23569 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23570 : PyLong_Type.tp_name);
23571 0 : return -1;
23572 : }
23573 : }
23574 0 : return 0;
23575 : }
23576 :
23577 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_refer(PyObject *obj, void *closure)
23578 : {
23579 0 : struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(obj);
23580 : PyObject *py_refer;
23581 0 : py_refer = pytalloc_reference_ex(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, pytalloc_get_mem_ctx(obj), &object->refer);
23582 0 : return py_refer;
23583 : }
23584 :
23585 0 : static int py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_refer(PyObject *py_obj, PyObject *value, void *closure)
23586 : {
23587 0 : struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *object = (struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(py_obj);
23588 0 : if (value == NULL) {
23589 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->refer");
23590 0 : return -1;
23591 : }
23592 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntry_RefErrListItem_V1_Type, value, return -1;);
23593 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23594 0 : PyErr_NoMemory();
23595 0 : return -1;
23596 : }
23597 0 : object->refer = *(struct drsuapi_DsAddEntry_RefErrListItem_V1 *)pytalloc_get_ptr(value);
23598 0 : return 0;
23599 : }
23600 :
23601 : static PyGetSetDef py_drsuapi_DsAddEntryErrorInfo_Referr_V1_getsetters[] = {
23602 : {
23603 : .name = discard_const_p(char, "dsid"),
23604 : .get = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_dsid,
23605 : .set = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_dsid,
23606 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23607 : },
23608 : {
23609 : .name = discard_const_p(char, "extended_err"),
23610 : .get = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_err,
23611 : .set = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_err,
23612 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
23613 : },
23614 : {
23615 : .name = discard_const_p(char, "extended_data"),
23616 : .get = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_extended_data,
23617 : .set = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_extended_data,
23618 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23619 : },
23620 : {
23621 : .name = discard_const_p(char, "refer"),
23622 : .get = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_get_refer,
23623 : .set = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_set_refer,
23624 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_RefErrListItem_V1")
23625 : },
23626 : { .name = NULL }
23627 : };
23628 :
23629 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_Referr_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23630 : {
23631 0 : return pytalloc_new(struct drsuapi_DsAddEntryErrorInfo_Referr_V1, type);
23632 : }
23633 :
23634 :
23635 : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Referr_V1_Type = {
23636 : PyVarObject_HEAD_INIT(NULL, 0)
23637 : .tp_name = "drsuapi.DsAddEntryErrorInfo_Referr_V1",
23638 : .tp_getset = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_getsetters,
23639 : .tp_methods = NULL,
23640 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23641 : .tp_new = py_drsuapi_DsAddEntryErrorInfo_Referr_V1_new,
23642 : };
23643 :
23644 0 : static PyObject *py_import_drsuapi_DsAddEntryErrorInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryErrorInfo *in)
23645 : {
23646 : PyObject *ret;
23647 :
23648 0 : switch (level) {
23649 0 : case 1:
23650 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type, mem_ctx, &in->attr_err);
23651 0 : return ret;
23652 :
23653 0 : case 2:
23654 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type, mem_ctx, &in->name_err);
23655 0 : return ret;
23656 :
23657 0 : case 3:
23658 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type, mem_ctx, &in->referral_err);
23659 0 : return ret;
23660 :
23661 0 : case 4:
23662 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->security_err);
23663 0 : return ret;
23664 :
23665 0 : case 5:
23666 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->service_err);
23667 0 : return ret;
23668 :
23669 0 : case 6:
23670 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->update_err);
23671 0 : return ret;
23672 :
23673 0 : case 7:
23674 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryErrorInfoX_Type, mem_ctx, &in->system_err);
23675 0 : return ret;
23676 :
23677 : }
23678 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
23679 0 : return NULL;
23680 : }
23681 :
23682 0 : static union drsuapi_DsAddEntryErrorInfo *py_export_drsuapi_DsAddEntryErrorInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
23683 : {
23684 0 : union drsuapi_DsAddEntryErrorInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryErrorInfo);
23685 0 : switch (level) {
23686 0 : case 1:
23687 0 : if (in == NULL) {
23688 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->attr_err");
23689 0 : talloc_free(ret); return NULL;
23690 : }
23691 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type, in, talloc_free(ret); return NULL;);
23692 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
23693 0 : PyErr_NoMemory();
23694 0 : talloc_free(ret); return NULL;
23695 : }
23696 0 : ret->attr_err = *(struct drsuapi_DsAddEntryErrorInfo_Attr_V1 *)pytalloc_get_ptr(in);
23697 0 : break;
23698 :
23699 0 : case 2:
23700 0 : if (in == NULL) {
23701 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name_err");
23702 0 : talloc_free(ret); return NULL;
23703 : }
23704 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type, in, talloc_free(ret); return NULL;);
23705 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
23706 0 : PyErr_NoMemory();
23707 0 : talloc_free(ret); return NULL;
23708 : }
23709 0 : ret->name_err = *(struct drsuapi_DsAddEntryErrorInfo_Name_V1 *)pytalloc_get_ptr(in);
23710 0 : break;
23711 :
23712 0 : case 3:
23713 0 : if (in == NULL) {
23714 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->referral_err");
23715 0 : talloc_free(ret); return NULL;
23716 : }
23717 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type, in, talloc_free(ret); return NULL;);
23718 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
23719 0 : PyErr_NoMemory();
23720 0 : talloc_free(ret); return NULL;
23721 : }
23722 0 : ret->referral_err = *(struct drsuapi_DsAddEntryErrorInfo_Referr_V1 *)pytalloc_get_ptr(in);
23723 0 : break;
23724 :
23725 0 : case 4:
23726 0 : if (in == NULL) {
23727 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->security_err");
23728 0 : talloc_free(ret); return NULL;
23729 : }
23730 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
23731 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
23732 0 : PyErr_NoMemory();
23733 0 : talloc_free(ret); return NULL;
23734 : }
23735 0 : ret->security_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
23736 0 : break;
23737 :
23738 0 : case 5:
23739 0 : if (in == NULL) {
23740 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->service_err");
23741 0 : talloc_free(ret); return NULL;
23742 : }
23743 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
23744 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
23745 0 : PyErr_NoMemory();
23746 0 : talloc_free(ret); return NULL;
23747 : }
23748 0 : ret->service_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
23749 0 : break;
23750 :
23751 0 : case 6:
23752 0 : if (in == NULL) {
23753 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->update_err");
23754 0 : talloc_free(ret); return NULL;
23755 : }
23756 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
23757 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
23758 0 : PyErr_NoMemory();
23759 0 : talloc_free(ret); return NULL;
23760 : }
23761 0 : ret->update_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
23762 0 : break;
23763 :
23764 0 : case 7:
23765 0 : if (in == NULL) {
23766 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->system_err");
23767 0 : talloc_free(ret); return NULL;
23768 : }
23769 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryErrorInfoX_Type, in, talloc_free(ret); return NULL;);
23770 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
23771 0 : PyErr_NoMemory();
23772 0 : talloc_free(ret); return NULL;
23773 : }
23774 0 : ret->system_err = *(struct drsuapi_DsAddEntryErrorInfoX *)pytalloc_get_ptr(in);
23775 0 : break;
23776 :
23777 0 : default:
23778 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
23779 0 : talloc_free(ret);
23780 0 : ret = NULL;
23781 : }
23782 :
23783 0 : return ret;
23784 : }
23785 :
23786 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23787 : {
23788 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
23789 0 : PyObject *mem_ctx_obj = NULL;
23790 0 : TALLOC_CTX *mem_ctx = NULL;
23791 0 : int level = 0;
23792 0 : PyObject *in_obj = NULL;
23793 0 : union drsuapi_DsAddEntryErrorInfo *in = NULL;
23794 :
23795 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
23796 : discard_const_p(char *, kwnames),
23797 : &mem_ctx_obj,
23798 : &level,
23799 : &in_obj)) {
23800 0 : return NULL;
23801 : }
23802 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
23803 0 : if (mem_ctx == NULL) {
23804 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
23805 0 : return NULL;
23806 : }
23807 0 : in = (union drsuapi_DsAddEntryErrorInfo *)pytalloc_get_ptr(in_obj);
23808 0 : if (in == NULL) {
23809 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsAddEntryErrorInfo!");
23810 0 : return NULL;
23811 : }
23812 :
23813 0 : return py_import_drsuapi_DsAddEntryErrorInfo(mem_ctx, level, in);
23814 : }
23815 :
23816 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23817 : {
23818 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
23819 0 : PyObject *mem_ctx_obj = NULL;
23820 0 : TALLOC_CTX *mem_ctx = NULL;
23821 0 : int level = 0;
23822 0 : PyObject *in = NULL;
23823 0 : union drsuapi_DsAddEntryErrorInfo *out = NULL;
23824 :
23825 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
23826 : discard_const_p(char *, kwnames),
23827 : &mem_ctx_obj,
23828 : &level,
23829 : &in)) {
23830 0 : return NULL;
23831 : }
23832 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
23833 0 : if (mem_ctx == NULL) {
23834 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
23835 0 : return NULL;
23836 : }
23837 :
23838 0 : out = py_export_drsuapi_DsAddEntryErrorInfo(mem_ctx, level, in);
23839 0 : if (out == NULL) {
23840 0 : return NULL;
23841 : }
23842 :
23843 0 : return pytalloc_GenericObject_reference(out);
23844 : }
23845 :
23846 : static PyMethodDef py_drsuapi_DsAddEntryErrorInfo_methods[] = {
23847 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryErrorInfo_import),
23848 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
23849 : "T.__import__(mem_ctx, level, in) => ret." },
23850 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryErrorInfo_export),
23851 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
23852 : "T.__export__(mem_ctx, level, in) => ret." },
23853 : { NULL, NULL, 0, NULL }
23854 : };
23855 :
23856 0 : static PyObject *py_drsuapi_DsAddEntryErrorInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23857 : {
23858 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
23859 0 : return NULL;
23860 : }
23861 :
23862 :
23863 : static PyTypeObject drsuapi_DsAddEntryErrorInfo_Type = {
23864 : PyVarObject_HEAD_INIT(NULL, 0)
23865 : .tp_name = "drsuapi.DsAddEntryErrorInfo",
23866 : .tp_getset = NULL,
23867 : .tp_methods = py_drsuapi_DsAddEntryErrorInfo_methods,
23868 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23869 : .tp_new = py_drsuapi_DsAddEntryErrorInfo_new,
23870 : };
23871 :
23872 :
23873 84 : static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_get_status(PyObject *obj, void *closure)
23874 : {
23875 84 : struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(obj);
23876 : PyObject *py_status;
23877 84 : py_status = PyErr_FromWERROR(object->status);
23878 84 : return py_status;
23879 : }
23880 :
23881 0 : static int py_drsuapi_DsAddEntry_ErrData_V1_set_status(PyObject *py_obj, PyObject *value, void *closure)
23882 : {
23883 0 : struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(py_obj);
23884 0 : if (value == NULL) {
23885 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->status");
23886 0 : return -1;
23887 : }
23888 0 : object->status = W_ERROR(PyLong_AsLong(value));
23889 0 : return 0;
23890 : }
23891 :
23892 84 : static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_get_dir_err(PyObject *obj, void *closure)
23893 : {
23894 84 : struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(obj);
23895 : PyObject *py_dir_err;
23896 84 : py_dir_err = PyLong_FromUnsignedLongLong((uint32_t)object->dir_err);
23897 84 : return py_dir_err;
23898 : }
23899 :
23900 0 : static int py_drsuapi_DsAddEntry_ErrData_V1_set_dir_err(PyObject *py_obj, PyObject *value, void *closure)
23901 : {
23902 0 : struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(py_obj);
23903 0 : if (value == NULL) {
23904 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dir_err");
23905 0 : return -1;
23906 : }
23907 : {
23908 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dir_err));
23909 0 : if (PyLong_Check(value)) {
23910 : unsigned long long test_var;
23911 0 : test_var = PyLong_AsUnsignedLongLong(value);
23912 0 : if (PyErr_Occurred() != NULL) {
23913 0 : return -1;
23914 : }
23915 0 : if (test_var > uint_max) {
23916 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23917 : PyLong_Type.tp_name, uint_max, test_var);
23918 0 : return -1;
23919 : }
23920 0 : object->dir_err = test_var;
23921 : } else {
23922 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23923 : PyLong_Type.tp_name);
23924 0 : return -1;
23925 : }
23926 : }
23927 0 : return 0;
23928 : }
23929 :
23930 0 : static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_get_info(PyObject *obj, void *closure)
23931 : {
23932 0 : struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(obj);
23933 : PyObject *py_info;
23934 0 : if (object->info == NULL) {
23935 0 : Py_RETURN_NONE;
23936 : }
23937 0 : if (object->info == NULL) {
23938 0 : py_info = Py_None;
23939 0 : Py_INCREF(py_info);
23940 : } else {
23941 0 : py_info = pyrpc_import_union(&drsuapi_DsAddEntryErrorInfo_Type, object->info, object->dir_err, object->info, "union drsuapi_DsAddEntryErrorInfo");
23942 0 : if (py_info == NULL) {
23943 0 : return NULL;
23944 : }
23945 : }
23946 0 : return py_info;
23947 : }
23948 :
23949 0 : static int py_drsuapi_DsAddEntry_ErrData_V1_set_info(PyObject *py_obj, PyObject *value, void *closure)
23950 : {
23951 0 : struct drsuapi_DsAddEntry_ErrData_V1 *object = (struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(py_obj);
23952 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
23953 0 : if (value == NULL) {
23954 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
23955 0 : return -1;
23956 : }
23957 0 : if (value == Py_None) {
23958 0 : object->info = NULL;
23959 : } else {
23960 0 : object->info = NULL;
23961 : {
23962 : union drsuapi_DsAddEntryErrorInfo *info_switch_1;
23963 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");
23964 0 : if (info_switch_1 == NULL) {
23965 0 : return -1;
23966 : }
23967 0 : object->info = info_switch_1;
23968 : }
23969 : }
23970 0 : return 0;
23971 : }
23972 :
23973 : static PyGetSetDef py_drsuapi_DsAddEntry_ErrData_V1_getsetters[] = {
23974 : {
23975 : .name = discard_const_p(char, "status"),
23976 : .get = py_drsuapi_DsAddEntry_ErrData_V1_get_status,
23977 : .set = py_drsuapi_DsAddEntry_ErrData_V1_set_status,
23978 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
23979 : },
23980 : {
23981 : .name = discard_const_p(char, "dir_err"),
23982 : .get = py_drsuapi_DsAddEntry_ErrData_V1_get_dir_err,
23983 : .set = py_drsuapi_DsAddEntry_ErrData_V1_set_dir_err,
23984 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_DirErr")
23985 : },
23986 : {
23987 : .name = discard_const_p(char, "info"),
23988 : .get = py_drsuapi_DsAddEntry_ErrData_V1_get_info,
23989 : .set = py_drsuapi_DsAddEntry_ErrData_V1_set_info,
23990 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntryErrorInfo")
23991 : },
23992 : { .name = NULL }
23993 : };
23994 :
23995 0 : static PyObject *py_drsuapi_DsAddEntry_ErrData_V1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23996 : {
23997 0 : return pytalloc_new(struct drsuapi_DsAddEntry_ErrData_V1, type);
23998 : }
23999 :
24000 :
24001 : static PyTypeObject drsuapi_DsAddEntry_ErrData_V1_Type = {
24002 : PyVarObject_HEAD_INIT(NULL, 0)
24003 : .tp_name = "drsuapi.DsAddEntry_ErrData_V1",
24004 : .tp_getset = py_drsuapi_DsAddEntry_ErrData_V1_getsetters,
24005 : .tp_methods = NULL,
24006 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24007 : .tp_new = py_drsuapi_DsAddEntry_ErrData_V1_new,
24008 : };
24009 :
24010 168 : static PyObject *py_import_drsuapi_DsAddEntry_ErrData(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntry_ErrData *in)
24011 : {
24012 : PyObject *ret;
24013 :
24014 168 : switch (level) {
24015 168 : case 1:
24016 168 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntry_ErrData_V1_Type, mem_ctx, &in->v1);
24017 168 : return ret;
24018 :
24019 : }
24020 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
24021 0 : return NULL;
24022 : }
24023 :
24024 0 : static union drsuapi_DsAddEntry_ErrData *py_export_drsuapi_DsAddEntry_ErrData(TALLOC_CTX *mem_ctx, int level, PyObject *in)
24025 : {
24026 0 : union drsuapi_DsAddEntry_ErrData *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntry_ErrData);
24027 0 : switch (level) {
24028 0 : case 1:
24029 0 : if (in == NULL) {
24030 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->v1");
24031 0 : talloc_free(ret); return NULL;
24032 : }
24033 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntry_ErrData_V1_Type, in, talloc_free(ret); return NULL;);
24034 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
24035 0 : PyErr_NoMemory();
24036 0 : talloc_free(ret); return NULL;
24037 : }
24038 0 : ret->v1 = *(struct drsuapi_DsAddEntry_ErrData_V1 *)pytalloc_get_ptr(in);
24039 0 : break;
24040 :
24041 0 : default:
24042 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
24043 0 : talloc_free(ret);
24044 0 : ret = NULL;
24045 : }
24046 :
24047 0 : return ret;
24048 : }
24049 :
24050 168 : static PyObject *py_drsuapi_DsAddEntry_ErrData_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24051 : {
24052 168 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
24053 168 : PyObject *mem_ctx_obj = NULL;
24054 168 : TALLOC_CTX *mem_ctx = NULL;
24055 168 : int level = 0;
24056 168 : PyObject *in_obj = NULL;
24057 168 : union drsuapi_DsAddEntry_ErrData *in = NULL;
24058 :
24059 168 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
24060 : discard_const_p(char *, kwnames),
24061 : &mem_ctx_obj,
24062 : &level,
24063 : &in_obj)) {
24064 0 : return NULL;
24065 : }
24066 168 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
24067 168 : if (mem_ctx == NULL) {
24068 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
24069 0 : return NULL;
24070 : }
24071 168 : in = (union drsuapi_DsAddEntry_ErrData *)pytalloc_get_ptr(in_obj);
24072 168 : if (in == NULL) {
24073 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsAddEntry_ErrData!");
24074 0 : return NULL;
24075 : }
24076 :
24077 168 : return py_import_drsuapi_DsAddEntry_ErrData(mem_ctx, level, in);
24078 : }
24079 :
24080 0 : static PyObject *py_drsuapi_DsAddEntry_ErrData_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24081 : {
24082 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
24083 0 : PyObject *mem_ctx_obj = NULL;
24084 0 : TALLOC_CTX *mem_ctx = NULL;
24085 0 : int level = 0;
24086 0 : PyObject *in = NULL;
24087 0 : union drsuapi_DsAddEntry_ErrData *out = NULL;
24088 :
24089 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
24090 : discard_const_p(char *, kwnames),
24091 : &mem_ctx_obj,
24092 : &level,
24093 : &in)) {
24094 0 : return NULL;
24095 : }
24096 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
24097 0 : if (mem_ctx == NULL) {
24098 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
24099 0 : return NULL;
24100 : }
24101 :
24102 0 : out = py_export_drsuapi_DsAddEntry_ErrData(mem_ctx, level, in);
24103 0 : if (out == NULL) {
24104 0 : return NULL;
24105 : }
24106 :
24107 0 : return pytalloc_GenericObject_reference(out);
24108 : }
24109 :
24110 : static PyMethodDef py_drsuapi_DsAddEntry_ErrData_methods[] = {
24111 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ErrData_import),
24112 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
24113 : "T.__import__(mem_ctx, level, in) => ret." },
24114 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ErrData_export),
24115 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
24116 : "T.__export__(mem_ctx, level, in) => ret." },
24117 : { NULL, NULL, 0, NULL }
24118 : };
24119 :
24120 0 : static PyObject *py_drsuapi_DsAddEntry_ErrData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24121 : {
24122 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
24123 0 : return NULL;
24124 : }
24125 :
24126 :
24127 : static PyTypeObject drsuapi_DsAddEntry_ErrData_Type = {
24128 : PyVarObject_HEAD_INIT(NULL, 0)
24129 : .tp_name = "drsuapi.DsAddEntry_ErrData",
24130 : .tp_getset = NULL,
24131 : .tp_methods = py_drsuapi_DsAddEntry_ErrData_methods,
24132 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24133 : .tp_new = py_drsuapi_DsAddEntry_ErrData_new,
24134 : };
24135 :
24136 :
24137 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier2_get_guid(PyObject *obj, void *closure)
24138 : {
24139 0 : struct drsuapi_DsReplicaObjectIdentifier2 *object = (struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(obj);
24140 : PyObject *py_guid;
24141 0 : py_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->guid);
24142 0 : return py_guid;
24143 : }
24144 :
24145 0 : static int py_drsuapi_DsReplicaObjectIdentifier2_set_guid(PyObject *py_obj, PyObject *value, void *closure)
24146 : {
24147 0 : struct drsuapi_DsReplicaObjectIdentifier2 *object = (struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(py_obj);
24148 0 : if (value == NULL) {
24149 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->guid");
24150 0 : return -1;
24151 : }
24152 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
24153 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24154 0 : PyErr_NoMemory();
24155 0 : return -1;
24156 : }
24157 0 : object->guid = *(struct GUID *)pytalloc_get_ptr(value);
24158 0 : return 0;
24159 : }
24160 :
24161 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier2_get_sid(PyObject *obj, void *closure)
24162 : {
24163 0 : struct drsuapi_DsReplicaObjectIdentifier2 *object = (struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(obj);
24164 : PyObject *py_sid;
24165 0 : py_sid = pytalloc_reference_ex(dom_sid_Type, pytalloc_get_mem_ctx(obj), &object->sid);
24166 0 : return py_sid;
24167 : }
24168 :
24169 0 : static int py_drsuapi_DsReplicaObjectIdentifier2_set_sid(PyObject *py_obj, PyObject *value, void *closure)
24170 : {
24171 0 : struct drsuapi_DsReplicaObjectIdentifier2 *object = (struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(py_obj);
24172 0 : if (value == NULL) {
24173 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->sid");
24174 0 : return -1;
24175 : }
24176 0 : PY_CHECK_TYPE(dom_sid_Type, value, return -1;);
24177 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24178 0 : PyErr_NoMemory();
24179 0 : return -1;
24180 : }
24181 0 : object->sid = *(struct dom_sid *)pytalloc_get_ptr(value);
24182 0 : return 0;
24183 : }
24184 :
24185 : static PyGetSetDef py_drsuapi_DsReplicaObjectIdentifier2_getsetters[] = {
24186 : {
24187 : .name = discard_const_p(char, "guid"),
24188 : .get = py_drsuapi_DsReplicaObjectIdentifier2_get_guid,
24189 : .set = py_drsuapi_DsReplicaObjectIdentifier2_set_guid,
24190 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
24191 : },
24192 : {
24193 : .name = discard_const_p(char, "sid"),
24194 : .get = py_drsuapi_DsReplicaObjectIdentifier2_get_sid,
24195 : .set = py_drsuapi_DsReplicaObjectIdentifier2_set_sid,
24196 : .doc = discard_const_p(char, "PIDL-generated element of base type dom_sid28")
24197 : },
24198 : { .name = NULL }
24199 : };
24200 :
24201 0 : static PyObject *py_drsuapi_DsReplicaObjectIdentifier2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24202 : {
24203 0 : return pytalloc_new(struct drsuapi_DsReplicaObjectIdentifier2, type);
24204 : }
24205 :
24206 :
24207 : static PyTypeObject drsuapi_DsReplicaObjectIdentifier2_Type = {
24208 : PyVarObject_HEAD_INIT(NULL, 0)
24209 : .tp_name = "drsuapi.DsReplicaObjectIdentifier2",
24210 : .tp_getset = py_drsuapi_DsReplicaObjectIdentifier2_getsetters,
24211 : .tp_methods = NULL,
24212 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24213 : .tp_new = py_drsuapi_DsReplicaObjectIdentifier2_new,
24214 : };
24215 :
24216 :
24217 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_id(PyObject *obj, void *closure)
24218 : {
24219 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
24220 : PyObject *py_id;
24221 0 : if (object->id == NULL) {
24222 0 : Py_RETURN_NONE;
24223 : }
24224 0 : if (object->id == NULL) {
24225 0 : py_id = Py_None;
24226 0 : Py_INCREF(py_id);
24227 : } else {
24228 0 : py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
24229 : }
24230 0 : return py_id;
24231 : }
24232 :
24233 0 : static int py_drsuapi_DsAddEntryCtr2_set_id(PyObject *py_obj, PyObject *value, void *closure)
24234 : {
24235 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
24236 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id));
24237 0 : if (value == NULL) {
24238 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id");
24239 0 : return -1;
24240 : }
24241 0 : if (value == Py_None) {
24242 0 : object->id = NULL;
24243 : } else {
24244 0 : object->id = NULL;
24245 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
24246 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24247 0 : PyErr_NoMemory();
24248 0 : return -1;
24249 : }
24250 0 : object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
24251 : }
24252 0 : return 0;
24253 : }
24254 :
24255 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_dir_err(PyObject *obj, void *closure)
24256 : {
24257 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
24258 : PyObject *py_dir_err;
24259 0 : py_dir_err = PyLong_FromUnsignedLongLong((uint32_t)object->dir_err);
24260 0 : return py_dir_err;
24261 : }
24262 :
24263 0 : static int py_drsuapi_DsAddEntryCtr2_set_dir_err(PyObject *py_obj, PyObject *value, void *closure)
24264 : {
24265 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
24266 0 : if (value == NULL) {
24267 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dir_err");
24268 0 : return -1;
24269 : }
24270 : {
24271 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dir_err));
24272 0 : if (PyLong_Check(value)) {
24273 : unsigned long long test_var;
24274 0 : test_var = PyLong_AsUnsignedLongLong(value);
24275 0 : if (PyErr_Occurred() != NULL) {
24276 0 : return -1;
24277 : }
24278 0 : if (test_var > uint_max) {
24279 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24280 : PyLong_Type.tp_name, uint_max, test_var);
24281 0 : return -1;
24282 : }
24283 0 : object->dir_err = test_var;
24284 : } else {
24285 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24286 : PyLong_Type.tp_name);
24287 0 : return -1;
24288 : }
24289 : }
24290 0 : return 0;
24291 : }
24292 :
24293 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_dsid(PyObject *obj, void *closure)
24294 : {
24295 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
24296 : PyObject *py_dsid;
24297 0 : py_dsid = PyLong_FromUnsignedLongLong((uint32_t)object->dsid);
24298 0 : return py_dsid;
24299 : }
24300 :
24301 0 : static int py_drsuapi_DsAddEntryCtr2_set_dsid(PyObject *py_obj, PyObject *value, void *closure)
24302 : {
24303 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
24304 0 : if (value == NULL) {
24305 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsid");
24306 0 : return -1;
24307 : }
24308 : {
24309 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dsid));
24310 0 : if (PyLong_Check(value)) {
24311 : unsigned long long test_var;
24312 0 : test_var = PyLong_AsUnsignedLongLong(value);
24313 0 : if (PyErr_Occurred() != NULL) {
24314 0 : return -1;
24315 : }
24316 0 : if (test_var > uint_max) {
24317 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24318 : PyLong_Type.tp_name, uint_max, test_var);
24319 0 : return -1;
24320 : }
24321 0 : object->dsid = test_var;
24322 : } else {
24323 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24324 : PyLong_Type.tp_name);
24325 0 : return -1;
24326 : }
24327 : }
24328 0 : return 0;
24329 : }
24330 :
24331 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_extended_err(PyObject *obj, void *closure)
24332 : {
24333 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
24334 : PyObject *py_extended_err;
24335 0 : py_extended_err = PyErr_FromWERROR(object->extended_err);
24336 0 : return py_extended_err;
24337 : }
24338 :
24339 0 : static int py_drsuapi_DsAddEntryCtr2_set_extended_err(PyObject *py_obj, PyObject *value, void *closure)
24340 : {
24341 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
24342 0 : if (value == NULL) {
24343 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_err");
24344 0 : return -1;
24345 : }
24346 0 : object->extended_err = W_ERROR(PyLong_AsLong(value));
24347 0 : return 0;
24348 : }
24349 :
24350 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_extended_data(PyObject *obj, void *closure)
24351 : {
24352 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
24353 : PyObject *py_extended_data;
24354 0 : py_extended_data = PyLong_FromUnsignedLongLong((uint32_t)object->extended_data);
24355 0 : return py_extended_data;
24356 : }
24357 :
24358 0 : static int py_drsuapi_DsAddEntryCtr2_set_extended_data(PyObject *py_obj, PyObject *value, void *closure)
24359 : {
24360 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
24361 0 : if (value == NULL) {
24362 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extended_data");
24363 0 : return -1;
24364 : }
24365 : {
24366 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->extended_data));
24367 0 : if (PyLong_Check(value)) {
24368 : unsigned long long test_var;
24369 0 : test_var = PyLong_AsUnsignedLongLong(value);
24370 0 : if (PyErr_Occurred() != NULL) {
24371 0 : return -1;
24372 : }
24373 0 : if (test_var > uint_max) {
24374 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24375 : PyLong_Type.tp_name, uint_max, test_var);
24376 0 : return -1;
24377 : }
24378 0 : object->extended_data = test_var;
24379 : } else {
24380 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24381 : PyLong_Type.tp_name);
24382 0 : return -1;
24383 : }
24384 : }
24385 0 : return 0;
24386 : }
24387 :
24388 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_problem(PyObject *obj, void *closure)
24389 : {
24390 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
24391 : PyObject *py_problem;
24392 0 : py_problem = PyLong_FromLong((uint16_t)object->problem);
24393 0 : return py_problem;
24394 : }
24395 :
24396 0 : static int py_drsuapi_DsAddEntryCtr2_set_problem(PyObject *py_obj, PyObject *value, void *closure)
24397 : {
24398 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
24399 0 : if (value == NULL) {
24400 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->problem");
24401 0 : return -1;
24402 : }
24403 : {
24404 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->problem));
24405 0 : if (PyLong_Check(value)) {
24406 : unsigned long long test_var;
24407 0 : test_var = PyLong_AsUnsignedLongLong(value);
24408 0 : if (PyErr_Occurred() != NULL) {
24409 0 : return -1;
24410 : }
24411 0 : if (test_var > uint_max) {
24412 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24413 : PyLong_Type.tp_name, uint_max, test_var);
24414 0 : return -1;
24415 : }
24416 0 : object->problem = test_var;
24417 : } else {
24418 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24419 : PyLong_Type.tp_name);
24420 0 : return -1;
24421 : }
24422 : }
24423 0 : return 0;
24424 : }
24425 :
24426 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_count(PyObject *obj, void *closure)
24427 : {
24428 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
24429 : PyObject *py_count;
24430 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
24431 0 : return py_count;
24432 : }
24433 :
24434 0 : static int py_drsuapi_DsAddEntryCtr2_set_count(PyObject *py_obj, PyObject *value, void *closure)
24435 : {
24436 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
24437 0 : if (value == NULL) {
24438 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
24439 0 : return -1;
24440 : }
24441 : {
24442 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
24443 0 : if (PyLong_Check(value)) {
24444 : unsigned long long test_var;
24445 0 : test_var = PyLong_AsUnsignedLongLong(value);
24446 0 : if (PyErr_Occurred() != NULL) {
24447 0 : return -1;
24448 : }
24449 0 : if (test_var > uint_max) {
24450 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24451 : PyLong_Type.tp_name, uint_max, test_var);
24452 0 : return -1;
24453 : }
24454 0 : object->count = test_var;
24455 : } else {
24456 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24457 : PyLong_Type.tp_name);
24458 0 : return -1;
24459 : }
24460 : }
24461 0 : return 0;
24462 : }
24463 :
24464 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_get_objects(PyObject *obj, void *closure)
24465 : {
24466 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(obj);
24467 : PyObject *py_objects;
24468 0 : if (object->objects == NULL) {
24469 0 : Py_RETURN_NONE;
24470 : }
24471 0 : if (object->objects == NULL) {
24472 0 : py_objects = Py_None;
24473 0 : Py_INCREF(py_objects);
24474 : } else {
24475 0 : py_objects = PyList_New(object->count);
24476 0 : if (py_objects == NULL) {
24477 0 : return NULL;
24478 : }
24479 : {
24480 : int objects_cntr_1;
24481 0 : for (objects_cntr_1 = 0; objects_cntr_1 < (object->count); objects_cntr_1++) {
24482 : PyObject *py_objects_1;
24483 0 : py_objects_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier2_Type, object->objects, &object->objects[objects_cntr_1]);
24484 0 : PyList_SetItem(py_objects, objects_cntr_1, py_objects_1);
24485 : }
24486 : }
24487 : }
24488 0 : return py_objects;
24489 : }
24490 :
24491 0 : static int py_drsuapi_DsAddEntryCtr2_set_objects(PyObject *py_obj, PyObject *value, void *closure)
24492 : {
24493 0 : struct drsuapi_DsAddEntryCtr2 *object = (struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(py_obj);
24494 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->objects));
24495 0 : if (value == NULL) {
24496 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->objects");
24497 0 : return -1;
24498 : }
24499 0 : if (value == Py_None) {
24500 0 : object->objects = NULL;
24501 : } else {
24502 0 : object->objects = NULL;
24503 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
24504 : {
24505 : int objects_cntr_1;
24506 0 : object->objects = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->objects, PyList_GET_SIZE(value));
24507 0 : if (!object->objects) { return -1;; }
24508 0 : talloc_set_name_const(object->objects, "ARRAY: object->objects");
24509 0 : for (objects_cntr_1 = 0; objects_cntr_1 < PyList_GET_SIZE(value); objects_cntr_1++) {
24510 0 : if (PyList_GET_ITEM(value, objects_cntr_1) == NULL) {
24511 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->objects[objects_cntr_1]");
24512 0 : return -1;
24513 : }
24514 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier2_Type, PyList_GET_ITEM(value, objects_cntr_1), return -1;);
24515 0 : if (talloc_reference(object->objects, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, objects_cntr_1))) == NULL) {
24516 0 : PyErr_NoMemory();
24517 0 : return -1;
24518 : }
24519 0 : object->objects[objects_cntr_1] = *(struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, objects_cntr_1));
24520 : }
24521 : }
24522 : }
24523 0 : return 0;
24524 : }
24525 :
24526 : static PyGetSetDef py_drsuapi_DsAddEntryCtr2_getsetters[] = {
24527 : {
24528 : .name = discard_const_p(char, "id"),
24529 : .get = py_drsuapi_DsAddEntryCtr2_get_id,
24530 : .set = py_drsuapi_DsAddEntryCtr2_set_id,
24531 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
24532 : },
24533 : {
24534 : .name = discard_const_p(char, "dir_err"),
24535 : .get = py_drsuapi_DsAddEntryCtr2_get_dir_err,
24536 : .set = py_drsuapi_DsAddEntryCtr2_set_dir_err,
24537 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_DirErr")
24538 : },
24539 : {
24540 : .name = discard_const_p(char, "dsid"),
24541 : .get = py_drsuapi_DsAddEntryCtr2_get_dsid,
24542 : .set = py_drsuapi_DsAddEntryCtr2_set_dsid,
24543 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24544 : },
24545 : {
24546 : .name = discard_const_p(char, "extended_err"),
24547 : .get = py_drsuapi_DsAddEntryCtr2_get_extended_err,
24548 : .set = py_drsuapi_DsAddEntryCtr2_set_extended_err,
24549 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
24550 : },
24551 : {
24552 : .name = discard_const_p(char, "extended_data"),
24553 : .get = py_drsuapi_DsAddEntryCtr2_get_extended_data,
24554 : .set = py_drsuapi_DsAddEntryCtr2_set_extended_data,
24555 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24556 : },
24557 : {
24558 : .name = discard_const_p(char, "problem"),
24559 : .get = py_drsuapi_DsAddEntryCtr2_get_problem,
24560 : .set = py_drsuapi_DsAddEntryCtr2_set_problem,
24561 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
24562 : },
24563 : {
24564 : .name = discard_const_p(char, "count"),
24565 : .get = py_drsuapi_DsAddEntryCtr2_get_count,
24566 : .set = py_drsuapi_DsAddEntryCtr2_set_count,
24567 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24568 : },
24569 : {
24570 : .name = discard_const_p(char, "objects"),
24571 : .get = py_drsuapi_DsAddEntryCtr2_get_objects,
24572 : .set = py_drsuapi_DsAddEntryCtr2_set_objects,
24573 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier2")
24574 : },
24575 : { .name = NULL }
24576 : };
24577 :
24578 0 : static PyObject *py_drsuapi_DsAddEntryCtr2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24579 : {
24580 0 : return pytalloc_new(struct drsuapi_DsAddEntryCtr2, type);
24581 : }
24582 :
24583 :
24584 : static PyTypeObject drsuapi_DsAddEntryCtr2_Type = {
24585 : PyVarObject_HEAD_INIT(NULL, 0)
24586 : .tp_name = "drsuapi.DsAddEntryCtr2",
24587 : .tp_getset = py_drsuapi_DsAddEntryCtr2_getsetters,
24588 : .tp_methods = NULL,
24589 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24590 : .tp_new = py_drsuapi_DsAddEntryCtr2_new,
24591 : };
24592 :
24593 :
24594 0 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_id(PyObject *obj, void *closure)
24595 : {
24596 0 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
24597 : PyObject *py_id;
24598 0 : if (object->id == NULL) {
24599 0 : Py_RETURN_NONE;
24600 : }
24601 0 : if (object->id == NULL) {
24602 0 : py_id = Py_None;
24603 0 : Py_INCREF(py_id);
24604 : } else {
24605 0 : py_id = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier_Type, object->id, object->id);
24606 : }
24607 0 : return py_id;
24608 : }
24609 :
24610 0 : static int py_drsuapi_DsAddEntryCtr3_set_id(PyObject *py_obj, PyObject *value, void *closure)
24611 : {
24612 0 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
24613 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->id));
24614 0 : if (value == NULL) {
24615 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->id");
24616 0 : return -1;
24617 : }
24618 0 : if (value == Py_None) {
24619 0 : object->id = NULL;
24620 : } else {
24621 0 : object->id = NULL;
24622 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier_Type, value, return -1;);
24623 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24624 0 : PyErr_NoMemory();
24625 0 : return -1;
24626 : }
24627 0 : object->id = (struct drsuapi_DsReplicaObjectIdentifier *)pytalloc_get_ptr(value);
24628 : }
24629 0 : return 0;
24630 : }
24631 :
24632 84 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_err_ver(PyObject *obj, void *closure)
24633 : {
24634 84 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
24635 : PyObject *py_err_ver;
24636 84 : py_err_ver = PyLong_FromUnsignedLongLong((uint32_t)object->err_ver);
24637 84 : return py_err_ver;
24638 : }
24639 :
24640 0 : static int py_drsuapi_DsAddEntryCtr3_set_err_ver(PyObject *py_obj, PyObject *value, void *closure)
24641 : {
24642 0 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
24643 0 : if (value == NULL) {
24644 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->err_ver");
24645 0 : return -1;
24646 : }
24647 : {
24648 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->err_ver));
24649 0 : if (PyLong_Check(value)) {
24650 : unsigned long long test_var;
24651 0 : test_var = PyLong_AsUnsignedLongLong(value);
24652 0 : if (PyErr_Occurred() != NULL) {
24653 0 : return -1;
24654 : }
24655 0 : if (test_var > uint_max) {
24656 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24657 : PyLong_Type.tp_name, uint_max, test_var);
24658 0 : return -1;
24659 : }
24660 0 : object->err_ver = test_var;
24661 : } else {
24662 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24663 : PyLong_Type.tp_name);
24664 0 : return -1;
24665 : }
24666 : }
24667 0 : return 0;
24668 : }
24669 :
24670 168 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_err_data(PyObject *obj, void *closure)
24671 : {
24672 168 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
24673 : PyObject *py_err_data;
24674 168 : if (object->err_data == NULL) {
24675 0 : Py_RETURN_NONE;
24676 : }
24677 168 : if (object->err_data == NULL) {
24678 0 : py_err_data = Py_None;
24679 0 : Py_INCREF(py_err_data);
24680 : } else {
24681 168 : py_err_data = pyrpc_import_union(&drsuapi_DsAddEntry_ErrData_Type, object->err_data, object->err_ver, object->err_data, "union drsuapi_DsAddEntry_ErrData");
24682 168 : if (py_err_data == NULL) {
24683 0 : return NULL;
24684 : }
24685 : }
24686 168 : return py_err_data;
24687 : }
24688 :
24689 0 : static int py_drsuapi_DsAddEntryCtr3_set_err_data(PyObject *py_obj, PyObject *value, void *closure)
24690 : {
24691 0 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
24692 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->err_data));
24693 0 : if (value == NULL) {
24694 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->err_data");
24695 0 : return -1;
24696 : }
24697 0 : if (value == Py_None) {
24698 0 : object->err_data = NULL;
24699 : } else {
24700 0 : object->err_data = NULL;
24701 : {
24702 : union drsuapi_DsAddEntry_ErrData *err_data_switch_1;
24703 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");
24704 0 : if (err_data_switch_1 == NULL) {
24705 0 : return -1;
24706 : }
24707 0 : object->err_data = err_data_switch_1;
24708 : }
24709 : }
24710 0 : return 0;
24711 : }
24712 :
24713 0 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_count(PyObject *obj, void *closure)
24714 : {
24715 0 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
24716 : PyObject *py_count;
24717 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
24718 0 : return py_count;
24719 : }
24720 :
24721 0 : static int py_drsuapi_DsAddEntryCtr3_set_count(PyObject *py_obj, PyObject *value, void *closure)
24722 : {
24723 0 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
24724 0 : if (value == NULL) {
24725 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
24726 0 : return -1;
24727 : }
24728 : {
24729 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
24730 0 : if (PyLong_Check(value)) {
24731 : unsigned long long test_var;
24732 0 : test_var = PyLong_AsUnsignedLongLong(value);
24733 0 : if (PyErr_Occurred() != NULL) {
24734 0 : return -1;
24735 : }
24736 0 : if (test_var > uint_max) {
24737 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24738 : PyLong_Type.tp_name, uint_max, test_var);
24739 0 : return -1;
24740 : }
24741 0 : object->count = test_var;
24742 : } else {
24743 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24744 : PyLong_Type.tp_name);
24745 0 : return -1;
24746 : }
24747 : }
24748 0 : return 0;
24749 : }
24750 :
24751 84 : static PyObject *py_drsuapi_DsAddEntryCtr3_get_objects(PyObject *obj, void *closure)
24752 : {
24753 84 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(obj);
24754 : PyObject *py_objects;
24755 84 : if (object->objects == NULL) {
24756 0 : Py_RETURN_NONE;
24757 : }
24758 84 : if (object->objects == NULL) {
24759 0 : py_objects = Py_None;
24760 0 : Py_INCREF(py_objects);
24761 : } else {
24762 84 : py_objects = PyList_New(object->count);
24763 84 : if (py_objects == NULL) {
24764 0 : return NULL;
24765 : }
24766 : {
24767 : int objects_cntr_1;
24768 168 : for (objects_cntr_1 = 0; objects_cntr_1 < (object->count); objects_cntr_1++) {
24769 : PyObject *py_objects_1;
24770 84 : py_objects_1 = pytalloc_reference_ex(&drsuapi_DsReplicaObjectIdentifier2_Type, object->objects, &object->objects[objects_cntr_1]);
24771 84 : PyList_SetItem(py_objects, objects_cntr_1, py_objects_1);
24772 : }
24773 : }
24774 : }
24775 84 : return py_objects;
24776 : }
24777 :
24778 0 : static int py_drsuapi_DsAddEntryCtr3_set_objects(PyObject *py_obj, PyObject *value, void *closure)
24779 : {
24780 0 : struct drsuapi_DsAddEntryCtr3 *object = (struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(py_obj);
24781 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->objects));
24782 0 : if (value == NULL) {
24783 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->objects");
24784 0 : return -1;
24785 : }
24786 0 : if (value == Py_None) {
24787 0 : object->objects = NULL;
24788 : } else {
24789 0 : object->objects = NULL;
24790 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
24791 : {
24792 : int objects_cntr_1;
24793 0 : object->objects = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->objects, PyList_GET_SIZE(value));
24794 0 : if (!object->objects) { return -1;; }
24795 0 : talloc_set_name_const(object->objects, "ARRAY: object->objects");
24796 0 : for (objects_cntr_1 = 0; objects_cntr_1 < PyList_GET_SIZE(value); objects_cntr_1++) {
24797 0 : if (PyList_GET_ITEM(value, objects_cntr_1) == NULL) {
24798 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->objects[objects_cntr_1]");
24799 0 : return -1;
24800 : }
24801 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjectIdentifier2_Type, PyList_GET_ITEM(value, objects_cntr_1), return -1;);
24802 0 : if (talloc_reference(object->objects, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, objects_cntr_1))) == NULL) {
24803 0 : PyErr_NoMemory();
24804 0 : return -1;
24805 : }
24806 0 : object->objects[objects_cntr_1] = *(struct drsuapi_DsReplicaObjectIdentifier2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, objects_cntr_1));
24807 : }
24808 : }
24809 : }
24810 0 : return 0;
24811 : }
24812 :
24813 : static PyGetSetDef py_drsuapi_DsAddEntryCtr3_getsetters[] = {
24814 : {
24815 : .name = discard_const_p(char, "id"),
24816 : .get = py_drsuapi_DsAddEntryCtr3_get_id,
24817 : .set = py_drsuapi_DsAddEntryCtr3_set_id,
24818 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier")
24819 : },
24820 : {
24821 : .name = discard_const_p(char, "err_ver"),
24822 : .get = py_drsuapi_DsAddEntryCtr3_get_err_ver,
24823 : .set = py_drsuapi_DsAddEntryCtr3_set_err_ver,
24824 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24825 : },
24826 : {
24827 : .name = discard_const_p(char, "err_data"),
24828 : .get = py_drsuapi_DsAddEntryCtr3_get_err_data,
24829 : .set = py_drsuapi_DsAddEntryCtr3_set_err_data,
24830 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntry_ErrData")
24831 : },
24832 : {
24833 : .name = discard_const_p(char, "count"),
24834 : .get = py_drsuapi_DsAddEntryCtr3_get_count,
24835 : .set = py_drsuapi_DsAddEntryCtr3_set_count,
24836 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24837 : },
24838 : {
24839 : .name = discard_const_p(char, "objects"),
24840 : .get = py_drsuapi_DsAddEntryCtr3_get_objects,
24841 : .set = py_drsuapi_DsAddEntryCtr3_set_objects,
24842 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjectIdentifier2")
24843 : },
24844 : { .name = NULL }
24845 : };
24846 :
24847 0 : static PyObject *py_drsuapi_DsAddEntryCtr3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24848 : {
24849 0 : return pytalloc_new(struct drsuapi_DsAddEntryCtr3, type);
24850 : }
24851 :
24852 :
24853 : static PyTypeObject drsuapi_DsAddEntryCtr3_Type = {
24854 : PyVarObject_HEAD_INIT(NULL, 0)
24855 : .tp_name = "drsuapi.DsAddEntryCtr3",
24856 : .tp_getset = py_drsuapi_DsAddEntryCtr3_getsetters,
24857 : .tp_methods = NULL,
24858 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24859 : .tp_new = py_drsuapi_DsAddEntryCtr3_new,
24860 : };
24861 :
24862 84 : static PyObject *py_import_drsuapi_DsAddEntryCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsAddEntryCtr *in)
24863 : {
24864 : PyObject *ret;
24865 :
24866 84 : switch (level) {
24867 0 : case 2:
24868 0 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryCtr2_Type, mem_ctx, &in->ctr2);
24869 0 : return ret;
24870 :
24871 84 : case 3:
24872 84 : ret = pytalloc_reference_ex(&drsuapi_DsAddEntryCtr3_Type, mem_ctx, &in->ctr3);
24873 84 : return ret;
24874 :
24875 : }
24876 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
24877 0 : return NULL;
24878 : }
24879 :
24880 0 : static union drsuapi_DsAddEntryCtr *py_export_drsuapi_DsAddEntryCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
24881 : {
24882 0 : union drsuapi_DsAddEntryCtr *ret = talloc_zero(mem_ctx, union drsuapi_DsAddEntryCtr);
24883 0 : switch (level) {
24884 0 : case 2:
24885 0 : if (in == NULL) {
24886 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr2");
24887 0 : talloc_free(ret); return NULL;
24888 : }
24889 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryCtr2_Type, in, talloc_free(ret); return NULL;);
24890 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
24891 0 : PyErr_NoMemory();
24892 0 : talloc_free(ret); return NULL;
24893 : }
24894 0 : ret->ctr2 = *(struct drsuapi_DsAddEntryCtr2 *)pytalloc_get_ptr(in);
24895 0 : break;
24896 :
24897 0 : case 3:
24898 0 : if (in == NULL) {
24899 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr3");
24900 0 : talloc_free(ret); return NULL;
24901 : }
24902 0 : PY_CHECK_TYPE(&drsuapi_DsAddEntryCtr3_Type, in, talloc_free(ret); return NULL;);
24903 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
24904 0 : PyErr_NoMemory();
24905 0 : talloc_free(ret); return NULL;
24906 : }
24907 0 : ret->ctr3 = *(struct drsuapi_DsAddEntryCtr3 *)pytalloc_get_ptr(in);
24908 0 : break;
24909 :
24910 0 : default:
24911 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
24912 0 : talloc_free(ret);
24913 0 : ret = NULL;
24914 : }
24915 :
24916 0 : return ret;
24917 : }
24918 :
24919 84 : static PyObject *py_drsuapi_DsAddEntryCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24920 : {
24921 84 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
24922 84 : PyObject *mem_ctx_obj = NULL;
24923 84 : TALLOC_CTX *mem_ctx = NULL;
24924 84 : int level = 0;
24925 84 : PyObject *in_obj = NULL;
24926 84 : union drsuapi_DsAddEntryCtr *in = NULL;
24927 :
24928 84 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
24929 : discard_const_p(char *, kwnames),
24930 : &mem_ctx_obj,
24931 : &level,
24932 : &in_obj)) {
24933 0 : return NULL;
24934 : }
24935 84 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
24936 84 : if (mem_ctx == NULL) {
24937 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
24938 0 : return NULL;
24939 : }
24940 84 : in = (union drsuapi_DsAddEntryCtr *)pytalloc_get_ptr(in_obj);
24941 84 : if (in == NULL) {
24942 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsAddEntryCtr!");
24943 0 : return NULL;
24944 : }
24945 :
24946 84 : return py_import_drsuapi_DsAddEntryCtr(mem_ctx, level, in);
24947 : }
24948 :
24949 0 : static PyObject *py_drsuapi_DsAddEntryCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24950 : {
24951 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
24952 0 : PyObject *mem_ctx_obj = NULL;
24953 0 : TALLOC_CTX *mem_ctx = NULL;
24954 0 : int level = 0;
24955 0 : PyObject *in = NULL;
24956 0 : union drsuapi_DsAddEntryCtr *out = NULL;
24957 :
24958 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
24959 : discard_const_p(char *, kwnames),
24960 : &mem_ctx_obj,
24961 : &level,
24962 : &in)) {
24963 0 : return NULL;
24964 : }
24965 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
24966 0 : if (mem_ctx == NULL) {
24967 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
24968 0 : return NULL;
24969 : }
24970 :
24971 0 : out = py_export_drsuapi_DsAddEntryCtr(mem_ctx, level, in);
24972 0 : if (out == NULL) {
24973 0 : return NULL;
24974 : }
24975 :
24976 0 : return pytalloc_GenericObject_reference(out);
24977 : }
24978 :
24979 : static PyMethodDef py_drsuapi_DsAddEntryCtr_methods[] = {
24980 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryCtr_import),
24981 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
24982 : "T.__import__(mem_ctx, level, in) => ret." },
24983 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntryCtr_export),
24984 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
24985 : "T.__export__(mem_ctx, level, in) => ret." },
24986 : { NULL, NULL, 0, NULL }
24987 : };
24988 :
24989 0 : static PyObject *py_drsuapi_DsAddEntryCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24990 : {
24991 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
24992 0 : return NULL;
24993 : }
24994 :
24995 :
24996 : static PyTypeObject drsuapi_DsAddEntryCtr_Type = {
24997 : PyVarObject_HEAD_INIT(NULL, 0)
24998 : .tp_name = "drsuapi.DsAddEntryCtr",
24999 : .tp_getset = NULL,
25000 : .tp_methods = py_drsuapi_DsAddEntryCtr_methods,
25001 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25002 : .tp_new = py_drsuapi_DsAddEntryCtr_new,
25003 : };
25004 :
25005 :
25006 0 : static PyObject *py_drsuapi_DsExecuteKCC1_get_taskID(PyObject *obj, void *closure)
25007 : {
25008 0 : struct drsuapi_DsExecuteKCC1 *object = (struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(obj);
25009 : PyObject *py_taskID;
25010 0 : py_taskID = PyLong_FromUnsignedLongLong((uint32_t)object->taskID);
25011 0 : return py_taskID;
25012 : }
25013 :
25014 0 : static int py_drsuapi_DsExecuteKCC1_set_taskID(PyObject *py_obj, PyObject *value, void *closure)
25015 : {
25016 0 : struct drsuapi_DsExecuteKCC1 *object = (struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(py_obj);
25017 0 : if (value == NULL) {
25018 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->taskID");
25019 0 : return -1;
25020 : }
25021 : {
25022 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->taskID));
25023 0 : if (PyLong_Check(value)) {
25024 : unsigned long long test_var;
25025 0 : test_var = PyLong_AsUnsignedLongLong(value);
25026 0 : if (PyErr_Occurred() != NULL) {
25027 0 : return -1;
25028 : }
25029 0 : if (test_var > uint_max) {
25030 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25031 : PyLong_Type.tp_name, uint_max, test_var);
25032 0 : return -1;
25033 : }
25034 0 : object->taskID = test_var;
25035 : } else {
25036 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25037 : PyLong_Type.tp_name);
25038 0 : return -1;
25039 : }
25040 : }
25041 0 : return 0;
25042 : }
25043 :
25044 0 : static PyObject *py_drsuapi_DsExecuteKCC1_get_flags(PyObject *obj, void *closure)
25045 : {
25046 0 : struct drsuapi_DsExecuteKCC1 *object = (struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(obj);
25047 : PyObject *py_flags;
25048 0 : py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
25049 0 : return py_flags;
25050 : }
25051 :
25052 0 : static int py_drsuapi_DsExecuteKCC1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
25053 : {
25054 0 : struct drsuapi_DsExecuteKCC1 *object = (struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(py_obj);
25055 0 : if (value == NULL) {
25056 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
25057 0 : return -1;
25058 : }
25059 : {
25060 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
25061 0 : if (PyLong_Check(value)) {
25062 : unsigned long long test_var;
25063 0 : test_var = PyLong_AsUnsignedLongLong(value);
25064 0 : if (PyErr_Occurred() != NULL) {
25065 0 : return -1;
25066 : }
25067 0 : if (test_var > uint_max) {
25068 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25069 : PyLong_Type.tp_name, uint_max, test_var);
25070 0 : return -1;
25071 : }
25072 0 : object->flags = test_var;
25073 : } else {
25074 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25075 : PyLong_Type.tp_name);
25076 0 : return -1;
25077 : }
25078 : }
25079 0 : return 0;
25080 : }
25081 :
25082 : static PyGetSetDef py_drsuapi_DsExecuteKCC1_getsetters[] = {
25083 : {
25084 : .name = discard_const_p(char, "taskID"),
25085 : .get = py_drsuapi_DsExecuteKCC1_get_taskID,
25086 : .set = py_drsuapi_DsExecuteKCC1_set_taskID,
25087 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
25088 : },
25089 : {
25090 : .name = discard_const_p(char, "flags"),
25091 : .get = py_drsuapi_DsExecuteKCC1_get_flags,
25092 : .set = py_drsuapi_DsExecuteKCC1_set_flags,
25093 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExecuteKCCFlags")
25094 : },
25095 : { .name = NULL }
25096 : };
25097 :
25098 1 : static PyObject *py_drsuapi_DsExecuteKCC1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25099 : {
25100 1 : return pytalloc_new(struct drsuapi_DsExecuteKCC1, type);
25101 : }
25102 :
25103 :
25104 : static PyTypeObject drsuapi_DsExecuteKCC1_Type = {
25105 : PyVarObject_HEAD_INIT(NULL, 0)
25106 : .tp_name = "drsuapi.DsExecuteKCC1",
25107 : .tp_getset = py_drsuapi_DsExecuteKCC1_getsetters,
25108 : .tp_methods = NULL,
25109 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25110 : .tp_new = py_drsuapi_DsExecuteKCC1_new,
25111 : };
25112 :
25113 0 : static PyObject *py_import_drsuapi_DsExecuteKCCRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsExecuteKCCRequest *in)
25114 : {
25115 : PyObject *ret;
25116 :
25117 0 : switch (level) {
25118 0 : case 1:
25119 0 : ret = pytalloc_reference_ex(&drsuapi_DsExecuteKCC1_Type, mem_ctx, &in->ctr1);
25120 0 : return ret;
25121 :
25122 : }
25123 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
25124 0 : return NULL;
25125 : }
25126 :
25127 1 : static union drsuapi_DsExecuteKCCRequest *py_export_drsuapi_DsExecuteKCCRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
25128 : {
25129 1 : union drsuapi_DsExecuteKCCRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsExecuteKCCRequest);
25130 1 : switch (level) {
25131 1 : case 1:
25132 1 : if (in == NULL) {
25133 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
25134 0 : talloc_free(ret); return NULL;
25135 : }
25136 1 : PY_CHECK_TYPE(&drsuapi_DsExecuteKCC1_Type, in, talloc_free(ret); return NULL;);
25137 1 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25138 0 : PyErr_NoMemory();
25139 0 : talloc_free(ret); return NULL;
25140 : }
25141 1 : ret->ctr1 = *(struct drsuapi_DsExecuteKCC1 *)pytalloc_get_ptr(in);
25142 1 : break;
25143 :
25144 0 : default:
25145 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
25146 0 : talloc_free(ret);
25147 0 : ret = NULL;
25148 : }
25149 :
25150 1 : return ret;
25151 : }
25152 :
25153 0 : static PyObject *py_drsuapi_DsExecuteKCCRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25154 : {
25155 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
25156 0 : PyObject *mem_ctx_obj = NULL;
25157 0 : TALLOC_CTX *mem_ctx = NULL;
25158 0 : int level = 0;
25159 0 : PyObject *in_obj = NULL;
25160 0 : union drsuapi_DsExecuteKCCRequest *in = NULL;
25161 :
25162 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
25163 : discard_const_p(char *, kwnames),
25164 : &mem_ctx_obj,
25165 : &level,
25166 : &in_obj)) {
25167 0 : return NULL;
25168 : }
25169 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
25170 0 : if (mem_ctx == NULL) {
25171 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
25172 0 : return NULL;
25173 : }
25174 0 : in = (union drsuapi_DsExecuteKCCRequest *)pytalloc_get_ptr(in_obj);
25175 0 : if (in == NULL) {
25176 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsExecuteKCCRequest!");
25177 0 : return NULL;
25178 : }
25179 :
25180 0 : return py_import_drsuapi_DsExecuteKCCRequest(mem_ctx, level, in);
25181 : }
25182 :
25183 1 : static PyObject *py_drsuapi_DsExecuteKCCRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25184 : {
25185 1 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
25186 1 : PyObject *mem_ctx_obj = NULL;
25187 1 : TALLOC_CTX *mem_ctx = NULL;
25188 1 : int level = 0;
25189 1 : PyObject *in = NULL;
25190 1 : union drsuapi_DsExecuteKCCRequest *out = NULL;
25191 :
25192 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
25193 : discard_const_p(char *, kwnames),
25194 : &mem_ctx_obj,
25195 : &level,
25196 : &in)) {
25197 0 : return NULL;
25198 : }
25199 1 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
25200 1 : if (mem_ctx == NULL) {
25201 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
25202 0 : return NULL;
25203 : }
25204 :
25205 1 : out = py_export_drsuapi_DsExecuteKCCRequest(mem_ctx, level, in);
25206 1 : if (out == NULL) {
25207 0 : return NULL;
25208 : }
25209 :
25210 1 : return pytalloc_GenericObject_reference(out);
25211 : }
25212 :
25213 : static PyMethodDef py_drsuapi_DsExecuteKCCRequest_methods[] = {
25214 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCCRequest_import),
25215 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
25216 : "T.__import__(mem_ctx, level, in) => ret." },
25217 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCCRequest_export),
25218 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
25219 : "T.__export__(mem_ctx, level, in) => ret." },
25220 : { NULL, NULL, 0, NULL }
25221 : };
25222 :
25223 0 : static PyObject *py_drsuapi_DsExecuteKCCRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25224 : {
25225 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
25226 0 : return NULL;
25227 : }
25228 :
25229 :
25230 : static PyTypeObject drsuapi_DsExecuteKCCRequest_Type = {
25231 : PyVarObject_HEAD_INIT(NULL, 0)
25232 : .tp_name = "drsuapi.DsExecuteKCCRequest",
25233 : .tp_getset = NULL,
25234 : .tp_methods = py_drsuapi_DsExecuteKCCRequest_methods,
25235 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25236 : .tp_new = py_drsuapi_DsExecuteKCCRequest_new,
25237 : };
25238 :
25239 :
25240 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_get_info_type(PyObject *obj, void *closure)
25241 : {
25242 0 : struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(obj);
25243 : PyObject *py_info_type;
25244 0 : py_info_type = PyLong_FromUnsignedLongLong((uint32_t)object->info_type);
25245 0 : return py_info_type;
25246 : }
25247 :
25248 18 : static int py_drsuapi_DsReplicaGetInfoRequest1_set_info_type(PyObject *py_obj, PyObject *value, void *closure)
25249 : {
25250 18 : struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(py_obj);
25251 18 : if (value == NULL) {
25252 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_type");
25253 0 : return -1;
25254 : }
25255 : {
25256 18 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->info_type));
25257 18 : if (PyLong_Check(value)) {
25258 : unsigned long long test_var;
25259 18 : test_var = PyLong_AsUnsignedLongLong(value);
25260 18 : if (PyErr_Occurred() != NULL) {
25261 0 : return -1;
25262 : }
25263 18 : if (test_var > uint_max) {
25264 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25265 : PyLong_Type.tp_name, uint_max, test_var);
25266 0 : return -1;
25267 : }
25268 18 : object->info_type = test_var;
25269 : } else {
25270 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25271 : PyLong_Type.tp_name);
25272 0 : return -1;
25273 : }
25274 : }
25275 18 : return 0;
25276 : }
25277 :
25278 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_get_object_dn(PyObject *obj, void *closure)
25279 : {
25280 0 : struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(obj);
25281 : PyObject *py_object_dn;
25282 0 : if (object->object_dn == NULL) {
25283 0 : Py_RETURN_NONE;
25284 : }
25285 0 : if (object->object_dn == NULL) {
25286 0 : py_object_dn = Py_None;
25287 0 : Py_INCREF(py_object_dn);
25288 : } else {
25289 0 : if (object->object_dn == NULL) {
25290 0 : py_object_dn = Py_None;
25291 0 : Py_INCREF(py_object_dn);
25292 : } else {
25293 0 : py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
25294 : }
25295 : }
25296 0 : return py_object_dn;
25297 : }
25298 :
25299 0 : static int py_drsuapi_DsReplicaGetInfoRequest1_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
25300 : {
25301 0 : struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(py_obj);
25302 0 : if (value == NULL) {
25303 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
25304 0 : return -1;
25305 : }
25306 0 : if (value == Py_None) {
25307 0 : object->object_dn = NULL;
25308 : } else {
25309 0 : object->object_dn = NULL;
25310 : {
25311 : const char *test_str;
25312 : const char *talloc_str;
25313 0 : PyObject *unicode = NULL;
25314 0 : if (PyUnicode_Check(value)) {
25315 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
25316 0 : if (unicode == NULL) {
25317 0 : PyErr_NoMemory();
25318 0 : return -1;
25319 : }
25320 0 : test_str = PyBytes_AS_STRING(unicode);
25321 0 : } else if (PyBytes_Check(value)) {
25322 0 : test_str = PyBytes_AS_STRING(value);
25323 : } else {
25324 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
25325 0 : return -1;
25326 : }
25327 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
25328 0 : if (unicode != NULL) {
25329 0 : Py_DECREF(unicode);
25330 : }
25331 0 : if (talloc_str == NULL) {
25332 0 : PyErr_NoMemory();
25333 0 : return -1;
25334 : }
25335 0 : object->object_dn = talloc_str;
25336 : }
25337 : }
25338 0 : return 0;
25339 : }
25340 :
25341 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_get_source_dsa_guid(PyObject *obj, void *closure)
25342 : {
25343 0 : struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(obj);
25344 : PyObject *py_source_dsa_guid;
25345 0 : py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
25346 0 : return py_source_dsa_guid;
25347 : }
25348 :
25349 0 : static int py_drsuapi_DsReplicaGetInfoRequest1_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
25350 : {
25351 0 : struct drsuapi_DsReplicaGetInfoRequest1 *object = (struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(py_obj);
25352 0 : if (value == NULL) {
25353 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
25354 0 : return -1;
25355 : }
25356 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
25357 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
25358 0 : PyErr_NoMemory();
25359 0 : return -1;
25360 : }
25361 0 : object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
25362 0 : return 0;
25363 : }
25364 :
25365 : static PyGetSetDef py_drsuapi_DsReplicaGetInfoRequest1_getsetters[] = {
25366 : {
25367 : .name = discard_const_p(char, "info_type"),
25368 : .get = py_drsuapi_DsReplicaGetInfoRequest1_get_info_type,
25369 : .set = py_drsuapi_DsReplicaGetInfoRequest1_set_info_type,
25370 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaInfoType")
25371 : },
25372 : {
25373 : .name = discard_const_p(char, "object_dn"),
25374 : .get = py_drsuapi_DsReplicaGetInfoRequest1_get_object_dn,
25375 : .set = py_drsuapi_DsReplicaGetInfoRequest1_set_object_dn,
25376 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
25377 : },
25378 : {
25379 : .name = discard_const_p(char, "source_dsa_guid"),
25380 : .get = py_drsuapi_DsReplicaGetInfoRequest1_get_source_dsa_guid,
25381 : .set = py_drsuapi_DsReplicaGetInfoRequest1_set_source_dsa_guid,
25382 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
25383 : },
25384 : { .name = NULL }
25385 : };
25386 :
25387 18 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25388 : {
25389 18 : return pytalloc_new(struct drsuapi_DsReplicaGetInfoRequest1, type);
25390 : }
25391 :
25392 :
25393 : static PyTypeObject drsuapi_DsReplicaGetInfoRequest1_Type = {
25394 : PyVarObject_HEAD_INIT(NULL, 0)
25395 : .tp_name = "drsuapi.DsReplicaGetInfoRequest1",
25396 : .tp_getset = py_drsuapi_DsReplicaGetInfoRequest1_getsetters,
25397 : .tp_methods = NULL,
25398 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25399 : .tp_new = py_drsuapi_DsReplicaGetInfoRequest1_new,
25400 : };
25401 :
25402 :
25403 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_info_type(PyObject *obj, void *closure)
25404 : {
25405 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
25406 : PyObject *py_info_type;
25407 0 : py_info_type = PyLong_FromUnsignedLongLong((uint32_t)object->info_type);
25408 0 : return py_info_type;
25409 : }
25410 :
25411 0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_info_type(PyObject *py_obj, PyObject *value, void *closure)
25412 : {
25413 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
25414 0 : if (value == NULL) {
25415 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info_type");
25416 0 : return -1;
25417 : }
25418 : {
25419 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->info_type));
25420 0 : if (PyLong_Check(value)) {
25421 : unsigned long long test_var;
25422 0 : test_var = PyLong_AsUnsignedLongLong(value);
25423 0 : if (PyErr_Occurred() != NULL) {
25424 0 : return -1;
25425 : }
25426 0 : if (test_var > uint_max) {
25427 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25428 : PyLong_Type.tp_name, uint_max, test_var);
25429 0 : return -1;
25430 : }
25431 0 : object->info_type = test_var;
25432 : } else {
25433 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25434 : PyLong_Type.tp_name);
25435 0 : return -1;
25436 : }
25437 : }
25438 0 : return 0;
25439 : }
25440 :
25441 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_object_dn(PyObject *obj, void *closure)
25442 : {
25443 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
25444 : PyObject *py_object_dn;
25445 0 : if (object->object_dn == NULL) {
25446 0 : Py_RETURN_NONE;
25447 : }
25448 0 : if (object->object_dn == NULL) {
25449 0 : py_object_dn = Py_None;
25450 0 : Py_INCREF(py_object_dn);
25451 : } else {
25452 0 : if (object->object_dn == NULL) {
25453 0 : py_object_dn = Py_None;
25454 0 : Py_INCREF(py_object_dn);
25455 : } else {
25456 0 : py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
25457 : }
25458 : }
25459 0 : return py_object_dn;
25460 : }
25461 :
25462 0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
25463 : {
25464 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
25465 0 : if (value == NULL) {
25466 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
25467 0 : return -1;
25468 : }
25469 0 : if (value == Py_None) {
25470 0 : object->object_dn = NULL;
25471 : } else {
25472 0 : object->object_dn = NULL;
25473 : {
25474 : const char *test_str;
25475 : const char *talloc_str;
25476 0 : PyObject *unicode = NULL;
25477 0 : if (PyUnicode_Check(value)) {
25478 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
25479 0 : if (unicode == NULL) {
25480 0 : PyErr_NoMemory();
25481 0 : return -1;
25482 : }
25483 0 : test_str = PyBytes_AS_STRING(unicode);
25484 0 : } else if (PyBytes_Check(value)) {
25485 0 : test_str = PyBytes_AS_STRING(value);
25486 : } else {
25487 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
25488 0 : return -1;
25489 : }
25490 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
25491 0 : if (unicode != NULL) {
25492 0 : Py_DECREF(unicode);
25493 : }
25494 0 : if (talloc_str == NULL) {
25495 0 : PyErr_NoMemory();
25496 0 : return -1;
25497 : }
25498 0 : object->object_dn = talloc_str;
25499 : }
25500 : }
25501 0 : return 0;
25502 : }
25503 :
25504 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_source_dsa_guid(PyObject *obj, void *closure)
25505 : {
25506 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
25507 : PyObject *py_source_dsa_guid;
25508 0 : py_source_dsa_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_guid);
25509 0 : return py_source_dsa_guid;
25510 : }
25511 :
25512 0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_source_dsa_guid(PyObject *py_obj, PyObject *value, void *closure)
25513 : {
25514 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
25515 0 : if (value == NULL) {
25516 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_guid");
25517 0 : return -1;
25518 : }
25519 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
25520 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
25521 0 : PyErr_NoMemory();
25522 0 : return -1;
25523 : }
25524 0 : object->source_dsa_guid = *(struct GUID *)pytalloc_get_ptr(value);
25525 0 : return 0;
25526 : }
25527 :
25528 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_flags(PyObject *obj, void *closure)
25529 : {
25530 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
25531 : PyObject *py_flags;
25532 0 : py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
25533 0 : return py_flags;
25534 : }
25535 :
25536 0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_flags(PyObject *py_obj, PyObject *value, void *closure)
25537 : {
25538 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
25539 0 : if (value == NULL) {
25540 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
25541 0 : return -1;
25542 : }
25543 : {
25544 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
25545 0 : if (PyLong_Check(value)) {
25546 : unsigned long long test_var;
25547 0 : test_var = PyLong_AsUnsignedLongLong(value);
25548 0 : if (PyErr_Occurred() != NULL) {
25549 0 : return -1;
25550 : }
25551 0 : if (test_var > uint_max) {
25552 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25553 : PyLong_Type.tp_name, uint_max, test_var);
25554 0 : return -1;
25555 : }
25556 0 : object->flags = test_var;
25557 : } else {
25558 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25559 : PyLong_Type.tp_name);
25560 0 : return -1;
25561 : }
25562 : }
25563 0 : return 0;
25564 : }
25565 :
25566 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_attribute_name(PyObject *obj, void *closure)
25567 : {
25568 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
25569 : PyObject *py_attribute_name;
25570 0 : if (object->attribute_name == NULL) {
25571 0 : Py_RETURN_NONE;
25572 : }
25573 0 : if (object->attribute_name == NULL) {
25574 0 : py_attribute_name = Py_None;
25575 0 : Py_INCREF(py_attribute_name);
25576 : } else {
25577 0 : if (object->attribute_name == NULL) {
25578 0 : py_attribute_name = Py_None;
25579 0 : Py_INCREF(py_attribute_name);
25580 : } else {
25581 0 : py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
25582 : }
25583 : }
25584 0 : return py_attribute_name;
25585 : }
25586 :
25587 0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
25588 : {
25589 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
25590 0 : if (value == NULL) {
25591 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
25592 0 : return -1;
25593 : }
25594 0 : if (value == Py_None) {
25595 0 : object->attribute_name = NULL;
25596 : } else {
25597 0 : object->attribute_name = NULL;
25598 : {
25599 : const char *test_str;
25600 : const char *talloc_str;
25601 0 : PyObject *unicode = NULL;
25602 0 : if (PyUnicode_Check(value)) {
25603 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
25604 0 : if (unicode == NULL) {
25605 0 : PyErr_NoMemory();
25606 0 : return -1;
25607 : }
25608 0 : test_str = PyBytes_AS_STRING(unicode);
25609 0 : } else if (PyBytes_Check(value)) {
25610 0 : test_str = PyBytes_AS_STRING(value);
25611 : } else {
25612 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
25613 0 : return -1;
25614 : }
25615 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
25616 0 : if (unicode != NULL) {
25617 0 : Py_DECREF(unicode);
25618 : }
25619 0 : if (talloc_str == NULL) {
25620 0 : PyErr_NoMemory();
25621 0 : return -1;
25622 : }
25623 0 : object->attribute_name = talloc_str;
25624 : }
25625 : }
25626 0 : return 0;
25627 : }
25628 :
25629 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_value_dn_str(PyObject *obj, void *closure)
25630 : {
25631 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
25632 : PyObject *py_value_dn_str;
25633 0 : if (object->value_dn_str == NULL) {
25634 0 : Py_RETURN_NONE;
25635 : }
25636 0 : if (object->value_dn_str == NULL) {
25637 0 : py_value_dn_str = Py_None;
25638 0 : Py_INCREF(py_value_dn_str);
25639 : } else {
25640 0 : if (object->value_dn_str == NULL) {
25641 0 : py_value_dn_str = Py_None;
25642 0 : Py_INCREF(py_value_dn_str);
25643 : } else {
25644 0 : py_value_dn_str = PyUnicode_Decode(object->value_dn_str, strlen(object->value_dn_str), "utf-8", "ignore");
25645 : }
25646 : }
25647 0 : return py_value_dn_str;
25648 : }
25649 :
25650 0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_value_dn_str(PyObject *py_obj, PyObject *value, void *closure)
25651 : {
25652 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
25653 0 : if (value == NULL) {
25654 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->value_dn_str");
25655 0 : return -1;
25656 : }
25657 0 : if (value == Py_None) {
25658 0 : object->value_dn_str = NULL;
25659 : } else {
25660 0 : object->value_dn_str = NULL;
25661 : {
25662 : const char *test_str;
25663 : const char *talloc_str;
25664 0 : PyObject *unicode = NULL;
25665 0 : if (PyUnicode_Check(value)) {
25666 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
25667 0 : if (unicode == NULL) {
25668 0 : PyErr_NoMemory();
25669 0 : return -1;
25670 : }
25671 0 : test_str = PyBytes_AS_STRING(unicode);
25672 0 : } else if (PyBytes_Check(value)) {
25673 0 : test_str = PyBytes_AS_STRING(value);
25674 : } else {
25675 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
25676 0 : return -1;
25677 : }
25678 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
25679 0 : if (unicode != NULL) {
25680 0 : Py_DECREF(unicode);
25681 : }
25682 0 : if (talloc_str == NULL) {
25683 0 : PyErr_NoMemory();
25684 0 : return -1;
25685 : }
25686 0 : object->value_dn_str = talloc_str;
25687 : }
25688 : }
25689 0 : return 0;
25690 : }
25691 :
25692 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_get_enumeration_context(PyObject *obj, void *closure)
25693 : {
25694 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(obj);
25695 : PyObject *py_enumeration_context;
25696 0 : py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)object->enumeration_context);
25697 0 : return py_enumeration_context;
25698 : }
25699 :
25700 0 : static int py_drsuapi_DsReplicaGetInfoRequest2_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
25701 : {
25702 0 : struct drsuapi_DsReplicaGetInfoRequest2 *object = (struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(py_obj);
25703 0 : if (value == NULL) {
25704 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
25705 0 : return -1;
25706 : }
25707 : {
25708 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
25709 0 : if (PyLong_Check(value)) {
25710 : unsigned long long test_var;
25711 0 : test_var = PyLong_AsUnsignedLongLong(value);
25712 0 : if (PyErr_Occurred() != NULL) {
25713 0 : return -1;
25714 : }
25715 0 : if (test_var > uint_max) {
25716 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25717 : PyLong_Type.tp_name, uint_max, test_var);
25718 0 : return -1;
25719 : }
25720 0 : object->enumeration_context = test_var;
25721 : } else {
25722 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25723 : PyLong_Type.tp_name);
25724 0 : return -1;
25725 : }
25726 : }
25727 0 : return 0;
25728 : }
25729 :
25730 : static PyGetSetDef py_drsuapi_DsReplicaGetInfoRequest2_getsetters[] = {
25731 : {
25732 : .name = discard_const_p(char, "info_type"),
25733 : .get = py_drsuapi_DsReplicaGetInfoRequest2_get_info_type,
25734 : .set = py_drsuapi_DsReplicaGetInfoRequest2_set_info_type,
25735 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaInfoType")
25736 : },
25737 : {
25738 : .name = discard_const_p(char, "object_dn"),
25739 : .get = py_drsuapi_DsReplicaGetInfoRequest2_get_object_dn,
25740 : .set = py_drsuapi_DsReplicaGetInfoRequest2_set_object_dn,
25741 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
25742 : },
25743 : {
25744 : .name = discard_const_p(char, "source_dsa_guid"),
25745 : .get = py_drsuapi_DsReplicaGetInfoRequest2_get_source_dsa_guid,
25746 : .set = py_drsuapi_DsReplicaGetInfoRequest2_set_source_dsa_guid,
25747 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
25748 : },
25749 : {
25750 : .name = discard_const_p(char, "flags"),
25751 : .get = py_drsuapi_DsReplicaGetInfoRequest2_get_flags,
25752 : .set = py_drsuapi_DsReplicaGetInfoRequest2_set_flags,
25753 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
25754 : },
25755 : {
25756 : .name = discard_const_p(char, "attribute_name"),
25757 : .get = py_drsuapi_DsReplicaGetInfoRequest2_get_attribute_name,
25758 : .set = py_drsuapi_DsReplicaGetInfoRequest2_set_attribute_name,
25759 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
25760 : },
25761 : {
25762 : .name = discard_const_p(char, "value_dn_str"),
25763 : .get = py_drsuapi_DsReplicaGetInfoRequest2_get_value_dn_str,
25764 : .set = py_drsuapi_DsReplicaGetInfoRequest2_set_value_dn_str,
25765 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
25766 : },
25767 : {
25768 : .name = discard_const_p(char, "enumeration_context"),
25769 : .get = py_drsuapi_DsReplicaGetInfoRequest2_get_enumeration_context,
25770 : .set = py_drsuapi_DsReplicaGetInfoRequest2_set_enumeration_context,
25771 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
25772 : },
25773 : { .name = NULL }
25774 : };
25775 :
25776 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25777 : {
25778 0 : return pytalloc_new(struct drsuapi_DsReplicaGetInfoRequest2, type);
25779 : }
25780 :
25781 :
25782 : static PyTypeObject drsuapi_DsReplicaGetInfoRequest2_Type = {
25783 : PyVarObject_HEAD_INIT(NULL, 0)
25784 : .tp_name = "drsuapi.DsReplicaGetInfoRequest2",
25785 : .tp_getset = py_drsuapi_DsReplicaGetInfoRequest2_getsetters,
25786 : .tp_methods = NULL,
25787 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25788 : .tp_new = py_drsuapi_DsReplicaGetInfoRequest2_new,
25789 : };
25790 :
25791 0 : static PyObject *py_import_drsuapi_DsReplicaGetInfoRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaGetInfoRequest *in)
25792 : {
25793 : PyObject *ret;
25794 :
25795 0 : switch (level) {
25796 0 : case DRSUAPI_DS_REPLICA_GET_INFO:
25797 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaGetInfoRequest1_Type, mem_ctx, &in->req1);
25798 0 : return ret;
25799 :
25800 0 : case DRSUAPI_DS_REPLICA_GET_INFO2:
25801 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaGetInfoRequest2_Type, mem_ctx, &in->req2);
25802 0 : return ret;
25803 :
25804 : }
25805 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
25806 0 : return NULL;
25807 : }
25808 :
25809 18 : static union drsuapi_DsReplicaGetInfoRequest *py_export_drsuapi_DsReplicaGetInfoRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
25810 : {
25811 18 : union drsuapi_DsReplicaGetInfoRequest *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaGetInfoRequest);
25812 18 : switch (level) {
25813 18 : case DRSUAPI_DS_REPLICA_GET_INFO:
25814 18 : if (in == NULL) {
25815 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
25816 0 : talloc_free(ret); return NULL;
25817 : }
25818 18 : PY_CHECK_TYPE(&drsuapi_DsReplicaGetInfoRequest1_Type, in, talloc_free(ret); return NULL;);
25819 18 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25820 0 : PyErr_NoMemory();
25821 0 : talloc_free(ret); return NULL;
25822 : }
25823 18 : ret->req1 = *(struct drsuapi_DsReplicaGetInfoRequest1 *)pytalloc_get_ptr(in);
25824 18 : break;
25825 :
25826 0 : case DRSUAPI_DS_REPLICA_GET_INFO2:
25827 0 : if (in == NULL) {
25828 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req2");
25829 0 : talloc_free(ret); return NULL;
25830 : }
25831 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaGetInfoRequest2_Type, in, talloc_free(ret); return NULL;);
25832 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25833 0 : PyErr_NoMemory();
25834 0 : talloc_free(ret); return NULL;
25835 : }
25836 0 : ret->req2 = *(struct drsuapi_DsReplicaGetInfoRequest2 *)pytalloc_get_ptr(in);
25837 0 : break;
25838 :
25839 0 : default:
25840 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
25841 0 : talloc_free(ret);
25842 0 : ret = NULL;
25843 : }
25844 :
25845 18 : return ret;
25846 : }
25847 :
25848 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25849 : {
25850 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
25851 0 : PyObject *mem_ctx_obj = NULL;
25852 0 : TALLOC_CTX *mem_ctx = NULL;
25853 0 : int level = 0;
25854 0 : PyObject *in_obj = NULL;
25855 0 : union drsuapi_DsReplicaGetInfoRequest *in = NULL;
25856 :
25857 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
25858 : discard_const_p(char *, kwnames),
25859 : &mem_ctx_obj,
25860 : &level,
25861 : &in_obj)) {
25862 0 : return NULL;
25863 : }
25864 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
25865 0 : if (mem_ctx == NULL) {
25866 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
25867 0 : return NULL;
25868 : }
25869 0 : in = (union drsuapi_DsReplicaGetInfoRequest *)pytalloc_get_ptr(in_obj);
25870 0 : if (in == NULL) {
25871 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaGetInfoRequest!");
25872 0 : return NULL;
25873 : }
25874 :
25875 0 : return py_import_drsuapi_DsReplicaGetInfoRequest(mem_ctx, level, in);
25876 : }
25877 :
25878 18 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25879 : {
25880 18 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
25881 18 : PyObject *mem_ctx_obj = NULL;
25882 18 : TALLOC_CTX *mem_ctx = NULL;
25883 18 : int level = 0;
25884 18 : PyObject *in = NULL;
25885 18 : union drsuapi_DsReplicaGetInfoRequest *out = NULL;
25886 :
25887 18 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
25888 : discard_const_p(char *, kwnames),
25889 : &mem_ctx_obj,
25890 : &level,
25891 : &in)) {
25892 0 : return NULL;
25893 : }
25894 18 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
25895 18 : if (mem_ctx == NULL) {
25896 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
25897 0 : return NULL;
25898 : }
25899 :
25900 18 : out = py_export_drsuapi_DsReplicaGetInfoRequest(mem_ctx, level, in);
25901 18 : if (out == NULL) {
25902 0 : return NULL;
25903 : }
25904 :
25905 18 : return pytalloc_GenericObject_reference(out);
25906 : }
25907 :
25908 : static PyMethodDef py_drsuapi_DsReplicaGetInfoRequest_methods[] = {
25909 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfoRequest_import),
25910 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
25911 : "T.__import__(mem_ctx, level, in) => ret." },
25912 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfoRequest_export),
25913 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
25914 : "T.__export__(mem_ctx, level, in) => ret." },
25915 : { NULL, NULL, 0, NULL }
25916 : };
25917 :
25918 0 : static PyObject *py_drsuapi_DsReplicaGetInfoRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25919 : {
25920 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
25921 0 : return NULL;
25922 : }
25923 :
25924 :
25925 : static PyTypeObject drsuapi_DsReplicaGetInfoRequest_Type = {
25926 : PyVarObject_HEAD_INIT(NULL, 0)
25927 : .tp_name = "drsuapi.DsReplicaGetInfoRequest",
25928 : .tp_getset = NULL,
25929 : .tp_methods = py_drsuapi_DsReplicaGetInfoRequest_methods,
25930 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25931 : .tp_new = py_drsuapi_DsReplicaGetInfoRequest_new,
25932 : };
25933 :
25934 :
25935 77 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_naming_context_dn(PyObject *obj, void *closure)
25936 : {
25937 77 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
25938 : PyObject *py_naming_context_dn;
25939 77 : if (object->naming_context_dn == NULL) {
25940 0 : Py_RETURN_NONE;
25941 : }
25942 77 : if (object->naming_context_dn == NULL) {
25943 0 : py_naming_context_dn = Py_None;
25944 0 : Py_INCREF(py_naming_context_dn);
25945 : } else {
25946 77 : if (object->naming_context_dn == NULL) {
25947 0 : py_naming_context_dn = Py_None;
25948 0 : Py_INCREF(py_naming_context_dn);
25949 : } else {
25950 77 : py_naming_context_dn = PyUnicode_Decode(object->naming_context_dn, strlen(object->naming_context_dn), "utf-8", "ignore");
25951 : }
25952 : }
25953 77 : return py_naming_context_dn;
25954 : }
25955 :
25956 0 : static int py_drsuapi_DsReplicaNeighbour_set_naming_context_dn(PyObject *py_obj, PyObject *value, void *closure)
25957 : {
25958 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
25959 0 : if (value == NULL) {
25960 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context_dn");
25961 0 : return -1;
25962 : }
25963 0 : if (value == Py_None) {
25964 0 : object->naming_context_dn = NULL;
25965 : } else {
25966 0 : object->naming_context_dn = NULL;
25967 : {
25968 : const char *test_str;
25969 : const char *talloc_str;
25970 0 : PyObject *unicode = NULL;
25971 0 : if (PyUnicode_Check(value)) {
25972 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
25973 0 : if (unicode == NULL) {
25974 0 : PyErr_NoMemory();
25975 0 : return -1;
25976 : }
25977 0 : test_str = PyBytes_AS_STRING(unicode);
25978 0 : } else if (PyBytes_Check(value)) {
25979 0 : test_str = PyBytes_AS_STRING(value);
25980 : } else {
25981 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
25982 0 : return -1;
25983 : }
25984 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
25985 0 : if (unicode != NULL) {
25986 0 : Py_DECREF(unicode);
25987 : }
25988 0 : if (talloc_str == NULL) {
25989 0 : PyErr_NoMemory();
25990 0 : return -1;
25991 : }
25992 0 : object->naming_context_dn = talloc_str;
25993 : }
25994 : }
25995 0 : return 0;
25996 : }
25997 :
25998 164 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_dn(PyObject *obj, void *closure)
25999 : {
26000 164 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26001 : PyObject *py_source_dsa_obj_dn;
26002 164 : if (object->source_dsa_obj_dn == NULL) {
26003 0 : Py_RETURN_NONE;
26004 : }
26005 164 : if (object->source_dsa_obj_dn == NULL) {
26006 0 : py_source_dsa_obj_dn = Py_None;
26007 0 : Py_INCREF(py_source_dsa_obj_dn);
26008 : } else {
26009 164 : if (object->source_dsa_obj_dn == NULL) {
26010 0 : py_source_dsa_obj_dn = Py_None;
26011 0 : Py_INCREF(py_source_dsa_obj_dn);
26012 : } else {
26013 164 : py_source_dsa_obj_dn = PyUnicode_Decode(object->source_dsa_obj_dn, strlen(object->source_dsa_obj_dn), "utf-8", "ignore");
26014 : }
26015 : }
26016 164 : return py_source_dsa_obj_dn;
26017 : }
26018 :
26019 0 : static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
26020 : {
26021 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26022 0 : if (value == NULL) {
26023 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_obj_dn");
26024 0 : return -1;
26025 : }
26026 0 : if (value == Py_None) {
26027 0 : object->source_dsa_obj_dn = NULL;
26028 : } else {
26029 0 : object->source_dsa_obj_dn = NULL;
26030 : {
26031 : const char *test_str;
26032 : const char *talloc_str;
26033 0 : PyObject *unicode = NULL;
26034 0 : if (PyUnicode_Check(value)) {
26035 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
26036 0 : if (unicode == NULL) {
26037 0 : PyErr_NoMemory();
26038 0 : return -1;
26039 : }
26040 0 : test_str = PyBytes_AS_STRING(unicode);
26041 0 : } else if (PyBytes_Check(value)) {
26042 0 : test_str = PyBytes_AS_STRING(value);
26043 : } else {
26044 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
26045 0 : return -1;
26046 : }
26047 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
26048 0 : if (unicode != NULL) {
26049 0 : Py_DECREF(unicode);
26050 : }
26051 0 : if (talloc_str == NULL) {
26052 0 : PyErr_NoMemory();
26053 0 : return -1;
26054 : }
26055 0 : object->source_dsa_obj_dn = talloc_str;
26056 : }
26057 : }
26058 0 : return 0;
26059 : }
26060 :
26061 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_address(PyObject *obj, void *closure)
26062 : {
26063 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26064 : PyObject *py_source_dsa_address;
26065 0 : if (object->source_dsa_address == NULL) {
26066 0 : Py_RETURN_NONE;
26067 : }
26068 0 : if (object->source_dsa_address == NULL) {
26069 0 : py_source_dsa_address = Py_None;
26070 0 : Py_INCREF(py_source_dsa_address);
26071 : } else {
26072 0 : if (object->source_dsa_address == NULL) {
26073 0 : py_source_dsa_address = Py_None;
26074 0 : Py_INCREF(py_source_dsa_address);
26075 : } else {
26076 0 : py_source_dsa_address = PyUnicode_Decode(object->source_dsa_address, strlen(object->source_dsa_address), "utf-8", "ignore");
26077 : }
26078 : }
26079 0 : return py_source_dsa_address;
26080 : }
26081 :
26082 0 : static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
26083 : {
26084 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26085 0 : if (value == NULL) {
26086 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_address");
26087 0 : return -1;
26088 : }
26089 0 : if (value == Py_None) {
26090 0 : object->source_dsa_address = NULL;
26091 : } else {
26092 0 : object->source_dsa_address = NULL;
26093 : {
26094 : const char *test_str;
26095 : const char *talloc_str;
26096 0 : PyObject *unicode = NULL;
26097 0 : if (PyUnicode_Check(value)) {
26098 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
26099 0 : if (unicode == NULL) {
26100 0 : PyErr_NoMemory();
26101 0 : return -1;
26102 : }
26103 0 : test_str = PyBytes_AS_STRING(unicode);
26104 0 : } else if (PyBytes_Check(value)) {
26105 0 : test_str = PyBytes_AS_STRING(value);
26106 : } else {
26107 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
26108 0 : return -1;
26109 : }
26110 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
26111 0 : if (unicode != NULL) {
26112 0 : Py_DECREF(unicode);
26113 : }
26114 0 : if (talloc_str == NULL) {
26115 0 : PyErr_NoMemory();
26116 0 : return -1;
26117 : }
26118 0 : object->source_dsa_address = talloc_str;
26119 : }
26120 : }
26121 0 : return 0;
26122 : }
26123 :
26124 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_transport_obj_dn(PyObject *obj, void *closure)
26125 : {
26126 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26127 : PyObject *py_transport_obj_dn;
26128 0 : if (object->transport_obj_dn == NULL) {
26129 0 : Py_RETURN_NONE;
26130 : }
26131 0 : if (object->transport_obj_dn == NULL) {
26132 0 : py_transport_obj_dn = Py_None;
26133 0 : Py_INCREF(py_transport_obj_dn);
26134 : } else {
26135 0 : if (object->transport_obj_dn == NULL) {
26136 0 : py_transport_obj_dn = Py_None;
26137 0 : Py_INCREF(py_transport_obj_dn);
26138 : } else {
26139 0 : py_transport_obj_dn = PyUnicode_Decode(object->transport_obj_dn, strlen(object->transport_obj_dn), "utf-8", "ignore");
26140 : }
26141 : }
26142 0 : return py_transport_obj_dn;
26143 : }
26144 :
26145 0 : static int py_drsuapi_DsReplicaNeighbour_set_transport_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
26146 : {
26147 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26148 0 : if (value == NULL) {
26149 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport_obj_dn");
26150 0 : return -1;
26151 : }
26152 0 : if (value == Py_None) {
26153 0 : object->transport_obj_dn = NULL;
26154 : } else {
26155 0 : object->transport_obj_dn = NULL;
26156 : {
26157 : const char *test_str;
26158 : const char *talloc_str;
26159 0 : PyObject *unicode = NULL;
26160 0 : if (PyUnicode_Check(value)) {
26161 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
26162 0 : if (unicode == NULL) {
26163 0 : PyErr_NoMemory();
26164 0 : return -1;
26165 : }
26166 0 : test_str = PyBytes_AS_STRING(unicode);
26167 0 : } else if (PyBytes_Check(value)) {
26168 0 : test_str = PyBytes_AS_STRING(value);
26169 : } else {
26170 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
26171 0 : return -1;
26172 : }
26173 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
26174 0 : if (unicode != NULL) {
26175 0 : Py_DECREF(unicode);
26176 : }
26177 0 : if (talloc_str == NULL) {
26178 0 : PyErr_NoMemory();
26179 0 : return -1;
26180 : }
26181 0 : object->transport_obj_dn = talloc_str;
26182 : }
26183 : }
26184 0 : return 0;
26185 : }
26186 :
26187 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_replica_flags(PyObject *obj, void *closure)
26188 : {
26189 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26190 : PyObject *py_replica_flags;
26191 0 : py_replica_flags = PyLong_FromUnsignedLongLong((uint32_t)object->replica_flags);
26192 0 : return py_replica_flags;
26193 : }
26194 :
26195 0 : static int py_drsuapi_DsReplicaNeighbour_set_replica_flags(PyObject *py_obj, PyObject *value, void *closure)
26196 : {
26197 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26198 0 : if (value == NULL) {
26199 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->replica_flags");
26200 0 : return -1;
26201 : }
26202 : {
26203 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->replica_flags));
26204 0 : if (PyLong_Check(value)) {
26205 : unsigned long long test_var;
26206 0 : test_var = PyLong_AsUnsignedLongLong(value);
26207 0 : if (PyErr_Occurred() != NULL) {
26208 0 : return -1;
26209 : }
26210 0 : if (test_var > uint_max) {
26211 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26212 : PyLong_Type.tp_name, uint_max, test_var);
26213 0 : return -1;
26214 : }
26215 0 : object->replica_flags = test_var;
26216 : } else {
26217 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26218 : PyLong_Type.tp_name);
26219 0 : return -1;
26220 : }
26221 : }
26222 0 : return 0;
26223 : }
26224 :
26225 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_reserved(PyObject *obj, void *closure)
26226 : {
26227 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26228 : PyObject *py_reserved;
26229 0 : py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
26230 0 : return py_reserved;
26231 : }
26232 :
26233 0 : static int py_drsuapi_DsReplicaNeighbour_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
26234 : {
26235 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26236 0 : if (value == NULL) {
26237 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
26238 0 : return -1;
26239 : }
26240 : {
26241 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
26242 0 : if (PyLong_Check(value)) {
26243 : unsigned long long test_var;
26244 0 : test_var = PyLong_AsUnsignedLongLong(value);
26245 0 : if (PyErr_Occurred() != NULL) {
26246 0 : return -1;
26247 : }
26248 0 : if (test_var > uint_max) {
26249 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26250 : PyLong_Type.tp_name, uint_max, test_var);
26251 0 : return -1;
26252 : }
26253 0 : object->reserved = test_var;
26254 : } else {
26255 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26256 : PyLong_Type.tp_name);
26257 0 : return -1;
26258 : }
26259 : }
26260 0 : return 0;
26261 : }
26262 :
26263 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_naming_context_obj_guid(PyObject *obj, void *closure)
26264 : {
26265 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26266 : PyObject *py_naming_context_obj_guid;
26267 0 : py_naming_context_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->naming_context_obj_guid);
26268 0 : return py_naming_context_obj_guid;
26269 : }
26270 :
26271 0 : static int py_drsuapi_DsReplicaNeighbour_set_naming_context_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
26272 : {
26273 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26274 0 : if (value == NULL) {
26275 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->naming_context_obj_guid");
26276 0 : return -1;
26277 : }
26278 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
26279 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
26280 0 : PyErr_NoMemory();
26281 0 : return -1;
26282 : }
26283 0 : object->naming_context_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
26284 0 : return 0;
26285 : }
26286 :
26287 77 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_guid(PyObject *obj, void *closure)
26288 : {
26289 77 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26290 : PyObject *py_source_dsa_obj_guid;
26291 77 : py_source_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_obj_guid);
26292 77 : return py_source_dsa_obj_guid;
26293 : }
26294 :
26295 0 : static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
26296 : {
26297 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26298 0 : if (value == NULL) {
26299 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_obj_guid");
26300 0 : return -1;
26301 : }
26302 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
26303 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
26304 0 : PyErr_NoMemory();
26305 0 : return -1;
26306 : }
26307 0 : object->source_dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
26308 0 : return 0;
26309 : }
26310 :
26311 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_source_dsa_invocation_id(PyObject *obj, void *closure)
26312 : {
26313 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26314 : PyObject *py_source_dsa_invocation_id;
26315 0 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
26316 0 : return py_source_dsa_invocation_id;
26317 : }
26318 :
26319 0 : static int py_drsuapi_DsReplicaNeighbour_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
26320 : {
26321 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26322 0 : if (value == NULL) {
26323 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
26324 0 : return -1;
26325 : }
26326 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
26327 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
26328 0 : PyErr_NoMemory();
26329 0 : return -1;
26330 : }
26331 0 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
26332 0 : return 0;
26333 : }
26334 :
26335 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_transport_obj_guid(PyObject *obj, void *closure)
26336 : {
26337 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26338 : PyObject *py_transport_obj_guid;
26339 0 : py_transport_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->transport_obj_guid);
26340 0 : return py_transport_obj_guid;
26341 : }
26342 :
26343 0 : static int py_drsuapi_DsReplicaNeighbour_set_transport_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
26344 : {
26345 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26346 0 : if (value == NULL) {
26347 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->transport_obj_guid");
26348 0 : return -1;
26349 : }
26350 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
26351 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
26352 0 : PyErr_NoMemory();
26353 0 : return -1;
26354 : }
26355 0 : object->transport_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
26356 0 : return 0;
26357 : }
26358 :
26359 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_tmp_highest_usn(PyObject *obj, void *closure)
26360 : {
26361 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26362 : PyObject *py_tmp_highest_usn;
26363 0 : py_tmp_highest_usn = PyLong_FromUnsignedLongLong(object->tmp_highest_usn);
26364 0 : return py_tmp_highest_usn;
26365 : }
26366 :
26367 0 : static int py_drsuapi_DsReplicaNeighbour_set_tmp_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
26368 : {
26369 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26370 0 : if (value == NULL) {
26371 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->tmp_highest_usn");
26372 0 : return -1;
26373 : }
26374 : {
26375 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->tmp_highest_usn));
26376 0 : if (PyLong_Check(value)) {
26377 : unsigned long long test_var;
26378 0 : test_var = PyLong_AsUnsignedLongLong(value);
26379 0 : if (PyErr_Occurred() != NULL) {
26380 0 : return -1;
26381 : }
26382 0 : if (test_var > uint_max) {
26383 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26384 : PyLong_Type.tp_name, uint_max, test_var);
26385 0 : return -1;
26386 : }
26387 0 : object->tmp_highest_usn = test_var;
26388 : } else {
26389 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26390 : PyLong_Type.tp_name);
26391 0 : return -1;
26392 : }
26393 : }
26394 0 : return 0;
26395 : }
26396 :
26397 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_highest_usn(PyObject *obj, void *closure)
26398 : {
26399 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26400 : PyObject *py_highest_usn;
26401 0 : py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
26402 0 : return py_highest_usn;
26403 : }
26404 :
26405 0 : static int py_drsuapi_DsReplicaNeighbour_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
26406 : {
26407 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26408 0 : if (value == NULL) {
26409 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
26410 0 : return -1;
26411 : }
26412 : {
26413 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
26414 0 : if (PyLong_Check(value)) {
26415 : unsigned long long test_var;
26416 0 : test_var = PyLong_AsUnsignedLongLong(value);
26417 0 : if (PyErr_Occurred() != NULL) {
26418 0 : return -1;
26419 : }
26420 0 : if (test_var > uint_max) {
26421 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26422 : PyLong_Type.tp_name, uint_max, test_var);
26423 0 : return -1;
26424 : }
26425 0 : object->highest_usn = test_var;
26426 : } else {
26427 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26428 : PyLong_Type.tp_name);
26429 0 : return -1;
26430 : }
26431 : }
26432 0 : return 0;
26433 : }
26434 :
26435 77 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_last_success(PyObject *obj, void *closure)
26436 : {
26437 77 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26438 : PyObject *py_last_success;
26439 77 : py_last_success = PyLong_FromUnsignedLongLong(object->last_success);
26440 77 : return py_last_success;
26441 : }
26442 :
26443 0 : static int py_drsuapi_DsReplicaNeighbour_set_last_success(PyObject *py_obj, PyObject *value, void *closure)
26444 : {
26445 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26446 0 : if (value == NULL) {
26447 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_success");
26448 0 : return -1;
26449 : }
26450 : {
26451 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_success));
26452 0 : if (PyLong_Check(value)) {
26453 : unsigned long long test_var;
26454 0 : test_var = PyLong_AsUnsignedLongLong(value);
26455 0 : if (PyErr_Occurred() != NULL) {
26456 0 : return -1;
26457 : }
26458 0 : if (test_var > uint_max) {
26459 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26460 : PyLong_Type.tp_name, uint_max, test_var);
26461 0 : return -1;
26462 : }
26463 0 : object->last_success = test_var;
26464 : } else {
26465 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26466 : PyLong_Type.tp_name);
26467 0 : return -1;
26468 : }
26469 : }
26470 0 : return 0;
26471 : }
26472 :
26473 77 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_last_attempt(PyObject *obj, void *closure)
26474 : {
26475 77 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26476 : PyObject *py_last_attempt;
26477 77 : py_last_attempt = PyLong_FromUnsignedLongLong(object->last_attempt);
26478 77 : return py_last_attempt;
26479 : }
26480 :
26481 0 : static int py_drsuapi_DsReplicaNeighbour_set_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
26482 : {
26483 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26484 0 : if (value == NULL) {
26485 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_attempt");
26486 0 : return -1;
26487 : }
26488 : {
26489 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_attempt));
26490 0 : if (PyLong_Check(value)) {
26491 : unsigned long long test_var;
26492 0 : test_var = PyLong_AsUnsignedLongLong(value);
26493 0 : if (PyErr_Occurred() != NULL) {
26494 0 : return -1;
26495 : }
26496 0 : if (test_var > uint_max) {
26497 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26498 : PyLong_Type.tp_name, uint_max, test_var);
26499 0 : return -1;
26500 : }
26501 0 : object->last_attempt = test_var;
26502 : } else {
26503 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26504 : PyLong_Type.tp_name);
26505 0 : return -1;
26506 : }
26507 : }
26508 0 : return 0;
26509 : }
26510 :
26511 77 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_result_last_attempt(PyObject *obj, void *closure)
26512 : {
26513 77 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26514 : PyObject *py_result_last_attempt;
26515 77 : py_result_last_attempt = PyErr_FromWERROR(object->result_last_attempt);
26516 77 : return py_result_last_attempt;
26517 : }
26518 :
26519 0 : static int py_drsuapi_DsReplicaNeighbour_set_result_last_attempt(PyObject *py_obj, PyObject *value, void *closure)
26520 : {
26521 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26522 0 : if (value == NULL) {
26523 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->result_last_attempt");
26524 0 : return -1;
26525 : }
26526 0 : object->result_last_attempt = W_ERROR(PyLong_AsLong(value));
26527 0 : return 0;
26528 : }
26529 :
26530 77 : static PyObject *py_drsuapi_DsReplicaNeighbour_get_consecutive_sync_failures(PyObject *obj, void *closure)
26531 : {
26532 77 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(obj);
26533 : PyObject *py_consecutive_sync_failures;
26534 77 : py_consecutive_sync_failures = PyLong_FromUnsignedLongLong((uint32_t)object->consecutive_sync_failures);
26535 77 : return py_consecutive_sync_failures;
26536 : }
26537 :
26538 0 : static int py_drsuapi_DsReplicaNeighbour_set_consecutive_sync_failures(PyObject *py_obj, PyObject *value, void *closure)
26539 : {
26540 0 : struct drsuapi_DsReplicaNeighbour *object = (struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(py_obj);
26541 0 : if (value == NULL) {
26542 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->consecutive_sync_failures");
26543 0 : return -1;
26544 : }
26545 : {
26546 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->consecutive_sync_failures));
26547 0 : if (PyLong_Check(value)) {
26548 : unsigned long long test_var;
26549 0 : test_var = PyLong_AsUnsignedLongLong(value);
26550 0 : if (PyErr_Occurred() != NULL) {
26551 0 : return -1;
26552 : }
26553 0 : if (test_var > uint_max) {
26554 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26555 : PyLong_Type.tp_name, uint_max, test_var);
26556 0 : return -1;
26557 : }
26558 0 : object->consecutive_sync_failures = test_var;
26559 : } else {
26560 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26561 : PyLong_Type.tp_name);
26562 0 : return -1;
26563 : }
26564 : }
26565 0 : return 0;
26566 : }
26567 :
26568 : static PyGetSetDef py_drsuapi_DsReplicaNeighbour_getsetters[] = {
26569 : {
26570 : .name = discard_const_p(char, "naming_context_dn"),
26571 : .get = py_drsuapi_DsReplicaNeighbour_get_naming_context_dn,
26572 : .set = py_drsuapi_DsReplicaNeighbour_set_naming_context_dn,
26573 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
26574 : },
26575 : {
26576 : .name = discard_const_p(char, "source_dsa_obj_dn"),
26577 : .get = py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_dn,
26578 : .set = py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_dn,
26579 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
26580 : },
26581 : {
26582 : .name = discard_const_p(char, "source_dsa_address"),
26583 : .get = py_drsuapi_DsReplicaNeighbour_get_source_dsa_address,
26584 : .set = py_drsuapi_DsReplicaNeighbour_set_source_dsa_address,
26585 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
26586 : },
26587 : {
26588 : .name = discard_const_p(char, "transport_obj_dn"),
26589 : .get = py_drsuapi_DsReplicaNeighbour_get_transport_obj_dn,
26590 : .set = py_drsuapi_DsReplicaNeighbour_set_transport_obj_dn,
26591 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
26592 : },
26593 : {
26594 : .name = discard_const_p(char, "replica_flags"),
26595 : .get = py_drsuapi_DsReplicaNeighbour_get_replica_flags,
26596 : .set = py_drsuapi_DsReplicaNeighbour_set_replica_flags,
26597 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
26598 : },
26599 : {
26600 : .name = discard_const_p(char, "reserved"),
26601 : .get = py_drsuapi_DsReplicaNeighbour_get_reserved,
26602 : .set = py_drsuapi_DsReplicaNeighbour_set_reserved,
26603 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26604 : },
26605 : {
26606 : .name = discard_const_p(char, "naming_context_obj_guid"),
26607 : .get = py_drsuapi_DsReplicaNeighbour_get_naming_context_obj_guid,
26608 : .set = py_drsuapi_DsReplicaNeighbour_set_naming_context_obj_guid,
26609 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
26610 : },
26611 : {
26612 : .name = discard_const_p(char, "source_dsa_obj_guid"),
26613 : .get = py_drsuapi_DsReplicaNeighbour_get_source_dsa_obj_guid,
26614 : .set = py_drsuapi_DsReplicaNeighbour_set_source_dsa_obj_guid,
26615 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
26616 : },
26617 : {
26618 : .name = discard_const_p(char, "source_dsa_invocation_id"),
26619 : .get = py_drsuapi_DsReplicaNeighbour_get_source_dsa_invocation_id,
26620 : .set = py_drsuapi_DsReplicaNeighbour_set_source_dsa_invocation_id,
26621 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
26622 : },
26623 : {
26624 : .name = discard_const_p(char, "transport_obj_guid"),
26625 : .get = py_drsuapi_DsReplicaNeighbour_get_transport_obj_guid,
26626 : .set = py_drsuapi_DsReplicaNeighbour_set_transport_obj_guid,
26627 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
26628 : },
26629 : {
26630 : .name = discard_const_p(char, "tmp_highest_usn"),
26631 : .get = py_drsuapi_DsReplicaNeighbour_get_tmp_highest_usn,
26632 : .set = py_drsuapi_DsReplicaNeighbour_set_tmp_highest_usn,
26633 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
26634 : },
26635 : {
26636 : .name = discard_const_p(char, "highest_usn"),
26637 : .get = py_drsuapi_DsReplicaNeighbour_get_highest_usn,
26638 : .set = py_drsuapi_DsReplicaNeighbour_set_highest_usn,
26639 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
26640 : },
26641 : {
26642 : .name = discard_const_p(char, "last_success"),
26643 : .get = py_drsuapi_DsReplicaNeighbour_get_last_success,
26644 : .set = py_drsuapi_DsReplicaNeighbour_set_last_success,
26645 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
26646 : },
26647 : {
26648 : .name = discard_const_p(char, "last_attempt"),
26649 : .get = py_drsuapi_DsReplicaNeighbour_get_last_attempt,
26650 : .set = py_drsuapi_DsReplicaNeighbour_set_last_attempt,
26651 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
26652 : },
26653 : {
26654 : .name = discard_const_p(char, "result_last_attempt"),
26655 : .get = py_drsuapi_DsReplicaNeighbour_get_result_last_attempt,
26656 : .set = py_drsuapi_DsReplicaNeighbour_set_result_last_attempt,
26657 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
26658 : },
26659 : {
26660 : .name = discard_const_p(char, "consecutive_sync_failures"),
26661 : .get = py_drsuapi_DsReplicaNeighbour_get_consecutive_sync_failures,
26662 : .set = py_drsuapi_DsReplicaNeighbour_set_consecutive_sync_failures,
26663 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26664 : },
26665 : { .name = NULL }
26666 : };
26667 :
26668 0 : static PyObject *py_drsuapi_DsReplicaNeighbour_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26669 : {
26670 0 : return pytalloc_new(struct drsuapi_DsReplicaNeighbour, type);
26671 : }
26672 :
26673 :
26674 : static PyTypeObject drsuapi_DsReplicaNeighbour_Type = {
26675 : PyVarObject_HEAD_INIT(NULL, 0)
26676 : .tp_name = "drsuapi.DsReplicaNeighbour",
26677 : .tp_getset = py_drsuapi_DsReplicaNeighbour_getsetters,
26678 : .tp_methods = NULL,
26679 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
26680 : .tp_new = py_drsuapi_DsReplicaNeighbour_new,
26681 : };
26682 :
26683 :
26684 0 : static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_count(PyObject *obj, void *closure)
26685 : {
26686 0 : struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(obj);
26687 : PyObject *py_count;
26688 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
26689 0 : return py_count;
26690 : }
26691 :
26692 0 : static int py_drsuapi_DsReplicaNeighbourCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
26693 : {
26694 0 : struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(py_obj);
26695 0 : if (value == NULL) {
26696 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
26697 0 : return -1;
26698 : }
26699 : {
26700 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
26701 0 : if (PyLong_Check(value)) {
26702 : unsigned long long test_var;
26703 0 : test_var = PyLong_AsUnsignedLongLong(value);
26704 0 : if (PyErr_Occurred() != NULL) {
26705 0 : return -1;
26706 : }
26707 0 : if (test_var > uint_max) {
26708 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26709 : PyLong_Type.tp_name, uint_max, test_var);
26710 0 : return -1;
26711 : }
26712 0 : object->count = test_var;
26713 : } else {
26714 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26715 : PyLong_Type.tp_name);
26716 0 : return -1;
26717 : }
26718 : }
26719 0 : return 0;
26720 : }
26721 :
26722 0 : static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_reserved(PyObject *obj, void *closure)
26723 : {
26724 0 : struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(obj);
26725 : PyObject *py_reserved;
26726 0 : py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
26727 0 : return py_reserved;
26728 : }
26729 :
26730 0 : static int py_drsuapi_DsReplicaNeighbourCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
26731 : {
26732 0 : struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(py_obj);
26733 0 : if (value == NULL) {
26734 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
26735 0 : return -1;
26736 : }
26737 : {
26738 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
26739 0 : if (PyLong_Check(value)) {
26740 : unsigned long long test_var;
26741 0 : test_var = PyLong_AsUnsignedLongLong(value);
26742 0 : if (PyErr_Occurred() != NULL) {
26743 0 : return -1;
26744 : }
26745 0 : if (test_var > uint_max) {
26746 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26747 : PyLong_Type.tp_name, uint_max, test_var);
26748 0 : return -1;
26749 : }
26750 0 : object->reserved = test_var;
26751 : } else {
26752 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26753 : PyLong_Type.tp_name);
26754 0 : return -1;
26755 : }
26756 : }
26757 0 : return 0;
26758 : }
26759 :
26760 18 : static PyObject *py_drsuapi_DsReplicaNeighbourCtr_get_array(PyObject *obj, void *closure)
26761 : {
26762 18 : struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(obj);
26763 : PyObject *py_array;
26764 18 : py_array = PyList_New(object->count);
26765 18 : if (py_array == NULL) {
26766 0 : return NULL;
26767 : }
26768 : {
26769 : int array_cntr_0;
26770 105 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
26771 : PyObject *py_array_0;
26772 87 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbour_Type, object->array, &object->array[array_cntr_0]);
26773 87 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
26774 : }
26775 : }
26776 18 : return py_array;
26777 : }
26778 :
26779 0 : static int py_drsuapi_DsReplicaNeighbourCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
26780 : {
26781 0 : struct drsuapi_DsReplicaNeighbourCtr *object = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(py_obj);
26782 0 : if (value == NULL) {
26783 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
26784 0 : return -1;
26785 : }
26786 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
26787 : {
26788 : int array_cntr_0;
26789 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
26790 0 : if (!object->array) { return -1;; }
26791 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
26792 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
26793 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
26794 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
26795 0 : return -1;
26796 : }
26797 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbour_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
26798 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
26799 0 : PyErr_NoMemory();
26800 0 : return -1;
26801 : }
26802 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaNeighbour *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
26803 : }
26804 : }
26805 0 : return 0;
26806 : }
26807 :
26808 : static PyGetSetDef py_drsuapi_DsReplicaNeighbourCtr_getsetters[] = {
26809 : {
26810 : .name = discard_const_p(char, "count"),
26811 : .get = py_drsuapi_DsReplicaNeighbourCtr_get_count,
26812 : .set = py_drsuapi_DsReplicaNeighbourCtr_set_count,
26813 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26814 : },
26815 : {
26816 : .name = discard_const_p(char, "reserved"),
26817 : .get = py_drsuapi_DsReplicaNeighbourCtr_get_reserved,
26818 : .set = py_drsuapi_DsReplicaNeighbourCtr_set_reserved,
26819 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26820 : },
26821 : {
26822 : .name = discard_const_p(char, "array"),
26823 : .get = py_drsuapi_DsReplicaNeighbourCtr_get_array,
26824 : .set = py_drsuapi_DsReplicaNeighbourCtr_set_array,
26825 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaNeighbour")
26826 : },
26827 : { .name = NULL }
26828 : };
26829 :
26830 0 : static PyObject *py_drsuapi_DsReplicaNeighbourCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26831 : {
26832 0 : return pytalloc_new(struct drsuapi_DsReplicaNeighbourCtr, type);
26833 : }
26834 :
26835 :
26836 : static PyTypeObject drsuapi_DsReplicaNeighbourCtr_Type = {
26837 : PyVarObject_HEAD_INIT(NULL, 0)
26838 : .tp_name = "drsuapi.DsReplicaNeighbourCtr",
26839 : .tp_getset = py_drsuapi_DsReplicaNeighbourCtr_getsetters,
26840 : .tp_methods = NULL,
26841 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
26842 : .tp_new = py_drsuapi_DsReplicaNeighbourCtr_new,
26843 : };
26844 :
26845 :
26846 0 : static PyObject *py_drsuapi_DsReplicaCursorCtr_get_count(PyObject *obj, void *closure)
26847 : {
26848 0 : struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(obj);
26849 : PyObject *py_count;
26850 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
26851 0 : return py_count;
26852 : }
26853 :
26854 0 : static int py_drsuapi_DsReplicaCursorCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
26855 : {
26856 0 : struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(py_obj);
26857 0 : if (value == NULL) {
26858 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
26859 0 : return -1;
26860 : }
26861 : {
26862 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
26863 0 : if (PyLong_Check(value)) {
26864 : unsigned long long test_var;
26865 0 : test_var = PyLong_AsUnsignedLongLong(value);
26866 0 : if (PyErr_Occurred() != NULL) {
26867 0 : return -1;
26868 : }
26869 0 : if (test_var > uint_max) {
26870 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26871 : PyLong_Type.tp_name, uint_max, test_var);
26872 0 : return -1;
26873 : }
26874 0 : object->count = test_var;
26875 : } else {
26876 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26877 : PyLong_Type.tp_name);
26878 0 : return -1;
26879 : }
26880 : }
26881 0 : return 0;
26882 : }
26883 :
26884 0 : static PyObject *py_drsuapi_DsReplicaCursorCtr_get_reserved(PyObject *obj, void *closure)
26885 : {
26886 0 : struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(obj);
26887 : PyObject *py_reserved;
26888 0 : py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
26889 0 : return py_reserved;
26890 : }
26891 :
26892 0 : static int py_drsuapi_DsReplicaCursorCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
26893 : {
26894 0 : struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(py_obj);
26895 0 : if (value == NULL) {
26896 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
26897 0 : return -1;
26898 : }
26899 : {
26900 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
26901 0 : if (PyLong_Check(value)) {
26902 : unsigned long long test_var;
26903 0 : test_var = PyLong_AsUnsignedLongLong(value);
26904 0 : if (PyErr_Occurred() != NULL) {
26905 0 : return -1;
26906 : }
26907 0 : if (test_var > uint_max) {
26908 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26909 : PyLong_Type.tp_name, uint_max, test_var);
26910 0 : return -1;
26911 : }
26912 0 : object->reserved = test_var;
26913 : } else {
26914 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26915 : PyLong_Type.tp_name);
26916 0 : return -1;
26917 : }
26918 : }
26919 0 : return 0;
26920 : }
26921 :
26922 0 : static PyObject *py_drsuapi_DsReplicaCursorCtr_get_array(PyObject *obj, void *closure)
26923 : {
26924 0 : struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(obj);
26925 : PyObject *py_array;
26926 0 : py_array = PyList_New(object->count);
26927 0 : if (py_array == NULL) {
26928 0 : return NULL;
26929 : }
26930 : {
26931 : int array_cntr_0;
26932 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
26933 : PyObject *py_array_0;
26934 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor_Type, object->array, &object->array[array_cntr_0]);
26935 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
26936 : }
26937 : }
26938 0 : return py_array;
26939 : }
26940 :
26941 0 : static int py_drsuapi_DsReplicaCursorCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
26942 : {
26943 0 : struct drsuapi_DsReplicaCursorCtr *object = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(py_obj);
26944 0 : if (value == NULL) {
26945 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
26946 0 : return -1;
26947 : }
26948 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
26949 : {
26950 : int array_cntr_0;
26951 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
26952 0 : if (!object->array) { return -1;; }
26953 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
26954 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
26955 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
26956 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
26957 0 : return -1;
26958 : }
26959 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursor_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
26960 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
26961 0 : PyErr_NoMemory();
26962 0 : return -1;
26963 : }
26964 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaCursor *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
26965 : }
26966 : }
26967 0 : return 0;
26968 : }
26969 :
26970 : static PyGetSetDef py_drsuapi_DsReplicaCursorCtr_getsetters[] = {
26971 : {
26972 : .name = discard_const_p(char, "count"),
26973 : .get = py_drsuapi_DsReplicaCursorCtr_get_count,
26974 : .set = py_drsuapi_DsReplicaCursorCtr_set_count,
26975 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26976 : },
26977 : {
26978 : .name = discard_const_p(char, "reserved"),
26979 : .get = py_drsuapi_DsReplicaCursorCtr_get_reserved,
26980 : .set = py_drsuapi_DsReplicaCursorCtr_set_reserved,
26981 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26982 : },
26983 : {
26984 : .name = discard_const_p(char, "array"),
26985 : .get = py_drsuapi_DsReplicaCursorCtr_get_array,
26986 : .set = py_drsuapi_DsReplicaCursorCtr_set_array,
26987 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor")
26988 : },
26989 : { .name = NULL }
26990 : };
26991 :
26992 0 : static PyObject *py_drsuapi_DsReplicaCursorCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26993 : {
26994 0 : return pytalloc_new(struct drsuapi_DsReplicaCursorCtr, type);
26995 : }
26996 :
26997 :
26998 : static PyTypeObject drsuapi_DsReplicaCursorCtr_Type = {
26999 : PyVarObject_HEAD_INIT(NULL, 0)
27000 : .tp_name = "drsuapi.DsReplicaCursorCtr",
27001 : .tp_getset = py_drsuapi_DsReplicaCursorCtr_getsetters,
27002 : .tp_methods = NULL,
27003 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27004 : .tp_new = py_drsuapi_DsReplicaCursorCtr_new,
27005 : };
27006 :
27007 :
27008 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_attribute_name(PyObject *obj, void *closure)
27009 : {
27010 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
27011 : PyObject *py_attribute_name;
27012 0 : if (object->attribute_name == NULL) {
27013 0 : Py_RETURN_NONE;
27014 : }
27015 0 : if (object->attribute_name == NULL) {
27016 0 : py_attribute_name = Py_None;
27017 0 : Py_INCREF(py_attribute_name);
27018 : } else {
27019 0 : if (object->attribute_name == NULL) {
27020 0 : py_attribute_name = Py_None;
27021 0 : Py_INCREF(py_attribute_name);
27022 : } else {
27023 0 : py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
27024 : }
27025 : }
27026 0 : return py_attribute_name;
27027 : }
27028 :
27029 0 : static int py_drsuapi_DsReplicaObjMetaData_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
27030 : {
27031 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
27032 0 : if (value == NULL) {
27033 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
27034 0 : return -1;
27035 : }
27036 0 : if (value == Py_None) {
27037 0 : object->attribute_name = NULL;
27038 : } else {
27039 0 : object->attribute_name = NULL;
27040 : {
27041 : const char *test_str;
27042 : const char *talloc_str;
27043 0 : PyObject *unicode = NULL;
27044 0 : if (PyUnicode_Check(value)) {
27045 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27046 0 : if (unicode == NULL) {
27047 0 : PyErr_NoMemory();
27048 0 : return -1;
27049 : }
27050 0 : test_str = PyBytes_AS_STRING(unicode);
27051 0 : } else if (PyBytes_Check(value)) {
27052 0 : test_str = PyBytes_AS_STRING(value);
27053 : } else {
27054 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27055 0 : return -1;
27056 : }
27057 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27058 0 : if (unicode != NULL) {
27059 0 : Py_DECREF(unicode);
27060 : }
27061 0 : if (talloc_str == NULL) {
27062 0 : PyErr_NoMemory();
27063 0 : return -1;
27064 : }
27065 0 : object->attribute_name = talloc_str;
27066 : }
27067 : }
27068 0 : return 0;
27069 : }
27070 :
27071 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_version(PyObject *obj, void *closure)
27072 : {
27073 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
27074 : PyObject *py_version;
27075 0 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
27076 0 : return py_version;
27077 : }
27078 :
27079 0 : static int py_drsuapi_DsReplicaObjMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
27080 : {
27081 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
27082 0 : if (value == NULL) {
27083 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
27084 0 : return -1;
27085 : }
27086 : {
27087 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
27088 0 : if (PyLong_Check(value)) {
27089 : unsigned long long test_var;
27090 0 : test_var = PyLong_AsUnsignedLongLong(value);
27091 0 : if (PyErr_Occurred() != NULL) {
27092 0 : return -1;
27093 : }
27094 0 : if (test_var > uint_max) {
27095 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27096 : PyLong_Type.tp_name, uint_max, test_var);
27097 0 : return -1;
27098 : }
27099 0 : object->version = test_var;
27100 : } else {
27101 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27102 : PyLong_Type.tp_name);
27103 0 : return -1;
27104 : }
27105 : }
27106 0 : return 0;
27107 : }
27108 :
27109 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_originating_change_time(PyObject *obj, void *closure)
27110 : {
27111 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
27112 : PyObject *py_originating_change_time;
27113 0 : py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
27114 0 : return py_originating_change_time;
27115 : }
27116 :
27117 0 : static int py_drsuapi_DsReplicaObjMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
27118 : {
27119 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
27120 0 : if (value == NULL) {
27121 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
27122 0 : return -1;
27123 : }
27124 : {
27125 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
27126 0 : if (PyLong_Check(value)) {
27127 : unsigned long long test_var;
27128 0 : test_var = PyLong_AsUnsignedLongLong(value);
27129 0 : if (PyErr_Occurred() != NULL) {
27130 0 : return -1;
27131 : }
27132 0 : if (test_var > uint_max) {
27133 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27134 : PyLong_Type.tp_name, uint_max, test_var);
27135 0 : return -1;
27136 : }
27137 0 : object->originating_change_time = test_var;
27138 : } else {
27139 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27140 : PyLong_Type.tp_name);
27141 0 : return -1;
27142 : }
27143 : }
27144 0 : return 0;
27145 : }
27146 :
27147 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
27148 : {
27149 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
27150 : PyObject *py_originating_invocation_id;
27151 0 : py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
27152 0 : return py_originating_invocation_id;
27153 : }
27154 :
27155 0 : static int py_drsuapi_DsReplicaObjMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
27156 : {
27157 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
27158 0 : if (value == NULL) {
27159 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
27160 0 : return -1;
27161 : }
27162 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
27163 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
27164 0 : PyErr_NoMemory();
27165 0 : return -1;
27166 : }
27167 0 : object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
27168 0 : return 0;
27169 : }
27170 :
27171 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_originating_usn(PyObject *obj, void *closure)
27172 : {
27173 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
27174 : PyObject *py_originating_usn;
27175 0 : py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
27176 0 : return py_originating_usn;
27177 : }
27178 :
27179 0 : static int py_drsuapi_DsReplicaObjMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
27180 : {
27181 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
27182 0 : if (value == NULL) {
27183 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
27184 0 : return -1;
27185 : }
27186 : {
27187 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
27188 0 : if (PyLong_Check(value)) {
27189 : unsigned long long test_var;
27190 0 : test_var = PyLong_AsUnsignedLongLong(value);
27191 0 : if (PyErr_Occurred() != NULL) {
27192 0 : return -1;
27193 : }
27194 0 : if (test_var > uint_max) {
27195 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27196 : PyLong_Type.tp_name, uint_max, test_var);
27197 0 : return -1;
27198 : }
27199 0 : object->originating_usn = test_var;
27200 : } else {
27201 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27202 : PyLong_Type.tp_name);
27203 0 : return -1;
27204 : }
27205 : }
27206 0 : return 0;
27207 : }
27208 :
27209 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_get_local_usn(PyObject *obj, void *closure)
27210 : {
27211 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(obj);
27212 : PyObject *py_local_usn;
27213 0 : py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
27214 0 : return py_local_usn;
27215 : }
27216 :
27217 0 : static int py_drsuapi_DsReplicaObjMetaData_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
27218 : {
27219 0 : struct drsuapi_DsReplicaObjMetaData *object = (struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(py_obj);
27220 0 : if (value == NULL) {
27221 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->local_usn");
27222 0 : return -1;
27223 : }
27224 : {
27225 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->local_usn));
27226 0 : if (PyLong_Check(value)) {
27227 : unsigned long long test_var;
27228 0 : test_var = PyLong_AsUnsignedLongLong(value);
27229 0 : if (PyErr_Occurred() != NULL) {
27230 0 : return -1;
27231 : }
27232 0 : if (test_var > uint_max) {
27233 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27234 : PyLong_Type.tp_name, uint_max, test_var);
27235 0 : return -1;
27236 : }
27237 0 : object->local_usn = test_var;
27238 : } else {
27239 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27240 : PyLong_Type.tp_name);
27241 0 : return -1;
27242 : }
27243 : }
27244 0 : return 0;
27245 : }
27246 :
27247 : static PyGetSetDef py_drsuapi_DsReplicaObjMetaData_getsetters[] = {
27248 : {
27249 : .name = discard_const_p(char, "attribute_name"),
27250 : .get = py_drsuapi_DsReplicaObjMetaData_get_attribute_name,
27251 : .set = py_drsuapi_DsReplicaObjMetaData_set_attribute_name,
27252 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
27253 : },
27254 : {
27255 : .name = discard_const_p(char, "version"),
27256 : .get = py_drsuapi_DsReplicaObjMetaData_get_version,
27257 : .set = py_drsuapi_DsReplicaObjMetaData_set_version,
27258 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27259 : },
27260 : {
27261 : .name = discard_const_p(char, "originating_change_time"),
27262 : .get = py_drsuapi_DsReplicaObjMetaData_get_originating_change_time,
27263 : .set = py_drsuapi_DsReplicaObjMetaData_set_originating_change_time,
27264 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
27265 : },
27266 : {
27267 : .name = discard_const_p(char, "originating_invocation_id"),
27268 : .get = py_drsuapi_DsReplicaObjMetaData_get_originating_invocation_id,
27269 : .set = py_drsuapi_DsReplicaObjMetaData_set_originating_invocation_id,
27270 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
27271 : },
27272 : {
27273 : .name = discard_const_p(char, "originating_usn"),
27274 : .get = py_drsuapi_DsReplicaObjMetaData_get_originating_usn,
27275 : .set = py_drsuapi_DsReplicaObjMetaData_set_originating_usn,
27276 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
27277 : },
27278 : {
27279 : .name = discard_const_p(char, "local_usn"),
27280 : .get = py_drsuapi_DsReplicaObjMetaData_get_local_usn,
27281 : .set = py_drsuapi_DsReplicaObjMetaData_set_local_usn,
27282 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
27283 : },
27284 : { .name = NULL }
27285 : };
27286 :
27287 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
27288 : {
27289 0 : return pytalloc_new(struct drsuapi_DsReplicaObjMetaData, type);
27290 : }
27291 :
27292 :
27293 : static PyTypeObject drsuapi_DsReplicaObjMetaData_Type = {
27294 : PyVarObject_HEAD_INIT(NULL, 0)
27295 : .tp_name = "drsuapi.DsReplicaObjMetaData",
27296 : .tp_getset = py_drsuapi_DsReplicaObjMetaData_getsetters,
27297 : .tp_methods = NULL,
27298 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27299 : .tp_new = py_drsuapi_DsReplicaObjMetaData_new,
27300 : };
27301 :
27302 :
27303 0 : static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_count(PyObject *obj, void *closure)
27304 : {
27305 0 : struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(obj);
27306 : PyObject *py_count;
27307 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
27308 0 : return py_count;
27309 : }
27310 :
27311 0 : static int py_drsuapi_DsReplicaObjMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
27312 : {
27313 0 : struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(py_obj);
27314 0 : if (value == NULL) {
27315 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
27316 0 : return -1;
27317 : }
27318 : {
27319 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
27320 0 : if (PyLong_Check(value)) {
27321 : unsigned long long test_var;
27322 0 : test_var = PyLong_AsUnsignedLongLong(value);
27323 0 : if (PyErr_Occurred() != NULL) {
27324 0 : return -1;
27325 : }
27326 0 : if (test_var > uint_max) {
27327 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27328 : PyLong_Type.tp_name, uint_max, test_var);
27329 0 : return -1;
27330 : }
27331 0 : object->count = test_var;
27332 : } else {
27333 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27334 : PyLong_Type.tp_name);
27335 0 : return -1;
27336 : }
27337 : }
27338 0 : return 0;
27339 : }
27340 :
27341 0 : static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_reserved(PyObject *obj, void *closure)
27342 : {
27343 0 : struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(obj);
27344 : PyObject *py_reserved;
27345 0 : py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
27346 0 : return py_reserved;
27347 : }
27348 :
27349 0 : static int py_drsuapi_DsReplicaObjMetaDataCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
27350 : {
27351 0 : struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(py_obj);
27352 0 : if (value == NULL) {
27353 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
27354 0 : return -1;
27355 : }
27356 : {
27357 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
27358 0 : if (PyLong_Check(value)) {
27359 : unsigned long long test_var;
27360 0 : test_var = PyLong_AsUnsignedLongLong(value);
27361 0 : if (PyErr_Occurred() != NULL) {
27362 0 : return -1;
27363 : }
27364 0 : if (test_var > uint_max) {
27365 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27366 : PyLong_Type.tp_name, uint_max, test_var);
27367 0 : return -1;
27368 : }
27369 0 : object->reserved = test_var;
27370 : } else {
27371 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27372 : PyLong_Type.tp_name);
27373 0 : return -1;
27374 : }
27375 : }
27376 0 : return 0;
27377 : }
27378 :
27379 0 : static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_get_array(PyObject *obj, void *closure)
27380 : {
27381 0 : struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(obj);
27382 : PyObject *py_array;
27383 0 : py_array = PyList_New(object->count);
27384 0 : if (py_array == NULL) {
27385 0 : return NULL;
27386 : }
27387 : {
27388 : int array_cntr_0;
27389 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
27390 : PyObject *py_array_0;
27391 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData_Type, object->array, &object->array[array_cntr_0]);
27392 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
27393 : }
27394 : }
27395 0 : return py_array;
27396 : }
27397 :
27398 0 : static int py_drsuapi_DsReplicaObjMetaDataCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
27399 : {
27400 0 : struct drsuapi_DsReplicaObjMetaDataCtr *object = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(py_obj);
27401 0 : if (value == NULL) {
27402 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
27403 0 : return -1;
27404 : }
27405 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
27406 : {
27407 : int array_cntr_0;
27408 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
27409 0 : if (!object->array) { return -1;; }
27410 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
27411 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
27412 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
27413 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
27414 0 : return -1;
27415 : }
27416 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
27417 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
27418 0 : PyErr_NoMemory();
27419 0 : return -1;
27420 : }
27421 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaObjMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
27422 : }
27423 : }
27424 0 : return 0;
27425 : }
27426 :
27427 : static PyGetSetDef py_drsuapi_DsReplicaObjMetaDataCtr_getsetters[] = {
27428 : {
27429 : .name = discard_const_p(char, "count"),
27430 : .get = py_drsuapi_DsReplicaObjMetaDataCtr_get_count,
27431 : .set = py_drsuapi_DsReplicaObjMetaDataCtr_set_count,
27432 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27433 : },
27434 : {
27435 : .name = discard_const_p(char, "reserved"),
27436 : .get = py_drsuapi_DsReplicaObjMetaDataCtr_get_reserved,
27437 : .set = py_drsuapi_DsReplicaObjMetaDataCtr_set_reserved,
27438 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27439 : },
27440 : {
27441 : .name = discard_const_p(char, "array"),
27442 : .get = py_drsuapi_DsReplicaObjMetaDataCtr_get_array,
27443 : .set = py_drsuapi_DsReplicaObjMetaDataCtr_set_array,
27444 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjMetaData")
27445 : },
27446 : { .name = NULL }
27447 : };
27448 :
27449 0 : static PyObject *py_drsuapi_DsReplicaObjMetaDataCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
27450 : {
27451 0 : return pytalloc_new(struct drsuapi_DsReplicaObjMetaDataCtr, type);
27452 : }
27453 :
27454 :
27455 : static PyTypeObject drsuapi_DsReplicaObjMetaDataCtr_Type = {
27456 : PyVarObject_HEAD_INIT(NULL, 0)
27457 : .tp_name = "drsuapi.DsReplicaObjMetaDataCtr",
27458 : .tp_getset = py_drsuapi_DsReplicaObjMetaDataCtr_getsetters,
27459 : .tp_methods = NULL,
27460 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27461 : .tp_new = py_drsuapi_DsReplicaObjMetaDataCtr_new,
27462 : };
27463 :
27464 :
27465 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_dn(PyObject *obj, void *closure)
27466 : {
27467 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
27468 : PyObject *py_dsa_obj_dn;
27469 0 : if (object->dsa_obj_dn == NULL) {
27470 0 : Py_RETURN_NONE;
27471 : }
27472 0 : if (object->dsa_obj_dn == NULL) {
27473 0 : py_dsa_obj_dn = Py_None;
27474 0 : Py_INCREF(py_dsa_obj_dn);
27475 : } else {
27476 0 : if (object->dsa_obj_dn == NULL) {
27477 0 : py_dsa_obj_dn = Py_None;
27478 0 : Py_INCREF(py_dsa_obj_dn);
27479 : } else {
27480 0 : py_dsa_obj_dn = PyUnicode_Decode(object->dsa_obj_dn, strlen(object->dsa_obj_dn), "utf-8", "ignore");
27481 : }
27482 : }
27483 0 : return py_dsa_obj_dn;
27484 : }
27485 :
27486 0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
27487 : {
27488 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
27489 0 : if (value == NULL) {
27490 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsa_obj_dn");
27491 0 : return -1;
27492 : }
27493 0 : if (value == Py_None) {
27494 0 : object->dsa_obj_dn = NULL;
27495 : } else {
27496 0 : object->dsa_obj_dn = NULL;
27497 : {
27498 : const char *test_str;
27499 : const char *talloc_str;
27500 0 : PyObject *unicode = NULL;
27501 0 : if (PyUnicode_Check(value)) {
27502 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27503 0 : if (unicode == NULL) {
27504 0 : PyErr_NoMemory();
27505 0 : return -1;
27506 : }
27507 0 : test_str = PyBytes_AS_STRING(unicode);
27508 0 : } else if (PyBytes_Check(value)) {
27509 0 : test_str = PyBytes_AS_STRING(value);
27510 : } else {
27511 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27512 0 : return -1;
27513 : }
27514 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27515 0 : if (unicode != NULL) {
27516 0 : Py_DECREF(unicode);
27517 : }
27518 0 : if (talloc_str == NULL) {
27519 0 : PyErr_NoMemory();
27520 0 : return -1;
27521 : }
27522 0 : object->dsa_obj_dn = talloc_str;
27523 : }
27524 : }
27525 0 : return 0;
27526 : }
27527 :
27528 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_guid(PyObject *obj, void *closure)
27529 : {
27530 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
27531 : PyObject *py_dsa_obj_guid;
27532 0 : py_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->dsa_obj_guid);
27533 0 : return py_dsa_obj_guid;
27534 : }
27535 :
27536 0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
27537 : {
27538 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
27539 0 : if (value == NULL) {
27540 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dsa_obj_guid");
27541 0 : return -1;
27542 : }
27543 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
27544 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
27545 0 : PyErr_NoMemory();
27546 0 : return -1;
27547 : }
27548 0 : object->dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
27549 0 : return 0;
27550 : }
27551 :
27552 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_first_failure(PyObject *obj, void *closure)
27553 : {
27554 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
27555 : PyObject *py_first_failure;
27556 0 : py_first_failure = PyLong_FromUnsignedLongLong(object->first_failure);
27557 0 : return py_first_failure;
27558 : }
27559 :
27560 0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_first_failure(PyObject *py_obj, PyObject *value, void *closure)
27561 : {
27562 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
27563 0 : if (value == NULL) {
27564 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->first_failure");
27565 0 : return -1;
27566 : }
27567 : {
27568 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->first_failure));
27569 0 : if (PyLong_Check(value)) {
27570 : unsigned long long test_var;
27571 0 : test_var = PyLong_AsUnsignedLongLong(value);
27572 0 : if (PyErr_Occurred() != NULL) {
27573 0 : return -1;
27574 : }
27575 0 : if (test_var > uint_max) {
27576 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27577 : PyLong_Type.tp_name, uint_max, test_var);
27578 0 : return -1;
27579 : }
27580 0 : object->first_failure = test_var;
27581 : } else {
27582 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27583 : PyLong_Type.tp_name);
27584 0 : return -1;
27585 : }
27586 : }
27587 0 : return 0;
27588 : }
27589 :
27590 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_num_failures(PyObject *obj, void *closure)
27591 : {
27592 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
27593 : PyObject *py_num_failures;
27594 0 : py_num_failures = PyLong_FromUnsignedLongLong((uint32_t)object->num_failures);
27595 0 : return py_num_failures;
27596 : }
27597 :
27598 0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_num_failures(PyObject *py_obj, PyObject *value, void *closure)
27599 : {
27600 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
27601 0 : if (value == NULL) {
27602 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_failures");
27603 0 : return -1;
27604 : }
27605 : {
27606 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_failures));
27607 0 : if (PyLong_Check(value)) {
27608 : unsigned long long test_var;
27609 0 : test_var = PyLong_AsUnsignedLongLong(value);
27610 0 : if (PyErr_Occurred() != NULL) {
27611 0 : return -1;
27612 : }
27613 0 : if (test_var > uint_max) {
27614 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27615 : PyLong_Type.tp_name, uint_max, test_var);
27616 0 : return -1;
27617 : }
27618 0 : object->num_failures = test_var;
27619 : } else {
27620 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27621 : PyLong_Type.tp_name);
27622 0 : return -1;
27623 : }
27624 : }
27625 0 : return 0;
27626 : }
27627 :
27628 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_get_last_result(PyObject *obj, void *closure)
27629 : {
27630 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(obj);
27631 : PyObject *py_last_result;
27632 0 : py_last_result = PyErr_FromWERROR(object->last_result);
27633 0 : return py_last_result;
27634 : }
27635 :
27636 0 : static int py_drsuapi_DsReplicaKccDsaFailure_set_last_result(PyObject *py_obj, PyObject *value, void *closure)
27637 : {
27638 0 : struct drsuapi_DsReplicaKccDsaFailure *object = (struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(py_obj);
27639 0 : if (value == NULL) {
27640 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_result");
27641 0 : return -1;
27642 : }
27643 0 : object->last_result = W_ERROR(PyLong_AsLong(value));
27644 0 : return 0;
27645 : }
27646 :
27647 : static PyGetSetDef py_drsuapi_DsReplicaKccDsaFailure_getsetters[] = {
27648 : {
27649 : .name = discard_const_p(char, "dsa_obj_dn"),
27650 : .get = py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_dn,
27651 : .set = py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_dn,
27652 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
27653 : },
27654 : {
27655 : .name = discard_const_p(char, "dsa_obj_guid"),
27656 : .get = py_drsuapi_DsReplicaKccDsaFailure_get_dsa_obj_guid,
27657 : .set = py_drsuapi_DsReplicaKccDsaFailure_set_dsa_obj_guid,
27658 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
27659 : },
27660 : {
27661 : .name = discard_const_p(char, "first_failure"),
27662 : .get = py_drsuapi_DsReplicaKccDsaFailure_get_first_failure,
27663 : .set = py_drsuapi_DsReplicaKccDsaFailure_set_first_failure,
27664 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
27665 : },
27666 : {
27667 : .name = discard_const_p(char, "num_failures"),
27668 : .get = py_drsuapi_DsReplicaKccDsaFailure_get_num_failures,
27669 : .set = py_drsuapi_DsReplicaKccDsaFailure_set_num_failures,
27670 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27671 : },
27672 : {
27673 : .name = discard_const_p(char, "last_result"),
27674 : .get = py_drsuapi_DsReplicaKccDsaFailure_get_last_result,
27675 : .set = py_drsuapi_DsReplicaKccDsaFailure_set_last_result,
27676 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
27677 : },
27678 : { .name = NULL }
27679 : };
27680 :
27681 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailure_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
27682 : {
27683 0 : return pytalloc_new(struct drsuapi_DsReplicaKccDsaFailure, type);
27684 : }
27685 :
27686 :
27687 : static PyTypeObject drsuapi_DsReplicaKccDsaFailure_Type = {
27688 : PyVarObject_HEAD_INIT(NULL, 0)
27689 : .tp_name = "drsuapi.DsReplicaKccDsaFailure",
27690 : .tp_getset = py_drsuapi_DsReplicaKccDsaFailure_getsetters,
27691 : .tp_methods = NULL,
27692 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27693 : .tp_new = py_drsuapi_DsReplicaKccDsaFailure_new,
27694 : };
27695 :
27696 :
27697 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_count(PyObject *obj, void *closure)
27698 : {
27699 0 : struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(obj);
27700 : PyObject *py_count;
27701 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
27702 0 : return py_count;
27703 : }
27704 :
27705 0 : static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
27706 : {
27707 0 : struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(py_obj);
27708 0 : if (value == NULL) {
27709 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
27710 0 : return -1;
27711 : }
27712 : {
27713 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
27714 0 : if (PyLong_Check(value)) {
27715 : unsigned long long test_var;
27716 0 : test_var = PyLong_AsUnsignedLongLong(value);
27717 0 : if (PyErr_Occurred() != NULL) {
27718 0 : return -1;
27719 : }
27720 0 : if (test_var > uint_max) {
27721 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27722 : PyLong_Type.tp_name, uint_max, test_var);
27723 0 : return -1;
27724 : }
27725 0 : object->count = test_var;
27726 : } else {
27727 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27728 : PyLong_Type.tp_name);
27729 0 : return -1;
27730 : }
27731 : }
27732 0 : return 0;
27733 : }
27734 :
27735 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_reserved(PyObject *obj, void *closure)
27736 : {
27737 0 : struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(obj);
27738 : PyObject *py_reserved;
27739 0 : py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
27740 0 : return py_reserved;
27741 : }
27742 :
27743 0 : static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
27744 : {
27745 0 : struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(py_obj);
27746 0 : if (value == NULL) {
27747 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
27748 0 : return -1;
27749 : }
27750 : {
27751 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
27752 0 : if (PyLong_Check(value)) {
27753 : unsigned long long test_var;
27754 0 : test_var = PyLong_AsUnsignedLongLong(value);
27755 0 : if (PyErr_Occurred() != NULL) {
27756 0 : return -1;
27757 : }
27758 0 : if (test_var > uint_max) {
27759 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27760 : PyLong_Type.tp_name, uint_max, test_var);
27761 0 : return -1;
27762 : }
27763 0 : object->reserved = test_var;
27764 : } else {
27765 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27766 : PyLong_Type.tp_name);
27767 0 : return -1;
27768 : }
27769 : }
27770 0 : return 0;
27771 : }
27772 :
27773 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_get_array(PyObject *obj, void *closure)
27774 : {
27775 0 : struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(obj);
27776 : PyObject *py_array;
27777 0 : py_array = PyList_New(object->count);
27778 0 : if (py_array == NULL) {
27779 0 : return NULL;
27780 : }
27781 : {
27782 : int array_cntr_0;
27783 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
27784 : PyObject *py_array_0;
27785 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailure_Type, object->array, &object->array[array_cntr_0]);
27786 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
27787 : }
27788 : }
27789 0 : return py_array;
27790 : }
27791 :
27792 0 : static int py_drsuapi_DsReplicaKccDsaFailuresCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
27793 : {
27794 0 : struct drsuapi_DsReplicaKccDsaFailuresCtr *object = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(py_obj);
27795 0 : if (value == NULL) {
27796 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
27797 0 : return -1;
27798 : }
27799 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
27800 : {
27801 : int array_cntr_0;
27802 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
27803 0 : if (!object->array) { return -1;; }
27804 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
27805 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
27806 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
27807 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
27808 0 : return -1;
27809 : }
27810 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailure_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
27811 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
27812 0 : PyErr_NoMemory();
27813 0 : return -1;
27814 : }
27815 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaKccDsaFailure *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
27816 : }
27817 : }
27818 0 : return 0;
27819 : }
27820 :
27821 : static PyGetSetDef py_drsuapi_DsReplicaKccDsaFailuresCtr_getsetters[] = {
27822 : {
27823 : .name = discard_const_p(char, "count"),
27824 : .get = py_drsuapi_DsReplicaKccDsaFailuresCtr_get_count,
27825 : .set = py_drsuapi_DsReplicaKccDsaFailuresCtr_set_count,
27826 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27827 : },
27828 : {
27829 : .name = discard_const_p(char, "reserved"),
27830 : .get = py_drsuapi_DsReplicaKccDsaFailuresCtr_get_reserved,
27831 : .set = py_drsuapi_DsReplicaKccDsaFailuresCtr_set_reserved,
27832 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27833 : },
27834 : {
27835 : .name = discard_const_p(char, "array"),
27836 : .get = py_drsuapi_DsReplicaKccDsaFailuresCtr_get_array,
27837 : .set = py_drsuapi_DsReplicaKccDsaFailuresCtr_set_array,
27838 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaKccDsaFailure")
27839 : },
27840 : { .name = NULL }
27841 : };
27842 :
27843 0 : static PyObject *py_drsuapi_DsReplicaKccDsaFailuresCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
27844 : {
27845 0 : return pytalloc_new(struct drsuapi_DsReplicaKccDsaFailuresCtr, type);
27846 : }
27847 :
27848 :
27849 : static PyTypeObject drsuapi_DsReplicaKccDsaFailuresCtr_Type = {
27850 : PyVarObject_HEAD_INIT(NULL, 0)
27851 : .tp_name = "drsuapi.DsReplicaKccDsaFailuresCtr",
27852 : .tp_getset = py_drsuapi_DsReplicaKccDsaFailuresCtr_getsetters,
27853 : .tp_methods = NULL,
27854 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27855 : .tp_new = py_drsuapi_DsReplicaKccDsaFailuresCtr_new,
27856 : };
27857 :
27858 :
27859 0 : static PyObject *py_drsuapi_DsReplicaOp_get_operation_start(PyObject *obj, void *closure)
27860 : {
27861 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
27862 : PyObject *py_operation_start;
27863 0 : py_operation_start = PyLong_FromUnsignedLongLong(object->operation_start);
27864 0 : return py_operation_start;
27865 : }
27866 :
27867 0 : static int py_drsuapi_DsReplicaOp_set_operation_start(PyObject *py_obj, PyObject *value, void *closure)
27868 : {
27869 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
27870 0 : if (value == NULL) {
27871 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->operation_start");
27872 0 : return -1;
27873 : }
27874 : {
27875 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->operation_start));
27876 0 : if (PyLong_Check(value)) {
27877 : unsigned long long test_var;
27878 0 : test_var = PyLong_AsUnsignedLongLong(value);
27879 0 : if (PyErr_Occurred() != NULL) {
27880 0 : return -1;
27881 : }
27882 0 : if (test_var > uint_max) {
27883 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27884 : PyLong_Type.tp_name, uint_max, test_var);
27885 0 : return -1;
27886 : }
27887 0 : object->operation_start = test_var;
27888 : } else {
27889 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27890 : PyLong_Type.tp_name);
27891 0 : return -1;
27892 : }
27893 : }
27894 0 : return 0;
27895 : }
27896 :
27897 0 : static PyObject *py_drsuapi_DsReplicaOp_get_serial_num(PyObject *obj, void *closure)
27898 : {
27899 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
27900 : PyObject *py_serial_num;
27901 0 : py_serial_num = PyLong_FromUnsignedLongLong((uint32_t)object->serial_num);
27902 0 : return py_serial_num;
27903 : }
27904 :
27905 0 : static int py_drsuapi_DsReplicaOp_set_serial_num(PyObject *py_obj, PyObject *value, void *closure)
27906 : {
27907 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
27908 0 : if (value == NULL) {
27909 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->serial_num");
27910 0 : return -1;
27911 : }
27912 : {
27913 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->serial_num));
27914 0 : if (PyLong_Check(value)) {
27915 : unsigned long long test_var;
27916 0 : test_var = PyLong_AsUnsignedLongLong(value);
27917 0 : if (PyErr_Occurred() != NULL) {
27918 0 : return -1;
27919 : }
27920 0 : if (test_var > uint_max) {
27921 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27922 : PyLong_Type.tp_name, uint_max, test_var);
27923 0 : return -1;
27924 : }
27925 0 : object->serial_num = test_var;
27926 : } else {
27927 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27928 : PyLong_Type.tp_name);
27929 0 : return -1;
27930 : }
27931 : }
27932 0 : return 0;
27933 : }
27934 :
27935 0 : static PyObject *py_drsuapi_DsReplicaOp_get_priority(PyObject *obj, void *closure)
27936 : {
27937 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
27938 : PyObject *py_priority;
27939 0 : py_priority = PyLong_FromUnsignedLongLong((uint32_t)object->priority);
27940 0 : return py_priority;
27941 : }
27942 :
27943 0 : static int py_drsuapi_DsReplicaOp_set_priority(PyObject *py_obj, PyObject *value, void *closure)
27944 : {
27945 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
27946 0 : if (value == NULL) {
27947 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->priority");
27948 0 : return -1;
27949 : }
27950 : {
27951 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->priority));
27952 0 : if (PyLong_Check(value)) {
27953 : unsigned long long test_var;
27954 0 : test_var = PyLong_AsUnsignedLongLong(value);
27955 0 : if (PyErr_Occurred() != NULL) {
27956 0 : return -1;
27957 : }
27958 0 : if (test_var > uint_max) {
27959 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27960 : PyLong_Type.tp_name, uint_max, test_var);
27961 0 : return -1;
27962 : }
27963 0 : object->priority = test_var;
27964 : } else {
27965 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27966 : PyLong_Type.tp_name);
27967 0 : return -1;
27968 : }
27969 : }
27970 0 : return 0;
27971 : }
27972 :
27973 0 : static PyObject *py_drsuapi_DsReplicaOp_get_operation_type(PyObject *obj, void *closure)
27974 : {
27975 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
27976 : PyObject *py_operation_type;
27977 0 : py_operation_type = PyLong_FromLong((uint16_t)object->operation_type);
27978 0 : return py_operation_type;
27979 : }
27980 :
27981 0 : static int py_drsuapi_DsReplicaOp_set_operation_type(PyObject *py_obj, PyObject *value, void *closure)
27982 : {
27983 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
27984 0 : if (value == NULL) {
27985 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->operation_type");
27986 0 : return -1;
27987 : }
27988 : {
27989 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->operation_type));
27990 0 : if (PyLong_Check(value)) {
27991 : unsigned long long test_var;
27992 0 : test_var = PyLong_AsUnsignedLongLong(value);
27993 0 : if (PyErr_Occurred() != NULL) {
27994 0 : return -1;
27995 : }
27996 0 : if (test_var > uint_max) {
27997 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27998 : PyLong_Type.tp_name, uint_max, test_var);
27999 0 : return -1;
28000 : }
28001 0 : object->operation_type = test_var;
28002 : } else {
28003 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28004 : PyLong_Type.tp_name);
28005 0 : return -1;
28006 : }
28007 : }
28008 0 : return 0;
28009 : }
28010 :
28011 0 : static PyObject *py_drsuapi_DsReplicaOp_get_options(PyObject *obj, void *closure)
28012 : {
28013 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
28014 : PyObject *py_options;
28015 0 : py_options = PyLong_FromUnsignedLongLong((uint32_t)object->options);
28016 0 : return py_options;
28017 : }
28018 :
28019 0 : static int py_drsuapi_DsReplicaOp_set_options(PyObject *py_obj, PyObject *value, void *closure)
28020 : {
28021 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
28022 0 : if (value == NULL) {
28023 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->options");
28024 0 : return -1;
28025 : }
28026 : {
28027 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->options));
28028 0 : if (PyLong_Check(value)) {
28029 : unsigned long long test_var;
28030 0 : test_var = PyLong_AsUnsignedLongLong(value);
28031 0 : if (PyErr_Occurred() != NULL) {
28032 0 : return -1;
28033 : }
28034 0 : if (test_var > uint_max) {
28035 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28036 : PyLong_Type.tp_name, uint_max, test_var);
28037 0 : return -1;
28038 : }
28039 0 : object->options = test_var;
28040 : } else {
28041 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28042 : PyLong_Type.tp_name);
28043 0 : return -1;
28044 : }
28045 : }
28046 0 : return 0;
28047 : }
28048 :
28049 0 : static PyObject *py_drsuapi_DsReplicaOp_get_nc_dn(PyObject *obj, void *closure)
28050 : {
28051 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
28052 : PyObject *py_nc_dn;
28053 0 : if (object->nc_dn == NULL) {
28054 0 : Py_RETURN_NONE;
28055 : }
28056 0 : if (object->nc_dn == NULL) {
28057 0 : py_nc_dn = Py_None;
28058 0 : Py_INCREF(py_nc_dn);
28059 : } else {
28060 0 : if (object->nc_dn == NULL) {
28061 0 : py_nc_dn = Py_None;
28062 0 : Py_INCREF(py_nc_dn);
28063 : } else {
28064 0 : py_nc_dn = PyUnicode_Decode(object->nc_dn, strlen(object->nc_dn), "utf-8", "ignore");
28065 : }
28066 : }
28067 0 : return py_nc_dn;
28068 : }
28069 :
28070 0 : static int py_drsuapi_DsReplicaOp_set_nc_dn(PyObject *py_obj, PyObject *value, void *closure)
28071 : {
28072 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
28073 0 : if (value == NULL) {
28074 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nc_dn");
28075 0 : return -1;
28076 : }
28077 0 : if (value == Py_None) {
28078 0 : object->nc_dn = NULL;
28079 : } else {
28080 0 : object->nc_dn = NULL;
28081 : {
28082 : const char *test_str;
28083 : const char *talloc_str;
28084 0 : PyObject *unicode = NULL;
28085 0 : if (PyUnicode_Check(value)) {
28086 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28087 0 : if (unicode == NULL) {
28088 0 : PyErr_NoMemory();
28089 0 : return -1;
28090 : }
28091 0 : test_str = PyBytes_AS_STRING(unicode);
28092 0 : } else if (PyBytes_Check(value)) {
28093 0 : test_str = PyBytes_AS_STRING(value);
28094 : } else {
28095 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28096 0 : return -1;
28097 : }
28098 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28099 0 : if (unicode != NULL) {
28100 0 : Py_DECREF(unicode);
28101 : }
28102 0 : if (talloc_str == NULL) {
28103 0 : PyErr_NoMemory();
28104 0 : return -1;
28105 : }
28106 0 : object->nc_dn = talloc_str;
28107 : }
28108 : }
28109 0 : return 0;
28110 : }
28111 :
28112 0 : static PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_obj_dn(PyObject *obj, void *closure)
28113 : {
28114 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
28115 : PyObject *py_remote_dsa_obj_dn;
28116 0 : if (object->remote_dsa_obj_dn == NULL) {
28117 0 : Py_RETURN_NONE;
28118 : }
28119 0 : if (object->remote_dsa_obj_dn == NULL) {
28120 0 : py_remote_dsa_obj_dn = Py_None;
28121 0 : Py_INCREF(py_remote_dsa_obj_dn);
28122 : } else {
28123 0 : if (object->remote_dsa_obj_dn == NULL) {
28124 0 : py_remote_dsa_obj_dn = Py_None;
28125 0 : Py_INCREF(py_remote_dsa_obj_dn);
28126 : } else {
28127 0 : py_remote_dsa_obj_dn = PyUnicode_Decode(object->remote_dsa_obj_dn, strlen(object->remote_dsa_obj_dn), "utf-8", "ignore");
28128 : }
28129 : }
28130 0 : return py_remote_dsa_obj_dn;
28131 : }
28132 :
28133 0 : static int py_drsuapi_DsReplicaOp_set_remote_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
28134 : {
28135 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
28136 0 : if (value == NULL) {
28137 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->remote_dsa_obj_dn");
28138 0 : return -1;
28139 : }
28140 0 : if (value == Py_None) {
28141 0 : object->remote_dsa_obj_dn = NULL;
28142 : } else {
28143 0 : object->remote_dsa_obj_dn = NULL;
28144 : {
28145 : const char *test_str;
28146 : const char *talloc_str;
28147 0 : PyObject *unicode = NULL;
28148 0 : if (PyUnicode_Check(value)) {
28149 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28150 0 : if (unicode == NULL) {
28151 0 : PyErr_NoMemory();
28152 0 : return -1;
28153 : }
28154 0 : test_str = PyBytes_AS_STRING(unicode);
28155 0 : } else if (PyBytes_Check(value)) {
28156 0 : test_str = PyBytes_AS_STRING(value);
28157 : } else {
28158 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28159 0 : return -1;
28160 : }
28161 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28162 0 : if (unicode != NULL) {
28163 0 : Py_DECREF(unicode);
28164 : }
28165 0 : if (talloc_str == NULL) {
28166 0 : PyErr_NoMemory();
28167 0 : return -1;
28168 : }
28169 0 : object->remote_dsa_obj_dn = talloc_str;
28170 : }
28171 : }
28172 0 : return 0;
28173 : }
28174 :
28175 0 : static PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_address(PyObject *obj, void *closure)
28176 : {
28177 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
28178 : PyObject *py_remote_dsa_address;
28179 0 : if (object->remote_dsa_address == NULL) {
28180 0 : Py_RETURN_NONE;
28181 : }
28182 0 : if (object->remote_dsa_address == NULL) {
28183 0 : py_remote_dsa_address = Py_None;
28184 0 : Py_INCREF(py_remote_dsa_address);
28185 : } else {
28186 0 : if (object->remote_dsa_address == NULL) {
28187 0 : py_remote_dsa_address = Py_None;
28188 0 : Py_INCREF(py_remote_dsa_address);
28189 : } else {
28190 0 : py_remote_dsa_address = PyUnicode_Decode(object->remote_dsa_address, strlen(object->remote_dsa_address), "utf-8", "ignore");
28191 : }
28192 : }
28193 0 : return py_remote_dsa_address;
28194 : }
28195 :
28196 0 : static int py_drsuapi_DsReplicaOp_set_remote_dsa_address(PyObject *py_obj, PyObject *value, void *closure)
28197 : {
28198 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
28199 0 : if (value == NULL) {
28200 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->remote_dsa_address");
28201 0 : return -1;
28202 : }
28203 0 : if (value == Py_None) {
28204 0 : object->remote_dsa_address = NULL;
28205 : } else {
28206 0 : object->remote_dsa_address = NULL;
28207 : {
28208 : const char *test_str;
28209 : const char *talloc_str;
28210 0 : PyObject *unicode = NULL;
28211 0 : if (PyUnicode_Check(value)) {
28212 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28213 0 : if (unicode == NULL) {
28214 0 : PyErr_NoMemory();
28215 0 : return -1;
28216 : }
28217 0 : test_str = PyBytes_AS_STRING(unicode);
28218 0 : } else if (PyBytes_Check(value)) {
28219 0 : test_str = PyBytes_AS_STRING(value);
28220 : } else {
28221 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28222 0 : return -1;
28223 : }
28224 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28225 0 : if (unicode != NULL) {
28226 0 : Py_DECREF(unicode);
28227 : }
28228 0 : if (talloc_str == NULL) {
28229 0 : PyErr_NoMemory();
28230 0 : return -1;
28231 : }
28232 0 : object->remote_dsa_address = talloc_str;
28233 : }
28234 : }
28235 0 : return 0;
28236 : }
28237 :
28238 0 : static PyObject *py_drsuapi_DsReplicaOp_get_nc_obj_guid(PyObject *obj, void *closure)
28239 : {
28240 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
28241 : PyObject *py_nc_obj_guid;
28242 0 : py_nc_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->nc_obj_guid);
28243 0 : return py_nc_obj_guid;
28244 : }
28245 :
28246 0 : static int py_drsuapi_DsReplicaOp_set_nc_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
28247 : {
28248 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
28249 0 : if (value == NULL) {
28250 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nc_obj_guid");
28251 0 : return -1;
28252 : }
28253 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
28254 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
28255 0 : PyErr_NoMemory();
28256 0 : return -1;
28257 : }
28258 0 : object->nc_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
28259 0 : return 0;
28260 : }
28261 :
28262 0 : static PyObject *py_drsuapi_DsReplicaOp_get_remote_dsa_obj_guid(PyObject *obj, void *closure)
28263 : {
28264 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(obj);
28265 : PyObject *py_remote_dsa_obj_guid;
28266 0 : py_remote_dsa_obj_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->remote_dsa_obj_guid);
28267 0 : return py_remote_dsa_obj_guid;
28268 : }
28269 :
28270 0 : static int py_drsuapi_DsReplicaOp_set_remote_dsa_obj_guid(PyObject *py_obj, PyObject *value, void *closure)
28271 : {
28272 0 : struct drsuapi_DsReplicaOp *object = (struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(py_obj);
28273 0 : if (value == NULL) {
28274 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->remote_dsa_obj_guid");
28275 0 : return -1;
28276 : }
28277 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
28278 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
28279 0 : PyErr_NoMemory();
28280 0 : return -1;
28281 : }
28282 0 : object->remote_dsa_obj_guid = *(struct GUID *)pytalloc_get_ptr(value);
28283 0 : return 0;
28284 : }
28285 :
28286 : static PyGetSetDef py_drsuapi_DsReplicaOp_getsetters[] = {
28287 : {
28288 : .name = discard_const_p(char, "operation_start"),
28289 : .get = py_drsuapi_DsReplicaOp_get_operation_start,
28290 : .set = py_drsuapi_DsReplicaOp_set_operation_start,
28291 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
28292 : },
28293 : {
28294 : .name = discard_const_p(char, "serial_num"),
28295 : .get = py_drsuapi_DsReplicaOp_get_serial_num,
28296 : .set = py_drsuapi_DsReplicaOp_set_serial_num,
28297 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
28298 : },
28299 : {
28300 : .name = discard_const_p(char, "priority"),
28301 : .get = py_drsuapi_DsReplicaOp_get_priority,
28302 : .set = py_drsuapi_DsReplicaOp_set_priority,
28303 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
28304 : },
28305 : {
28306 : .name = discard_const_p(char, "operation_type"),
28307 : .get = py_drsuapi_DsReplicaOp_get_operation_type,
28308 : .set = py_drsuapi_DsReplicaOp_set_operation_type,
28309 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOpType")
28310 : },
28311 : {
28312 : .name = discard_const_p(char, "options"),
28313 : .get = py_drsuapi_DsReplicaOp_get_options,
28314 : .set = py_drsuapi_DsReplicaOp_set_options,
28315 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DrsOptions")
28316 : },
28317 : {
28318 : .name = discard_const_p(char, "nc_dn"),
28319 : .get = py_drsuapi_DsReplicaOp_get_nc_dn,
28320 : .set = py_drsuapi_DsReplicaOp_set_nc_dn,
28321 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
28322 : },
28323 : {
28324 : .name = discard_const_p(char, "remote_dsa_obj_dn"),
28325 : .get = py_drsuapi_DsReplicaOp_get_remote_dsa_obj_dn,
28326 : .set = py_drsuapi_DsReplicaOp_set_remote_dsa_obj_dn,
28327 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
28328 : },
28329 : {
28330 : .name = discard_const_p(char, "remote_dsa_address"),
28331 : .get = py_drsuapi_DsReplicaOp_get_remote_dsa_address,
28332 : .set = py_drsuapi_DsReplicaOp_set_remote_dsa_address,
28333 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
28334 : },
28335 : {
28336 : .name = discard_const_p(char, "nc_obj_guid"),
28337 : .get = py_drsuapi_DsReplicaOp_get_nc_obj_guid,
28338 : .set = py_drsuapi_DsReplicaOp_set_nc_obj_guid,
28339 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
28340 : },
28341 : {
28342 : .name = discard_const_p(char, "remote_dsa_obj_guid"),
28343 : .get = py_drsuapi_DsReplicaOp_get_remote_dsa_obj_guid,
28344 : .set = py_drsuapi_DsReplicaOp_set_remote_dsa_obj_guid,
28345 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
28346 : },
28347 : { .name = NULL }
28348 : };
28349 :
28350 0 : static PyObject *py_drsuapi_DsReplicaOp_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
28351 : {
28352 0 : return pytalloc_new(struct drsuapi_DsReplicaOp, type);
28353 : }
28354 :
28355 :
28356 : static PyTypeObject drsuapi_DsReplicaOp_Type = {
28357 : PyVarObject_HEAD_INIT(NULL, 0)
28358 : .tp_name = "drsuapi.DsReplicaOp",
28359 : .tp_getset = py_drsuapi_DsReplicaOp_getsetters,
28360 : .tp_methods = NULL,
28361 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
28362 : .tp_new = py_drsuapi_DsReplicaOp_new,
28363 : };
28364 :
28365 :
28366 0 : static PyObject *py_drsuapi_DsReplicaOpCtr_get_time(PyObject *obj, void *closure)
28367 : {
28368 0 : struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(obj);
28369 : PyObject *py_time;
28370 0 : py_time = PyLong_FromUnsignedLongLong(object->time);
28371 0 : return py_time;
28372 : }
28373 :
28374 0 : static int py_drsuapi_DsReplicaOpCtr_set_time(PyObject *py_obj, PyObject *value, void *closure)
28375 : {
28376 0 : struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(py_obj);
28377 0 : if (value == NULL) {
28378 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->time");
28379 0 : return -1;
28380 : }
28381 : {
28382 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->time));
28383 0 : if (PyLong_Check(value)) {
28384 : unsigned long long test_var;
28385 0 : test_var = PyLong_AsUnsignedLongLong(value);
28386 0 : if (PyErr_Occurred() != NULL) {
28387 0 : return -1;
28388 : }
28389 0 : if (test_var > uint_max) {
28390 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28391 : PyLong_Type.tp_name, uint_max, test_var);
28392 0 : return -1;
28393 : }
28394 0 : object->time = test_var;
28395 : } else {
28396 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28397 : PyLong_Type.tp_name);
28398 0 : return -1;
28399 : }
28400 : }
28401 0 : return 0;
28402 : }
28403 :
28404 0 : static PyObject *py_drsuapi_DsReplicaOpCtr_get_count(PyObject *obj, void *closure)
28405 : {
28406 0 : struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(obj);
28407 : PyObject *py_count;
28408 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
28409 0 : return py_count;
28410 : }
28411 :
28412 0 : static int py_drsuapi_DsReplicaOpCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
28413 : {
28414 0 : struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(py_obj);
28415 0 : if (value == NULL) {
28416 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
28417 0 : return -1;
28418 : }
28419 : {
28420 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
28421 0 : if (PyLong_Check(value)) {
28422 : unsigned long long test_var;
28423 0 : test_var = PyLong_AsUnsignedLongLong(value);
28424 0 : if (PyErr_Occurred() != NULL) {
28425 0 : return -1;
28426 : }
28427 0 : if (test_var > uint_max) {
28428 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28429 : PyLong_Type.tp_name, uint_max, test_var);
28430 0 : return -1;
28431 : }
28432 0 : object->count = test_var;
28433 : } else {
28434 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28435 : PyLong_Type.tp_name);
28436 0 : return -1;
28437 : }
28438 : }
28439 0 : return 0;
28440 : }
28441 :
28442 0 : static PyObject *py_drsuapi_DsReplicaOpCtr_get_array(PyObject *obj, void *closure)
28443 : {
28444 0 : struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(obj);
28445 : PyObject *py_array;
28446 0 : py_array = PyList_New(object->count);
28447 0 : if (py_array == NULL) {
28448 0 : return NULL;
28449 : }
28450 : {
28451 : int array_cntr_0;
28452 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
28453 : PyObject *py_array_0;
28454 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaOp_Type, object->array, &object->array[array_cntr_0]);
28455 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
28456 : }
28457 : }
28458 0 : return py_array;
28459 : }
28460 :
28461 0 : static int py_drsuapi_DsReplicaOpCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
28462 : {
28463 0 : struct drsuapi_DsReplicaOpCtr *object = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(py_obj);
28464 0 : if (value == NULL) {
28465 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
28466 0 : return -1;
28467 : }
28468 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
28469 : {
28470 : int array_cntr_0;
28471 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
28472 0 : if (!object->array) { return -1;; }
28473 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
28474 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
28475 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
28476 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
28477 0 : return -1;
28478 : }
28479 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaOp_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
28480 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
28481 0 : PyErr_NoMemory();
28482 0 : return -1;
28483 : }
28484 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaOp *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
28485 : }
28486 : }
28487 0 : return 0;
28488 : }
28489 :
28490 : static PyGetSetDef py_drsuapi_DsReplicaOpCtr_getsetters[] = {
28491 : {
28492 : .name = discard_const_p(char, "time"),
28493 : .get = py_drsuapi_DsReplicaOpCtr_get_time,
28494 : .set = py_drsuapi_DsReplicaOpCtr_set_time,
28495 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
28496 : },
28497 : {
28498 : .name = discard_const_p(char, "count"),
28499 : .get = py_drsuapi_DsReplicaOpCtr_get_count,
28500 : .set = py_drsuapi_DsReplicaOpCtr_set_count,
28501 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
28502 : },
28503 : {
28504 : .name = discard_const_p(char, "array"),
28505 : .get = py_drsuapi_DsReplicaOpCtr_get_array,
28506 : .set = py_drsuapi_DsReplicaOpCtr_set_array,
28507 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaOp")
28508 : },
28509 : { .name = NULL }
28510 : };
28511 :
28512 0 : static PyObject *py_drsuapi_DsReplicaOpCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
28513 : {
28514 0 : return pytalloc_new(struct drsuapi_DsReplicaOpCtr, type);
28515 : }
28516 :
28517 :
28518 : static PyTypeObject drsuapi_DsReplicaOpCtr_Type = {
28519 : PyVarObject_HEAD_INIT(NULL, 0)
28520 : .tp_name = "drsuapi.DsReplicaOpCtr",
28521 : .tp_getset = py_drsuapi_DsReplicaOpCtr_getsetters,
28522 : .tp_methods = NULL,
28523 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
28524 : .tp_new = py_drsuapi_DsReplicaOpCtr_new,
28525 : };
28526 :
28527 :
28528 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_attribute_name(PyObject *obj, void *closure)
28529 : {
28530 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28531 : PyObject *py_attribute_name;
28532 0 : if (object->attribute_name == NULL) {
28533 0 : Py_RETURN_NONE;
28534 : }
28535 0 : if (object->attribute_name == NULL) {
28536 0 : py_attribute_name = Py_None;
28537 0 : Py_INCREF(py_attribute_name);
28538 : } else {
28539 0 : if (object->attribute_name == NULL) {
28540 0 : py_attribute_name = Py_None;
28541 0 : Py_INCREF(py_attribute_name);
28542 : } else {
28543 0 : py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
28544 : }
28545 : }
28546 0 : return py_attribute_name;
28547 : }
28548 :
28549 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
28550 : {
28551 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28552 0 : if (value == NULL) {
28553 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
28554 0 : return -1;
28555 : }
28556 0 : if (value == Py_None) {
28557 0 : object->attribute_name = NULL;
28558 : } else {
28559 0 : object->attribute_name = NULL;
28560 : {
28561 : const char *test_str;
28562 : const char *talloc_str;
28563 0 : PyObject *unicode = NULL;
28564 0 : if (PyUnicode_Check(value)) {
28565 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28566 0 : if (unicode == NULL) {
28567 0 : PyErr_NoMemory();
28568 0 : return -1;
28569 : }
28570 0 : test_str = PyBytes_AS_STRING(unicode);
28571 0 : } else if (PyBytes_Check(value)) {
28572 0 : test_str = PyBytes_AS_STRING(value);
28573 : } else {
28574 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28575 0 : return -1;
28576 : }
28577 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28578 0 : if (unicode != NULL) {
28579 0 : Py_DECREF(unicode);
28580 : }
28581 0 : if (talloc_str == NULL) {
28582 0 : PyErr_NoMemory();
28583 0 : return -1;
28584 : }
28585 0 : object->attribute_name = talloc_str;
28586 : }
28587 : }
28588 0 : return 0;
28589 : }
28590 :
28591 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_object_dn(PyObject *obj, void *closure)
28592 : {
28593 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28594 : PyObject *py_object_dn;
28595 0 : if (object->object_dn == NULL) {
28596 0 : Py_RETURN_NONE;
28597 : }
28598 0 : if (object->object_dn == NULL) {
28599 0 : py_object_dn = Py_None;
28600 0 : Py_INCREF(py_object_dn);
28601 : } else {
28602 0 : if (object->object_dn == NULL) {
28603 0 : py_object_dn = Py_None;
28604 0 : Py_INCREF(py_object_dn);
28605 : } else {
28606 0 : py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
28607 : }
28608 : }
28609 0 : return py_object_dn;
28610 : }
28611 :
28612 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
28613 : {
28614 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28615 0 : if (value == NULL) {
28616 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
28617 0 : return -1;
28618 : }
28619 0 : if (value == Py_None) {
28620 0 : object->object_dn = NULL;
28621 : } else {
28622 0 : object->object_dn = NULL;
28623 : {
28624 : const char *test_str;
28625 : const char *talloc_str;
28626 0 : PyObject *unicode = NULL;
28627 0 : if (PyUnicode_Check(value)) {
28628 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28629 0 : if (unicode == NULL) {
28630 0 : PyErr_NoMemory();
28631 0 : return -1;
28632 : }
28633 0 : test_str = PyBytes_AS_STRING(unicode);
28634 0 : } else if (PyBytes_Check(value)) {
28635 0 : test_str = PyBytes_AS_STRING(value);
28636 : } else {
28637 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28638 0 : return -1;
28639 : }
28640 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28641 0 : if (unicode != NULL) {
28642 0 : Py_DECREF(unicode);
28643 : }
28644 0 : if (talloc_str == NULL) {
28645 0 : PyErr_NoMemory();
28646 0 : return -1;
28647 : }
28648 0 : object->object_dn = talloc_str;
28649 : }
28650 : }
28651 0 : return 0;
28652 : }
28653 :
28654 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get___ndr_size_binary(PyObject *obj, void *closure)
28655 : {
28656 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28657 : PyObject *py___ndr_size_binary;
28658 0 : py___ndr_size_binary = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_binary);
28659 0 : return py___ndr_size_binary;
28660 : }
28661 :
28662 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
28663 : {
28664 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28665 0 : if (value == NULL) {
28666 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_binary");
28667 0 : return -1;
28668 : }
28669 : {
28670 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_binary));
28671 0 : if (PyLong_Check(value)) {
28672 : unsigned long long test_var;
28673 0 : test_var = PyLong_AsUnsignedLongLong(value);
28674 0 : if (PyErr_Occurred() != NULL) {
28675 0 : return -1;
28676 : }
28677 0 : if (test_var > uint_max) {
28678 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28679 : PyLong_Type.tp_name, uint_max, test_var);
28680 0 : return -1;
28681 : }
28682 0 : object->__ndr_size_binary = test_var;
28683 : } else {
28684 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28685 : PyLong_Type.tp_name);
28686 0 : return -1;
28687 : }
28688 : }
28689 0 : return 0;
28690 : }
28691 :
28692 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_binary(PyObject *obj, void *closure)
28693 : {
28694 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28695 : PyObject *py_binary;
28696 0 : if (object->binary == NULL) {
28697 0 : Py_RETURN_NONE;
28698 : }
28699 0 : if (object->binary == NULL) {
28700 0 : py_binary = Py_None;
28701 0 : Py_INCREF(py_binary);
28702 : } else {
28703 0 : py_binary = PyBytes_FromStringAndSize((char *)(*object->binary).data, (*object->binary).length);
28704 : }
28705 0 : return py_binary;
28706 : }
28707 :
28708 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_binary(PyObject *py_obj, PyObject *value, void *closure)
28709 : {
28710 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28711 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->binary));
28712 0 : if (value == NULL) {
28713 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary");
28714 0 : return -1;
28715 : }
28716 0 : if (value == Py_None) {
28717 0 : object->binary = NULL;
28718 : } else {
28719 0 : object->binary = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary);
28720 0 : if (object->binary == NULL) {
28721 0 : PyErr_NoMemory();
28722 0 : return -1;
28723 : }
28724 0 : *object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
28725 : }
28726 0 : return 0;
28727 : }
28728 :
28729 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_deleted(PyObject *obj, void *closure)
28730 : {
28731 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28732 : PyObject *py_deleted;
28733 0 : py_deleted = PyLong_FromUnsignedLongLong(object->deleted);
28734 0 : return py_deleted;
28735 : }
28736 :
28737 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_deleted(PyObject *py_obj, PyObject *value, void *closure)
28738 : {
28739 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28740 0 : if (value == NULL) {
28741 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->deleted");
28742 0 : return -1;
28743 : }
28744 : {
28745 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->deleted));
28746 0 : if (PyLong_Check(value)) {
28747 : unsigned long long test_var;
28748 0 : test_var = PyLong_AsUnsignedLongLong(value);
28749 0 : if (PyErr_Occurred() != NULL) {
28750 0 : return -1;
28751 : }
28752 0 : if (test_var > uint_max) {
28753 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28754 : PyLong_Type.tp_name, uint_max, test_var);
28755 0 : return -1;
28756 : }
28757 0 : object->deleted = test_var;
28758 : } else {
28759 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28760 : PyLong_Type.tp_name);
28761 0 : return -1;
28762 : }
28763 : }
28764 0 : return 0;
28765 : }
28766 :
28767 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_created(PyObject *obj, void *closure)
28768 : {
28769 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28770 : PyObject *py_created;
28771 0 : py_created = PyLong_FromUnsignedLongLong(object->created);
28772 0 : return py_created;
28773 : }
28774 :
28775 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_created(PyObject *py_obj, PyObject *value, void *closure)
28776 : {
28777 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28778 0 : if (value == NULL) {
28779 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->created");
28780 0 : return -1;
28781 : }
28782 : {
28783 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->created));
28784 0 : if (PyLong_Check(value)) {
28785 : unsigned long long test_var;
28786 0 : test_var = PyLong_AsUnsignedLongLong(value);
28787 0 : if (PyErr_Occurred() != NULL) {
28788 0 : return -1;
28789 : }
28790 0 : if (test_var > uint_max) {
28791 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28792 : PyLong_Type.tp_name, uint_max, test_var);
28793 0 : return -1;
28794 : }
28795 0 : object->created = test_var;
28796 : } else {
28797 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28798 : PyLong_Type.tp_name);
28799 0 : return -1;
28800 : }
28801 : }
28802 0 : return 0;
28803 : }
28804 :
28805 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_version(PyObject *obj, void *closure)
28806 : {
28807 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28808 : PyObject *py_version;
28809 0 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
28810 0 : return py_version;
28811 : }
28812 :
28813 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_version(PyObject *py_obj, PyObject *value, void *closure)
28814 : {
28815 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28816 0 : if (value == NULL) {
28817 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
28818 0 : return -1;
28819 : }
28820 : {
28821 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
28822 0 : if (PyLong_Check(value)) {
28823 : unsigned long long test_var;
28824 0 : test_var = PyLong_AsUnsignedLongLong(value);
28825 0 : if (PyErr_Occurred() != NULL) {
28826 0 : return -1;
28827 : }
28828 0 : if (test_var > uint_max) {
28829 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28830 : PyLong_Type.tp_name, uint_max, test_var);
28831 0 : return -1;
28832 : }
28833 0 : object->version = test_var;
28834 : } else {
28835 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28836 : PyLong_Type.tp_name);
28837 0 : return -1;
28838 : }
28839 : }
28840 0 : return 0;
28841 : }
28842 :
28843 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_originating_change_time(PyObject *obj, void *closure)
28844 : {
28845 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28846 : PyObject *py_originating_change_time;
28847 0 : py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
28848 0 : return py_originating_change_time;
28849 : }
28850 :
28851 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
28852 : {
28853 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28854 0 : if (value == NULL) {
28855 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
28856 0 : return -1;
28857 : }
28858 : {
28859 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
28860 0 : if (PyLong_Check(value)) {
28861 : unsigned long long test_var;
28862 0 : test_var = PyLong_AsUnsignedLongLong(value);
28863 0 : if (PyErr_Occurred() != NULL) {
28864 0 : return -1;
28865 : }
28866 0 : if (test_var > uint_max) {
28867 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28868 : PyLong_Type.tp_name, uint_max, test_var);
28869 0 : return -1;
28870 : }
28871 0 : object->originating_change_time = test_var;
28872 : } else {
28873 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28874 : PyLong_Type.tp_name);
28875 0 : return -1;
28876 : }
28877 : }
28878 0 : return 0;
28879 : }
28880 :
28881 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_originating_invocation_id(PyObject *obj, void *closure)
28882 : {
28883 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28884 : PyObject *py_originating_invocation_id;
28885 0 : py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
28886 0 : return py_originating_invocation_id;
28887 : }
28888 :
28889 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
28890 : {
28891 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28892 0 : if (value == NULL) {
28893 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
28894 0 : return -1;
28895 : }
28896 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
28897 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
28898 0 : PyErr_NoMemory();
28899 0 : return -1;
28900 : }
28901 0 : object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
28902 0 : return 0;
28903 : }
28904 :
28905 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_originating_usn(PyObject *obj, void *closure)
28906 : {
28907 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28908 : PyObject *py_originating_usn;
28909 0 : py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
28910 0 : return py_originating_usn;
28911 : }
28912 :
28913 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
28914 : {
28915 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28916 0 : if (value == NULL) {
28917 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
28918 0 : return -1;
28919 : }
28920 : {
28921 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
28922 0 : if (PyLong_Check(value)) {
28923 : unsigned long long test_var;
28924 0 : test_var = PyLong_AsUnsignedLongLong(value);
28925 0 : if (PyErr_Occurred() != NULL) {
28926 0 : return -1;
28927 : }
28928 0 : if (test_var > uint_max) {
28929 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28930 : PyLong_Type.tp_name, uint_max, test_var);
28931 0 : return -1;
28932 : }
28933 0 : object->originating_usn = test_var;
28934 : } else {
28935 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28936 : PyLong_Type.tp_name);
28937 0 : return -1;
28938 : }
28939 : }
28940 0 : return 0;
28941 : }
28942 :
28943 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_get_local_usn(PyObject *obj, void *closure)
28944 : {
28945 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(obj);
28946 : PyObject *py_local_usn;
28947 0 : py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
28948 0 : return py_local_usn;
28949 : }
28950 :
28951 0 : static int py_drsuapi_DsReplicaAttrValMetaData_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
28952 : {
28953 0 : struct drsuapi_DsReplicaAttrValMetaData *object = (struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(py_obj);
28954 0 : if (value == NULL) {
28955 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->local_usn");
28956 0 : return -1;
28957 : }
28958 : {
28959 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->local_usn));
28960 0 : if (PyLong_Check(value)) {
28961 : unsigned long long test_var;
28962 0 : test_var = PyLong_AsUnsignedLongLong(value);
28963 0 : if (PyErr_Occurred() != NULL) {
28964 0 : return -1;
28965 : }
28966 0 : if (test_var > uint_max) {
28967 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28968 : PyLong_Type.tp_name, uint_max, test_var);
28969 0 : return -1;
28970 : }
28971 0 : object->local_usn = test_var;
28972 : } else {
28973 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28974 : PyLong_Type.tp_name);
28975 0 : return -1;
28976 : }
28977 : }
28978 0 : return 0;
28979 : }
28980 :
28981 : static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaData_getsetters[] = {
28982 : {
28983 : .name = discard_const_p(char, "attribute_name"),
28984 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_attribute_name,
28985 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_attribute_name,
28986 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
28987 : },
28988 : {
28989 : .name = discard_const_p(char, "object_dn"),
28990 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_object_dn,
28991 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_object_dn,
28992 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
28993 : },
28994 : {
28995 : .name = discard_const_p(char, "__ndr_size_binary"),
28996 : .get = py_drsuapi_DsReplicaAttrValMetaData_get___ndr_size_binary,
28997 : .set = py_drsuapi_DsReplicaAttrValMetaData_set___ndr_size_binary,
28998 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
28999 : },
29000 : {
29001 : .name = discard_const_p(char, "binary"),
29002 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_binary,
29003 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_binary,
29004 : .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
29005 : },
29006 : {
29007 : .name = discard_const_p(char, "deleted"),
29008 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_deleted,
29009 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_deleted,
29010 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
29011 : },
29012 : {
29013 : .name = discard_const_p(char, "created"),
29014 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_created,
29015 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_created,
29016 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
29017 : },
29018 : {
29019 : .name = discard_const_p(char, "version"),
29020 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_version,
29021 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_version,
29022 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
29023 : },
29024 : {
29025 : .name = discard_const_p(char, "originating_change_time"),
29026 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_originating_change_time,
29027 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_originating_change_time,
29028 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
29029 : },
29030 : {
29031 : .name = discard_const_p(char, "originating_invocation_id"),
29032 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_originating_invocation_id,
29033 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_originating_invocation_id,
29034 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
29035 : },
29036 : {
29037 : .name = discard_const_p(char, "originating_usn"),
29038 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_originating_usn,
29039 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_originating_usn,
29040 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
29041 : },
29042 : {
29043 : .name = discard_const_p(char, "local_usn"),
29044 : .get = py_drsuapi_DsReplicaAttrValMetaData_get_local_usn,
29045 : .set = py_drsuapi_DsReplicaAttrValMetaData_set_local_usn,
29046 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
29047 : },
29048 : { .name = NULL }
29049 : };
29050 :
29051 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29052 : {
29053 0 : return pytalloc_new(struct drsuapi_DsReplicaAttrValMetaData, type);
29054 : }
29055 :
29056 :
29057 : static PyTypeObject drsuapi_DsReplicaAttrValMetaData_Type = {
29058 : PyVarObject_HEAD_INIT(NULL, 0)
29059 : .tp_name = "drsuapi.DsReplicaAttrValMetaData",
29060 : .tp_getset = py_drsuapi_DsReplicaAttrValMetaData_getsetters,
29061 : .tp_methods = NULL,
29062 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29063 : .tp_new = py_drsuapi_DsReplicaAttrValMetaData_new,
29064 : };
29065 :
29066 :
29067 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_count(PyObject *obj, void *closure)
29068 : {
29069 0 : struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(obj);
29070 : PyObject *py_count;
29071 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
29072 0 : return py_count;
29073 : }
29074 :
29075 0 : static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_count(PyObject *py_obj, PyObject *value, void *closure)
29076 : {
29077 0 : struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(py_obj);
29078 0 : if (value == NULL) {
29079 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
29080 0 : return -1;
29081 : }
29082 : {
29083 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
29084 0 : if (PyLong_Check(value)) {
29085 : unsigned long long test_var;
29086 0 : test_var = PyLong_AsUnsignedLongLong(value);
29087 0 : if (PyErr_Occurred() != NULL) {
29088 0 : return -1;
29089 : }
29090 0 : if (test_var > uint_max) {
29091 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29092 : PyLong_Type.tp_name, uint_max, test_var);
29093 0 : return -1;
29094 : }
29095 0 : object->count = test_var;
29096 : } else {
29097 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29098 : PyLong_Type.tp_name);
29099 0 : return -1;
29100 : }
29101 : }
29102 0 : return 0;
29103 : }
29104 :
29105 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_enumeration_context(PyObject *obj, void *closure)
29106 : {
29107 0 : struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(obj);
29108 : PyObject *py_enumeration_context;
29109 0 : py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)object->enumeration_context);
29110 0 : return py_enumeration_context;
29111 : }
29112 :
29113 0 : static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
29114 : {
29115 0 : struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(py_obj);
29116 0 : if (value == NULL) {
29117 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
29118 0 : return -1;
29119 : }
29120 : {
29121 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
29122 0 : if (PyLong_Check(value)) {
29123 : unsigned long long test_var;
29124 0 : test_var = PyLong_AsUnsignedLongLong(value);
29125 0 : if (PyErr_Occurred() != NULL) {
29126 0 : return -1;
29127 : }
29128 0 : if (test_var > uint_max) {
29129 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29130 : PyLong_Type.tp_name, uint_max, test_var);
29131 0 : return -1;
29132 : }
29133 0 : object->enumeration_context = test_var;
29134 : } else {
29135 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29136 : PyLong_Type.tp_name);
29137 0 : return -1;
29138 : }
29139 : }
29140 0 : return 0;
29141 : }
29142 :
29143 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_get_array(PyObject *obj, void *closure)
29144 : {
29145 0 : struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(obj);
29146 : PyObject *py_array;
29147 0 : py_array = PyList_New(object->count);
29148 0 : if (py_array == NULL) {
29149 0 : return NULL;
29150 : }
29151 : {
29152 : int array_cntr_0;
29153 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
29154 : PyObject *py_array_0;
29155 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData_Type, object->array, &object->array[array_cntr_0]);
29156 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
29157 : }
29158 : }
29159 0 : return py_array;
29160 : }
29161 :
29162 0 : static int py_drsuapi_DsReplicaAttrValMetaDataCtr_set_array(PyObject *py_obj, PyObject *value, void *closure)
29163 : {
29164 0 : struct drsuapi_DsReplicaAttrValMetaDataCtr *object = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(py_obj);
29165 0 : if (value == NULL) {
29166 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
29167 0 : return -1;
29168 : }
29169 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
29170 : {
29171 : int array_cntr_0;
29172 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
29173 0 : if (!object->array) { return -1;; }
29174 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
29175 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
29176 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
29177 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
29178 0 : return -1;
29179 : }
29180 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
29181 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
29182 0 : PyErr_NoMemory();
29183 0 : return -1;
29184 : }
29185 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaAttrValMetaData *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
29186 : }
29187 : }
29188 0 : return 0;
29189 : }
29190 :
29191 : static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaDataCtr_getsetters[] = {
29192 : {
29193 : .name = discard_const_p(char, "count"),
29194 : .get = py_drsuapi_DsReplicaAttrValMetaDataCtr_get_count,
29195 : .set = py_drsuapi_DsReplicaAttrValMetaDataCtr_set_count,
29196 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
29197 : },
29198 : {
29199 : .name = discard_const_p(char, "enumeration_context"),
29200 : .get = py_drsuapi_DsReplicaAttrValMetaDataCtr_get_enumeration_context,
29201 : .set = py_drsuapi_DsReplicaAttrValMetaDataCtr_set_enumeration_context,
29202 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
29203 : },
29204 : {
29205 : .name = discard_const_p(char, "array"),
29206 : .get = py_drsuapi_DsReplicaAttrValMetaDataCtr_get_array,
29207 : .set = py_drsuapi_DsReplicaAttrValMetaDataCtr_set_array,
29208 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAttrValMetaData")
29209 : },
29210 : { .name = NULL }
29211 : };
29212 :
29213 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaDataCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29214 : {
29215 0 : return pytalloc_new(struct drsuapi_DsReplicaAttrValMetaDataCtr, type);
29216 : }
29217 :
29218 :
29219 : static PyTypeObject drsuapi_DsReplicaAttrValMetaDataCtr_Type = {
29220 : PyVarObject_HEAD_INIT(NULL, 0)
29221 : .tp_name = "drsuapi.DsReplicaAttrValMetaDataCtr",
29222 : .tp_getset = py_drsuapi_DsReplicaAttrValMetaDataCtr_getsetters,
29223 : .tp_methods = NULL,
29224 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29225 : .tp_new = py_drsuapi_DsReplicaAttrValMetaDataCtr_new,
29226 : };
29227 :
29228 :
29229 0 : static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_count(PyObject *obj, void *closure)
29230 : {
29231 0 : struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(obj);
29232 : PyObject *py_count;
29233 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
29234 0 : return py_count;
29235 : }
29236 :
29237 0 : static int py_drsuapi_DsReplicaCursor2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
29238 : {
29239 0 : struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(py_obj);
29240 0 : if (value == NULL) {
29241 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
29242 0 : return -1;
29243 : }
29244 : {
29245 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
29246 0 : if (PyLong_Check(value)) {
29247 : unsigned long long test_var;
29248 0 : test_var = PyLong_AsUnsignedLongLong(value);
29249 0 : if (PyErr_Occurred() != NULL) {
29250 0 : return -1;
29251 : }
29252 0 : if (test_var > uint_max) {
29253 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29254 : PyLong_Type.tp_name, uint_max, test_var);
29255 0 : return -1;
29256 : }
29257 0 : object->count = test_var;
29258 : } else {
29259 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29260 : PyLong_Type.tp_name);
29261 0 : return -1;
29262 : }
29263 : }
29264 0 : return 0;
29265 : }
29266 :
29267 0 : static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_enumeration_context(PyObject *obj, void *closure)
29268 : {
29269 0 : struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(obj);
29270 : PyObject *py_enumeration_context;
29271 0 : py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)object->enumeration_context);
29272 0 : return py_enumeration_context;
29273 : }
29274 :
29275 0 : static int py_drsuapi_DsReplicaCursor2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
29276 : {
29277 0 : struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(py_obj);
29278 0 : if (value == NULL) {
29279 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
29280 0 : return -1;
29281 : }
29282 : {
29283 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
29284 0 : if (PyLong_Check(value)) {
29285 : unsigned long long test_var;
29286 0 : test_var = PyLong_AsUnsignedLongLong(value);
29287 0 : if (PyErr_Occurred() != NULL) {
29288 0 : return -1;
29289 : }
29290 0 : if (test_var > uint_max) {
29291 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29292 : PyLong_Type.tp_name, uint_max, test_var);
29293 0 : return -1;
29294 : }
29295 0 : object->enumeration_context = test_var;
29296 : } else {
29297 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29298 : PyLong_Type.tp_name);
29299 0 : return -1;
29300 : }
29301 : }
29302 0 : return 0;
29303 : }
29304 :
29305 0 : static PyObject *py_drsuapi_DsReplicaCursor2Ctr_get_array(PyObject *obj, void *closure)
29306 : {
29307 0 : struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(obj);
29308 : PyObject *py_array;
29309 0 : py_array = PyList_New(object->count);
29310 0 : if (py_array == NULL) {
29311 0 : return NULL;
29312 : }
29313 : {
29314 : int array_cntr_0;
29315 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
29316 : PyObject *py_array_0;
29317 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2_Type, object->array, &object->array[array_cntr_0]);
29318 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
29319 : }
29320 : }
29321 0 : return py_array;
29322 : }
29323 :
29324 0 : static int py_drsuapi_DsReplicaCursor2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
29325 : {
29326 0 : struct drsuapi_DsReplicaCursor2Ctr *object = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(py_obj);
29327 0 : if (value == NULL) {
29328 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
29329 0 : return -1;
29330 : }
29331 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
29332 : {
29333 : int array_cntr_0;
29334 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
29335 0 : if (!object->array) { return -1;; }
29336 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
29337 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
29338 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
29339 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
29340 0 : return -1;
29341 : }
29342 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
29343 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
29344 0 : PyErr_NoMemory();
29345 0 : return -1;
29346 : }
29347 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaCursor2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
29348 : }
29349 : }
29350 0 : return 0;
29351 : }
29352 :
29353 : static PyGetSetDef py_drsuapi_DsReplicaCursor2Ctr_getsetters[] = {
29354 : {
29355 : .name = discard_const_p(char, "count"),
29356 : .get = py_drsuapi_DsReplicaCursor2Ctr_get_count,
29357 : .set = py_drsuapi_DsReplicaCursor2Ctr_set_count,
29358 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
29359 : },
29360 : {
29361 : .name = discard_const_p(char, "enumeration_context"),
29362 : .get = py_drsuapi_DsReplicaCursor2Ctr_get_enumeration_context,
29363 : .set = py_drsuapi_DsReplicaCursor2Ctr_set_enumeration_context,
29364 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
29365 : },
29366 : {
29367 : .name = discard_const_p(char, "array"),
29368 : .get = py_drsuapi_DsReplicaCursor2Ctr_get_array,
29369 : .set = py_drsuapi_DsReplicaCursor2Ctr_set_array,
29370 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor2")
29371 : },
29372 : { .name = NULL }
29373 : };
29374 :
29375 0 : static PyObject *py_drsuapi_DsReplicaCursor2Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29376 : {
29377 0 : return pytalloc_new(struct drsuapi_DsReplicaCursor2Ctr, type);
29378 : }
29379 :
29380 :
29381 : static PyTypeObject drsuapi_DsReplicaCursor2Ctr_Type = {
29382 : PyVarObject_HEAD_INIT(NULL, 0)
29383 : .tp_name = "drsuapi.DsReplicaCursor2Ctr",
29384 : .tp_getset = py_drsuapi_DsReplicaCursor2Ctr_getsetters,
29385 : .tp_methods = NULL,
29386 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29387 : .tp_new = py_drsuapi_DsReplicaCursor2Ctr_new,
29388 : };
29389 :
29390 :
29391 0 : static PyObject *py_drsuapi_DsReplicaCursor3_get_source_dsa_invocation_id(PyObject *obj, void *closure)
29392 : {
29393 0 : struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(obj);
29394 : PyObject *py_source_dsa_invocation_id;
29395 0 : py_source_dsa_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->source_dsa_invocation_id);
29396 0 : return py_source_dsa_invocation_id;
29397 : }
29398 :
29399 0 : static int py_drsuapi_DsReplicaCursor3_set_source_dsa_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
29400 : {
29401 0 : struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(py_obj);
29402 0 : if (value == NULL) {
29403 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_invocation_id");
29404 0 : return -1;
29405 : }
29406 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
29407 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
29408 0 : PyErr_NoMemory();
29409 0 : return -1;
29410 : }
29411 0 : object->source_dsa_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
29412 0 : return 0;
29413 : }
29414 :
29415 0 : static PyObject *py_drsuapi_DsReplicaCursor3_get_highest_usn(PyObject *obj, void *closure)
29416 : {
29417 0 : struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(obj);
29418 : PyObject *py_highest_usn;
29419 0 : py_highest_usn = PyLong_FromUnsignedLongLong(object->highest_usn);
29420 0 : return py_highest_usn;
29421 : }
29422 :
29423 0 : static int py_drsuapi_DsReplicaCursor3_set_highest_usn(PyObject *py_obj, PyObject *value, void *closure)
29424 : {
29425 0 : struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(py_obj);
29426 0 : if (value == NULL) {
29427 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->highest_usn");
29428 0 : return -1;
29429 : }
29430 : {
29431 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->highest_usn));
29432 0 : if (PyLong_Check(value)) {
29433 : unsigned long long test_var;
29434 0 : test_var = PyLong_AsUnsignedLongLong(value);
29435 0 : if (PyErr_Occurred() != NULL) {
29436 0 : return -1;
29437 : }
29438 0 : if (test_var > uint_max) {
29439 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29440 : PyLong_Type.tp_name, uint_max, test_var);
29441 0 : return -1;
29442 : }
29443 0 : object->highest_usn = test_var;
29444 : } else {
29445 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29446 : PyLong_Type.tp_name);
29447 0 : return -1;
29448 : }
29449 : }
29450 0 : return 0;
29451 : }
29452 :
29453 0 : static PyObject *py_drsuapi_DsReplicaCursor3_get_last_sync_success(PyObject *obj, void *closure)
29454 : {
29455 0 : struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(obj);
29456 : PyObject *py_last_sync_success;
29457 0 : py_last_sync_success = PyLong_FromUnsignedLongLong(object->last_sync_success);
29458 0 : return py_last_sync_success;
29459 : }
29460 :
29461 0 : static int py_drsuapi_DsReplicaCursor3_set_last_sync_success(PyObject *py_obj, PyObject *value, void *closure)
29462 : {
29463 0 : struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(py_obj);
29464 0 : if (value == NULL) {
29465 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->last_sync_success");
29466 0 : return -1;
29467 : }
29468 : {
29469 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->last_sync_success));
29470 0 : if (PyLong_Check(value)) {
29471 : unsigned long long test_var;
29472 0 : test_var = PyLong_AsUnsignedLongLong(value);
29473 0 : if (PyErr_Occurred() != NULL) {
29474 0 : return -1;
29475 : }
29476 0 : if (test_var > uint_max) {
29477 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29478 : PyLong_Type.tp_name, uint_max, test_var);
29479 0 : return -1;
29480 : }
29481 0 : object->last_sync_success = test_var;
29482 : } else {
29483 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29484 : PyLong_Type.tp_name);
29485 0 : return -1;
29486 : }
29487 : }
29488 0 : return 0;
29489 : }
29490 :
29491 0 : static PyObject *py_drsuapi_DsReplicaCursor3_get_source_dsa_obj_dn(PyObject *obj, void *closure)
29492 : {
29493 0 : struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(obj);
29494 : PyObject *py_source_dsa_obj_dn;
29495 0 : if (object->source_dsa_obj_dn == NULL) {
29496 0 : Py_RETURN_NONE;
29497 : }
29498 0 : if (object->source_dsa_obj_dn == NULL) {
29499 0 : py_source_dsa_obj_dn = Py_None;
29500 0 : Py_INCREF(py_source_dsa_obj_dn);
29501 : } else {
29502 0 : if (object->source_dsa_obj_dn == NULL) {
29503 0 : py_source_dsa_obj_dn = Py_None;
29504 0 : Py_INCREF(py_source_dsa_obj_dn);
29505 : } else {
29506 0 : py_source_dsa_obj_dn = PyUnicode_Decode(object->source_dsa_obj_dn, strlen(object->source_dsa_obj_dn), "utf-8", "ignore");
29507 : }
29508 : }
29509 0 : return py_source_dsa_obj_dn;
29510 : }
29511 :
29512 0 : static int py_drsuapi_DsReplicaCursor3_set_source_dsa_obj_dn(PyObject *py_obj, PyObject *value, void *closure)
29513 : {
29514 0 : struct drsuapi_DsReplicaCursor3 *object = (struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(py_obj);
29515 0 : if (value == NULL) {
29516 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->source_dsa_obj_dn");
29517 0 : return -1;
29518 : }
29519 0 : if (value == Py_None) {
29520 0 : object->source_dsa_obj_dn = NULL;
29521 : } else {
29522 0 : object->source_dsa_obj_dn = NULL;
29523 : {
29524 : const char *test_str;
29525 : const char *talloc_str;
29526 0 : PyObject *unicode = NULL;
29527 0 : if (PyUnicode_Check(value)) {
29528 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29529 0 : if (unicode == NULL) {
29530 0 : PyErr_NoMemory();
29531 0 : return -1;
29532 : }
29533 0 : test_str = PyBytes_AS_STRING(unicode);
29534 0 : } else if (PyBytes_Check(value)) {
29535 0 : test_str = PyBytes_AS_STRING(value);
29536 : } else {
29537 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29538 0 : return -1;
29539 : }
29540 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29541 0 : if (unicode != NULL) {
29542 0 : Py_DECREF(unicode);
29543 : }
29544 0 : if (talloc_str == NULL) {
29545 0 : PyErr_NoMemory();
29546 0 : return -1;
29547 : }
29548 0 : object->source_dsa_obj_dn = talloc_str;
29549 : }
29550 : }
29551 0 : return 0;
29552 : }
29553 :
29554 : static PyGetSetDef py_drsuapi_DsReplicaCursor3_getsetters[] = {
29555 : {
29556 : .name = discard_const_p(char, "source_dsa_invocation_id"),
29557 : .get = py_drsuapi_DsReplicaCursor3_get_source_dsa_invocation_id,
29558 : .set = py_drsuapi_DsReplicaCursor3_set_source_dsa_invocation_id,
29559 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
29560 : },
29561 : {
29562 : .name = discard_const_p(char, "highest_usn"),
29563 : .get = py_drsuapi_DsReplicaCursor3_get_highest_usn,
29564 : .set = py_drsuapi_DsReplicaCursor3_set_highest_usn,
29565 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
29566 : },
29567 : {
29568 : .name = discard_const_p(char, "last_sync_success"),
29569 : .get = py_drsuapi_DsReplicaCursor3_get_last_sync_success,
29570 : .set = py_drsuapi_DsReplicaCursor3_set_last_sync_success,
29571 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
29572 : },
29573 : {
29574 : .name = discard_const_p(char, "source_dsa_obj_dn"),
29575 : .get = py_drsuapi_DsReplicaCursor3_get_source_dsa_obj_dn,
29576 : .set = py_drsuapi_DsReplicaCursor3_set_source_dsa_obj_dn,
29577 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
29578 : },
29579 : { .name = NULL }
29580 : };
29581 :
29582 0 : static PyObject *py_drsuapi_DsReplicaCursor3_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29583 : {
29584 0 : return pytalloc_new(struct drsuapi_DsReplicaCursor3, type);
29585 : }
29586 :
29587 :
29588 : static PyTypeObject drsuapi_DsReplicaCursor3_Type = {
29589 : PyVarObject_HEAD_INIT(NULL, 0)
29590 : .tp_name = "drsuapi.DsReplicaCursor3",
29591 : .tp_getset = py_drsuapi_DsReplicaCursor3_getsetters,
29592 : .tp_methods = NULL,
29593 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29594 : .tp_new = py_drsuapi_DsReplicaCursor3_new,
29595 : };
29596 :
29597 :
29598 0 : static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_count(PyObject *obj, void *closure)
29599 : {
29600 0 : struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(obj);
29601 : PyObject *py_count;
29602 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
29603 0 : return py_count;
29604 : }
29605 :
29606 0 : static int py_drsuapi_DsReplicaCursor3Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
29607 : {
29608 0 : struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(py_obj);
29609 0 : if (value == NULL) {
29610 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
29611 0 : return -1;
29612 : }
29613 : {
29614 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
29615 0 : if (PyLong_Check(value)) {
29616 : unsigned long long test_var;
29617 0 : test_var = PyLong_AsUnsignedLongLong(value);
29618 0 : if (PyErr_Occurred() != NULL) {
29619 0 : return -1;
29620 : }
29621 0 : if (test_var > uint_max) {
29622 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29623 : PyLong_Type.tp_name, uint_max, test_var);
29624 0 : return -1;
29625 : }
29626 0 : object->count = test_var;
29627 : } else {
29628 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29629 : PyLong_Type.tp_name);
29630 0 : return -1;
29631 : }
29632 : }
29633 0 : return 0;
29634 : }
29635 :
29636 0 : static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_enumeration_context(PyObject *obj, void *closure)
29637 : {
29638 0 : struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(obj);
29639 : PyObject *py_enumeration_context;
29640 0 : py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)object->enumeration_context);
29641 0 : return py_enumeration_context;
29642 : }
29643 :
29644 0 : static int py_drsuapi_DsReplicaCursor3Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
29645 : {
29646 0 : struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(py_obj);
29647 0 : if (value == NULL) {
29648 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
29649 0 : return -1;
29650 : }
29651 : {
29652 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
29653 0 : if (PyLong_Check(value)) {
29654 : unsigned long long test_var;
29655 0 : test_var = PyLong_AsUnsignedLongLong(value);
29656 0 : if (PyErr_Occurred() != NULL) {
29657 0 : return -1;
29658 : }
29659 0 : if (test_var > uint_max) {
29660 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29661 : PyLong_Type.tp_name, uint_max, test_var);
29662 0 : return -1;
29663 : }
29664 0 : object->enumeration_context = test_var;
29665 : } else {
29666 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29667 : PyLong_Type.tp_name);
29668 0 : return -1;
29669 : }
29670 : }
29671 0 : return 0;
29672 : }
29673 :
29674 0 : static PyObject *py_drsuapi_DsReplicaCursor3Ctr_get_array(PyObject *obj, void *closure)
29675 : {
29676 0 : struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(obj);
29677 : PyObject *py_array;
29678 0 : py_array = PyList_New(object->count);
29679 0 : if (py_array == NULL) {
29680 0 : return NULL;
29681 : }
29682 : {
29683 : int array_cntr_0;
29684 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
29685 : PyObject *py_array_0;
29686 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaCursor3_Type, object->array, &object->array[array_cntr_0]);
29687 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
29688 : }
29689 : }
29690 0 : return py_array;
29691 : }
29692 :
29693 0 : static int py_drsuapi_DsReplicaCursor3Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
29694 : {
29695 0 : struct drsuapi_DsReplicaCursor3Ctr *object = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(py_obj);
29696 0 : if (value == NULL) {
29697 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
29698 0 : return -1;
29699 : }
29700 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
29701 : {
29702 : int array_cntr_0;
29703 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
29704 0 : if (!object->array) { return -1;; }
29705 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
29706 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
29707 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
29708 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
29709 0 : return -1;
29710 : }
29711 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursor3_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
29712 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
29713 0 : PyErr_NoMemory();
29714 0 : return -1;
29715 : }
29716 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaCursor3 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
29717 : }
29718 : }
29719 0 : return 0;
29720 : }
29721 :
29722 : static PyGetSetDef py_drsuapi_DsReplicaCursor3Ctr_getsetters[] = {
29723 : {
29724 : .name = discard_const_p(char, "count"),
29725 : .get = py_drsuapi_DsReplicaCursor3Ctr_get_count,
29726 : .set = py_drsuapi_DsReplicaCursor3Ctr_set_count,
29727 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
29728 : },
29729 : {
29730 : .name = discard_const_p(char, "enumeration_context"),
29731 : .get = py_drsuapi_DsReplicaCursor3Ctr_get_enumeration_context,
29732 : .set = py_drsuapi_DsReplicaCursor3Ctr_set_enumeration_context,
29733 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
29734 : },
29735 : {
29736 : .name = discard_const_p(char, "array"),
29737 : .get = py_drsuapi_DsReplicaCursor3Ctr_get_array,
29738 : .set = py_drsuapi_DsReplicaCursor3Ctr_set_array,
29739 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaCursor3")
29740 : },
29741 : { .name = NULL }
29742 : };
29743 :
29744 0 : static PyObject *py_drsuapi_DsReplicaCursor3Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29745 : {
29746 0 : return pytalloc_new(struct drsuapi_DsReplicaCursor3Ctr, type);
29747 : }
29748 :
29749 :
29750 : static PyTypeObject drsuapi_DsReplicaCursor3Ctr_Type = {
29751 : PyVarObject_HEAD_INIT(NULL, 0)
29752 : .tp_name = "drsuapi.DsReplicaCursor3Ctr",
29753 : .tp_getset = py_drsuapi_DsReplicaCursor3Ctr_getsetters,
29754 : .tp_methods = NULL,
29755 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29756 : .tp_new = py_drsuapi_DsReplicaCursor3Ctr_new,
29757 : };
29758 :
29759 :
29760 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_attribute_name(PyObject *obj, void *closure)
29761 : {
29762 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
29763 : PyObject *py_attribute_name;
29764 0 : if (object->attribute_name == NULL) {
29765 0 : Py_RETURN_NONE;
29766 : }
29767 0 : if (object->attribute_name == NULL) {
29768 0 : py_attribute_name = Py_None;
29769 0 : Py_INCREF(py_attribute_name);
29770 : } else {
29771 0 : if (object->attribute_name == NULL) {
29772 0 : py_attribute_name = Py_None;
29773 0 : Py_INCREF(py_attribute_name);
29774 : } else {
29775 0 : py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
29776 : }
29777 : }
29778 0 : return py_attribute_name;
29779 : }
29780 :
29781 0 : static int py_drsuapi_DsReplicaObjMetaData2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
29782 : {
29783 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
29784 0 : if (value == NULL) {
29785 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
29786 0 : return -1;
29787 : }
29788 0 : if (value == Py_None) {
29789 0 : object->attribute_name = NULL;
29790 : } else {
29791 0 : object->attribute_name = NULL;
29792 : {
29793 : const char *test_str;
29794 : const char *talloc_str;
29795 0 : PyObject *unicode = NULL;
29796 0 : if (PyUnicode_Check(value)) {
29797 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29798 0 : if (unicode == NULL) {
29799 0 : PyErr_NoMemory();
29800 0 : return -1;
29801 : }
29802 0 : test_str = PyBytes_AS_STRING(unicode);
29803 0 : } else if (PyBytes_Check(value)) {
29804 0 : test_str = PyBytes_AS_STRING(value);
29805 : } else {
29806 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29807 0 : return -1;
29808 : }
29809 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29810 0 : if (unicode != NULL) {
29811 0 : Py_DECREF(unicode);
29812 : }
29813 0 : if (talloc_str == NULL) {
29814 0 : PyErr_NoMemory();
29815 0 : return -1;
29816 : }
29817 0 : object->attribute_name = talloc_str;
29818 : }
29819 : }
29820 0 : return 0;
29821 : }
29822 :
29823 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_version(PyObject *obj, void *closure)
29824 : {
29825 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
29826 : PyObject *py_version;
29827 0 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
29828 0 : return py_version;
29829 : }
29830 :
29831 0 : static int py_drsuapi_DsReplicaObjMetaData2_set_version(PyObject *py_obj, PyObject *value, void *closure)
29832 : {
29833 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
29834 0 : if (value == NULL) {
29835 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
29836 0 : return -1;
29837 : }
29838 : {
29839 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
29840 0 : if (PyLong_Check(value)) {
29841 : unsigned long long test_var;
29842 0 : test_var = PyLong_AsUnsignedLongLong(value);
29843 0 : if (PyErr_Occurred() != NULL) {
29844 0 : return -1;
29845 : }
29846 0 : if (test_var > uint_max) {
29847 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29848 : PyLong_Type.tp_name, uint_max, test_var);
29849 0 : return -1;
29850 : }
29851 0 : object->version = test_var;
29852 : } else {
29853 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29854 : PyLong_Type.tp_name);
29855 0 : return -1;
29856 : }
29857 : }
29858 0 : return 0;
29859 : }
29860 :
29861 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_change_time(PyObject *obj, void *closure)
29862 : {
29863 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
29864 : PyObject *py_originating_change_time;
29865 0 : py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
29866 0 : return py_originating_change_time;
29867 : }
29868 :
29869 0 : static int py_drsuapi_DsReplicaObjMetaData2_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
29870 : {
29871 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
29872 0 : if (value == NULL) {
29873 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
29874 0 : return -1;
29875 : }
29876 : {
29877 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
29878 0 : if (PyLong_Check(value)) {
29879 : unsigned long long test_var;
29880 0 : test_var = PyLong_AsUnsignedLongLong(value);
29881 0 : if (PyErr_Occurred() != NULL) {
29882 0 : return -1;
29883 : }
29884 0 : if (test_var > uint_max) {
29885 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29886 : PyLong_Type.tp_name, uint_max, test_var);
29887 0 : return -1;
29888 : }
29889 0 : object->originating_change_time = test_var;
29890 : } else {
29891 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29892 : PyLong_Type.tp_name);
29893 0 : return -1;
29894 : }
29895 : }
29896 0 : return 0;
29897 : }
29898 :
29899 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_invocation_id(PyObject *obj, void *closure)
29900 : {
29901 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
29902 : PyObject *py_originating_invocation_id;
29903 0 : py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
29904 0 : return py_originating_invocation_id;
29905 : }
29906 :
29907 0 : static int py_drsuapi_DsReplicaObjMetaData2_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
29908 : {
29909 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
29910 0 : if (value == NULL) {
29911 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
29912 0 : return -1;
29913 : }
29914 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
29915 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
29916 0 : PyErr_NoMemory();
29917 0 : return -1;
29918 : }
29919 0 : object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
29920 0 : return 0;
29921 : }
29922 :
29923 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_usn(PyObject *obj, void *closure)
29924 : {
29925 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
29926 : PyObject *py_originating_usn;
29927 0 : py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
29928 0 : return py_originating_usn;
29929 : }
29930 :
29931 0 : static int py_drsuapi_DsReplicaObjMetaData2_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
29932 : {
29933 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
29934 0 : if (value == NULL) {
29935 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
29936 0 : return -1;
29937 : }
29938 : {
29939 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
29940 0 : if (PyLong_Check(value)) {
29941 : unsigned long long test_var;
29942 0 : test_var = PyLong_AsUnsignedLongLong(value);
29943 0 : if (PyErr_Occurred() != NULL) {
29944 0 : return -1;
29945 : }
29946 0 : if (test_var > uint_max) {
29947 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29948 : PyLong_Type.tp_name, uint_max, test_var);
29949 0 : return -1;
29950 : }
29951 0 : object->originating_usn = test_var;
29952 : } else {
29953 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29954 : PyLong_Type.tp_name);
29955 0 : return -1;
29956 : }
29957 : }
29958 0 : return 0;
29959 : }
29960 :
29961 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_local_usn(PyObject *obj, void *closure)
29962 : {
29963 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
29964 : PyObject *py_local_usn;
29965 0 : py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
29966 0 : return py_local_usn;
29967 : }
29968 :
29969 0 : static int py_drsuapi_DsReplicaObjMetaData2_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
29970 : {
29971 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
29972 0 : if (value == NULL) {
29973 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->local_usn");
29974 0 : return -1;
29975 : }
29976 : {
29977 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->local_usn));
29978 0 : if (PyLong_Check(value)) {
29979 : unsigned long long test_var;
29980 0 : test_var = PyLong_AsUnsignedLongLong(value);
29981 0 : if (PyErr_Occurred() != NULL) {
29982 0 : return -1;
29983 : }
29984 0 : if (test_var > uint_max) {
29985 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29986 : PyLong_Type.tp_name, uint_max, test_var);
29987 0 : return -1;
29988 : }
29989 0 : object->local_usn = test_var;
29990 : } else {
29991 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29992 : PyLong_Type.tp_name);
29993 0 : return -1;
29994 : }
29995 : }
29996 0 : return 0;
29997 : }
29998 :
29999 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_get_originating_dsa_dn(PyObject *obj, void *closure)
30000 : {
30001 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(obj);
30002 : PyObject *py_originating_dsa_dn;
30003 0 : if (object->originating_dsa_dn == NULL) {
30004 0 : Py_RETURN_NONE;
30005 : }
30006 0 : if (object->originating_dsa_dn == NULL) {
30007 0 : py_originating_dsa_dn = Py_None;
30008 0 : Py_INCREF(py_originating_dsa_dn);
30009 : } else {
30010 0 : if (object->originating_dsa_dn == NULL) {
30011 0 : py_originating_dsa_dn = Py_None;
30012 0 : Py_INCREF(py_originating_dsa_dn);
30013 : } else {
30014 0 : py_originating_dsa_dn = PyUnicode_Decode(object->originating_dsa_dn, strlen(object->originating_dsa_dn), "utf-8", "ignore");
30015 : }
30016 : }
30017 0 : return py_originating_dsa_dn;
30018 : }
30019 :
30020 0 : static int py_drsuapi_DsReplicaObjMetaData2_set_originating_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
30021 : {
30022 0 : struct drsuapi_DsReplicaObjMetaData2 *object = (struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(py_obj);
30023 0 : if (value == NULL) {
30024 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_dsa_dn");
30025 0 : return -1;
30026 : }
30027 0 : if (value == Py_None) {
30028 0 : object->originating_dsa_dn = NULL;
30029 : } else {
30030 0 : object->originating_dsa_dn = NULL;
30031 : {
30032 : const char *test_str;
30033 : const char *talloc_str;
30034 0 : PyObject *unicode = NULL;
30035 0 : if (PyUnicode_Check(value)) {
30036 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30037 0 : if (unicode == NULL) {
30038 0 : PyErr_NoMemory();
30039 0 : return -1;
30040 : }
30041 0 : test_str = PyBytes_AS_STRING(unicode);
30042 0 : } else if (PyBytes_Check(value)) {
30043 0 : test_str = PyBytes_AS_STRING(value);
30044 : } else {
30045 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30046 0 : return -1;
30047 : }
30048 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30049 0 : if (unicode != NULL) {
30050 0 : Py_DECREF(unicode);
30051 : }
30052 0 : if (talloc_str == NULL) {
30053 0 : PyErr_NoMemory();
30054 0 : return -1;
30055 : }
30056 0 : object->originating_dsa_dn = talloc_str;
30057 : }
30058 : }
30059 0 : return 0;
30060 : }
30061 :
30062 : static PyGetSetDef py_drsuapi_DsReplicaObjMetaData2_getsetters[] = {
30063 : {
30064 : .name = discard_const_p(char, "attribute_name"),
30065 : .get = py_drsuapi_DsReplicaObjMetaData2_get_attribute_name,
30066 : .set = py_drsuapi_DsReplicaObjMetaData2_set_attribute_name,
30067 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
30068 : },
30069 : {
30070 : .name = discard_const_p(char, "version"),
30071 : .get = py_drsuapi_DsReplicaObjMetaData2_get_version,
30072 : .set = py_drsuapi_DsReplicaObjMetaData2_set_version,
30073 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
30074 : },
30075 : {
30076 : .name = discard_const_p(char, "originating_change_time"),
30077 : .get = py_drsuapi_DsReplicaObjMetaData2_get_originating_change_time,
30078 : .set = py_drsuapi_DsReplicaObjMetaData2_set_originating_change_time,
30079 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
30080 : },
30081 : {
30082 : .name = discard_const_p(char, "originating_invocation_id"),
30083 : .get = py_drsuapi_DsReplicaObjMetaData2_get_originating_invocation_id,
30084 : .set = py_drsuapi_DsReplicaObjMetaData2_set_originating_invocation_id,
30085 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
30086 : },
30087 : {
30088 : .name = discard_const_p(char, "originating_usn"),
30089 : .get = py_drsuapi_DsReplicaObjMetaData2_get_originating_usn,
30090 : .set = py_drsuapi_DsReplicaObjMetaData2_set_originating_usn,
30091 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
30092 : },
30093 : {
30094 : .name = discard_const_p(char, "local_usn"),
30095 : .get = py_drsuapi_DsReplicaObjMetaData2_get_local_usn,
30096 : .set = py_drsuapi_DsReplicaObjMetaData2_set_local_usn,
30097 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
30098 : },
30099 : {
30100 : .name = discard_const_p(char, "originating_dsa_dn"),
30101 : .get = py_drsuapi_DsReplicaObjMetaData2_get_originating_dsa_dn,
30102 : .set = py_drsuapi_DsReplicaObjMetaData2_set_originating_dsa_dn,
30103 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
30104 : },
30105 : { .name = NULL }
30106 : };
30107 :
30108 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
30109 : {
30110 0 : return pytalloc_new(struct drsuapi_DsReplicaObjMetaData2, type);
30111 : }
30112 :
30113 :
30114 : static PyTypeObject drsuapi_DsReplicaObjMetaData2_Type = {
30115 : PyVarObject_HEAD_INIT(NULL, 0)
30116 : .tp_name = "drsuapi.DsReplicaObjMetaData2",
30117 : .tp_getset = py_drsuapi_DsReplicaObjMetaData2_getsetters,
30118 : .tp_methods = NULL,
30119 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
30120 : .tp_new = py_drsuapi_DsReplicaObjMetaData2_new,
30121 : };
30122 :
30123 :
30124 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_count(PyObject *obj, void *closure)
30125 : {
30126 0 : struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(obj);
30127 : PyObject *py_count;
30128 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
30129 0 : return py_count;
30130 : }
30131 :
30132 0 : static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
30133 : {
30134 0 : struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(py_obj);
30135 0 : if (value == NULL) {
30136 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
30137 0 : return -1;
30138 : }
30139 : {
30140 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
30141 0 : if (PyLong_Check(value)) {
30142 : unsigned long long test_var;
30143 0 : test_var = PyLong_AsUnsignedLongLong(value);
30144 0 : if (PyErr_Occurred() != NULL) {
30145 0 : return -1;
30146 : }
30147 0 : if (test_var > uint_max) {
30148 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30149 : PyLong_Type.tp_name, uint_max, test_var);
30150 0 : return -1;
30151 : }
30152 0 : object->count = test_var;
30153 : } else {
30154 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30155 : PyLong_Type.tp_name);
30156 0 : return -1;
30157 : }
30158 : }
30159 0 : return 0;
30160 : }
30161 :
30162 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_enumeration_context(PyObject *obj, void *closure)
30163 : {
30164 0 : struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(obj);
30165 : PyObject *py_enumeration_context;
30166 0 : py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)object->enumeration_context);
30167 0 : return py_enumeration_context;
30168 : }
30169 :
30170 0 : static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
30171 : {
30172 0 : struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(py_obj);
30173 0 : if (value == NULL) {
30174 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
30175 0 : return -1;
30176 : }
30177 : {
30178 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
30179 0 : if (PyLong_Check(value)) {
30180 : unsigned long long test_var;
30181 0 : test_var = PyLong_AsUnsignedLongLong(value);
30182 0 : if (PyErr_Occurred() != NULL) {
30183 0 : return -1;
30184 : }
30185 0 : if (test_var > uint_max) {
30186 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30187 : PyLong_Type.tp_name, uint_max, test_var);
30188 0 : return -1;
30189 : }
30190 0 : object->enumeration_context = test_var;
30191 : } else {
30192 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30193 : PyLong_Type.tp_name);
30194 0 : return -1;
30195 : }
30196 : }
30197 0 : return 0;
30198 : }
30199 :
30200 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_get_array(PyObject *obj, void *closure)
30201 : {
30202 0 : struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(obj);
30203 : PyObject *py_array;
30204 0 : py_array = PyList_New(object->count);
30205 0 : if (py_array == NULL) {
30206 0 : return NULL;
30207 : }
30208 : {
30209 : int array_cntr_0;
30210 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
30211 : PyObject *py_array_0;
30212 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData2_Type, object->array, &object->array[array_cntr_0]);
30213 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
30214 : }
30215 : }
30216 0 : return py_array;
30217 : }
30218 :
30219 0 : static int py_drsuapi_DsReplicaObjMetaData2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
30220 : {
30221 0 : struct drsuapi_DsReplicaObjMetaData2Ctr *object = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(py_obj);
30222 0 : if (value == NULL) {
30223 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
30224 0 : return -1;
30225 : }
30226 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
30227 : {
30228 : int array_cntr_0;
30229 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
30230 0 : if (!object->array) { return -1;; }
30231 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
30232 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
30233 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
30234 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
30235 0 : return -1;
30236 : }
30237 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
30238 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
30239 0 : PyErr_NoMemory();
30240 0 : return -1;
30241 : }
30242 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaObjMetaData2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
30243 : }
30244 : }
30245 0 : return 0;
30246 : }
30247 :
30248 : static PyGetSetDef py_drsuapi_DsReplicaObjMetaData2Ctr_getsetters[] = {
30249 : {
30250 : .name = discard_const_p(char, "count"),
30251 : .get = py_drsuapi_DsReplicaObjMetaData2Ctr_get_count,
30252 : .set = py_drsuapi_DsReplicaObjMetaData2Ctr_set_count,
30253 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
30254 : },
30255 : {
30256 : .name = discard_const_p(char, "enumeration_context"),
30257 : .get = py_drsuapi_DsReplicaObjMetaData2Ctr_get_enumeration_context,
30258 : .set = py_drsuapi_DsReplicaObjMetaData2Ctr_set_enumeration_context,
30259 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
30260 : },
30261 : {
30262 : .name = discard_const_p(char, "array"),
30263 : .get = py_drsuapi_DsReplicaObjMetaData2Ctr_get_array,
30264 : .set = py_drsuapi_DsReplicaObjMetaData2Ctr_set_array,
30265 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaObjMetaData2")
30266 : },
30267 : { .name = NULL }
30268 : };
30269 :
30270 0 : static PyObject *py_drsuapi_DsReplicaObjMetaData2Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
30271 : {
30272 0 : return pytalloc_new(struct drsuapi_DsReplicaObjMetaData2Ctr, type);
30273 : }
30274 :
30275 :
30276 : static PyTypeObject drsuapi_DsReplicaObjMetaData2Ctr_Type = {
30277 : PyVarObject_HEAD_INIT(NULL, 0)
30278 : .tp_name = "drsuapi.DsReplicaObjMetaData2Ctr",
30279 : .tp_getset = py_drsuapi_DsReplicaObjMetaData2Ctr_getsetters,
30280 : .tp_methods = NULL,
30281 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
30282 : .tp_new = py_drsuapi_DsReplicaObjMetaData2Ctr_new,
30283 : };
30284 :
30285 :
30286 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_attribute_name(PyObject *obj, void *closure)
30287 : {
30288 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30289 : PyObject *py_attribute_name;
30290 0 : if (object->attribute_name == NULL) {
30291 0 : Py_RETURN_NONE;
30292 : }
30293 0 : if (object->attribute_name == NULL) {
30294 0 : py_attribute_name = Py_None;
30295 0 : Py_INCREF(py_attribute_name);
30296 : } else {
30297 0 : if (object->attribute_name == NULL) {
30298 0 : py_attribute_name = Py_None;
30299 0 : Py_INCREF(py_attribute_name);
30300 : } else {
30301 0 : py_attribute_name = PyUnicode_Decode(object->attribute_name, strlen(object->attribute_name), "utf-8", "ignore");
30302 : }
30303 : }
30304 0 : return py_attribute_name;
30305 : }
30306 :
30307 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_attribute_name(PyObject *py_obj, PyObject *value, void *closure)
30308 : {
30309 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30310 0 : if (value == NULL) {
30311 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->attribute_name");
30312 0 : return -1;
30313 : }
30314 0 : if (value == Py_None) {
30315 0 : object->attribute_name = NULL;
30316 : } else {
30317 0 : object->attribute_name = NULL;
30318 : {
30319 : const char *test_str;
30320 : const char *talloc_str;
30321 0 : PyObject *unicode = NULL;
30322 0 : if (PyUnicode_Check(value)) {
30323 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30324 0 : if (unicode == NULL) {
30325 0 : PyErr_NoMemory();
30326 0 : return -1;
30327 : }
30328 0 : test_str = PyBytes_AS_STRING(unicode);
30329 0 : } else if (PyBytes_Check(value)) {
30330 0 : test_str = PyBytes_AS_STRING(value);
30331 : } else {
30332 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30333 0 : return -1;
30334 : }
30335 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30336 0 : if (unicode != NULL) {
30337 0 : Py_DECREF(unicode);
30338 : }
30339 0 : if (talloc_str == NULL) {
30340 0 : PyErr_NoMemory();
30341 0 : return -1;
30342 : }
30343 0 : object->attribute_name = talloc_str;
30344 : }
30345 : }
30346 0 : return 0;
30347 : }
30348 :
30349 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_object_dn(PyObject *obj, void *closure)
30350 : {
30351 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30352 : PyObject *py_object_dn;
30353 0 : if (object->object_dn == NULL) {
30354 0 : Py_RETURN_NONE;
30355 : }
30356 0 : if (object->object_dn == NULL) {
30357 0 : py_object_dn = Py_None;
30358 0 : Py_INCREF(py_object_dn);
30359 : } else {
30360 0 : if (object->object_dn == NULL) {
30361 0 : py_object_dn = Py_None;
30362 0 : Py_INCREF(py_object_dn);
30363 : } else {
30364 0 : py_object_dn = PyUnicode_Decode(object->object_dn, strlen(object->object_dn), "utf-8", "ignore");
30365 : }
30366 : }
30367 0 : return py_object_dn;
30368 : }
30369 :
30370 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_object_dn(PyObject *py_obj, PyObject *value, void *closure)
30371 : {
30372 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30373 0 : if (value == NULL) {
30374 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->object_dn");
30375 0 : return -1;
30376 : }
30377 0 : if (value == Py_None) {
30378 0 : object->object_dn = NULL;
30379 : } else {
30380 0 : object->object_dn = NULL;
30381 : {
30382 : const char *test_str;
30383 : const char *talloc_str;
30384 0 : PyObject *unicode = NULL;
30385 0 : if (PyUnicode_Check(value)) {
30386 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30387 0 : if (unicode == NULL) {
30388 0 : PyErr_NoMemory();
30389 0 : return -1;
30390 : }
30391 0 : test_str = PyBytes_AS_STRING(unicode);
30392 0 : } else if (PyBytes_Check(value)) {
30393 0 : test_str = PyBytes_AS_STRING(value);
30394 : } else {
30395 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30396 0 : return -1;
30397 : }
30398 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30399 0 : if (unicode != NULL) {
30400 0 : Py_DECREF(unicode);
30401 : }
30402 0 : if (talloc_str == NULL) {
30403 0 : PyErr_NoMemory();
30404 0 : return -1;
30405 : }
30406 0 : object->object_dn = talloc_str;
30407 : }
30408 : }
30409 0 : return 0;
30410 : }
30411 :
30412 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get___ndr_size_binary(PyObject *obj, void *closure)
30413 : {
30414 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30415 : PyObject *py___ndr_size_binary;
30416 0 : py___ndr_size_binary = PyLong_FromUnsignedLongLong((uint32_t)object->__ndr_size_binary);
30417 0 : return py___ndr_size_binary;
30418 : }
30419 :
30420 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set___ndr_size_binary(PyObject *py_obj, PyObject *value, void *closure)
30421 : {
30422 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30423 0 : if (value == NULL) {
30424 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->__ndr_size_binary");
30425 0 : return -1;
30426 : }
30427 : {
30428 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->__ndr_size_binary));
30429 0 : if (PyLong_Check(value)) {
30430 : unsigned long long test_var;
30431 0 : test_var = PyLong_AsUnsignedLongLong(value);
30432 0 : if (PyErr_Occurred() != NULL) {
30433 0 : return -1;
30434 : }
30435 0 : if (test_var > uint_max) {
30436 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30437 : PyLong_Type.tp_name, uint_max, test_var);
30438 0 : return -1;
30439 : }
30440 0 : object->__ndr_size_binary = test_var;
30441 : } else {
30442 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30443 : PyLong_Type.tp_name);
30444 0 : return -1;
30445 : }
30446 : }
30447 0 : return 0;
30448 : }
30449 :
30450 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_binary(PyObject *obj, void *closure)
30451 : {
30452 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30453 : PyObject *py_binary;
30454 0 : if (object->binary == NULL) {
30455 0 : Py_RETURN_NONE;
30456 : }
30457 0 : if (object->binary == NULL) {
30458 0 : py_binary = Py_None;
30459 0 : Py_INCREF(py_binary);
30460 : } else {
30461 0 : py_binary = PyBytes_FromStringAndSize((char *)(*object->binary).data, (*object->binary).length);
30462 : }
30463 0 : return py_binary;
30464 : }
30465 :
30466 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_binary(PyObject *py_obj, PyObject *value, void *closure)
30467 : {
30468 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30469 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->binary));
30470 0 : if (value == NULL) {
30471 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->binary");
30472 0 : return -1;
30473 : }
30474 0 : if (value == Py_None) {
30475 0 : object->binary = NULL;
30476 : } else {
30477 0 : object->binary = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->binary);
30478 0 : if (object->binary == NULL) {
30479 0 : PyErr_NoMemory();
30480 0 : return -1;
30481 : }
30482 0 : *object->binary = data_blob_talloc(pytalloc_get_mem_ctx(py_obj), PyBytes_AS_STRING(value), PyBytes_GET_SIZE(value));
30483 : }
30484 0 : return 0;
30485 : }
30486 :
30487 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_deleted(PyObject *obj, void *closure)
30488 : {
30489 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30490 : PyObject *py_deleted;
30491 0 : py_deleted = PyLong_FromUnsignedLongLong(object->deleted);
30492 0 : return py_deleted;
30493 : }
30494 :
30495 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_deleted(PyObject *py_obj, PyObject *value, void *closure)
30496 : {
30497 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30498 0 : if (value == NULL) {
30499 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->deleted");
30500 0 : return -1;
30501 : }
30502 : {
30503 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->deleted));
30504 0 : if (PyLong_Check(value)) {
30505 : unsigned long long test_var;
30506 0 : test_var = PyLong_AsUnsignedLongLong(value);
30507 0 : if (PyErr_Occurred() != NULL) {
30508 0 : return -1;
30509 : }
30510 0 : if (test_var > uint_max) {
30511 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30512 : PyLong_Type.tp_name, uint_max, test_var);
30513 0 : return -1;
30514 : }
30515 0 : object->deleted = test_var;
30516 : } else {
30517 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30518 : PyLong_Type.tp_name);
30519 0 : return -1;
30520 : }
30521 : }
30522 0 : return 0;
30523 : }
30524 :
30525 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_created(PyObject *obj, void *closure)
30526 : {
30527 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30528 : PyObject *py_created;
30529 0 : py_created = PyLong_FromUnsignedLongLong(object->created);
30530 0 : return py_created;
30531 : }
30532 :
30533 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_created(PyObject *py_obj, PyObject *value, void *closure)
30534 : {
30535 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30536 0 : if (value == NULL) {
30537 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->created");
30538 0 : return -1;
30539 : }
30540 : {
30541 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->created));
30542 0 : if (PyLong_Check(value)) {
30543 : unsigned long long test_var;
30544 0 : test_var = PyLong_AsUnsignedLongLong(value);
30545 0 : if (PyErr_Occurred() != NULL) {
30546 0 : return -1;
30547 : }
30548 0 : if (test_var > uint_max) {
30549 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30550 : PyLong_Type.tp_name, uint_max, test_var);
30551 0 : return -1;
30552 : }
30553 0 : object->created = test_var;
30554 : } else {
30555 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30556 : PyLong_Type.tp_name);
30557 0 : return -1;
30558 : }
30559 : }
30560 0 : return 0;
30561 : }
30562 :
30563 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_version(PyObject *obj, void *closure)
30564 : {
30565 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30566 : PyObject *py_version;
30567 0 : py_version = PyLong_FromUnsignedLongLong((uint32_t)object->version);
30568 0 : return py_version;
30569 : }
30570 :
30571 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_version(PyObject *py_obj, PyObject *value, void *closure)
30572 : {
30573 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30574 0 : if (value == NULL) {
30575 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->version");
30576 0 : return -1;
30577 : }
30578 : {
30579 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->version));
30580 0 : if (PyLong_Check(value)) {
30581 : unsigned long long test_var;
30582 0 : test_var = PyLong_AsUnsignedLongLong(value);
30583 0 : if (PyErr_Occurred() != NULL) {
30584 0 : return -1;
30585 : }
30586 0 : if (test_var > uint_max) {
30587 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30588 : PyLong_Type.tp_name, uint_max, test_var);
30589 0 : return -1;
30590 : }
30591 0 : object->version = test_var;
30592 : } else {
30593 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30594 : PyLong_Type.tp_name);
30595 0 : return -1;
30596 : }
30597 : }
30598 0 : return 0;
30599 : }
30600 :
30601 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_change_time(PyObject *obj, void *closure)
30602 : {
30603 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30604 : PyObject *py_originating_change_time;
30605 0 : py_originating_change_time = PyLong_FromUnsignedLongLong(object->originating_change_time);
30606 0 : return py_originating_change_time;
30607 : }
30608 :
30609 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_change_time(PyObject *py_obj, PyObject *value, void *closure)
30610 : {
30611 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30612 0 : if (value == NULL) {
30613 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_change_time");
30614 0 : return -1;
30615 : }
30616 : {
30617 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_change_time));
30618 0 : if (PyLong_Check(value)) {
30619 : unsigned long long test_var;
30620 0 : test_var = PyLong_AsUnsignedLongLong(value);
30621 0 : if (PyErr_Occurred() != NULL) {
30622 0 : return -1;
30623 : }
30624 0 : if (test_var > uint_max) {
30625 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30626 : PyLong_Type.tp_name, uint_max, test_var);
30627 0 : return -1;
30628 : }
30629 0 : object->originating_change_time = test_var;
30630 : } else {
30631 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30632 : PyLong_Type.tp_name);
30633 0 : return -1;
30634 : }
30635 : }
30636 0 : return 0;
30637 : }
30638 :
30639 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_invocation_id(PyObject *obj, void *closure)
30640 : {
30641 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30642 : PyObject *py_originating_invocation_id;
30643 0 : py_originating_invocation_id = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->originating_invocation_id);
30644 0 : return py_originating_invocation_id;
30645 : }
30646 :
30647 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_invocation_id(PyObject *py_obj, PyObject *value, void *closure)
30648 : {
30649 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30650 0 : if (value == NULL) {
30651 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_invocation_id");
30652 0 : return -1;
30653 : }
30654 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
30655 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
30656 0 : PyErr_NoMemory();
30657 0 : return -1;
30658 : }
30659 0 : object->originating_invocation_id = *(struct GUID *)pytalloc_get_ptr(value);
30660 0 : return 0;
30661 : }
30662 :
30663 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_usn(PyObject *obj, void *closure)
30664 : {
30665 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30666 : PyObject *py_originating_usn;
30667 0 : py_originating_usn = PyLong_FromUnsignedLongLong(object->originating_usn);
30668 0 : return py_originating_usn;
30669 : }
30670 :
30671 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_usn(PyObject *py_obj, PyObject *value, void *closure)
30672 : {
30673 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30674 0 : if (value == NULL) {
30675 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_usn");
30676 0 : return -1;
30677 : }
30678 : {
30679 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->originating_usn));
30680 0 : if (PyLong_Check(value)) {
30681 : unsigned long long test_var;
30682 0 : test_var = PyLong_AsUnsignedLongLong(value);
30683 0 : if (PyErr_Occurred() != NULL) {
30684 0 : return -1;
30685 : }
30686 0 : if (test_var > uint_max) {
30687 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30688 : PyLong_Type.tp_name, uint_max, test_var);
30689 0 : return -1;
30690 : }
30691 0 : object->originating_usn = test_var;
30692 : } else {
30693 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30694 : PyLong_Type.tp_name);
30695 0 : return -1;
30696 : }
30697 : }
30698 0 : return 0;
30699 : }
30700 :
30701 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_local_usn(PyObject *obj, void *closure)
30702 : {
30703 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30704 : PyObject *py_local_usn;
30705 0 : py_local_usn = PyLong_FromUnsignedLongLong(object->local_usn);
30706 0 : return py_local_usn;
30707 : }
30708 :
30709 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_local_usn(PyObject *py_obj, PyObject *value, void *closure)
30710 : {
30711 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30712 0 : if (value == NULL) {
30713 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->local_usn");
30714 0 : return -1;
30715 : }
30716 : {
30717 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->local_usn));
30718 0 : if (PyLong_Check(value)) {
30719 : unsigned long long test_var;
30720 0 : test_var = PyLong_AsUnsignedLongLong(value);
30721 0 : if (PyErr_Occurred() != NULL) {
30722 0 : return -1;
30723 : }
30724 0 : if (test_var > uint_max) {
30725 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30726 : PyLong_Type.tp_name, uint_max, test_var);
30727 0 : return -1;
30728 : }
30729 0 : object->local_usn = test_var;
30730 : } else {
30731 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30732 : PyLong_Type.tp_name);
30733 0 : return -1;
30734 : }
30735 : }
30736 0 : return 0;
30737 : }
30738 :
30739 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_get_originating_dsa_dn(PyObject *obj, void *closure)
30740 : {
30741 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(obj);
30742 : PyObject *py_originating_dsa_dn;
30743 0 : if (object->originating_dsa_dn == NULL) {
30744 0 : Py_RETURN_NONE;
30745 : }
30746 0 : if (object->originating_dsa_dn == NULL) {
30747 0 : py_originating_dsa_dn = Py_None;
30748 0 : Py_INCREF(py_originating_dsa_dn);
30749 : } else {
30750 0 : if (object->originating_dsa_dn == NULL) {
30751 0 : py_originating_dsa_dn = Py_None;
30752 0 : Py_INCREF(py_originating_dsa_dn);
30753 : } else {
30754 0 : py_originating_dsa_dn = PyUnicode_Decode(object->originating_dsa_dn, strlen(object->originating_dsa_dn), "utf-8", "ignore");
30755 : }
30756 : }
30757 0 : return py_originating_dsa_dn;
30758 : }
30759 :
30760 0 : static int py_drsuapi_DsReplicaAttrValMetaData2_set_originating_dsa_dn(PyObject *py_obj, PyObject *value, void *closure)
30761 : {
30762 0 : struct drsuapi_DsReplicaAttrValMetaData2 *object = (struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(py_obj);
30763 0 : if (value == NULL) {
30764 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->originating_dsa_dn");
30765 0 : return -1;
30766 : }
30767 0 : if (value == Py_None) {
30768 0 : object->originating_dsa_dn = NULL;
30769 : } else {
30770 0 : object->originating_dsa_dn = NULL;
30771 : {
30772 : const char *test_str;
30773 : const char *talloc_str;
30774 0 : PyObject *unicode = NULL;
30775 0 : if (PyUnicode_Check(value)) {
30776 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30777 0 : if (unicode == NULL) {
30778 0 : PyErr_NoMemory();
30779 0 : return -1;
30780 : }
30781 0 : test_str = PyBytes_AS_STRING(unicode);
30782 0 : } else if (PyBytes_Check(value)) {
30783 0 : test_str = PyBytes_AS_STRING(value);
30784 : } else {
30785 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30786 0 : return -1;
30787 : }
30788 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30789 0 : if (unicode != NULL) {
30790 0 : Py_DECREF(unicode);
30791 : }
30792 0 : if (talloc_str == NULL) {
30793 0 : PyErr_NoMemory();
30794 0 : return -1;
30795 : }
30796 0 : object->originating_dsa_dn = talloc_str;
30797 : }
30798 : }
30799 0 : return 0;
30800 : }
30801 :
30802 : static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaData2_getsetters[] = {
30803 : {
30804 : .name = discard_const_p(char, "attribute_name"),
30805 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_attribute_name,
30806 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_attribute_name,
30807 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
30808 : },
30809 : {
30810 : .name = discard_const_p(char, "object_dn"),
30811 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_object_dn,
30812 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_object_dn,
30813 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
30814 : },
30815 : {
30816 : .name = discard_const_p(char, "__ndr_size_binary"),
30817 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get___ndr_size_binary,
30818 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set___ndr_size_binary,
30819 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
30820 : },
30821 : {
30822 : .name = discard_const_p(char, "binary"),
30823 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_binary,
30824 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_binary,
30825 : .doc = discard_const_p(char, "PIDL-generated element of base type DATA_BLOB")
30826 : },
30827 : {
30828 : .name = discard_const_p(char, "deleted"),
30829 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_deleted,
30830 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_deleted,
30831 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
30832 : },
30833 : {
30834 : .name = discard_const_p(char, "created"),
30835 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_created,
30836 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_created,
30837 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
30838 : },
30839 : {
30840 : .name = discard_const_p(char, "version"),
30841 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_version,
30842 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_version,
30843 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
30844 : },
30845 : {
30846 : .name = discard_const_p(char, "originating_change_time"),
30847 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_originating_change_time,
30848 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_originating_change_time,
30849 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME")
30850 : },
30851 : {
30852 : .name = discard_const_p(char, "originating_invocation_id"),
30853 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_originating_invocation_id,
30854 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_originating_invocation_id,
30855 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
30856 : },
30857 : {
30858 : .name = discard_const_p(char, "originating_usn"),
30859 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_originating_usn,
30860 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_originating_usn,
30861 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
30862 : },
30863 : {
30864 : .name = discard_const_p(char, "local_usn"),
30865 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_local_usn,
30866 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_local_usn,
30867 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
30868 : },
30869 : {
30870 : .name = discard_const_p(char, "originating_dsa_dn"),
30871 : .get = py_drsuapi_DsReplicaAttrValMetaData2_get_originating_dsa_dn,
30872 : .set = py_drsuapi_DsReplicaAttrValMetaData2_set_originating_dsa_dn,
30873 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
30874 : },
30875 : { .name = NULL }
30876 : };
30877 :
30878 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
30879 : {
30880 0 : return pytalloc_new(struct drsuapi_DsReplicaAttrValMetaData2, type);
30881 : }
30882 :
30883 :
30884 : static PyTypeObject drsuapi_DsReplicaAttrValMetaData2_Type = {
30885 : PyVarObject_HEAD_INIT(NULL, 0)
30886 : .tp_name = "drsuapi.DsReplicaAttrValMetaData2",
30887 : .tp_getset = py_drsuapi_DsReplicaAttrValMetaData2_getsetters,
30888 : .tp_methods = NULL,
30889 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
30890 : .tp_new = py_drsuapi_DsReplicaAttrValMetaData2_new,
30891 : };
30892 :
30893 :
30894 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_count(PyObject *obj, void *closure)
30895 : {
30896 0 : struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(obj);
30897 : PyObject *py_count;
30898 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
30899 0 : return py_count;
30900 : }
30901 :
30902 0 : static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
30903 : {
30904 0 : struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(py_obj);
30905 0 : if (value == NULL) {
30906 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
30907 0 : return -1;
30908 : }
30909 : {
30910 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
30911 0 : if (PyLong_Check(value)) {
30912 : unsigned long long test_var;
30913 0 : test_var = PyLong_AsUnsignedLongLong(value);
30914 0 : if (PyErr_Occurred() != NULL) {
30915 0 : return -1;
30916 : }
30917 0 : if (test_var > uint_max) {
30918 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30919 : PyLong_Type.tp_name, uint_max, test_var);
30920 0 : return -1;
30921 : }
30922 0 : object->count = test_var;
30923 : } else {
30924 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30925 : PyLong_Type.tp_name);
30926 0 : return -1;
30927 : }
30928 : }
30929 0 : return 0;
30930 : }
30931 :
30932 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_enumeration_context(PyObject *obj, void *closure)
30933 : {
30934 0 : struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(obj);
30935 : PyObject *py_enumeration_context;
30936 0 : py_enumeration_context = PyLong_FromUnsignedLongLong((uint32_t)object->enumeration_context);
30937 0 : return py_enumeration_context;
30938 : }
30939 :
30940 0 : static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_enumeration_context(PyObject *py_obj, PyObject *value, void *closure)
30941 : {
30942 0 : struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(py_obj);
30943 0 : if (value == NULL) {
30944 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->enumeration_context");
30945 0 : return -1;
30946 : }
30947 : {
30948 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->enumeration_context));
30949 0 : if (PyLong_Check(value)) {
30950 : unsigned long long test_var;
30951 0 : test_var = PyLong_AsUnsignedLongLong(value);
30952 0 : if (PyErr_Occurred() != NULL) {
30953 0 : return -1;
30954 : }
30955 0 : if (test_var > uint_max) {
30956 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30957 : PyLong_Type.tp_name, uint_max, test_var);
30958 0 : return -1;
30959 : }
30960 0 : object->enumeration_context = test_var;
30961 : } else {
30962 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30963 : PyLong_Type.tp_name);
30964 0 : return -1;
30965 : }
30966 : }
30967 0 : return 0;
30968 : }
30969 :
30970 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_array(PyObject *obj, void *closure)
30971 : {
30972 0 : struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(obj);
30973 : PyObject *py_array;
30974 0 : py_array = PyList_New(object->count);
30975 0 : if (py_array == NULL) {
30976 0 : return NULL;
30977 : }
30978 : {
30979 : int array_cntr_0;
30980 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
30981 : PyObject *py_array_0;
30982 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData2_Type, object->array, &object->array[array_cntr_0]);
30983 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
30984 : }
30985 : }
30986 0 : return py_array;
30987 : }
30988 :
30989 0 : static int py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
30990 : {
30991 0 : struct drsuapi_DsReplicaAttrValMetaData2Ctr *object = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(py_obj);
30992 0 : if (value == NULL) {
30993 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
30994 0 : return -1;
30995 : }
30996 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
30997 : {
30998 : int array_cntr_0;
30999 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
31000 0 : if (!object->array) { return -1;; }
31001 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
31002 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
31003 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
31004 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
31005 0 : return -1;
31006 : }
31007 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData2_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
31008 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
31009 0 : PyErr_NoMemory();
31010 0 : return -1;
31011 : }
31012 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaAttrValMetaData2 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
31013 : }
31014 : }
31015 0 : return 0;
31016 : }
31017 :
31018 : static PyGetSetDef py_drsuapi_DsReplicaAttrValMetaData2Ctr_getsetters[] = {
31019 : {
31020 : .name = discard_const_p(char, "count"),
31021 : .get = py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_count,
31022 : .set = py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_count,
31023 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31024 : },
31025 : {
31026 : .name = discard_const_p(char, "enumeration_context"),
31027 : .get = py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_enumeration_context,
31028 : .set = py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_enumeration_context,
31029 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31030 : },
31031 : {
31032 : .name = discard_const_p(char, "array"),
31033 : .get = py_drsuapi_DsReplicaAttrValMetaData2Ctr_get_array,
31034 : .set = py_drsuapi_DsReplicaAttrValMetaData2Ctr_set_array,
31035 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAttrValMetaData2")
31036 : },
31037 : { .name = NULL }
31038 : };
31039 :
31040 0 : static PyObject *py_drsuapi_DsReplicaAttrValMetaData2Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31041 : {
31042 0 : return pytalloc_new(struct drsuapi_DsReplicaAttrValMetaData2Ctr, type);
31043 : }
31044 :
31045 :
31046 : static PyTypeObject drsuapi_DsReplicaAttrValMetaData2Ctr_Type = {
31047 : PyVarObject_HEAD_INIT(NULL, 0)
31048 : .tp_name = "drsuapi.DsReplicaAttrValMetaData2Ctr",
31049 : .tp_getset = py_drsuapi_DsReplicaAttrValMetaData2Ctr_getsetters,
31050 : .tp_methods = NULL,
31051 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31052 : .tp_new = py_drsuapi_DsReplicaAttrValMetaData2Ctr_new,
31053 : };
31054 :
31055 :
31056 0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_u1(PyObject *obj, void *closure)
31057 : {
31058 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
31059 : PyObject *py_u1;
31060 0 : py_u1 = PyLong_FromUnsignedLongLong(object->u1);
31061 0 : return py_u1;
31062 : }
31063 :
31064 0 : static int py_drsuapi_DsReplicaConnection04_set_u1(PyObject *py_obj, PyObject *value, void *closure)
31065 : {
31066 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
31067 0 : if (value == NULL) {
31068 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u1");
31069 0 : return -1;
31070 : }
31071 : {
31072 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u1));
31073 0 : if (PyLong_Check(value)) {
31074 : unsigned long long test_var;
31075 0 : test_var = PyLong_AsUnsignedLongLong(value);
31076 0 : if (PyErr_Occurred() != NULL) {
31077 0 : return -1;
31078 : }
31079 0 : if (test_var > uint_max) {
31080 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31081 : PyLong_Type.tp_name, uint_max, test_var);
31082 0 : return -1;
31083 : }
31084 0 : object->u1 = test_var;
31085 : } else {
31086 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31087 : PyLong_Type.tp_name);
31088 0 : return -1;
31089 : }
31090 : }
31091 0 : return 0;
31092 : }
31093 :
31094 0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_u2(PyObject *obj, void *closure)
31095 : {
31096 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
31097 : PyObject *py_u2;
31098 0 : py_u2 = PyLong_FromUnsignedLongLong((uint32_t)object->u2);
31099 0 : return py_u2;
31100 : }
31101 :
31102 0 : static int py_drsuapi_DsReplicaConnection04_set_u2(PyObject *py_obj, PyObject *value, void *closure)
31103 : {
31104 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
31105 0 : if (value == NULL) {
31106 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u2");
31107 0 : return -1;
31108 : }
31109 : {
31110 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u2));
31111 0 : if (PyLong_Check(value)) {
31112 : unsigned long long test_var;
31113 0 : test_var = PyLong_AsUnsignedLongLong(value);
31114 0 : if (PyErr_Occurred() != NULL) {
31115 0 : return -1;
31116 : }
31117 0 : if (test_var > uint_max) {
31118 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31119 : PyLong_Type.tp_name, uint_max, test_var);
31120 0 : return -1;
31121 : }
31122 0 : object->u2 = test_var;
31123 : } else {
31124 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31125 : PyLong_Type.tp_name);
31126 0 : return -1;
31127 : }
31128 : }
31129 0 : return 0;
31130 : }
31131 :
31132 0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_u3(PyObject *obj, void *closure)
31133 : {
31134 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
31135 : PyObject *py_u3;
31136 0 : py_u3 = PyLong_FromUnsignedLongLong((uint32_t)object->u3);
31137 0 : return py_u3;
31138 : }
31139 :
31140 0 : static int py_drsuapi_DsReplicaConnection04_set_u3(PyObject *py_obj, PyObject *value, void *closure)
31141 : {
31142 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
31143 0 : if (value == NULL) {
31144 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u3");
31145 0 : return -1;
31146 : }
31147 : {
31148 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u3));
31149 0 : if (PyLong_Check(value)) {
31150 : unsigned long long test_var;
31151 0 : test_var = PyLong_AsUnsignedLongLong(value);
31152 0 : if (PyErr_Occurred() != NULL) {
31153 0 : return -1;
31154 : }
31155 0 : if (test_var > uint_max) {
31156 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31157 : PyLong_Type.tp_name, uint_max, test_var);
31158 0 : return -1;
31159 : }
31160 0 : object->u3 = test_var;
31161 : } else {
31162 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31163 : PyLong_Type.tp_name);
31164 0 : return -1;
31165 : }
31166 : }
31167 0 : return 0;
31168 : }
31169 :
31170 0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_bind_guid(PyObject *obj, void *closure)
31171 : {
31172 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
31173 : PyObject *py_bind_guid;
31174 0 : py_bind_guid = pytalloc_reference_ex(GUID_Type, pytalloc_get_mem_ctx(obj), &object->bind_guid);
31175 0 : return py_bind_guid;
31176 : }
31177 :
31178 0 : static int py_drsuapi_DsReplicaConnection04_set_bind_guid(PyObject *py_obj, PyObject *value, void *closure)
31179 : {
31180 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
31181 0 : if (value == NULL) {
31182 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bind_guid");
31183 0 : return -1;
31184 : }
31185 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
31186 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
31187 0 : PyErr_NoMemory();
31188 0 : return -1;
31189 : }
31190 0 : object->bind_guid = *(struct GUID *)pytalloc_get_ptr(value);
31191 0 : return 0;
31192 : }
31193 :
31194 0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_bind_time(PyObject *obj, void *closure)
31195 : {
31196 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
31197 : PyObject *py_bind_time;
31198 0 : py_bind_time = PyLong_FromUnsignedLongLong(object->bind_time);
31199 0 : return py_bind_time;
31200 : }
31201 :
31202 0 : static int py_drsuapi_DsReplicaConnection04_set_bind_time(PyObject *py_obj, PyObject *value, void *closure)
31203 : {
31204 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
31205 0 : if (value == NULL) {
31206 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->bind_time");
31207 0 : return -1;
31208 : }
31209 : {
31210 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->bind_time));
31211 0 : if (PyLong_Check(value)) {
31212 : unsigned long long test_var;
31213 0 : test_var = PyLong_AsUnsignedLongLong(value);
31214 0 : if (PyErr_Occurred() != NULL) {
31215 0 : return -1;
31216 : }
31217 0 : if (test_var > uint_max) {
31218 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31219 : PyLong_Type.tp_name, uint_max, test_var);
31220 0 : return -1;
31221 : }
31222 0 : object->bind_time = test_var;
31223 : } else {
31224 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31225 : PyLong_Type.tp_name);
31226 0 : return -1;
31227 : }
31228 : }
31229 0 : return 0;
31230 : }
31231 :
31232 0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_client_ip_address(PyObject *obj, void *closure)
31233 : {
31234 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
31235 : PyObject *py_client_ip_address;
31236 0 : py_client_ip_address = PyString_FromStringOrNULL(object->client_ip_address);
31237 0 : return py_client_ip_address;
31238 : }
31239 :
31240 0 : static int py_drsuapi_DsReplicaConnection04_set_client_ip_address(PyObject *py_obj, PyObject *value, void *closure)
31241 : {
31242 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
31243 0 : if (value == NULL) {
31244 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->client_ip_address");
31245 0 : return -1;
31246 : }
31247 : {
31248 : const char *test_str;
31249 : const char *talloc_str;
31250 0 : PyObject *unicode = NULL;
31251 0 : if (PyUnicode_Check(value)) {
31252 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31253 0 : if (unicode == NULL) {
31254 0 : PyErr_NoMemory();
31255 0 : return -1;
31256 : }
31257 0 : test_str = PyBytes_AS_STRING(unicode);
31258 0 : } else if (PyBytes_Check(value)) {
31259 0 : test_str = PyBytes_AS_STRING(value);
31260 : } else {
31261 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31262 0 : return -1;
31263 : }
31264 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31265 0 : if (unicode != NULL) {
31266 0 : Py_DECREF(unicode);
31267 : }
31268 0 : if (talloc_str == NULL) {
31269 0 : PyErr_NoMemory();
31270 0 : return -1;
31271 : }
31272 0 : object->client_ip_address = talloc_str;
31273 : }
31274 0 : return 0;
31275 : }
31276 :
31277 0 : static PyObject *py_drsuapi_DsReplicaConnection04_get_u5(PyObject *obj, void *closure)
31278 : {
31279 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(obj);
31280 : PyObject *py_u5;
31281 0 : py_u5 = PyLong_FromUnsignedLongLong((uint32_t)object->u5);
31282 0 : return py_u5;
31283 : }
31284 :
31285 0 : static int py_drsuapi_DsReplicaConnection04_set_u5(PyObject *py_obj, PyObject *value, void *closure)
31286 : {
31287 0 : struct drsuapi_DsReplicaConnection04 *object = (struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(py_obj);
31288 0 : if (value == NULL) {
31289 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u5");
31290 0 : return -1;
31291 : }
31292 : {
31293 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u5));
31294 0 : if (PyLong_Check(value)) {
31295 : unsigned long long test_var;
31296 0 : test_var = PyLong_AsUnsignedLongLong(value);
31297 0 : if (PyErr_Occurred() != NULL) {
31298 0 : return -1;
31299 : }
31300 0 : if (test_var > uint_max) {
31301 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31302 : PyLong_Type.tp_name, uint_max, test_var);
31303 0 : return -1;
31304 : }
31305 0 : object->u5 = test_var;
31306 : } else {
31307 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31308 : PyLong_Type.tp_name);
31309 0 : return -1;
31310 : }
31311 : }
31312 0 : return 0;
31313 : }
31314 :
31315 : static PyGetSetDef py_drsuapi_DsReplicaConnection04_getsetters[] = {
31316 : {
31317 : .name = discard_const_p(char, "u1"),
31318 : .get = py_drsuapi_DsReplicaConnection04_get_u1,
31319 : .set = py_drsuapi_DsReplicaConnection04_set_u1,
31320 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
31321 : },
31322 : {
31323 : .name = discard_const_p(char, "u2"),
31324 : .get = py_drsuapi_DsReplicaConnection04_get_u2,
31325 : .set = py_drsuapi_DsReplicaConnection04_set_u2,
31326 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31327 : },
31328 : {
31329 : .name = discard_const_p(char, "u3"),
31330 : .get = py_drsuapi_DsReplicaConnection04_get_u3,
31331 : .set = py_drsuapi_DsReplicaConnection04_set_u3,
31332 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31333 : },
31334 : {
31335 : .name = discard_const_p(char, "bind_guid"),
31336 : .get = py_drsuapi_DsReplicaConnection04_get_bind_guid,
31337 : .set = py_drsuapi_DsReplicaConnection04_set_bind_guid,
31338 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
31339 : },
31340 : {
31341 : .name = discard_const_p(char, "bind_time"),
31342 : .get = py_drsuapi_DsReplicaConnection04_get_bind_time,
31343 : .set = py_drsuapi_DsReplicaConnection04_set_bind_time,
31344 : .doc = discard_const_p(char, "PIDL-generated element of base type NTTIME_1sec")
31345 : },
31346 : {
31347 : .name = discard_const_p(char, "client_ip_address"),
31348 : .get = py_drsuapi_DsReplicaConnection04_get_client_ip_address,
31349 : .set = py_drsuapi_DsReplicaConnection04_set_client_ip_address,
31350 : .doc = discard_const_p(char, "PIDL-generated element of base type ipv4address")
31351 : },
31352 : {
31353 : .name = discard_const_p(char, "u5"),
31354 : .get = py_drsuapi_DsReplicaConnection04_get_u5,
31355 : .set = py_drsuapi_DsReplicaConnection04_set_u5,
31356 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31357 : },
31358 : { .name = NULL }
31359 : };
31360 :
31361 0 : static PyObject *py_drsuapi_DsReplicaConnection04_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31362 : {
31363 0 : return pytalloc_new(struct drsuapi_DsReplicaConnection04, type);
31364 : }
31365 :
31366 :
31367 : static PyTypeObject drsuapi_DsReplicaConnection04_Type = {
31368 : PyVarObject_HEAD_INIT(NULL, 0)
31369 : .tp_name = "drsuapi.DsReplicaConnection04",
31370 : .tp_getset = py_drsuapi_DsReplicaConnection04_getsetters,
31371 : .tp_methods = NULL,
31372 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31373 : .tp_new = py_drsuapi_DsReplicaConnection04_new,
31374 : };
31375 :
31376 :
31377 0 : static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_count(PyObject *obj, void *closure)
31378 : {
31379 0 : struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(obj);
31380 : PyObject *py_count;
31381 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
31382 0 : return py_count;
31383 : }
31384 :
31385 0 : static int py_drsuapi_DsReplicaConnection04Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
31386 : {
31387 0 : struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(py_obj);
31388 0 : if (value == NULL) {
31389 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
31390 0 : return -1;
31391 : }
31392 : {
31393 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
31394 0 : if (PyLong_Check(value)) {
31395 : unsigned long long test_var;
31396 0 : test_var = PyLong_AsUnsignedLongLong(value);
31397 0 : if (PyErr_Occurred() != NULL) {
31398 0 : return -1;
31399 : }
31400 0 : if (test_var > uint_max) {
31401 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31402 : PyLong_Type.tp_name, uint_max, test_var);
31403 0 : return -1;
31404 : }
31405 0 : object->count = test_var;
31406 : } else {
31407 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31408 : PyLong_Type.tp_name);
31409 0 : return -1;
31410 : }
31411 : }
31412 0 : return 0;
31413 : }
31414 :
31415 0 : static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_reserved(PyObject *obj, void *closure)
31416 : {
31417 0 : struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(obj);
31418 : PyObject *py_reserved;
31419 0 : py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
31420 0 : return py_reserved;
31421 : }
31422 :
31423 0 : static int py_drsuapi_DsReplicaConnection04Ctr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
31424 : {
31425 0 : struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(py_obj);
31426 0 : if (value == NULL) {
31427 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
31428 0 : return -1;
31429 : }
31430 : {
31431 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
31432 0 : if (PyLong_Check(value)) {
31433 : unsigned long long test_var;
31434 0 : test_var = PyLong_AsUnsignedLongLong(value);
31435 0 : if (PyErr_Occurred() != NULL) {
31436 0 : return -1;
31437 : }
31438 0 : if (test_var > uint_max) {
31439 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31440 : PyLong_Type.tp_name, uint_max, test_var);
31441 0 : return -1;
31442 : }
31443 0 : object->reserved = test_var;
31444 : } else {
31445 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31446 : PyLong_Type.tp_name);
31447 0 : return -1;
31448 : }
31449 : }
31450 0 : return 0;
31451 : }
31452 :
31453 0 : static PyObject *py_drsuapi_DsReplicaConnection04Ctr_get_array(PyObject *obj, void *closure)
31454 : {
31455 0 : struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(obj);
31456 : PyObject *py_array;
31457 0 : py_array = PyList_New(object->count);
31458 0 : if (py_array == NULL) {
31459 0 : return NULL;
31460 : }
31461 : {
31462 : int array_cntr_0;
31463 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
31464 : PyObject *py_array_0;
31465 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplicaConnection04_Type, object->array, &object->array[array_cntr_0]);
31466 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
31467 : }
31468 : }
31469 0 : return py_array;
31470 : }
31471 :
31472 0 : static int py_drsuapi_DsReplicaConnection04Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
31473 : {
31474 0 : struct drsuapi_DsReplicaConnection04Ctr *object = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(py_obj);
31475 0 : if (value == NULL) {
31476 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
31477 0 : return -1;
31478 : }
31479 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
31480 : {
31481 : int array_cntr_0;
31482 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
31483 0 : if (!object->array) { return -1;; }
31484 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
31485 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
31486 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
31487 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
31488 0 : return -1;
31489 : }
31490 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaConnection04_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
31491 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
31492 0 : PyErr_NoMemory();
31493 0 : return -1;
31494 : }
31495 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplicaConnection04 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
31496 : }
31497 : }
31498 0 : return 0;
31499 : }
31500 :
31501 : static PyGetSetDef py_drsuapi_DsReplicaConnection04Ctr_getsetters[] = {
31502 : {
31503 : .name = discard_const_p(char, "count"),
31504 : .get = py_drsuapi_DsReplicaConnection04Ctr_get_count,
31505 : .set = py_drsuapi_DsReplicaConnection04Ctr_set_count,
31506 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31507 : },
31508 : {
31509 : .name = discard_const_p(char, "reserved"),
31510 : .get = py_drsuapi_DsReplicaConnection04Ctr_get_reserved,
31511 : .set = py_drsuapi_DsReplicaConnection04Ctr_set_reserved,
31512 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31513 : },
31514 : {
31515 : .name = discard_const_p(char, "array"),
31516 : .get = py_drsuapi_DsReplicaConnection04Ctr_get_array,
31517 : .set = py_drsuapi_DsReplicaConnection04Ctr_set_array,
31518 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaConnection04")
31519 : },
31520 : { .name = NULL }
31521 : };
31522 :
31523 0 : static PyObject *py_drsuapi_DsReplicaConnection04Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31524 : {
31525 0 : return pytalloc_new(struct drsuapi_DsReplicaConnection04Ctr, type);
31526 : }
31527 :
31528 :
31529 : static PyTypeObject drsuapi_DsReplicaConnection04Ctr_Type = {
31530 : PyVarObject_HEAD_INIT(NULL, 0)
31531 : .tp_name = "drsuapi.DsReplicaConnection04Ctr",
31532 : .tp_getset = py_drsuapi_DsReplicaConnection04Ctr_getsetters,
31533 : .tp_methods = NULL,
31534 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31535 : .tp_new = py_drsuapi_DsReplicaConnection04Ctr_new,
31536 : };
31537 :
31538 :
31539 0 : static PyObject *py_drsuapi_DsReplica06_get_str1(PyObject *obj, void *closure)
31540 : {
31541 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
31542 : PyObject *py_str1;
31543 0 : if (object->str1 == NULL) {
31544 0 : Py_RETURN_NONE;
31545 : }
31546 0 : if (object->str1 == NULL) {
31547 0 : py_str1 = Py_None;
31548 0 : Py_INCREF(py_str1);
31549 : } else {
31550 0 : if (object->str1 == NULL) {
31551 0 : py_str1 = Py_None;
31552 0 : Py_INCREF(py_str1);
31553 : } else {
31554 0 : py_str1 = PyUnicode_Decode(object->str1, strlen(object->str1), "utf-8", "ignore");
31555 : }
31556 : }
31557 0 : return py_str1;
31558 : }
31559 :
31560 0 : static int py_drsuapi_DsReplica06_set_str1(PyObject *py_obj, PyObject *value, void *closure)
31561 : {
31562 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
31563 0 : if (value == NULL) {
31564 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->str1");
31565 0 : return -1;
31566 : }
31567 0 : if (value == Py_None) {
31568 0 : object->str1 = NULL;
31569 : } else {
31570 0 : object->str1 = NULL;
31571 : {
31572 : const char *test_str;
31573 : const char *talloc_str;
31574 0 : PyObject *unicode = NULL;
31575 0 : if (PyUnicode_Check(value)) {
31576 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31577 0 : if (unicode == NULL) {
31578 0 : PyErr_NoMemory();
31579 0 : return -1;
31580 : }
31581 0 : test_str = PyBytes_AS_STRING(unicode);
31582 0 : } else if (PyBytes_Check(value)) {
31583 0 : test_str = PyBytes_AS_STRING(value);
31584 : } else {
31585 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31586 0 : return -1;
31587 : }
31588 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31589 0 : if (unicode != NULL) {
31590 0 : Py_DECREF(unicode);
31591 : }
31592 0 : if (talloc_str == NULL) {
31593 0 : PyErr_NoMemory();
31594 0 : return -1;
31595 : }
31596 0 : object->str1 = talloc_str;
31597 : }
31598 : }
31599 0 : return 0;
31600 : }
31601 :
31602 0 : static PyObject *py_drsuapi_DsReplica06_get_u1(PyObject *obj, void *closure)
31603 : {
31604 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
31605 : PyObject *py_u1;
31606 0 : py_u1 = PyLong_FromUnsignedLongLong((uint32_t)object->u1);
31607 0 : return py_u1;
31608 : }
31609 :
31610 0 : static int py_drsuapi_DsReplica06_set_u1(PyObject *py_obj, PyObject *value, void *closure)
31611 : {
31612 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
31613 0 : if (value == NULL) {
31614 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u1");
31615 0 : return -1;
31616 : }
31617 : {
31618 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u1));
31619 0 : if (PyLong_Check(value)) {
31620 : unsigned long long test_var;
31621 0 : test_var = PyLong_AsUnsignedLongLong(value);
31622 0 : if (PyErr_Occurred() != NULL) {
31623 0 : return -1;
31624 : }
31625 0 : if (test_var > uint_max) {
31626 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31627 : PyLong_Type.tp_name, uint_max, test_var);
31628 0 : return -1;
31629 : }
31630 0 : object->u1 = test_var;
31631 : } else {
31632 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31633 : PyLong_Type.tp_name);
31634 0 : return -1;
31635 : }
31636 : }
31637 0 : return 0;
31638 : }
31639 :
31640 0 : static PyObject *py_drsuapi_DsReplica06_get_u2(PyObject *obj, void *closure)
31641 : {
31642 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
31643 : PyObject *py_u2;
31644 0 : py_u2 = PyLong_FromUnsignedLongLong((uint32_t)object->u2);
31645 0 : return py_u2;
31646 : }
31647 :
31648 0 : static int py_drsuapi_DsReplica06_set_u2(PyObject *py_obj, PyObject *value, void *closure)
31649 : {
31650 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
31651 0 : if (value == NULL) {
31652 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u2");
31653 0 : return -1;
31654 : }
31655 : {
31656 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u2));
31657 0 : if (PyLong_Check(value)) {
31658 : unsigned long long test_var;
31659 0 : test_var = PyLong_AsUnsignedLongLong(value);
31660 0 : if (PyErr_Occurred() != NULL) {
31661 0 : return -1;
31662 : }
31663 0 : if (test_var > uint_max) {
31664 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31665 : PyLong_Type.tp_name, uint_max, test_var);
31666 0 : return -1;
31667 : }
31668 0 : object->u2 = test_var;
31669 : } else {
31670 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31671 : PyLong_Type.tp_name);
31672 0 : return -1;
31673 : }
31674 : }
31675 0 : return 0;
31676 : }
31677 :
31678 0 : static PyObject *py_drsuapi_DsReplica06_get_u3(PyObject *obj, void *closure)
31679 : {
31680 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
31681 : PyObject *py_u3;
31682 0 : py_u3 = PyLong_FromUnsignedLongLong((uint32_t)object->u3);
31683 0 : return py_u3;
31684 : }
31685 :
31686 0 : static int py_drsuapi_DsReplica06_set_u3(PyObject *py_obj, PyObject *value, void *closure)
31687 : {
31688 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
31689 0 : if (value == NULL) {
31690 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u3");
31691 0 : return -1;
31692 : }
31693 : {
31694 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u3));
31695 0 : if (PyLong_Check(value)) {
31696 : unsigned long long test_var;
31697 0 : test_var = PyLong_AsUnsignedLongLong(value);
31698 0 : if (PyErr_Occurred() != NULL) {
31699 0 : return -1;
31700 : }
31701 0 : if (test_var > uint_max) {
31702 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31703 : PyLong_Type.tp_name, uint_max, test_var);
31704 0 : return -1;
31705 : }
31706 0 : object->u3 = test_var;
31707 : } else {
31708 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31709 : PyLong_Type.tp_name);
31710 0 : return -1;
31711 : }
31712 : }
31713 0 : return 0;
31714 : }
31715 :
31716 0 : static PyObject *py_drsuapi_DsReplica06_get_u4(PyObject *obj, void *closure)
31717 : {
31718 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
31719 : PyObject *py_u4;
31720 0 : py_u4 = PyLong_FromUnsignedLongLong((uint32_t)object->u4);
31721 0 : return py_u4;
31722 : }
31723 :
31724 0 : static int py_drsuapi_DsReplica06_set_u4(PyObject *py_obj, PyObject *value, void *closure)
31725 : {
31726 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
31727 0 : if (value == NULL) {
31728 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u4");
31729 0 : return -1;
31730 : }
31731 : {
31732 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u4));
31733 0 : if (PyLong_Check(value)) {
31734 : unsigned long long test_var;
31735 0 : test_var = PyLong_AsUnsignedLongLong(value);
31736 0 : if (PyErr_Occurred() != NULL) {
31737 0 : return -1;
31738 : }
31739 0 : if (test_var > uint_max) {
31740 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31741 : PyLong_Type.tp_name, uint_max, test_var);
31742 0 : return -1;
31743 : }
31744 0 : object->u4 = test_var;
31745 : } else {
31746 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31747 : PyLong_Type.tp_name);
31748 0 : return -1;
31749 : }
31750 : }
31751 0 : return 0;
31752 : }
31753 :
31754 0 : static PyObject *py_drsuapi_DsReplica06_get_u5(PyObject *obj, void *closure)
31755 : {
31756 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
31757 : PyObject *py_u5;
31758 0 : py_u5 = PyLong_FromUnsignedLongLong((uint32_t)object->u5);
31759 0 : return py_u5;
31760 : }
31761 :
31762 0 : static int py_drsuapi_DsReplica06_set_u5(PyObject *py_obj, PyObject *value, void *closure)
31763 : {
31764 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
31765 0 : if (value == NULL) {
31766 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u5");
31767 0 : return -1;
31768 : }
31769 : {
31770 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u5));
31771 0 : if (PyLong_Check(value)) {
31772 : unsigned long long test_var;
31773 0 : test_var = PyLong_AsUnsignedLongLong(value);
31774 0 : if (PyErr_Occurred() != NULL) {
31775 0 : return -1;
31776 : }
31777 0 : if (test_var > uint_max) {
31778 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31779 : PyLong_Type.tp_name, uint_max, test_var);
31780 0 : return -1;
31781 : }
31782 0 : object->u5 = test_var;
31783 : } else {
31784 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31785 : PyLong_Type.tp_name);
31786 0 : return -1;
31787 : }
31788 : }
31789 0 : return 0;
31790 : }
31791 :
31792 0 : static PyObject *py_drsuapi_DsReplica06_get_u6(PyObject *obj, void *closure)
31793 : {
31794 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
31795 : PyObject *py_u6;
31796 0 : py_u6 = PyLong_FromUnsignedLongLong(object->u6);
31797 0 : return py_u6;
31798 : }
31799 :
31800 0 : static int py_drsuapi_DsReplica06_set_u6(PyObject *py_obj, PyObject *value, void *closure)
31801 : {
31802 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
31803 0 : if (value == NULL) {
31804 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u6");
31805 0 : return -1;
31806 : }
31807 : {
31808 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u6));
31809 0 : if (PyLong_Check(value)) {
31810 : unsigned long long test_var;
31811 0 : test_var = PyLong_AsUnsignedLongLong(value);
31812 0 : if (PyErr_Occurred() != NULL) {
31813 0 : return -1;
31814 : }
31815 0 : if (test_var > uint_max) {
31816 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31817 : PyLong_Type.tp_name, uint_max, test_var);
31818 0 : return -1;
31819 : }
31820 0 : object->u6 = test_var;
31821 : } else {
31822 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31823 : PyLong_Type.tp_name);
31824 0 : return -1;
31825 : }
31826 : }
31827 0 : return 0;
31828 : }
31829 :
31830 0 : static PyObject *py_drsuapi_DsReplica06_get_u7(PyObject *obj, void *closure)
31831 : {
31832 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(obj);
31833 : PyObject *py_u7;
31834 0 : py_u7 = PyLong_FromUnsignedLongLong((uint32_t)object->u7);
31835 0 : return py_u7;
31836 : }
31837 :
31838 0 : static int py_drsuapi_DsReplica06_set_u7(PyObject *py_obj, PyObject *value, void *closure)
31839 : {
31840 0 : struct drsuapi_DsReplica06 *object = (struct drsuapi_DsReplica06 *)pytalloc_get_ptr(py_obj);
31841 0 : if (value == NULL) {
31842 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->u7");
31843 0 : return -1;
31844 : }
31845 : {
31846 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->u7));
31847 0 : if (PyLong_Check(value)) {
31848 : unsigned long long test_var;
31849 0 : test_var = PyLong_AsUnsignedLongLong(value);
31850 0 : if (PyErr_Occurred() != NULL) {
31851 0 : return -1;
31852 : }
31853 0 : if (test_var > uint_max) {
31854 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31855 : PyLong_Type.tp_name, uint_max, test_var);
31856 0 : return -1;
31857 : }
31858 0 : object->u7 = test_var;
31859 : } else {
31860 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31861 : PyLong_Type.tp_name);
31862 0 : return -1;
31863 : }
31864 : }
31865 0 : return 0;
31866 : }
31867 :
31868 : static PyGetSetDef py_drsuapi_DsReplica06_getsetters[] = {
31869 : {
31870 : .name = discard_const_p(char, "str1"),
31871 : .get = py_drsuapi_DsReplica06_get_str1,
31872 : .set = py_drsuapi_DsReplica06_set_str1,
31873 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
31874 : },
31875 : {
31876 : .name = discard_const_p(char, "u1"),
31877 : .get = py_drsuapi_DsReplica06_get_u1,
31878 : .set = py_drsuapi_DsReplica06_set_u1,
31879 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31880 : },
31881 : {
31882 : .name = discard_const_p(char, "u2"),
31883 : .get = py_drsuapi_DsReplica06_get_u2,
31884 : .set = py_drsuapi_DsReplica06_set_u2,
31885 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31886 : },
31887 : {
31888 : .name = discard_const_p(char, "u3"),
31889 : .get = py_drsuapi_DsReplica06_get_u3,
31890 : .set = py_drsuapi_DsReplica06_set_u3,
31891 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31892 : },
31893 : {
31894 : .name = discard_const_p(char, "u4"),
31895 : .get = py_drsuapi_DsReplica06_get_u4,
31896 : .set = py_drsuapi_DsReplica06_set_u4,
31897 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31898 : },
31899 : {
31900 : .name = discard_const_p(char, "u5"),
31901 : .get = py_drsuapi_DsReplica06_get_u5,
31902 : .set = py_drsuapi_DsReplica06_set_u5,
31903 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31904 : },
31905 : {
31906 : .name = discard_const_p(char, "u6"),
31907 : .get = py_drsuapi_DsReplica06_get_u6,
31908 : .set = py_drsuapi_DsReplica06_set_u6,
31909 : .doc = discard_const_p(char, "PIDL-generated element of base type hyper")
31910 : },
31911 : {
31912 : .name = discard_const_p(char, "u7"),
31913 : .get = py_drsuapi_DsReplica06_get_u7,
31914 : .set = py_drsuapi_DsReplica06_set_u7,
31915 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
31916 : },
31917 : { .name = NULL }
31918 : };
31919 :
31920 0 : static PyObject *py_drsuapi_DsReplica06_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31921 : {
31922 0 : return pytalloc_new(struct drsuapi_DsReplica06, type);
31923 : }
31924 :
31925 :
31926 : static PyTypeObject drsuapi_DsReplica06_Type = {
31927 : PyVarObject_HEAD_INIT(NULL, 0)
31928 : .tp_name = "drsuapi.DsReplica06",
31929 : .tp_getset = py_drsuapi_DsReplica06_getsetters,
31930 : .tp_methods = NULL,
31931 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31932 : .tp_new = py_drsuapi_DsReplica06_new,
31933 : };
31934 :
31935 :
31936 0 : static PyObject *py_drsuapi_DsReplica06Ctr_get_count(PyObject *obj, void *closure)
31937 : {
31938 0 : struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(obj);
31939 : PyObject *py_count;
31940 0 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
31941 0 : return py_count;
31942 : }
31943 :
31944 0 : static int py_drsuapi_DsReplica06Ctr_set_count(PyObject *py_obj, PyObject *value, void *closure)
31945 : {
31946 0 : struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(py_obj);
31947 0 : if (value == NULL) {
31948 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
31949 0 : return -1;
31950 : }
31951 : {
31952 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
31953 0 : if (PyLong_Check(value)) {
31954 : unsigned long long test_var;
31955 0 : test_var = PyLong_AsUnsignedLongLong(value);
31956 0 : if (PyErr_Occurred() != NULL) {
31957 0 : return -1;
31958 : }
31959 0 : if (test_var > uint_max) {
31960 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31961 : PyLong_Type.tp_name, uint_max, test_var);
31962 0 : return -1;
31963 : }
31964 0 : object->count = test_var;
31965 : } else {
31966 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31967 : PyLong_Type.tp_name);
31968 0 : return -1;
31969 : }
31970 : }
31971 0 : return 0;
31972 : }
31973 :
31974 0 : static PyObject *py_drsuapi_DsReplica06Ctr_get_reserved(PyObject *obj, void *closure)
31975 : {
31976 0 : struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(obj);
31977 : PyObject *py_reserved;
31978 0 : py_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->reserved);
31979 0 : return py_reserved;
31980 : }
31981 :
31982 0 : static int py_drsuapi_DsReplica06Ctr_set_reserved(PyObject *py_obj, PyObject *value, void *closure)
31983 : {
31984 0 : struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(py_obj);
31985 0 : if (value == NULL) {
31986 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->reserved");
31987 0 : return -1;
31988 : }
31989 : {
31990 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->reserved));
31991 0 : if (PyLong_Check(value)) {
31992 : unsigned long long test_var;
31993 0 : test_var = PyLong_AsUnsignedLongLong(value);
31994 0 : if (PyErr_Occurred() != NULL) {
31995 0 : return -1;
31996 : }
31997 0 : if (test_var > uint_max) {
31998 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31999 : PyLong_Type.tp_name, uint_max, test_var);
32000 0 : return -1;
32001 : }
32002 0 : object->reserved = test_var;
32003 : } else {
32004 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32005 : PyLong_Type.tp_name);
32006 0 : return -1;
32007 : }
32008 : }
32009 0 : return 0;
32010 : }
32011 :
32012 0 : static PyObject *py_drsuapi_DsReplica06Ctr_get_array(PyObject *obj, void *closure)
32013 : {
32014 0 : struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(obj);
32015 : PyObject *py_array;
32016 0 : py_array = PyList_New(object->count);
32017 0 : if (py_array == NULL) {
32018 0 : return NULL;
32019 : }
32020 : {
32021 : int array_cntr_0;
32022 0 : for (array_cntr_0 = 0; array_cntr_0 < (object->count); array_cntr_0++) {
32023 : PyObject *py_array_0;
32024 0 : py_array_0 = pytalloc_reference_ex(&drsuapi_DsReplica06_Type, object->array, &object->array[array_cntr_0]);
32025 0 : PyList_SetItem(py_array, array_cntr_0, py_array_0);
32026 : }
32027 : }
32028 0 : return py_array;
32029 : }
32030 :
32031 0 : static int py_drsuapi_DsReplica06Ctr_set_array(PyObject *py_obj, PyObject *value, void *closure)
32032 : {
32033 0 : struct drsuapi_DsReplica06Ctr *object = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(py_obj);
32034 0 : if (value == NULL) {
32035 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array");
32036 0 : return -1;
32037 : }
32038 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
32039 : {
32040 : int array_cntr_0;
32041 0 : object->array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->array, PyList_GET_SIZE(value));
32042 0 : if (!object->array) { return -1;; }
32043 0 : talloc_set_name_const(object->array, "ARRAY: object->array");
32044 0 : for (array_cntr_0 = 0; array_cntr_0 < PyList_GET_SIZE(value); array_cntr_0++) {
32045 0 : if (PyList_GET_ITEM(value, array_cntr_0) == NULL) {
32046 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->array[array_cntr_0]");
32047 0 : return -1;
32048 : }
32049 0 : PY_CHECK_TYPE(&drsuapi_DsReplica06_Type, PyList_GET_ITEM(value, array_cntr_0), return -1;);
32050 0 : if (talloc_reference(object->array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, array_cntr_0))) == NULL) {
32051 0 : PyErr_NoMemory();
32052 0 : return -1;
32053 : }
32054 0 : object->array[array_cntr_0] = *(struct drsuapi_DsReplica06 *)pytalloc_get_ptr(PyList_GET_ITEM(value, array_cntr_0));
32055 : }
32056 : }
32057 0 : return 0;
32058 : }
32059 :
32060 : static PyGetSetDef py_drsuapi_DsReplica06Ctr_getsetters[] = {
32061 : {
32062 : .name = discard_const_p(char, "count"),
32063 : .get = py_drsuapi_DsReplica06Ctr_get_count,
32064 : .set = py_drsuapi_DsReplica06Ctr_set_count,
32065 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
32066 : },
32067 : {
32068 : .name = discard_const_p(char, "reserved"),
32069 : .get = py_drsuapi_DsReplica06Ctr_get_reserved,
32070 : .set = py_drsuapi_DsReplica06Ctr_set_reserved,
32071 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
32072 : },
32073 : {
32074 : .name = discard_const_p(char, "array"),
32075 : .get = py_drsuapi_DsReplica06Ctr_get_array,
32076 : .set = py_drsuapi_DsReplica06Ctr_set_array,
32077 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplica06")
32078 : },
32079 : { .name = NULL }
32080 : };
32081 :
32082 0 : static PyObject *py_drsuapi_DsReplica06Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32083 : {
32084 0 : return pytalloc_new(struct drsuapi_DsReplica06Ctr, type);
32085 : }
32086 :
32087 :
32088 : static PyTypeObject drsuapi_DsReplica06Ctr_Type = {
32089 : PyVarObject_HEAD_INIT(NULL, 0)
32090 : .tp_name = "drsuapi.DsReplica06Ctr",
32091 : .tp_getset = py_drsuapi_DsReplica06Ctr_getsetters,
32092 : .tp_methods = NULL,
32093 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
32094 : .tp_new = py_drsuapi_DsReplica06Ctr_new,
32095 : };
32096 :
32097 18 : static PyObject *py_import_drsuapi_DsReplicaInfo(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsReplicaInfo *in)
32098 : {
32099 : PyObject *ret;
32100 :
32101 18 : switch (level) {
32102 9 : case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
32103 9 : if (in->neighbours == NULL) {
32104 0 : ret = Py_None;
32105 0 : Py_INCREF(ret);
32106 : } else {
32107 9 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbourCtr_Type, in->neighbours, in->neighbours);
32108 : }
32109 9 : return ret;
32110 :
32111 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS:
32112 0 : if (in->cursors == NULL) {
32113 0 : ret = Py_None;
32114 0 : Py_INCREF(ret);
32115 : } else {
32116 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtr_Type, in->cursors, in->cursors);
32117 : }
32118 0 : return ret;
32119 :
32120 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
32121 0 : if (in->objmetadata == NULL) {
32122 0 : ret = Py_None;
32123 0 : Py_INCREF(ret);
32124 : } else {
32125 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaDataCtr_Type, in->objmetadata, in->objmetadata);
32126 : }
32127 0 : return ret;
32128 :
32129 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
32130 0 : if (in->connectfailures == NULL) {
32131 0 : ret = Py_None;
32132 0 : Py_INCREF(ret);
32133 : } else {
32134 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in->connectfailures, in->connectfailures);
32135 : }
32136 0 : return ret;
32137 :
32138 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
32139 0 : if (in->linkfailures == NULL) {
32140 0 : ret = Py_None;
32141 0 : Py_INCREF(ret);
32142 : } else {
32143 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in->linkfailures, in->linkfailures);
32144 : }
32145 0 : return ret;
32146 :
32147 0 : case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
32148 0 : if (in->pendingops == NULL) {
32149 0 : ret = Py_None;
32150 0 : Py_INCREF(ret);
32151 : } else {
32152 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaOpCtr_Type, in->pendingops, in->pendingops);
32153 : }
32154 0 : return ret;
32155 :
32156 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
32157 0 : if (in->attrvalmetadata == NULL) {
32158 0 : ret = Py_None;
32159 0 : Py_INCREF(ret);
32160 : } else {
32161 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaDataCtr_Type, in->attrvalmetadata, in->attrvalmetadata);
32162 : }
32163 0 : return ret;
32164 :
32165 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
32166 0 : if (in->cursors2 == NULL) {
32167 0 : ret = Py_None;
32168 0 : Py_INCREF(ret);
32169 : } else {
32170 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursor2Ctr_Type, in->cursors2, in->cursors2);
32171 : }
32172 0 : return ret;
32173 :
32174 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
32175 0 : if (in->cursors3 == NULL) {
32176 0 : ret = Py_None;
32177 0 : Py_INCREF(ret);
32178 : } else {
32179 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursor3Ctr_Type, in->cursors3, in->cursors3);
32180 : }
32181 0 : return ret;
32182 :
32183 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
32184 0 : if (in->objmetadata2 == NULL) {
32185 0 : ret = Py_None;
32186 0 : Py_INCREF(ret);
32187 : } else {
32188 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaObjMetaData2Ctr_Type, in->objmetadata2, in->objmetadata2);
32189 : }
32190 0 : return ret;
32191 :
32192 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
32193 0 : if (in->attrvalmetadata2 == NULL) {
32194 0 : ret = Py_None;
32195 0 : Py_INCREF(ret);
32196 : } else {
32197 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type, in->attrvalmetadata2, in->attrvalmetadata2);
32198 : }
32199 0 : return ret;
32200 :
32201 9 : case DRSUAPI_DS_REPLICA_INFO_REPSTO:
32202 9 : if (in->repsto == NULL) {
32203 0 : ret = Py_None;
32204 0 : Py_INCREF(ret);
32205 : } else {
32206 9 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaNeighbourCtr_Type, in->repsto, in->repsto);
32207 : }
32208 9 : return ret;
32209 :
32210 0 : case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
32211 0 : if (in->clientctx == NULL) {
32212 0 : ret = Py_None;
32213 0 : Py_INCREF(ret);
32214 : } else {
32215 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaConnection04Ctr_Type, in->clientctx, in->clientctx);
32216 : }
32217 0 : return ret;
32218 :
32219 0 : case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
32220 0 : if (in->udv1 == NULL) {
32221 0 : ret = Py_None;
32222 0 : Py_INCREF(ret);
32223 : } else {
32224 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplicaCursorCtrEx_Type, in->udv1, in->udv1);
32225 : }
32226 0 : return ret;
32227 :
32228 0 : case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
32229 0 : if (in->srvoutgoingcalls == NULL) {
32230 0 : ret = Py_None;
32231 0 : Py_INCREF(ret);
32232 : } else {
32233 0 : ret = pytalloc_reference_ex(&drsuapi_DsReplica06Ctr_Type, in->srvoutgoingcalls, in->srvoutgoingcalls);
32234 : }
32235 0 : return ret;
32236 :
32237 : }
32238 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
32239 0 : return NULL;
32240 : }
32241 :
32242 0 : static union drsuapi_DsReplicaInfo *py_export_drsuapi_DsReplicaInfo(TALLOC_CTX *mem_ctx, int level, PyObject *in)
32243 : {
32244 0 : union drsuapi_DsReplicaInfo *ret = talloc_zero(mem_ctx, union drsuapi_DsReplicaInfo);
32245 0 : switch (level) {
32246 0 : case DRSUAPI_DS_REPLICA_INFO_NEIGHBORS:
32247 0 : if (in == NULL) {
32248 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->neighbours");
32249 0 : talloc_free(ret); return NULL;
32250 : }
32251 0 : if (in == Py_None) {
32252 0 : ret->neighbours = NULL;
32253 : } else {
32254 0 : ret->neighbours = NULL;
32255 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbourCtr_Type, in, talloc_free(ret); return NULL;);
32256 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32257 0 : PyErr_NoMemory();
32258 0 : talloc_free(ret); return NULL;
32259 : }
32260 0 : ret->neighbours = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(in);
32261 : }
32262 0 : break;
32263 :
32264 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS:
32265 0 : if (in == NULL) {
32266 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->cursors");
32267 0 : talloc_free(ret); return NULL;
32268 : }
32269 0 : if (in == Py_None) {
32270 0 : ret->cursors = NULL;
32271 : } else {
32272 0 : ret->cursors = NULL;
32273 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtr_Type, in, talloc_free(ret); return NULL;);
32274 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32275 0 : PyErr_NoMemory();
32276 0 : talloc_free(ret); return NULL;
32277 : }
32278 0 : ret->cursors = (struct drsuapi_DsReplicaCursorCtr *)pytalloc_get_ptr(in);
32279 : }
32280 0 : break;
32281 :
32282 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA:
32283 0 : if (in == NULL) {
32284 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->objmetadata");
32285 0 : talloc_free(ret); return NULL;
32286 : }
32287 0 : if (in == Py_None) {
32288 0 : ret->objmetadata = NULL;
32289 : } else {
32290 0 : ret->objmetadata = NULL;
32291 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaDataCtr_Type, in, talloc_free(ret); return NULL;);
32292 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32293 0 : PyErr_NoMemory();
32294 0 : talloc_free(ret); return NULL;
32295 : }
32296 0 : ret->objmetadata = (struct drsuapi_DsReplicaObjMetaDataCtr *)pytalloc_get_ptr(in);
32297 : }
32298 0 : break;
32299 :
32300 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES:
32301 0 : if (in == NULL) {
32302 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->connectfailures");
32303 0 : talloc_free(ret); return NULL;
32304 : }
32305 0 : if (in == Py_None) {
32306 0 : ret->connectfailures = NULL;
32307 : } else {
32308 0 : ret->connectfailures = NULL;
32309 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in, talloc_free(ret); return NULL;);
32310 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32311 0 : PyErr_NoMemory();
32312 0 : talloc_free(ret); return NULL;
32313 : }
32314 0 : ret->connectfailures = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(in);
32315 : }
32316 0 : break;
32317 :
32318 0 : case DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES:
32319 0 : if (in == NULL) {
32320 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->linkfailures");
32321 0 : talloc_free(ret); return NULL;
32322 : }
32323 0 : if (in == Py_None) {
32324 0 : ret->linkfailures = NULL;
32325 : } else {
32326 0 : ret->linkfailures = NULL;
32327 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaKccDsaFailuresCtr_Type, in, talloc_free(ret); return NULL;);
32328 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32329 0 : PyErr_NoMemory();
32330 0 : talloc_free(ret); return NULL;
32331 : }
32332 0 : ret->linkfailures = (struct drsuapi_DsReplicaKccDsaFailuresCtr *)pytalloc_get_ptr(in);
32333 : }
32334 0 : break;
32335 :
32336 0 : case DRSUAPI_DS_REPLICA_INFO_PENDING_OPS:
32337 0 : if (in == NULL) {
32338 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->pendingops");
32339 0 : talloc_free(ret); return NULL;
32340 : }
32341 0 : if (in == Py_None) {
32342 0 : ret->pendingops = NULL;
32343 : } else {
32344 0 : ret->pendingops = NULL;
32345 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaOpCtr_Type, in, talloc_free(ret); return NULL;);
32346 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32347 0 : PyErr_NoMemory();
32348 0 : talloc_free(ret); return NULL;
32349 : }
32350 0 : ret->pendingops = (struct drsuapi_DsReplicaOpCtr *)pytalloc_get_ptr(in);
32351 : }
32352 0 : break;
32353 :
32354 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA:
32355 0 : if (in == NULL) {
32356 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->attrvalmetadata");
32357 0 : talloc_free(ret); return NULL;
32358 : }
32359 0 : if (in == Py_None) {
32360 0 : ret->attrvalmetadata = NULL;
32361 : } else {
32362 0 : ret->attrvalmetadata = NULL;
32363 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaDataCtr_Type, in, talloc_free(ret); return NULL;);
32364 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32365 0 : PyErr_NoMemory();
32366 0 : talloc_free(ret); return NULL;
32367 : }
32368 0 : ret->attrvalmetadata = (struct drsuapi_DsReplicaAttrValMetaDataCtr *)pytalloc_get_ptr(in);
32369 : }
32370 0 : break;
32371 :
32372 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS2:
32373 0 : if (in == NULL) {
32374 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->cursors2");
32375 0 : talloc_free(ret); return NULL;
32376 : }
32377 0 : if (in == Py_None) {
32378 0 : ret->cursors2 = NULL;
32379 : } else {
32380 0 : ret->cursors2 = NULL;
32381 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursor2Ctr_Type, in, talloc_free(ret); return NULL;);
32382 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32383 0 : PyErr_NoMemory();
32384 0 : talloc_free(ret); return NULL;
32385 : }
32386 0 : ret->cursors2 = (struct drsuapi_DsReplicaCursor2Ctr *)pytalloc_get_ptr(in);
32387 : }
32388 0 : break;
32389 :
32390 0 : case DRSUAPI_DS_REPLICA_INFO_CURSORS3:
32391 0 : if (in == NULL) {
32392 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->cursors3");
32393 0 : talloc_free(ret); return NULL;
32394 : }
32395 0 : if (in == Py_None) {
32396 0 : ret->cursors3 = NULL;
32397 : } else {
32398 0 : ret->cursors3 = NULL;
32399 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursor3Ctr_Type, in, talloc_free(ret); return NULL;);
32400 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32401 0 : PyErr_NoMemory();
32402 0 : talloc_free(ret); return NULL;
32403 : }
32404 0 : ret->cursors3 = (struct drsuapi_DsReplicaCursor3Ctr *)pytalloc_get_ptr(in);
32405 : }
32406 0 : break;
32407 :
32408 0 : case DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2:
32409 0 : if (in == NULL) {
32410 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->objmetadata2");
32411 0 : talloc_free(ret); return NULL;
32412 : }
32413 0 : if (in == Py_None) {
32414 0 : ret->objmetadata2 = NULL;
32415 : } else {
32416 0 : ret->objmetadata2 = NULL;
32417 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaObjMetaData2Ctr_Type, in, talloc_free(ret); return NULL;);
32418 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32419 0 : PyErr_NoMemory();
32420 0 : talloc_free(ret); return NULL;
32421 : }
32422 0 : ret->objmetadata2 = (struct drsuapi_DsReplicaObjMetaData2Ctr *)pytalloc_get_ptr(in);
32423 : }
32424 0 : break;
32425 :
32426 0 : case DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2:
32427 0 : if (in == NULL) {
32428 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->attrvalmetadata2");
32429 0 : talloc_free(ret); return NULL;
32430 : }
32431 0 : if (in == Py_None) {
32432 0 : ret->attrvalmetadata2 = NULL;
32433 : } else {
32434 0 : ret->attrvalmetadata2 = NULL;
32435 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type, in, talloc_free(ret); return NULL;);
32436 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32437 0 : PyErr_NoMemory();
32438 0 : talloc_free(ret); return NULL;
32439 : }
32440 0 : ret->attrvalmetadata2 = (struct drsuapi_DsReplicaAttrValMetaData2Ctr *)pytalloc_get_ptr(in);
32441 : }
32442 0 : break;
32443 :
32444 0 : case DRSUAPI_DS_REPLICA_INFO_REPSTO:
32445 0 : if (in == NULL) {
32446 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->repsto");
32447 0 : talloc_free(ret); return NULL;
32448 : }
32449 0 : if (in == Py_None) {
32450 0 : ret->repsto = NULL;
32451 : } else {
32452 0 : ret->repsto = NULL;
32453 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaNeighbourCtr_Type, in, talloc_free(ret); return NULL;);
32454 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32455 0 : PyErr_NoMemory();
32456 0 : talloc_free(ret); return NULL;
32457 : }
32458 0 : ret->repsto = (struct drsuapi_DsReplicaNeighbourCtr *)pytalloc_get_ptr(in);
32459 : }
32460 0 : break;
32461 :
32462 0 : case DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS:
32463 0 : if (in == NULL) {
32464 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->clientctx");
32465 0 : talloc_free(ret); return NULL;
32466 : }
32467 0 : if (in == Py_None) {
32468 0 : ret->clientctx = NULL;
32469 : } else {
32470 0 : ret->clientctx = NULL;
32471 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaConnection04Ctr_Type, in, talloc_free(ret); return NULL;);
32472 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32473 0 : PyErr_NoMemory();
32474 0 : talloc_free(ret); return NULL;
32475 : }
32476 0 : ret->clientctx = (struct drsuapi_DsReplicaConnection04Ctr *)pytalloc_get_ptr(in);
32477 : }
32478 0 : break;
32479 :
32480 0 : case DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1:
32481 0 : if (in == NULL) {
32482 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->udv1");
32483 0 : talloc_free(ret); return NULL;
32484 : }
32485 0 : if (in == Py_None) {
32486 0 : ret->udv1 = NULL;
32487 : } else {
32488 0 : ret->udv1 = NULL;
32489 0 : PY_CHECK_TYPE(&drsuapi_DsReplicaCursorCtrEx_Type, in, talloc_free(ret); return NULL;);
32490 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32491 0 : PyErr_NoMemory();
32492 0 : talloc_free(ret); return NULL;
32493 : }
32494 0 : ret->udv1 = (struct drsuapi_DsReplicaCursorCtrEx *)pytalloc_get_ptr(in);
32495 : }
32496 0 : break;
32497 :
32498 0 : case DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS:
32499 0 : if (in == NULL) {
32500 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->srvoutgoingcalls");
32501 0 : talloc_free(ret); return NULL;
32502 : }
32503 0 : if (in == Py_None) {
32504 0 : ret->srvoutgoingcalls = NULL;
32505 : } else {
32506 0 : ret->srvoutgoingcalls = NULL;
32507 0 : PY_CHECK_TYPE(&drsuapi_DsReplica06Ctr_Type, in, talloc_free(ret); return NULL;);
32508 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32509 0 : PyErr_NoMemory();
32510 0 : talloc_free(ret); return NULL;
32511 : }
32512 0 : ret->srvoutgoingcalls = (struct drsuapi_DsReplica06Ctr *)pytalloc_get_ptr(in);
32513 : }
32514 0 : break;
32515 :
32516 0 : default:
32517 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
32518 0 : talloc_free(ret);
32519 0 : ret = NULL;
32520 : }
32521 :
32522 0 : return ret;
32523 : }
32524 :
32525 18 : static PyObject *py_drsuapi_DsReplicaInfo_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32526 : {
32527 18 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
32528 18 : PyObject *mem_ctx_obj = NULL;
32529 18 : TALLOC_CTX *mem_ctx = NULL;
32530 18 : int level = 0;
32531 18 : PyObject *in_obj = NULL;
32532 18 : union drsuapi_DsReplicaInfo *in = NULL;
32533 :
32534 18 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
32535 : discard_const_p(char *, kwnames),
32536 : &mem_ctx_obj,
32537 : &level,
32538 : &in_obj)) {
32539 0 : return NULL;
32540 : }
32541 18 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
32542 18 : if (mem_ctx == NULL) {
32543 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
32544 0 : return NULL;
32545 : }
32546 18 : in = (union drsuapi_DsReplicaInfo *)pytalloc_get_ptr(in_obj);
32547 18 : if (in == NULL) {
32548 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsReplicaInfo!");
32549 0 : return NULL;
32550 : }
32551 :
32552 18 : return py_import_drsuapi_DsReplicaInfo(mem_ctx, level, in);
32553 : }
32554 :
32555 0 : static PyObject *py_drsuapi_DsReplicaInfo_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32556 : {
32557 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
32558 0 : PyObject *mem_ctx_obj = NULL;
32559 0 : TALLOC_CTX *mem_ctx = NULL;
32560 0 : int level = 0;
32561 0 : PyObject *in = NULL;
32562 0 : union drsuapi_DsReplicaInfo *out = NULL;
32563 :
32564 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
32565 : discard_const_p(char *, kwnames),
32566 : &mem_ctx_obj,
32567 : &level,
32568 : &in)) {
32569 0 : return NULL;
32570 : }
32571 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
32572 0 : if (mem_ctx == NULL) {
32573 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
32574 0 : return NULL;
32575 : }
32576 :
32577 0 : out = py_export_drsuapi_DsReplicaInfo(mem_ctx, level, in);
32578 0 : if (out == NULL) {
32579 0 : return NULL;
32580 : }
32581 :
32582 0 : return pytalloc_GenericObject_reference(out);
32583 : }
32584 :
32585 : static PyMethodDef py_drsuapi_DsReplicaInfo_methods[] = {
32586 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaInfo_import),
32587 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
32588 : "T.__import__(mem_ctx, level, in) => ret." },
32589 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaInfo_export),
32590 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
32591 : "T.__export__(mem_ctx, level, in) => ret." },
32592 : { NULL, NULL, 0, NULL }
32593 : };
32594 :
32595 0 : static PyObject *py_drsuapi_DsReplicaInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32596 : {
32597 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
32598 0 : return NULL;
32599 : }
32600 :
32601 :
32602 : static PyTypeObject drsuapi_DsReplicaInfo_Type = {
32603 : PyVarObject_HEAD_INIT(NULL, 0)
32604 : .tp_name = "drsuapi.DsReplicaInfo",
32605 : .tp_getset = NULL,
32606 : .tp_methods = py_drsuapi_DsReplicaInfo_methods,
32607 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
32608 : .tp_new = py_drsuapi_DsReplicaInfo_new,
32609 : };
32610 :
32611 :
32612 0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr1_get_num_entries(PyObject *obj, void *closure)
32613 : {
32614 0 : struct drsuapi_DsGetMemberships2Ctr1 *object = (struct drsuapi_DsGetMemberships2Ctr1 *)pytalloc_get_ptr(obj);
32615 : PyObject *py_num_entries;
32616 0 : py_num_entries = PyLong_FromUnsignedLongLong((uint32_t)object->num_entries);
32617 0 : return py_num_entries;
32618 : }
32619 :
32620 0 : static int py_drsuapi_DsGetMemberships2Ctr1_set_num_entries(PyObject *py_obj, PyObject *value, void *closure)
32621 : {
32622 0 : struct drsuapi_DsGetMemberships2Ctr1 *object = (struct drsuapi_DsGetMemberships2Ctr1 *)pytalloc_get_ptr(py_obj);
32623 0 : if (value == NULL) {
32624 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_entries");
32625 0 : return -1;
32626 : }
32627 : {
32628 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_entries));
32629 0 : if (PyLong_Check(value)) {
32630 : unsigned long long test_var;
32631 0 : test_var = PyLong_AsUnsignedLongLong(value);
32632 0 : if (PyErr_Occurred() != NULL) {
32633 0 : return -1;
32634 : }
32635 0 : if (test_var > uint_max) {
32636 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32637 : PyLong_Type.tp_name, uint_max, test_var);
32638 0 : return -1;
32639 : }
32640 0 : object->num_entries = test_var;
32641 : } else {
32642 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32643 : PyLong_Type.tp_name);
32644 0 : return -1;
32645 : }
32646 : }
32647 0 : return 0;
32648 : }
32649 :
32650 0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr1_get_ctrl_array(PyObject *obj, void *closure)
32651 : {
32652 0 : struct drsuapi_DsGetMemberships2Ctr1 *object = (struct drsuapi_DsGetMemberships2Ctr1 *)pytalloc_get_ptr(obj);
32653 : PyObject *py_ctrl_array;
32654 0 : if (object->ctrl_array == NULL) {
32655 0 : Py_RETURN_NONE;
32656 : }
32657 0 : if (object->ctrl_array == NULL) {
32658 0 : py_ctrl_array = Py_None;
32659 0 : Py_INCREF(py_ctrl_array);
32660 : } else {
32661 0 : py_ctrl_array = PyList_New(object->num_entries);
32662 0 : if (py_ctrl_array == NULL) {
32663 0 : return NULL;
32664 : }
32665 : {
32666 : int ctrl_array_cntr_1;
32667 0 : for (ctrl_array_cntr_1 = 0; ctrl_array_cntr_1 < (object->num_entries); ctrl_array_cntr_1++) {
32668 : PyObject *py_ctrl_array_1;
32669 0 : if (object->ctrl_array[ctrl_array_cntr_1] == NULL) {
32670 0 : py_ctrl_array_1 = Py_None;
32671 0 : Py_INCREF(py_ctrl_array_1);
32672 : } else {
32673 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]);
32674 : }
32675 0 : PyList_SetItem(py_ctrl_array, ctrl_array_cntr_1, py_ctrl_array_1);
32676 : }
32677 : }
32678 : }
32679 0 : return py_ctrl_array;
32680 : }
32681 :
32682 0 : static int py_drsuapi_DsGetMemberships2Ctr1_set_ctrl_array(PyObject *py_obj, PyObject *value, void *closure)
32683 : {
32684 0 : struct drsuapi_DsGetMemberships2Ctr1 *object = (struct drsuapi_DsGetMemberships2Ctr1 *)pytalloc_get_ptr(py_obj);
32685 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->ctrl_array));
32686 0 : if (value == NULL) {
32687 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctrl_array");
32688 0 : return -1;
32689 : }
32690 0 : if (value == Py_None) {
32691 0 : object->ctrl_array = NULL;
32692 : } else {
32693 0 : object->ctrl_array = NULL;
32694 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
32695 : {
32696 : int ctrl_array_cntr_1;
32697 0 : object->ctrl_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ctrl_array, PyList_GET_SIZE(value));
32698 0 : if (!object->ctrl_array) { return -1;; }
32699 0 : talloc_set_name_const(object->ctrl_array, "ARRAY: object->ctrl_array");
32700 0 : for (ctrl_array_cntr_1 = 0; ctrl_array_cntr_1 < PyList_GET_SIZE(value); ctrl_array_cntr_1++) {
32701 0 : if (PyList_GET_ITEM(value, ctrl_array_cntr_1) == NULL) {
32702 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ctrl_array[ctrl_array_cntr_1]");
32703 0 : return -1;
32704 : }
32705 0 : if (PyList_GET_ITEM(value, ctrl_array_cntr_1) == Py_None) {
32706 0 : object->ctrl_array[ctrl_array_cntr_1] = NULL;
32707 : } else {
32708 0 : object->ctrl_array[ctrl_array_cntr_1] = NULL;
32709 0 : PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, PyList_GET_ITEM(value, ctrl_array_cntr_1), return -1;);
32710 0 : if (talloc_reference(object->ctrl_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ctrl_array_cntr_1))) == NULL) {
32711 0 : PyErr_NoMemory();
32712 0 : return -1;
32713 : }
32714 0 : object->ctrl_array[ctrl_array_cntr_1] = (struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, ctrl_array_cntr_1));
32715 : }
32716 : }
32717 : }
32718 : }
32719 0 : return 0;
32720 : }
32721 :
32722 : static PyGetSetDef py_drsuapi_DsGetMemberships2Ctr1_getsetters[] = {
32723 : {
32724 : .name = discard_const_p(char, "num_entries"),
32725 : .get = py_drsuapi_DsGetMemberships2Ctr1_get_num_entries,
32726 : .set = py_drsuapi_DsGetMemberships2Ctr1_set_num_entries,
32727 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
32728 : },
32729 : {
32730 : .name = discard_const_p(char, "ctrl_array"),
32731 : .get = py_drsuapi_DsGetMemberships2Ctr1_get_ctrl_array,
32732 : .set = py_drsuapi_DsGetMemberships2Ctr1_set_ctrl_array,
32733 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMembershipsCtr1")
32734 : },
32735 : { .name = NULL }
32736 : };
32737 :
32738 0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32739 : {
32740 0 : return pytalloc_new(struct drsuapi_DsGetMemberships2Ctr1, type);
32741 : }
32742 :
32743 :
32744 : static PyTypeObject drsuapi_DsGetMemberships2Ctr1_Type = {
32745 : PyVarObject_HEAD_INIT(NULL, 0)
32746 : .tp_name = "drsuapi.DsGetMemberships2Ctr1",
32747 : .tp_getset = py_drsuapi_DsGetMemberships2Ctr1_getsetters,
32748 : .tp_methods = NULL,
32749 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
32750 : .tp_new = py_drsuapi_DsGetMemberships2Ctr1_new,
32751 : };
32752 :
32753 0 : static PyObject *py_import_drsuapi_DsGetMemberships2Ctr(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMemberships2Ctr *in)
32754 : {
32755 : PyObject *ret;
32756 :
32757 0 : switch (level) {
32758 0 : case 1:
32759 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetMembershipsCtr1_Type, mem_ctx, &in->ctr1);
32760 0 : return ret;
32761 :
32762 : }
32763 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
32764 0 : return NULL;
32765 : }
32766 :
32767 0 : static union drsuapi_DsGetMemberships2Ctr *py_export_drsuapi_DsGetMemberships2Ctr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
32768 : {
32769 0 : union drsuapi_DsGetMemberships2Ctr *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Ctr);
32770 0 : switch (level) {
32771 0 : case 1:
32772 0 : if (in == NULL) {
32773 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
32774 0 : talloc_free(ret); return NULL;
32775 : }
32776 0 : PY_CHECK_TYPE(&drsuapi_DsGetMembershipsCtr1_Type, in, talloc_free(ret); return NULL;);
32777 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
32778 0 : PyErr_NoMemory();
32779 0 : talloc_free(ret); return NULL;
32780 : }
32781 0 : ret->ctr1 = *(struct drsuapi_DsGetMembershipsCtr1 *)pytalloc_get_ptr(in);
32782 0 : break;
32783 :
32784 0 : default:
32785 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
32786 0 : talloc_free(ret);
32787 0 : ret = NULL;
32788 : }
32789 :
32790 0 : return ret;
32791 : }
32792 :
32793 0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32794 : {
32795 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
32796 0 : PyObject *mem_ctx_obj = NULL;
32797 0 : TALLOC_CTX *mem_ctx = NULL;
32798 0 : int level = 0;
32799 0 : PyObject *in_obj = NULL;
32800 0 : union drsuapi_DsGetMemberships2Ctr *in = NULL;
32801 :
32802 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
32803 : discard_const_p(char *, kwnames),
32804 : &mem_ctx_obj,
32805 : &level,
32806 : &in_obj)) {
32807 0 : return NULL;
32808 : }
32809 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
32810 0 : if (mem_ctx == NULL) {
32811 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
32812 0 : return NULL;
32813 : }
32814 0 : in = (union drsuapi_DsGetMemberships2Ctr *)pytalloc_get_ptr(in_obj);
32815 0 : if (in == NULL) {
32816 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetMemberships2Ctr!");
32817 0 : return NULL;
32818 : }
32819 :
32820 0 : return py_import_drsuapi_DsGetMemberships2Ctr(mem_ctx, level, in);
32821 : }
32822 :
32823 0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32824 : {
32825 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
32826 0 : PyObject *mem_ctx_obj = NULL;
32827 0 : TALLOC_CTX *mem_ctx = NULL;
32828 0 : int level = 0;
32829 0 : PyObject *in = NULL;
32830 0 : union drsuapi_DsGetMemberships2Ctr *out = NULL;
32831 :
32832 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
32833 : discard_const_p(char *, kwnames),
32834 : &mem_ctx_obj,
32835 : &level,
32836 : &in)) {
32837 0 : return NULL;
32838 : }
32839 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
32840 0 : if (mem_ctx == NULL) {
32841 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
32842 0 : return NULL;
32843 : }
32844 :
32845 0 : out = py_export_drsuapi_DsGetMemberships2Ctr(mem_ctx, level, in);
32846 0 : if (out == NULL) {
32847 0 : return NULL;
32848 : }
32849 :
32850 0 : return pytalloc_GenericObject_reference(out);
32851 : }
32852 :
32853 : static PyMethodDef py_drsuapi_DsGetMemberships2Ctr_methods[] = {
32854 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2Ctr_import),
32855 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
32856 : "T.__import__(mem_ctx, level, in) => ret." },
32857 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2Ctr_export),
32858 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
32859 : "T.__export__(mem_ctx, level, in) => ret." },
32860 : { NULL, NULL, 0, NULL }
32861 : };
32862 :
32863 0 : static PyObject *py_drsuapi_DsGetMemberships2Ctr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32864 : {
32865 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
32866 0 : return NULL;
32867 : }
32868 :
32869 :
32870 : static PyTypeObject drsuapi_DsGetMemberships2Ctr_Type = {
32871 : PyVarObject_HEAD_INIT(NULL, 0)
32872 : .tp_name = "drsuapi.DsGetMemberships2Ctr",
32873 : .tp_getset = NULL,
32874 : .tp_methods = py_drsuapi_DsGetMemberships2Ctr_methods,
32875 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
32876 : .tp_new = py_drsuapi_DsGetMemberships2Ctr_new,
32877 : };
32878 :
32879 :
32880 0 : static PyObject *py_drsuapi_DsGetMemberships2Request1_get_num_req(PyObject *obj, void *closure)
32881 : {
32882 0 : struct drsuapi_DsGetMemberships2Request1 *object = (struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(obj);
32883 : PyObject *py_num_req;
32884 0 : py_num_req = PyLong_FromUnsignedLongLong((uint32_t)object->num_req);
32885 0 : return py_num_req;
32886 : }
32887 :
32888 0 : static int py_drsuapi_DsGetMemberships2Request1_set_num_req(PyObject *py_obj, PyObject *value, void *closure)
32889 : {
32890 0 : struct drsuapi_DsGetMemberships2Request1 *object = (struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(py_obj);
32891 0 : if (value == NULL) {
32892 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_req");
32893 0 : return -1;
32894 : }
32895 : {
32896 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_req));
32897 0 : if (PyLong_Check(value)) {
32898 : unsigned long long test_var;
32899 0 : test_var = PyLong_AsUnsignedLongLong(value);
32900 0 : if (PyErr_Occurred() != NULL) {
32901 0 : return -1;
32902 : }
32903 0 : if (test_var > uint_max) {
32904 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32905 : PyLong_Type.tp_name, uint_max, test_var);
32906 0 : return -1;
32907 : }
32908 0 : object->num_req = test_var;
32909 : } else {
32910 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32911 : PyLong_Type.tp_name);
32912 0 : return -1;
32913 : }
32914 : }
32915 0 : return 0;
32916 : }
32917 :
32918 0 : static PyObject *py_drsuapi_DsGetMemberships2Request1_get_req_array(PyObject *obj, void *closure)
32919 : {
32920 0 : struct drsuapi_DsGetMemberships2Request1 *object = (struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(obj);
32921 : PyObject *py_req_array;
32922 0 : if (object->req_array == NULL) {
32923 0 : Py_RETURN_NONE;
32924 : }
32925 0 : if (object->req_array == NULL) {
32926 0 : py_req_array = Py_None;
32927 0 : Py_INCREF(py_req_array);
32928 : } else {
32929 0 : py_req_array = PyList_New(object->num_req);
32930 0 : if (py_req_array == NULL) {
32931 0 : return NULL;
32932 : }
32933 : {
32934 : int req_array_cntr_1;
32935 0 : for (req_array_cntr_1 = 0; req_array_cntr_1 < (object->num_req); req_array_cntr_1++) {
32936 : PyObject *py_req_array_1;
32937 0 : if (object->req_array[req_array_cntr_1] == NULL) {
32938 0 : py_req_array_1 = Py_None;
32939 0 : Py_INCREF(py_req_array_1);
32940 : } else {
32941 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]);
32942 : }
32943 0 : PyList_SetItem(py_req_array, req_array_cntr_1, py_req_array_1);
32944 : }
32945 : }
32946 : }
32947 0 : return py_req_array;
32948 : }
32949 :
32950 0 : static int py_drsuapi_DsGetMemberships2Request1_set_req_array(PyObject *py_obj, PyObject *value, void *closure)
32951 : {
32952 0 : struct drsuapi_DsGetMemberships2Request1 *object = (struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(py_obj);
32953 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->req_array));
32954 0 : if (value == NULL) {
32955 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->req_array");
32956 0 : return -1;
32957 : }
32958 0 : if (value == Py_None) {
32959 0 : object->req_array = NULL;
32960 : } else {
32961 0 : object->req_array = NULL;
32962 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
32963 : {
32964 : int req_array_cntr_1;
32965 0 : object->req_array = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->req_array, PyList_GET_SIZE(value));
32966 0 : if (!object->req_array) { return -1;; }
32967 0 : talloc_set_name_const(object->req_array, "ARRAY: object->req_array");
32968 0 : for (req_array_cntr_1 = 0; req_array_cntr_1 < PyList_GET_SIZE(value); req_array_cntr_1++) {
32969 0 : if (PyList_GET_ITEM(value, req_array_cntr_1) == NULL) {
32970 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->req_array[req_array_cntr_1]");
32971 0 : return -1;
32972 : }
32973 0 : if (PyList_GET_ITEM(value, req_array_cntr_1) == Py_None) {
32974 0 : object->req_array[req_array_cntr_1] = NULL;
32975 : } else {
32976 0 : object->req_array[req_array_cntr_1] = NULL;
32977 0 : PY_CHECK_TYPE(&drsuapi_DsGetMembershipsRequest1_Type, PyList_GET_ITEM(value, req_array_cntr_1), return -1;);
32978 0 : if (talloc_reference(object->req_array, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, req_array_cntr_1))) == NULL) {
32979 0 : PyErr_NoMemory();
32980 0 : return -1;
32981 : }
32982 0 : object->req_array[req_array_cntr_1] = (struct drsuapi_DsGetMembershipsRequest1 *)pytalloc_get_ptr(PyList_GET_ITEM(value, req_array_cntr_1));
32983 : }
32984 : }
32985 : }
32986 : }
32987 0 : return 0;
32988 : }
32989 :
32990 : static PyGetSetDef py_drsuapi_DsGetMemberships2Request1_getsetters[] = {
32991 : {
32992 : .name = discard_const_p(char, "num_req"),
32993 : .get = py_drsuapi_DsGetMemberships2Request1_get_num_req,
32994 : .set = py_drsuapi_DsGetMemberships2Request1_set_num_req,
32995 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
32996 : },
32997 : {
32998 : .name = discard_const_p(char, "req_array"),
32999 : .get = py_drsuapi_DsGetMemberships2Request1_get_req_array,
33000 : .set = py_drsuapi_DsGetMemberships2Request1_set_req_array,
33001 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMembershipsRequest1")
33002 : },
33003 : { .name = NULL }
33004 : };
33005 :
33006 0 : static PyObject *py_drsuapi_DsGetMemberships2Request1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33007 : {
33008 0 : return pytalloc_new(struct drsuapi_DsGetMemberships2Request1, type);
33009 : }
33010 :
33011 :
33012 : static PyTypeObject drsuapi_DsGetMemberships2Request1_Type = {
33013 : PyVarObject_HEAD_INIT(NULL, 0)
33014 : .tp_name = "drsuapi.DsGetMemberships2Request1",
33015 : .tp_getset = py_drsuapi_DsGetMemberships2Request1_getsetters,
33016 : .tp_methods = NULL,
33017 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33018 : .tp_new = py_drsuapi_DsGetMemberships2Request1_new,
33019 : };
33020 :
33021 0 : static PyObject *py_import_drsuapi_DsGetMemberships2Request(TALLOC_CTX *mem_ctx, int level, union drsuapi_DsGetMemberships2Request *in)
33022 : {
33023 : PyObject *ret;
33024 :
33025 0 : switch (level) {
33026 0 : case 1:
33027 0 : ret = pytalloc_reference_ex(&drsuapi_DsGetMemberships2Request1_Type, mem_ctx, &in->req1);
33028 0 : return ret;
33029 :
33030 : }
33031 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
33032 0 : return NULL;
33033 : }
33034 :
33035 0 : static union drsuapi_DsGetMemberships2Request *py_export_drsuapi_DsGetMemberships2Request(TALLOC_CTX *mem_ctx, int level, PyObject *in)
33036 : {
33037 0 : union drsuapi_DsGetMemberships2Request *ret = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Request);
33038 0 : switch (level) {
33039 0 : case 1:
33040 0 : if (in == NULL) {
33041 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
33042 0 : talloc_free(ret); return NULL;
33043 : }
33044 0 : PY_CHECK_TYPE(&drsuapi_DsGetMemberships2Request1_Type, in, talloc_free(ret); return NULL;);
33045 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
33046 0 : PyErr_NoMemory();
33047 0 : talloc_free(ret); return NULL;
33048 : }
33049 0 : ret->req1 = *(struct drsuapi_DsGetMemberships2Request1 *)pytalloc_get_ptr(in);
33050 0 : break;
33051 :
33052 0 : default:
33053 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
33054 0 : talloc_free(ret);
33055 0 : ret = NULL;
33056 : }
33057 :
33058 0 : return ret;
33059 : }
33060 :
33061 0 : static PyObject *py_drsuapi_DsGetMemberships2Request_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33062 : {
33063 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
33064 0 : PyObject *mem_ctx_obj = NULL;
33065 0 : TALLOC_CTX *mem_ctx = NULL;
33066 0 : int level = 0;
33067 0 : PyObject *in_obj = NULL;
33068 0 : union drsuapi_DsGetMemberships2Request *in = NULL;
33069 :
33070 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
33071 : discard_const_p(char *, kwnames),
33072 : &mem_ctx_obj,
33073 : &level,
33074 : &in_obj)) {
33075 0 : return NULL;
33076 : }
33077 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
33078 0 : if (mem_ctx == NULL) {
33079 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
33080 0 : return NULL;
33081 : }
33082 0 : in = (union drsuapi_DsGetMemberships2Request *)pytalloc_get_ptr(in_obj);
33083 0 : if (in == NULL) {
33084 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_DsGetMemberships2Request!");
33085 0 : return NULL;
33086 : }
33087 :
33088 0 : return py_import_drsuapi_DsGetMemberships2Request(mem_ctx, level, in);
33089 : }
33090 :
33091 0 : static PyObject *py_drsuapi_DsGetMemberships2Request_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33092 : {
33093 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
33094 0 : PyObject *mem_ctx_obj = NULL;
33095 0 : TALLOC_CTX *mem_ctx = NULL;
33096 0 : int level = 0;
33097 0 : PyObject *in = NULL;
33098 0 : union drsuapi_DsGetMemberships2Request *out = NULL;
33099 :
33100 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
33101 : discard_const_p(char *, kwnames),
33102 : &mem_ctx_obj,
33103 : &level,
33104 : &in)) {
33105 0 : return NULL;
33106 : }
33107 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
33108 0 : if (mem_ctx == NULL) {
33109 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
33110 0 : return NULL;
33111 : }
33112 :
33113 0 : out = py_export_drsuapi_DsGetMemberships2Request(mem_ctx, level, in);
33114 0 : if (out == NULL) {
33115 0 : return NULL;
33116 : }
33117 :
33118 0 : return pytalloc_GenericObject_reference(out);
33119 : }
33120 :
33121 : static PyMethodDef py_drsuapi_DsGetMemberships2Request_methods[] = {
33122 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2Request_import),
33123 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
33124 : "T.__import__(mem_ctx, level, in) => ret." },
33125 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2Request_export),
33126 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
33127 : "T.__export__(mem_ctx, level, in) => ret." },
33128 : { NULL, NULL, 0, NULL }
33129 : };
33130 :
33131 0 : static PyObject *py_drsuapi_DsGetMemberships2Request_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33132 : {
33133 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
33134 0 : return NULL;
33135 : }
33136 :
33137 :
33138 : static PyTypeObject drsuapi_DsGetMemberships2Request_Type = {
33139 : PyVarObject_HEAD_INIT(NULL, 0)
33140 : .tp_name = "drsuapi.DsGetMemberships2Request",
33141 : .tp_getset = NULL,
33142 : .tp_methods = py_drsuapi_DsGetMemberships2Request_methods,
33143 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33144 : .tp_new = py_drsuapi_DsGetMemberships2Request_new,
33145 : };
33146 :
33147 :
33148 0 : static PyObject *py_drsuapi_DsSiteCostInfo_get_error_code(PyObject *obj, void *closure)
33149 : {
33150 0 : struct drsuapi_DsSiteCostInfo *object = (struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(obj);
33151 : PyObject *py_error_code;
33152 0 : py_error_code = PyErr_FromWERROR(object->error_code);
33153 0 : return py_error_code;
33154 : }
33155 :
33156 0 : static int py_drsuapi_DsSiteCostInfo_set_error_code(PyObject *py_obj, PyObject *value, void *closure)
33157 : {
33158 0 : struct drsuapi_DsSiteCostInfo *object = (struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(py_obj);
33159 0 : if (value == NULL) {
33160 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->error_code");
33161 0 : return -1;
33162 : }
33163 0 : object->error_code = W_ERROR(PyLong_AsLong(value));
33164 0 : return 0;
33165 : }
33166 :
33167 0 : static PyObject *py_drsuapi_DsSiteCostInfo_get_site_cost(PyObject *obj, void *closure)
33168 : {
33169 0 : struct drsuapi_DsSiteCostInfo *object = (struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(obj);
33170 : PyObject *py_site_cost;
33171 0 : py_site_cost = PyLong_FromUnsignedLongLong((uint32_t)object->site_cost);
33172 0 : return py_site_cost;
33173 : }
33174 :
33175 0 : static int py_drsuapi_DsSiteCostInfo_set_site_cost(PyObject *py_obj, PyObject *value, void *closure)
33176 : {
33177 0 : struct drsuapi_DsSiteCostInfo *object = (struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(py_obj);
33178 0 : if (value == NULL) {
33179 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_cost");
33180 0 : return -1;
33181 : }
33182 : {
33183 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->site_cost));
33184 0 : if (PyLong_Check(value)) {
33185 : unsigned long long test_var;
33186 0 : test_var = PyLong_AsUnsignedLongLong(value);
33187 0 : if (PyErr_Occurred() != NULL) {
33188 0 : return -1;
33189 : }
33190 0 : if (test_var > uint_max) {
33191 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33192 : PyLong_Type.tp_name, uint_max, test_var);
33193 0 : return -1;
33194 : }
33195 0 : object->site_cost = test_var;
33196 : } else {
33197 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33198 : PyLong_Type.tp_name);
33199 0 : return -1;
33200 : }
33201 : }
33202 0 : return 0;
33203 : }
33204 :
33205 : static PyGetSetDef py_drsuapi_DsSiteCostInfo_getsetters[] = {
33206 : {
33207 : .name = discard_const_p(char, "error_code"),
33208 : .get = py_drsuapi_DsSiteCostInfo_get_error_code,
33209 : .set = py_drsuapi_DsSiteCostInfo_set_error_code,
33210 : .doc = discard_const_p(char, "PIDL-generated element of base type WERROR")
33211 : },
33212 : {
33213 : .name = discard_const_p(char, "site_cost"),
33214 : .get = py_drsuapi_DsSiteCostInfo_get_site_cost,
33215 : .set = py_drsuapi_DsSiteCostInfo_set_site_cost,
33216 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
33217 : },
33218 : { .name = NULL }
33219 : };
33220 :
33221 0 : static PyObject *py_drsuapi_DsSiteCostInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33222 : {
33223 0 : return pytalloc_new(struct drsuapi_DsSiteCostInfo, type);
33224 : }
33225 :
33226 :
33227 : static PyTypeObject drsuapi_DsSiteCostInfo_Type = {
33228 : PyVarObject_HEAD_INIT(NULL, 0)
33229 : .tp_name = "drsuapi.DsSiteCostInfo",
33230 : .tp_getset = py_drsuapi_DsSiteCostInfo_getsetters,
33231 : .tp_methods = NULL,
33232 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33233 : .tp_new = py_drsuapi_DsSiteCostInfo_new,
33234 : };
33235 :
33236 :
33237 0 : static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_num_info(PyObject *obj, void *closure)
33238 : {
33239 0 : struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(obj);
33240 : PyObject *py_num_info;
33241 0 : py_num_info = PyLong_FromUnsignedLongLong((uint32_t)object->num_info);
33242 0 : return py_num_info;
33243 : }
33244 :
33245 0 : static int py_drsuapi_QuerySitesByCostCtr1_set_num_info(PyObject *py_obj, PyObject *value, void *closure)
33246 : {
33247 0 : struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(py_obj);
33248 0 : if (value == NULL) {
33249 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_info");
33250 0 : return -1;
33251 : }
33252 : {
33253 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_info));
33254 0 : if (PyLong_Check(value)) {
33255 : unsigned long long test_var;
33256 0 : test_var = PyLong_AsUnsignedLongLong(value);
33257 0 : if (PyErr_Occurred() != NULL) {
33258 0 : return -1;
33259 : }
33260 0 : if (test_var > uint_max) {
33261 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33262 : PyLong_Type.tp_name, uint_max, test_var);
33263 0 : return -1;
33264 : }
33265 0 : object->num_info = test_var;
33266 : } else {
33267 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33268 : PyLong_Type.tp_name);
33269 0 : return -1;
33270 : }
33271 : }
33272 0 : return 0;
33273 : }
33274 :
33275 0 : static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_info(PyObject *obj, void *closure)
33276 : {
33277 0 : struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(obj);
33278 : PyObject *py_info;
33279 0 : if (object->info == NULL) {
33280 0 : Py_RETURN_NONE;
33281 : }
33282 0 : if (object->info == NULL) {
33283 0 : py_info = Py_None;
33284 0 : Py_INCREF(py_info);
33285 : } else {
33286 0 : py_info = PyList_New(object->num_info);
33287 0 : if (py_info == NULL) {
33288 0 : return NULL;
33289 : }
33290 : {
33291 : int info_cntr_1;
33292 0 : for (info_cntr_1 = 0; info_cntr_1 < (object->num_info); info_cntr_1++) {
33293 : PyObject *py_info_1;
33294 0 : py_info_1 = pytalloc_reference_ex(&drsuapi_DsSiteCostInfo_Type, object->info, &object->info[info_cntr_1]);
33295 0 : PyList_SetItem(py_info, info_cntr_1, py_info_1);
33296 : }
33297 : }
33298 : }
33299 0 : return py_info;
33300 : }
33301 :
33302 0 : static int py_drsuapi_QuerySitesByCostCtr1_set_info(PyObject *py_obj, PyObject *value, void *closure)
33303 : {
33304 0 : struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(py_obj);
33305 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->info));
33306 0 : if (value == NULL) {
33307 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info");
33308 0 : return -1;
33309 : }
33310 0 : if (value == Py_None) {
33311 0 : object->info = NULL;
33312 : } else {
33313 0 : object->info = NULL;
33314 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
33315 : {
33316 : int info_cntr_1;
33317 0 : object->info = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->info, PyList_GET_SIZE(value));
33318 0 : if (!object->info) { return -1;; }
33319 0 : talloc_set_name_const(object->info, "ARRAY: object->info");
33320 0 : for (info_cntr_1 = 0; info_cntr_1 < PyList_GET_SIZE(value); info_cntr_1++) {
33321 0 : if (PyList_GET_ITEM(value, info_cntr_1) == NULL) {
33322 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->info[info_cntr_1]");
33323 0 : return -1;
33324 : }
33325 0 : PY_CHECK_TYPE(&drsuapi_DsSiteCostInfo_Type, PyList_GET_ITEM(value, info_cntr_1), return -1;);
33326 0 : if (talloc_reference(object->info, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, info_cntr_1))) == NULL) {
33327 0 : PyErr_NoMemory();
33328 0 : return -1;
33329 : }
33330 0 : object->info[info_cntr_1] = *(struct drsuapi_DsSiteCostInfo *)pytalloc_get_ptr(PyList_GET_ITEM(value, info_cntr_1));
33331 : }
33332 : }
33333 : }
33334 0 : return 0;
33335 : }
33336 :
33337 0 : static PyObject *py_drsuapi_QuerySitesByCostCtr1_get_flags_reserved(PyObject *obj, void *closure)
33338 : {
33339 0 : struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(obj);
33340 : PyObject *py_flags_reserved;
33341 0 : py_flags_reserved = PyLong_FromUnsignedLongLong((uint32_t)object->flags_reserved);
33342 0 : return py_flags_reserved;
33343 : }
33344 :
33345 0 : static int py_drsuapi_QuerySitesByCostCtr1_set_flags_reserved(PyObject *py_obj, PyObject *value, void *closure)
33346 : {
33347 0 : struct drsuapi_QuerySitesByCostCtr1 *object = (struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(py_obj);
33348 0 : if (value == NULL) {
33349 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags_reserved");
33350 0 : return -1;
33351 : }
33352 : {
33353 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags_reserved));
33354 0 : if (PyLong_Check(value)) {
33355 : unsigned long long test_var;
33356 0 : test_var = PyLong_AsUnsignedLongLong(value);
33357 0 : if (PyErr_Occurred() != NULL) {
33358 0 : return -1;
33359 : }
33360 0 : if (test_var > uint_max) {
33361 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33362 : PyLong_Type.tp_name, uint_max, test_var);
33363 0 : return -1;
33364 : }
33365 0 : object->flags_reserved = test_var;
33366 : } else {
33367 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33368 : PyLong_Type.tp_name);
33369 0 : return -1;
33370 : }
33371 : }
33372 0 : return 0;
33373 : }
33374 :
33375 : static PyGetSetDef py_drsuapi_QuerySitesByCostCtr1_getsetters[] = {
33376 : {
33377 : .name = discard_const_p(char, "num_info"),
33378 : .get = py_drsuapi_QuerySitesByCostCtr1_get_num_info,
33379 : .set = py_drsuapi_QuerySitesByCostCtr1_set_num_info,
33380 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
33381 : },
33382 : {
33383 : .name = discard_const_p(char, "info"),
33384 : .get = py_drsuapi_QuerySitesByCostCtr1_get_info,
33385 : .set = py_drsuapi_QuerySitesByCostCtr1_set_info,
33386 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsSiteCostInfo")
33387 : },
33388 : {
33389 : .name = discard_const_p(char, "flags_reserved"),
33390 : .get = py_drsuapi_QuerySitesByCostCtr1_get_flags_reserved,
33391 : .set = py_drsuapi_QuerySitesByCostCtr1_set_flags_reserved,
33392 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
33393 : },
33394 : { .name = NULL }
33395 : };
33396 :
33397 0 : static PyObject *py_drsuapi_QuerySitesByCostCtr1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33398 : {
33399 0 : return pytalloc_new(struct drsuapi_QuerySitesByCostCtr1, type);
33400 : }
33401 :
33402 :
33403 : static PyTypeObject drsuapi_QuerySitesByCostCtr1_Type = {
33404 : PyVarObject_HEAD_INIT(NULL, 0)
33405 : .tp_name = "drsuapi.QuerySitesByCostCtr1",
33406 : .tp_getset = py_drsuapi_QuerySitesByCostCtr1_getsetters,
33407 : .tp_methods = NULL,
33408 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33409 : .tp_new = py_drsuapi_QuerySitesByCostCtr1_new,
33410 : };
33411 :
33412 0 : static PyObject *py_import_drsuapi_QuerySitesByCostCtr(TALLOC_CTX *mem_ctx, int level, union drsuapi_QuerySitesByCostCtr *in)
33413 : {
33414 : PyObject *ret;
33415 :
33416 0 : switch (level) {
33417 0 : case 1:
33418 0 : ret = pytalloc_reference_ex(&drsuapi_QuerySitesByCostCtr1_Type, mem_ctx, &in->ctr1);
33419 0 : return ret;
33420 :
33421 : }
33422 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
33423 0 : return NULL;
33424 : }
33425 :
33426 0 : static union drsuapi_QuerySitesByCostCtr *py_export_drsuapi_QuerySitesByCostCtr(TALLOC_CTX *mem_ctx, int level, PyObject *in)
33427 : {
33428 0 : union drsuapi_QuerySitesByCostCtr *ret = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostCtr);
33429 0 : switch (level) {
33430 0 : case 1:
33431 0 : if (in == NULL) {
33432 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ctr1");
33433 0 : talloc_free(ret); return NULL;
33434 : }
33435 0 : PY_CHECK_TYPE(&drsuapi_QuerySitesByCostCtr1_Type, in, talloc_free(ret); return NULL;);
33436 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
33437 0 : PyErr_NoMemory();
33438 0 : talloc_free(ret); return NULL;
33439 : }
33440 0 : ret->ctr1 = *(struct drsuapi_QuerySitesByCostCtr1 *)pytalloc_get_ptr(in);
33441 0 : break;
33442 :
33443 0 : default:
33444 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
33445 0 : talloc_free(ret);
33446 0 : ret = NULL;
33447 : }
33448 :
33449 0 : return ret;
33450 : }
33451 :
33452 0 : static PyObject *py_drsuapi_QuerySitesByCostCtr_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33453 : {
33454 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
33455 0 : PyObject *mem_ctx_obj = NULL;
33456 0 : TALLOC_CTX *mem_ctx = NULL;
33457 0 : int level = 0;
33458 0 : PyObject *in_obj = NULL;
33459 0 : union drsuapi_QuerySitesByCostCtr *in = NULL;
33460 :
33461 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
33462 : discard_const_p(char *, kwnames),
33463 : &mem_ctx_obj,
33464 : &level,
33465 : &in_obj)) {
33466 0 : return NULL;
33467 : }
33468 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
33469 0 : if (mem_ctx == NULL) {
33470 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
33471 0 : return NULL;
33472 : }
33473 0 : in = (union drsuapi_QuerySitesByCostCtr *)pytalloc_get_ptr(in_obj);
33474 0 : if (in == NULL) {
33475 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_QuerySitesByCostCtr!");
33476 0 : return NULL;
33477 : }
33478 :
33479 0 : return py_import_drsuapi_QuerySitesByCostCtr(mem_ctx, level, in);
33480 : }
33481 :
33482 0 : static PyObject *py_drsuapi_QuerySitesByCostCtr_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33483 : {
33484 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
33485 0 : PyObject *mem_ctx_obj = NULL;
33486 0 : TALLOC_CTX *mem_ctx = NULL;
33487 0 : int level = 0;
33488 0 : PyObject *in = NULL;
33489 0 : union drsuapi_QuerySitesByCostCtr *out = NULL;
33490 :
33491 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
33492 : discard_const_p(char *, kwnames),
33493 : &mem_ctx_obj,
33494 : &level,
33495 : &in)) {
33496 0 : return NULL;
33497 : }
33498 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
33499 0 : if (mem_ctx == NULL) {
33500 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
33501 0 : return NULL;
33502 : }
33503 :
33504 0 : out = py_export_drsuapi_QuerySitesByCostCtr(mem_ctx, level, in);
33505 0 : if (out == NULL) {
33506 0 : return NULL;
33507 : }
33508 :
33509 0 : return pytalloc_GenericObject_reference(out);
33510 : }
33511 :
33512 : static PyMethodDef py_drsuapi_QuerySitesByCostCtr_methods[] = {
33513 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCostCtr_import),
33514 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
33515 : "T.__import__(mem_ctx, level, in) => ret." },
33516 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCostCtr_export),
33517 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
33518 : "T.__export__(mem_ctx, level, in) => ret." },
33519 : { NULL, NULL, 0, NULL }
33520 : };
33521 :
33522 0 : static PyObject *py_drsuapi_QuerySitesByCostCtr_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33523 : {
33524 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
33525 0 : return NULL;
33526 : }
33527 :
33528 :
33529 : static PyTypeObject drsuapi_QuerySitesByCostCtr_Type = {
33530 : PyVarObject_HEAD_INIT(NULL, 0)
33531 : .tp_name = "drsuapi.QuerySitesByCostCtr",
33532 : .tp_getset = NULL,
33533 : .tp_methods = py_drsuapi_QuerySitesByCostCtr_methods,
33534 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33535 : .tp_new = py_drsuapi_QuerySitesByCostCtr_new,
33536 : };
33537 :
33538 :
33539 0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_site_from(PyObject *obj, void *closure)
33540 : {
33541 0 : struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(obj);
33542 : PyObject *py_site_from;
33543 0 : if (object->site_from == NULL) {
33544 0 : Py_RETURN_NONE;
33545 : }
33546 0 : if (object->site_from == NULL) {
33547 0 : py_site_from = Py_None;
33548 0 : Py_INCREF(py_site_from);
33549 : } else {
33550 0 : if (object->site_from == NULL) {
33551 0 : py_site_from = Py_None;
33552 0 : Py_INCREF(py_site_from);
33553 : } else {
33554 0 : py_site_from = PyUnicode_Decode(object->site_from, strlen(object->site_from), "utf-8", "ignore");
33555 : }
33556 : }
33557 0 : return py_site_from;
33558 : }
33559 :
33560 0 : static int py_drsuapi_QuerySitesByCostRequest1_set_site_from(PyObject *py_obj, PyObject *value, void *closure)
33561 : {
33562 0 : struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(py_obj);
33563 0 : if (value == NULL) {
33564 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_from");
33565 0 : return -1;
33566 : }
33567 0 : if (value == Py_None) {
33568 0 : object->site_from = NULL;
33569 : } else {
33570 0 : object->site_from = NULL;
33571 : {
33572 : const char *test_str;
33573 : const char *talloc_str;
33574 0 : PyObject *unicode = NULL;
33575 0 : if (PyUnicode_Check(value)) {
33576 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
33577 0 : if (unicode == NULL) {
33578 0 : PyErr_NoMemory();
33579 0 : return -1;
33580 : }
33581 0 : test_str = PyBytes_AS_STRING(unicode);
33582 0 : } else if (PyBytes_Check(value)) {
33583 0 : test_str = PyBytes_AS_STRING(value);
33584 : } else {
33585 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
33586 0 : return -1;
33587 : }
33588 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
33589 0 : if (unicode != NULL) {
33590 0 : Py_DECREF(unicode);
33591 : }
33592 0 : if (talloc_str == NULL) {
33593 0 : PyErr_NoMemory();
33594 0 : return -1;
33595 : }
33596 0 : object->site_from = talloc_str;
33597 : }
33598 : }
33599 0 : return 0;
33600 : }
33601 :
33602 0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_num_req(PyObject *obj, void *closure)
33603 : {
33604 0 : struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(obj);
33605 : PyObject *py_num_req;
33606 0 : py_num_req = PyLong_FromUnsignedLongLong((uint32_t)object->num_req);
33607 0 : return py_num_req;
33608 : }
33609 :
33610 0 : static int py_drsuapi_QuerySitesByCostRequest1_set_num_req(PyObject *py_obj, PyObject *value, void *closure)
33611 : {
33612 0 : struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(py_obj);
33613 0 : if (value == NULL) {
33614 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->num_req");
33615 0 : return -1;
33616 : }
33617 : {
33618 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->num_req));
33619 0 : if (PyLong_Check(value)) {
33620 : unsigned long long test_var;
33621 0 : test_var = PyLong_AsUnsignedLongLong(value);
33622 0 : if (PyErr_Occurred() != NULL) {
33623 0 : return -1;
33624 : }
33625 0 : if (test_var > uint_max) {
33626 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33627 : PyLong_Type.tp_name, uint_max, test_var);
33628 0 : return -1;
33629 : }
33630 0 : object->num_req = test_var;
33631 : } else {
33632 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33633 : PyLong_Type.tp_name);
33634 0 : return -1;
33635 : }
33636 : }
33637 0 : return 0;
33638 : }
33639 :
33640 0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_site_to(PyObject *obj, void *closure)
33641 : {
33642 0 : struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(obj);
33643 : PyObject *py_site_to;
33644 0 : if (object->site_to == NULL) {
33645 0 : Py_RETURN_NONE;
33646 : }
33647 0 : if (object->site_to == NULL) {
33648 0 : py_site_to = Py_None;
33649 0 : Py_INCREF(py_site_to);
33650 : } else {
33651 0 : py_site_to = PyList_New(object->num_req);
33652 0 : if (py_site_to == NULL) {
33653 0 : return NULL;
33654 : }
33655 : {
33656 : int site_to_cntr_1;
33657 0 : for (site_to_cntr_1 = 0; site_to_cntr_1 < (object->num_req); site_to_cntr_1++) {
33658 : PyObject *py_site_to_1;
33659 0 : if (object->site_to[site_to_cntr_1] == NULL) {
33660 0 : py_site_to_1 = Py_None;
33661 0 : Py_INCREF(py_site_to_1);
33662 : } else {
33663 0 : if (object->site_to[site_to_cntr_1] == NULL) {
33664 0 : py_site_to_1 = Py_None;
33665 0 : Py_INCREF(py_site_to_1);
33666 : } else {
33667 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");
33668 : }
33669 : }
33670 0 : PyList_SetItem(py_site_to, site_to_cntr_1, py_site_to_1);
33671 : }
33672 : }
33673 : }
33674 0 : return py_site_to;
33675 : }
33676 :
33677 0 : static int py_drsuapi_QuerySitesByCostRequest1_set_site_to(PyObject *py_obj, PyObject *value, void *closure)
33678 : {
33679 0 : struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(py_obj);
33680 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->site_to));
33681 0 : if (value == NULL) {
33682 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_to");
33683 0 : return -1;
33684 : }
33685 0 : if (value == Py_None) {
33686 0 : object->site_to = NULL;
33687 : } else {
33688 0 : object->site_to = NULL;
33689 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
33690 : {
33691 : int site_to_cntr_1;
33692 0 : object->site_to = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->site_to, PyList_GET_SIZE(value));
33693 0 : if (!object->site_to) { return -1;; }
33694 0 : talloc_set_name_const(object->site_to, "ARRAY: object->site_to");
33695 0 : for (site_to_cntr_1 = 0; site_to_cntr_1 < PyList_GET_SIZE(value); site_to_cntr_1++) {
33696 0 : if (PyList_GET_ITEM(value, site_to_cntr_1) == NULL) {
33697 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->site_to[site_to_cntr_1]");
33698 0 : return -1;
33699 : }
33700 0 : if (PyList_GET_ITEM(value, site_to_cntr_1) == Py_None) {
33701 0 : object->site_to[site_to_cntr_1] = NULL;
33702 : } else {
33703 0 : object->site_to[site_to_cntr_1] = NULL;
33704 : {
33705 : const char *test_str;
33706 : const char *talloc_str;
33707 0 : PyObject *unicode = NULL;
33708 0 : if (PyUnicode_Check(PyList_GET_ITEM(value, site_to_cntr_1))) {
33709 0 : unicode = PyUnicode_AsEncodedString(PyList_GET_ITEM(value, site_to_cntr_1), "utf-8", "ignore");
33710 0 : if (unicode == NULL) {
33711 0 : PyErr_NoMemory();
33712 0 : return -1;
33713 : }
33714 0 : test_str = PyBytes_AS_STRING(unicode);
33715 0 : } else if (PyBytes_Check(PyList_GET_ITEM(value, site_to_cntr_1))) {
33716 0 : test_str = PyBytes_AS_STRING(PyList_GET_ITEM(value, site_to_cntr_1));
33717 : } else {
33718 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(PyList_GET_ITEM(value, site_to_cntr_1))->tp_name);
33719 0 : return -1;
33720 : }
33721 0 : talloc_str = talloc_strdup(object->site_to, test_str);
33722 0 : if (unicode != NULL) {
33723 0 : Py_DECREF(unicode);
33724 : }
33725 0 : if (talloc_str == NULL) {
33726 0 : PyErr_NoMemory();
33727 0 : return -1;
33728 : }
33729 0 : object->site_to[site_to_cntr_1] = talloc_str;
33730 : }
33731 : }
33732 : }
33733 : }
33734 : }
33735 0 : return 0;
33736 : }
33737 :
33738 0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_get_flags(PyObject *obj, void *closure)
33739 : {
33740 0 : struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(obj);
33741 : PyObject *py_flags;
33742 0 : py_flags = PyLong_FromUnsignedLongLong((uint32_t)object->flags);
33743 0 : return py_flags;
33744 : }
33745 :
33746 0 : static int py_drsuapi_QuerySitesByCostRequest1_set_flags(PyObject *py_obj, PyObject *value, void *closure)
33747 : {
33748 0 : struct drsuapi_QuerySitesByCostRequest1 *object = (struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(py_obj);
33749 0 : if (value == NULL) {
33750 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->flags");
33751 0 : return -1;
33752 : }
33753 : {
33754 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->flags));
33755 0 : if (PyLong_Check(value)) {
33756 : unsigned long long test_var;
33757 0 : test_var = PyLong_AsUnsignedLongLong(value);
33758 0 : if (PyErr_Occurred() != NULL) {
33759 0 : return -1;
33760 : }
33761 0 : if (test_var > uint_max) {
33762 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33763 : PyLong_Type.tp_name, uint_max, test_var);
33764 0 : return -1;
33765 : }
33766 0 : object->flags = test_var;
33767 : } else {
33768 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33769 : PyLong_Type.tp_name);
33770 0 : return -1;
33771 : }
33772 : }
33773 0 : return 0;
33774 : }
33775 :
33776 : static PyGetSetDef py_drsuapi_QuerySitesByCostRequest1_getsetters[] = {
33777 : {
33778 : .name = discard_const_p(char, "site_from"),
33779 : .get = py_drsuapi_QuerySitesByCostRequest1_get_site_from,
33780 : .set = py_drsuapi_QuerySitesByCostRequest1_set_site_from,
33781 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
33782 : },
33783 : {
33784 : .name = discard_const_p(char, "num_req"),
33785 : .get = py_drsuapi_QuerySitesByCostRequest1_get_num_req,
33786 : .set = py_drsuapi_QuerySitesByCostRequest1_set_num_req,
33787 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
33788 : },
33789 : {
33790 : .name = discard_const_p(char, "site_to"),
33791 : .get = py_drsuapi_QuerySitesByCostRequest1_get_site_to,
33792 : .set = py_drsuapi_QuerySitesByCostRequest1_set_site_to,
33793 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
33794 : },
33795 : {
33796 : .name = discard_const_p(char, "flags"),
33797 : .get = py_drsuapi_QuerySitesByCostRequest1_get_flags,
33798 : .set = py_drsuapi_QuerySitesByCostRequest1_set_flags,
33799 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
33800 : },
33801 : { .name = NULL }
33802 : };
33803 :
33804 0 : static PyObject *py_drsuapi_QuerySitesByCostRequest1_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33805 : {
33806 0 : return pytalloc_new(struct drsuapi_QuerySitesByCostRequest1, type);
33807 : }
33808 :
33809 :
33810 : static PyTypeObject drsuapi_QuerySitesByCostRequest1_Type = {
33811 : PyVarObject_HEAD_INIT(NULL, 0)
33812 : .tp_name = "drsuapi.QuerySitesByCostRequest1",
33813 : .tp_getset = py_drsuapi_QuerySitesByCostRequest1_getsetters,
33814 : .tp_methods = NULL,
33815 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33816 : .tp_new = py_drsuapi_QuerySitesByCostRequest1_new,
33817 : };
33818 :
33819 0 : static PyObject *py_import_drsuapi_QuerySitesByCostRequest(TALLOC_CTX *mem_ctx, int level, union drsuapi_QuerySitesByCostRequest *in)
33820 : {
33821 : PyObject *ret;
33822 :
33823 0 : switch (level) {
33824 0 : case 1:
33825 0 : ret = pytalloc_reference_ex(&drsuapi_QuerySitesByCostRequest1_Type, mem_ctx, &in->req1);
33826 0 : return ret;
33827 :
33828 : }
33829 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
33830 0 : return NULL;
33831 : }
33832 :
33833 0 : static union drsuapi_QuerySitesByCostRequest *py_export_drsuapi_QuerySitesByCostRequest(TALLOC_CTX *mem_ctx, int level, PyObject *in)
33834 : {
33835 0 : union drsuapi_QuerySitesByCostRequest *ret = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostRequest);
33836 0 : switch (level) {
33837 0 : case 1:
33838 0 : if (in == NULL) {
33839 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->req1");
33840 0 : talloc_free(ret); return NULL;
33841 : }
33842 0 : PY_CHECK_TYPE(&drsuapi_QuerySitesByCostRequest1_Type, in, talloc_free(ret); return NULL;);
33843 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
33844 0 : PyErr_NoMemory();
33845 0 : talloc_free(ret); return NULL;
33846 : }
33847 0 : ret->req1 = *(struct drsuapi_QuerySitesByCostRequest1 *)pytalloc_get_ptr(in);
33848 0 : break;
33849 :
33850 0 : default:
33851 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
33852 0 : talloc_free(ret);
33853 0 : ret = NULL;
33854 : }
33855 :
33856 0 : return ret;
33857 : }
33858 :
33859 0 : static PyObject *py_drsuapi_QuerySitesByCostRequest_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33860 : {
33861 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
33862 0 : PyObject *mem_ctx_obj = NULL;
33863 0 : TALLOC_CTX *mem_ctx = NULL;
33864 0 : int level = 0;
33865 0 : PyObject *in_obj = NULL;
33866 0 : union drsuapi_QuerySitesByCostRequest *in = NULL;
33867 :
33868 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
33869 : discard_const_p(char *, kwnames),
33870 : &mem_ctx_obj,
33871 : &level,
33872 : &in_obj)) {
33873 0 : return NULL;
33874 : }
33875 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
33876 0 : if (mem_ctx == NULL) {
33877 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
33878 0 : return NULL;
33879 : }
33880 0 : in = (union drsuapi_QuerySitesByCostRequest *)pytalloc_get_ptr(in_obj);
33881 0 : if (in == NULL) {
33882 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union drsuapi_QuerySitesByCostRequest!");
33883 0 : return NULL;
33884 : }
33885 :
33886 0 : return py_import_drsuapi_QuerySitesByCostRequest(mem_ctx, level, in);
33887 : }
33888 :
33889 0 : static PyObject *py_drsuapi_QuerySitesByCostRequest_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33890 : {
33891 0 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
33892 0 : PyObject *mem_ctx_obj = NULL;
33893 0 : TALLOC_CTX *mem_ctx = NULL;
33894 0 : int level = 0;
33895 0 : PyObject *in = NULL;
33896 0 : union drsuapi_QuerySitesByCostRequest *out = NULL;
33897 :
33898 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
33899 : discard_const_p(char *, kwnames),
33900 : &mem_ctx_obj,
33901 : &level,
33902 : &in)) {
33903 0 : return NULL;
33904 : }
33905 0 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
33906 0 : if (mem_ctx == NULL) {
33907 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
33908 0 : return NULL;
33909 : }
33910 :
33911 0 : out = py_export_drsuapi_QuerySitesByCostRequest(mem_ctx, level, in);
33912 0 : if (out == NULL) {
33913 0 : return NULL;
33914 : }
33915 :
33916 0 : return pytalloc_GenericObject_reference(out);
33917 : }
33918 :
33919 : static PyMethodDef py_drsuapi_QuerySitesByCostRequest_methods[] = {
33920 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCostRequest_import),
33921 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
33922 : "T.__import__(mem_ctx, level, in) => ret." },
33923 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCostRequest_export),
33924 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
33925 : "T.__export__(mem_ctx, level, in) => ret." },
33926 : { NULL, NULL, 0, NULL }
33927 : };
33928 :
33929 0 : static PyObject *py_drsuapi_QuerySitesByCostRequest_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33930 : {
33931 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
33932 0 : return NULL;
33933 : }
33934 :
33935 :
33936 : static PyTypeObject drsuapi_QuerySitesByCostRequest_Type = {
33937 : PyVarObject_HEAD_INIT(NULL, 0)
33938 : .tp_name = "drsuapi.QuerySitesByCostRequest",
33939 : .tp_getset = NULL,
33940 : .tp_methods = py_drsuapi_QuerySitesByCostRequest_methods,
33941 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33942 : .tp_new = py_drsuapi_QuerySitesByCostRequest_new,
33943 : };
33944 :
33945 :
33946 :
33947 0 : static PyObject *py_drsuapi_DsBind_in_get_bind_guid(PyObject *obj, void *closure)
33948 : {
33949 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(obj);
33950 : PyObject *py_bind_guid;
33951 0 : if (object->in.bind_guid == NULL) {
33952 0 : Py_RETURN_NONE;
33953 : }
33954 0 : if (object->in.bind_guid == NULL) {
33955 0 : py_bind_guid = Py_None;
33956 0 : Py_INCREF(py_bind_guid);
33957 : } else {
33958 0 : py_bind_guid = pytalloc_reference_ex(GUID_Type, object->in.bind_guid, object->in.bind_guid);
33959 : }
33960 0 : return py_bind_guid;
33961 : }
33962 :
33963 0 : static int py_drsuapi_DsBind_in_set_bind_guid(PyObject *py_obj, PyObject *value, void *closure)
33964 : {
33965 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(py_obj);
33966 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_guid));
33967 0 : if (value == NULL) {
33968 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_guid");
33969 0 : return -1;
33970 : }
33971 0 : if (value == Py_None) {
33972 0 : object->in.bind_guid = NULL;
33973 : } else {
33974 0 : object->in.bind_guid = NULL;
33975 0 : PY_CHECK_TYPE(GUID_Type, value, return -1;);
33976 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
33977 0 : PyErr_NoMemory();
33978 0 : return -1;
33979 : }
33980 0 : object->in.bind_guid = (struct GUID *)pytalloc_get_ptr(value);
33981 : }
33982 0 : return 0;
33983 : }
33984 :
33985 0 : static PyObject *py_drsuapi_DsBind_in_get_bind_info(PyObject *obj, void *closure)
33986 : {
33987 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(obj);
33988 : PyObject *py_bind_info;
33989 0 : if (object->in.bind_info == NULL) {
33990 0 : Py_RETURN_NONE;
33991 : }
33992 0 : if (object->in.bind_info == NULL) {
33993 0 : py_bind_info = Py_None;
33994 0 : Py_INCREF(py_bind_info);
33995 : } else {
33996 0 : py_bind_info = pytalloc_reference_ex(&drsuapi_DsBindInfoCtr_Type, object->in.bind_info, object->in.bind_info);
33997 : }
33998 0 : return py_bind_info;
33999 : }
34000 :
34001 0 : static int py_drsuapi_DsBind_in_set_bind_info(PyObject *py_obj, PyObject *value, void *closure)
34002 : {
34003 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(py_obj);
34004 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_info));
34005 0 : if (value == NULL) {
34006 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_info");
34007 0 : return -1;
34008 : }
34009 0 : if (value == Py_None) {
34010 0 : object->in.bind_info = NULL;
34011 : } else {
34012 0 : object->in.bind_info = NULL;
34013 0 : PY_CHECK_TYPE(&drsuapi_DsBindInfoCtr_Type, value, return -1;);
34014 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
34015 0 : PyErr_NoMemory();
34016 0 : return -1;
34017 : }
34018 0 : object->in.bind_info = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(value);
34019 : }
34020 0 : return 0;
34021 : }
34022 :
34023 0 : static PyObject *py_drsuapi_DsBind_out_get_bind_info(PyObject *obj, void *closure)
34024 : {
34025 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(obj);
34026 : PyObject *py_bind_info;
34027 0 : if (object->out.bind_info == NULL) {
34028 0 : Py_RETURN_NONE;
34029 : }
34030 0 : if (object->out.bind_info == NULL) {
34031 0 : py_bind_info = Py_None;
34032 0 : Py_INCREF(py_bind_info);
34033 : } else {
34034 0 : py_bind_info = pytalloc_reference_ex(&drsuapi_DsBindInfoCtr_Type, object->out.bind_info, object->out.bind_info);
34035 : }
34036 0 : return py_bind_info;
34037 : }
34038 :
34039 0 : static int py_drsuapi_DsBind_out_set_bind_info(PyObject *py_obj, PyObject *value, void *closure)
34040 : {
34041 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(py_obj);
34042 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.bind_info));
34043 0 : if (value == NULL) {
34044 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.bind_info");
34045 0 : return -1;
34046 : }
34047 0 : if (value == Py_None) {
34048 0 : object->out.bind_info = NULL;
34049 : } else {
34050 0 : object->out.bind_info = NULL;
34051 0 : PY_CHECK_TYPE(&drsuapi_DsBindInfoCtr_Type, value, return -1;);
34052 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
34053 0 : PyErr_NoMemory();
34054 0 : return -1;
34055 : }
34056 0 : object->out.bind_info = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(value);
34057 : }
34058 0 : return 0;
34059 : }
34060 :
34061 0 : static PyObject *py_drsuapi_DsBind_out_get_bind_handle(PyObject *obj, void *closure)
34062 : {
34063 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(obj);
34064 : PyObject *py_bind_handle;
34065 0 : if (object->out.bind_handle == NULL) {
34066 0 : Py_RETURN_NONE;
34067 : }
34068 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->out.bind_handle, object->out.bind_handle);
34069 0 : return py_bind_handle;
34070 : }
34071 :
34072 0 : static int py_drsuapi_DsBind_out_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
34073 : {
34074 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(py_obj);
34075 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.bind_handle));
34076 0 : if (value == NULL) {
34077 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.bind_handle");
34078 0 : return -1;
34079 : }
34080 0 : object->out.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.bind_handle);
34081 0 : if (object->out.bind_handle == NULL) {
34082 0 : PyErr_NoMemory();
34083 0 : return -1;
34084 : }
34085 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
34086 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
34087 0 : PyErr_NoMemory();
34088 0 : return -1;
34089 : }
34090 0 : object->out.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
34091 0 : return 0;
34092 : }
34093 :
34094 0 : static PyObject *py_drsuapi_DsBind_get_result(PyObject *obj, void *closure)
34095 : {
34096 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(obj);
34097 : PyObject *py_result;
34098 0 : py_result = PyErr_FromWERROR(object->out.result);
34099 0 : return py_result;
34100 : }
34101 :
34102 0 : static int py_drsuapi_DsBind_set_result(PyObject *py_obj, PyObject *value, void *closure)
34103 : {
34104 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(py_obj);
34105 0 : if (value == NULL) {
34106 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
34107 0 : return -1;
34108 : }
34109 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
34110 0 : return 0;
34111 : }
34112 :
34113 : static PyGetSetDef py_drsuapi_DsBind_getsetters[] = {
34114 : {
34115 : .name = discard_const_p(char, "in_bind_guid"),
34116 : .get = py_drsuapi_DsBind_in_get_bind_guid,
34117 : .set = py_drsuapi_DsBind_in_set_bind_guid,
34118 : .doc = discard_const_p(char, "PIDL-generated element of base type GUID")
34119 : },
34120 : {
34121 : .name = discard_const_p(char, "in_bind_info"),
34122 : .get = py_drsuapi_DsBind_in_get_bind_info,
34123 : .set = py_drsuapi_DsBind_in_set_bind_info,
34124 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsBindInfoCtr")
34125 : },
34126 : {
34127 : .name = discard_const_p(char, "out_bind_info"),
34128 : .get = py_drsuapi_DsBind_out_get_bind_info,
34129 : .set = py_drsuapi_DsBind_out_set_bind_info,
34130 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsBindInfoCtr")
34131 : },
34132 : {
34133 : .name = discard_const_p(char, "out_bind_handle"),
34134 : .get = py_drsuapi_DsBind_out_get_bind_handle,
34135 : .set = py_drsuapi_DsBind_out_set_bind_handle,
34136 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
34137 : },
34138 : {
34139 : .name = discard_const_p(char, "result"),
34140 : .get = py_drsuapi_DsBind_get_result,
34141 : .set = py_drsuapi_DsBind_set_result,
34142 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
34143 : },
34144 : { .name = NULL }
34145 : };
34146 :
34147 0 : static PyObject *py_drsuapi_DsBind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
34148 : {
34149 0 : PyObject *self = pytalloc_new(struct drsuapi_DsBind, type);
34150 0 : struct drsuapi_DsBind *_self = (struct drsuapi_DsBind *)pytalloc_get_ptr(self);
34151 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
34152 0 : _self->out.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
34153 0 : return self;
34154 : }
34155 :
34156 0 : static PyObject *py_drsuapi_DsBind_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
34157 : {
34158 :
34159 :
34160 0 : return PyLong_FromLong(0);
34161 : }
34162 :
34163 0 : static PyObject *py_drsuapi_DsBind_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
34164 : {
34165 0 : const struct ndr_interface_call *call = NULL;
34166 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(py_obj);
34167 0 : PyObject *ret = NULL;
34168 0 : struct ndr_push *push = NULL;
34169 : DATA_BLOB blob;
34170 : enum ndr_err_code err;
34171 :
34172 0 : if (ndr_table_drsuapi.num_calls < 1) {
34173 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsBind_ndr_pack");
34174 0 : return NULL;
34175 : }
34176 0 : call = &ndr_table_drsuapi.calls[0];
34177 :
34178 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
34179 0 : if (push == NULL) {
34180 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
34181 0 : return NULL;
34182 : }
34183 :
34184 0 : push->flags |= ndr_push_flags;
34185 :
34186 0 : err = call->ndr_push(push, ndr_inout_flags, object);
34187 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
34188 0 : TALLOC_FREE(push);
34189 0 : PyErr_SetNdrError(err);
34190 0 : return NULL;
34191 : }
34192 0 : blob = ndr_push_blob(push);
34193 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
34194 0 : TALLOC_FREE(push);
34195 0 : return ret;
34196 : }
34197 :
34198 0 : static PyObject *py_drsuapi_DsBind_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34199 : {
34200 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
34201 0 : PyObject *bigendian_obj = NULL;
34202 0 : PyObject *ndr64_obj = NULL;
34203 0 : uint32_t ndr_push_flags = 0;
34204 :
34205 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
34206 : discard_const_p(char *, kwnames),
34207 : &bigendian_obj,
34208 : &ndr64_obj)) {
34209 0 : return NULL;
34210 : }
34211 :
34212 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34213 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
34214 : }
34215 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34216 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
34217 : }
34218 :
34219 0 : return py_drsuapi_DsBind_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
34220 : }
34221 :
34222 0 : static PyObject *py_drsuapi_DsBind_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34223 : {
34224 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
34225 0 : PyObject *bigendian_obj = NULL;
34226 0 : PyObject *ndr64_obj = NULL;
34227 0 : uint32_t ndr_push_flags = 0;
34228 :
34229 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
34230 : discard_const_p(char *, kwnames),
34231 : &bigendian_obj,
34232 : &ndr64_obj)) {
34233 0 : return NULL;
34234 : }
34235 :
34236 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34237 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
34238 : }
34239 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34240 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
34241 : }
34242 :
34243 0 : return py_drsuapi_DsBind_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
34244 : }
34245 :
34246 0 : static PyObject *py_drsuapi_DsBind_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
34247 : {
34248 0 : const struct ndr_interface_call *call = NULL;
34249 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(py_obj);
34250 0 : struct ndr_pull *pull = NULL;
34251 : enum ndr_err_code err;
34252 :
34253 0 : if (ndr_table_drsuapi.num_calls < 1) {
34254 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsBind_ndr_unpack");
34255 0 : return NULL;
34256 : }
34257 0 : call = &ndr_table_drsuapi.calls[0];
34258 :
34259 0 : pull = ndr_pull_init_blob(blob, object);
34260 0 : if (pull == NULL) {
34261 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
34262 0 : return NULL;
34263 : }
34264 :
34265 0 : pull->flags |= ndr_pull_flags;
34266 :
34267 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
34268 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
34269 0 : TALLOC_FREE(pull);
34270 0 : PyErr_SetNdrError(err);
34271 0 : return NULL;
34272 : }
34273 0 : if (!allow_remaining) {
34274 : uint32_t highest_ofs;
34275 :
34276 0 : if (pull->offset > pull->relative_highest_offset) {
34277 0 : highest_ofs = pull->offset;
34278 : } else {
34279 0 : highest_ofs = pull->relative_highest_offset;
34280 : }
34281 0 : if (highest_ofs < pull->data_size) {
34282 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
34283 : "not all bytes consumed ofs[%u] size[%u]",
34284 : highest_ofs, pull->data_size);
34285 0 : TALLOC_FREE(pull);
34286 0 : PyErr_SetNdrError(err);
34287 0 : return NULL;
34288 : }
34289 : }
34290 :
34291 0 : TALLOC_FREE(pull);
34292 0 : Py_RETURN_NONE;
34293 : }
34294 :
34295 0 : static PyObject *py_drsuapi_DsBind_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34296 : {
34297 : DATA_BLOB blob;
34298 0 : Py_ssize_t blob_length = 0;
34299 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
34300 0 : PyObject *bigendian_obj = NULL;
34301 0 : PyObject *ndr64_obj = NULL;
34302 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
34303 0 : PyObject *allow_remaining_obj = NULL;
34304 0 : bool allow_remaining = false;
34305 :
34306 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
34307 : discard_const_p(char *, kwnames),
34308 : &blob.data, &blob_length,
34309 : &bigendian_obj,
34310 : &ndr64_obj,
34311 : &allow_remaining_obj)) {
34312 0 : return NULL;
34313 : }
34314 0 : blob.length = blob_length;
34315 :
34316 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34317 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
34318 : }
34319 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34320 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
34321 : }
34322 :
34323 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
34324 0 : allow_remaining = true;
34325 : }
34326 :
34327 0 : return py_drsuapi_DsBind_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
34328 : }
34329 :
34330 0 : static PyObject *py_drsuapi_DsBind_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34331 : {
34332 : DATA_BLOB blob;
34333 0 : Py_ssize_t blob_length = 0;
34334 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
34335 0 : PyObject *bigendian_obj = NULL;
34336 0 : PyObject *ndr64_obj = NULL;
34337 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
34338 0 : PyObject *allow_remaining_obj = NULL;
34339 0 : bool allow_remaining = false;
34340 :
34341 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
34342 : discard_const_p(char *, kwnames),
34343 : &blob.data, &blob_length,
34344 : &bigendian_obj,
34345 : &ndr64_obj,
34346 : &allow_remaining_obj)) {
34347 0 : return NULL;
34348 : }
34349 0 : blob.length = blob_length;
34350 :
34351 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34352 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
34353 : }
34354 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34355 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
34356 : }
34357 :
34358 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
34359 0 : allow_remaining = true;
34360 : }
34361 :
34362 0 : return py_drsuapi_DsBind_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
34363 : }
34364 :
34365 0 : static PyObject *py_drsuapi_DsBind_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
34366 : {
34367 0 : const struct ndr_interface_call *call = NULL;
34368 0 : struct drsuapi_DsBind *object = (struct drsuapi_DsBind *)pytalloc_get_ptr(py_obj);
34369 : PyObject *ret;
34370 : char *retstr;
34371 :
34372 0 : if (ndr_table_drsuapi.num_calls < 1) {
34373 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsBind_ndr_print");
34374 0 : return NULL;
34375 : }
34376 0 : call = &ndr_table_drsuapi.calls[0];
34377 :
34378 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
34379 0 : ret = PyUnicode_FromString(retstr);
34380 0 : TALLOC_FREE(retstr);
34381 :
34382 0 : return ret;
34383 : }
34384 :
34385 0 : static PyObject *py_drsuapi_DsBind_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
34386 : {
34387 0 : return py_drsuapi_DsBind_ndr_print(py_obj, "drsuapi_DsBind_in", NDR_IN);
34388 : }
34389 :
34390 0 : static PyObject *py_drsuapi_DsBind_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
34391 : {
34392 0 : return py_drsuapi_DsBind_ndr_print(py_obj, "drsuapi_DsBind_out", NDR_OUT);
34393 : }
34394 :
34395 : static PyMethodDef py_drsuapi_DsBind_methods[] = {
34396 : { "opnum", (PyCFunction)py_drsuapi_DsBind_ndr_opnum, METH_NOARGS|METH_CLASS,
34397 : "drsuapi.DsBind.opnum() -> 0 (0x00) " },
34398 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBind_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
34399 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
34400 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBind_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
34401 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
34402 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBind_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
34403 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
34404 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsBind_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
34405 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
34406 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsBind_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
34407 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsBind_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
34408 : { NULL, NULL, 0, NULL }
34409 : };
34410 :
34411 :
34412 : static PyTypeObject drsuapi_DsBind_Type = {
34413 : PyVarObject_HEAD_INIT(NULL, 0)
34414 : .tp_name = "drsuapi.DsBind",
34415 : .tp_getset = py_drsuapi_DsBind_getsetters,
34416 : .tp_methods = py_drsuapi_DsBind_methods,
34417 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
34418 : .tp_new = py_drsuapi_DsBind_new,
34419 : };
34420 :
34421 1821 : static bool pack_py_drsuapi_DsBind_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsBind *r)
34422 : {
34423 : PyObject *py_bind_guid;
34424 : PyObject *py_bind_info;
34425 1821 : const char *kwnames[] = {
34426 : "bind_guid", "bind_info", NULL
34427 : };
34428 :
34429 1821 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO:drsuapi_DsBind", discard_const_p(char *, kwnames), &py_bind_guid, &py_bind_info)) {
34430 0 : return false;
34431 : }
34432 :
34433 1821 : if (py_bind_guid == NULL) {
34434 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_guid");
34435 0 : return false;
34436 : }
34437 1821 : if (py_bind_guid == Py_None) {
34438 0 : r->in.bind_guid = NULL;
34439 : } else {
34440 1821 : r->in.bind_guid = NULL;
34441 1821 : PY_CHECK_TYPE(GUID_Type, py_bind_guid, return false;);
34442 1821 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_guid)) == NULL) {
34443 0 : PyErr_NoMemory();
34444 0 : return false;
34445 : }
34446 1821 : r->in.bind_guid = (struct GUID *)pytalloc_get_ptr(py_bind_guid);
34447 : }
34448 1821 : if (py_bind_info == NULL) {
34449 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_info");
34450 0 : return false;
34451 : }
34452 1821 : if (py_bind_info == Py_None) {
34453 0 : r->in.bind_info = NULL;
34454 : } else {
34455 1821 : r->in.bind_info = NULL;
34456 1821 : PY_CHECK_TYPE(&drsuapi_DsBindInfoCtr_Type, py_bind_info, return false;);
34457 1821 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_info)) == NULL) {
34458 0 : PyErr_NoMemory();
34459 0 : return false;
34460 : }
34461 1821 : r->in.bind_info = (struct drsuapi_DsBindInfoCtr *)pytalloc_get_ptr(py_bind_info);
34462 : }
34463 1821 : return true;
34464 : }
34465 :
34466 1821 : static PyObject *unpack_py_drsuapi_DsBind_args_out(struct drsuapi_DsBind *r)
34467 : {
34468 : PyObject *result;
34469 : PyObject *py_bind_info;
34470 : PyObject *py_bind_handle;
34471 1821 : result = PyTuple_New(2);
34472 1821 : if (r->out.bind_info == NULL) {
34473 0 : py_bind_info = Py_None;
34474 0 : Py_INCREF(py_bind_info);
34475 : } else {
34476 1821 : py_bind_info = pytalloc_reference_ex(&drsuapi_DsBindInfoCtr_Type, r->out.bind_info, r->out.bind_info);
34477 : }
34478 1821 : PyTuple_SetItem(result, 0, py_bind_info);
34479 1821 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, r->out.bind_handle, r->out.bind_handle);
34480 1821 : PyTuple_SetItem(result, 1, py_bind_handle);
34481 1821 : if (!W_ERROR_IS_OK(r->out.result)) {
34482 0 : PyErr_SetWERROR(r->out.result);
34483 0 : return NULL;
34484 : }
34485 :
34486 1821 : return result;
34487 : }
34488 :
34489 :
34490 0 : static PyObject *py_drsuapi_DsUnbind_in_get_bind_handle(PyObject *obj, void *closure)
34491 : {
34492 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(obj);
34493 : PyObject *py_bind_handle;
34494 0 : if (object->in.bind_handle == NULL) {
34495 0 : Py_RETURN_NONE;
34496 : }
34497 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
34498 0 : return py_bind_handle;
34499 : }
34500 :
34501 0 : static int py_drsuapi_DsUnbind_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
34502 : {
34503 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(py_obj);
34504 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
34505 0 : if (value == NULL) {
34506 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
34507 0 : return -1;
34508 : }
34509 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
34510 0 : if (object->in.bind_handle == NULL) {
34511 0 : PyErr_NoMemory();
34512 0 : return -1;
34513 : }
34514 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
34515 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
34516 0 : PyErr_NoMemory();
34517 0 : return -1;
34518 : }
34519 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
34520 0 : return 0;
34521 : }
34522 :
34523 0 : static PyObject *py_drsuapi_DsUnbind_out_get_bind_handle(PyObject *obj, void *closure)
34524 : {
34525 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(obj);
34526 : PyObject *py_bind_handle;
34527 0 : if (object->out.bind_handle == NULL) {
34528 0 : Py_RETURN_NONE;
34529 : }
34530 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->out.bind_handle, object->out.bind_handle);
34531 0 : return py_bind_handle;
34532 : }
34533 :
34534 0 : static int py_drsuapi_DsUnbind_out_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
34535 : {
34536 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(py_obj);
34537 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.bind_handle));
34538 0 : if (value == NULL) {
34539 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.bind_handle");
34540 0 : return -1;
34541 : }
34542 0 : object->out.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.bind_handle);
34543 0 : if (object->out.bind_handle == NULL) {
34544 0 : PyErr_NoMemory();
34545 0 : return -1;
34546 : }
34547 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
34548 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
34549 0 : PyErr_NoMemory();
34550 0 : return -1;
34551 : }
34552 0 : object->out.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
34553 0 : return 0;
34554 : }
34555 :
34556 0 : static PyObject *py_drsuapi_DsUnbind_get_result(PyObject *obj, void *closure)
34557 : {
34558 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(obj);
34559 : PyObject *py_result;
34560 0 : py_result = PyErr_FromWERROR(object->out.result);
34561 0 : return py_result;
34562 : }
34563 :
34564 0 : static int py_drsuapi_DsUnbind_set_result(PyObject *py_obj, PyObject *value, void *closure)
34565 : {
34566 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(py_obj);
34567 0 : if (value == NULL) {
34568 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
34569 0 : return -1;
34570 : }
34571 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
34572 0 : return 0;
34573 : }
34574 :
34575 : static PyGetSetDef py_drsuapi_DsUnbind_getsetters[] = {
34576 : {
34577 : .name = discard_const_p(char, "in_bind_handle"),
34578 : .get = py_drsuapi_DsUnbind_in_get_bind_handle,
34579 : .set = py_drsuapi_DsUnbind_in_set_bind_handle,
34580 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
34581 : },
34582 : {
34583 : .name = discard_const_p(char, "out_bind_handle"),
34584 : .get = py_drsuapi_DsUnbind_out_get_bind_handle,
34585 : .set = py_drsuapi_DsUnbind_out_set_bind_handle,
34586 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
34587 : },
34588 : {
34589 : .name = discard_const_p(char, "result"),
34590 : .get = py_drsuapi_DsUnbind_get_result,
34591 : .set = py_drsuapi_DsUnbind_set_result,
34592 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
34593 : },
34594 : { .name = NULL }
34595 : };
34596 :
34597 0 : static PyObject *py_drsuapi_DsUnbind_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
34598 : {
34599 0 : PyObject *self = pytalloc_new(struct drsuapi_DsUnbind, type);
34600 0 : struct drsuapi_DsUnbind *_self = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(self);
34601 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
34602 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
34603 0 : _self->out.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
34604 0 : return self;
34605 : }
34606 :
34607 0 : static PyObject *py_drsuapi_DsUnbind_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
34608 : {
34609 :
34610 :
34611 0 : return PyLong_FromLong(1);
34612 : }
34613 :
34614 0 : static PyObject *py_drsuapi_DsUnbind_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
34615 : {
34616 0 : const struct ndr_interface_call *call = NULL;
34617 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(py_obj);
34618 0 : PyObject *ret = NULL;
34619 0 : struct ndr_push *push = NULL;
34620 : DATA_BLOB blob;
34621 : enum ndr_err_code err;
34622 :
34623 0 : if (ndr_table_drsuapi.num_calls < 2) {
34624 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsUnbind_ndr_pack");
34625 0 : return NULL;
34626 : }
34627 0 : call = &ndr_table_drsuapi.calls[1];
34628 :
34629 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
34630 0 : if (push == NULL) {
34631 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
34632 0 : return NULL;
34633 : }
34634 :
34635 0 : push->flags |= ndr_push_flags;
34636 :
34637 0 : err = call->ndr_push(push, ndr_inout_flags, object);
34638 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
34639 0 : TALLOC_FREE(push);
34640 0 : PyErr_SetNdrError(err);
34641 0 : return NULL;
34642 : }
34643 0 : blob = ndr_push_blob(push);
34644 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
34645 0 : TALLOC_FREE(push);
34646 0 : return ret;
34647 : }
34648 :
34649 0 : static PyObject *py_drsuapi_DsUnbind_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34650 : {
34651 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
34652 0 : PyObject *bigendian_obj = NULL;
34653 0 : PyObject *ndr64_obj = NULL;
34654 0 : uint32_t ndr_push_flags = 0;
34655 :
34656 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
34657 : discard_const_p(char *, kwnames),
34658 : &bigendian_obj,
34659 : &ndr64_obj)) {
34660 0 : return NULL;
34661 : }
34662 :
34663 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34664 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
34665 : }
34666 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34667 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
34668 : }
34669 :
34670 0 : return py_drsuapi_DsUnbind_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
34671 : }
34672 :
34673 0 : static PyObject *py_drsuapi_DsUnbind_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34674 : {
34675 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
34676 0 : PyObject *bigendian_obj = NULL;
34677 0 : PyObject *ndr64_obj = NULL;
34678 0 : uint32_t ndr_push_flags = 0;
34679 :
34680 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
34681 : discard_const_p(char *, kwnames),
34682 : &bigendian_obj,
34683 : &ndr64_obj)) {
34684 0 : return NULL;
34685 : }
34686 :
34687 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34688 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
34689 : }
34690 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34691 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
34692 : }
34693 :
34694 0 : return py_drsuapi_DsUnbind_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
34695 : }
34696 :
34697 0 : static PyObject *py_drsuapi_DsUnbind_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
34698 : {
34699 0 : const struct ndr_interface_call *call = NULL;
34700 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(py_obj);
34701 0 : struct ndr_pull *pull = NULL;
34702 : enum ndr_err_code err;
34703 :
34704 0 : if (ndr_table_drsuapi.num_calls < 2) {
34705 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsUnbind_ndr_unpack");
34706 0 : return NULL;
34707 : }
34708 0 : call = &ndr_table_drsuapi.calls[1];
34709 :
34710 0 : pull = ndr_pull_init_blob(blob, object);
34711 0 : if (pull == NULL) {
34712 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
34713 0 : return NULL;
34714 : }
34715 :
34716 0 : pull->flags |= ndr_pull_flags;
34717 :
34718 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
34719 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
34720 0 : TALLOC_FREE(pull);
34721 0 : PyErr_SetNdrError(err);
34722 0 : return NULL;
34723 : }
34724 0 : if (!allow_remaining) {
34725 : uint32_t highest_ofs;
34726 :
34727 0 : if (pull->offset > pull->relative_highest_offset) {
34728 0 : highest_ofs = pull->offset;
34729 : } else {
34730 0 : highest_ofs = pull->relative_highest_offset;
34731 : }
34732 0 : if (highest_ofs < pull->data_size) {
34733 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
34734 : "not all bytes consumed ofs[%u] size[%u]",
34735 : highest_ofs, pull->data_size);
34736 0 : TALLOC_FREE(pull);
34737 0 : PyErr_SetNdrError(err);
34738 0 : return NULL;
34739 : }
34740 : }
34741 :
34742 0 : TALLOC_FREE(pull);
34743 0 : Py_RETURN_NONE;
34744 : }
34745 :
34746 0 : static PyObject *py_drsuapi_DsUnbind_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34747 : {
34748 : DATA_BLOB blob;
34749 0 : Py_ssize_t blob_length = 0;
34750 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
34751 0 : PyObject *bigendian_obj = NULL;
34752 0 : PyObject *ndr64_obj = NULL;
34753 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
34754 0 : PyObject *allow_remaining_obj = NULL;
34755 0 : bool allow_remaining = false;
34756 :
34757 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
34758 : discard_const_p(char *, kwnames),
34759 : &blob.data, &blob_length,
34760 : &bigendian_obj,
34761 : &ndr64_obj,
34762 : &allow_remaining_obj)) {
34763 0 : return NULL;
34764 : }
34765 0 : blob.length = blob_length;
34766 :
34767 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34768 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
34769 : }
34770 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34771 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
34772 : }
34773 :
34774 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
34775 0 : allow_remaining = true;
34776 : }
34777 :
34778 0 : return py_drsuapi_DsUnbind_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
34779 : }
34780 :
34781 0 : static PyObject *py_drsuapi_DsUnbind_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34782 : {
34783 : DATA_BLOB blob;
34784 0 : Py_ssize_t blob_length = 0;
34785 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
34786 0 : PyObject *bigendian_obj = NULL;
34787 0 : PyObject *ndr64_obj = NULL;
34788 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
34789 0 : PyObject *allow_remaining_obj = NULL;
34790 0 : bool allow_remaining = false;
34791 :
34792 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
34793 : discard_const_p(char *, kwnames),
34794 : &blob.data, &blob_length,
34795 : &bigendian_obj,
34796 : &ndr64_obj,
34797 : &allow_remaining_obj)) {
34798 0 : return NULL;
34799 : }
34800 0 : blob.length = blob_length;
34801 :
34802 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34803 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
34804 : }
34805 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34806 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
34807 : }
34808 :
34809 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
34810 0 : allow_remaining = true;
34811 : }
34812 :
34813 0 : return py_drsuapi_DsUnbind_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
34814 : }
34815 :
34816 0 : static PyObject *py_drsuapi_DsUnbind_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
34817 : {
34818 0 : const struct ndr_interface_call *call = NULL;
34819 0 : struct drsuapi_DsUnbind *object = (struct drsuapi_DsUnbind *)pytalloc_get_ptr(py_obj);
34820 : PyObject *ret;
34821 : char *retstr;
34822 :
34823 0 : if (ndr_table_drsuapi.num_calls < 2) {
34824 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsUnbind_ndr_print");
34825 0 : return NULL;
34826 : }
34827 0 : call = &ndr_table_drsuapi.calls[1];
34828 :
34829 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
34830 0 : ret = PyUnicode_FromString(retstr);
34831 0 : TALLOC_FREE(retstr);
34832 :
34833 0 : return ret;
34834 : }
34835 :
34836 0 : static PyObject *py_drsuapi_DsUnbind_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
34837 : {
34838 0 : return py_drsuapi_DsUnbind_ndr_print(py_obj, "drsuapi_DsUnbind_in", NDR_IN);
34839 : }
34840 :
34841 0 : static PyObject *py_drsuapi_DsUnbind_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
34842 : {
34843 0 : return py_drsuapi_DsUnbind_ndr_print(py_obj, "drsuapi_DsUnbind_out", NDR_OUT);
34844 : }
34845 :
34846 : static PyMethodDef py_drsuapi_DsUnbind_methods[] = {
34847 : { "opnum", (PyCFunction)py_drsuapi_DsUnbind_ndr_opnum, METH_NOARGS|METH_CLASS,
34848 : "drsuapi.DsUnbind.opnum() -> 1 (0x01) " },
34849 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsUnbind_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
34850 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
34851 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsUnbind_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
34852 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
34853 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsUnbind_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
34854 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
34855 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsUnbind_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
34856 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
34857 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsUnbind_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
34858 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsUnbind_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
34859 : { NULL, NULL, 0, NULL }
34860 : };
34861 :
34862 :
34863 : static PyTypeObject drsuapi_DsUnbind_Type = {
34864 : PyVarObject_HEAD_INIT(NULL, 0)
34865 : .tp_name = "drsuapi.DsUnbind",
34866 : .tp_getset = py_drsuapi_DsUnbind_getsetters,
34867 : .tp_methods = py_drsuapi_DsUnbind_methods,
34868 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
34869 : .tp_new = py_drsuapi_DsUnbind_new,
34870 : };
34871 :
34872 1 : static bool pack_py_drsuapi_DsUnbind_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsUnbind *r)
34873 : {
34874 : PyObject *py_bind_handle;
34875 1 : const char *kwnames[] = {
34876 : "bind_handle", NULL
34877 : };
34878 :
34879 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:drsuapi_DsUnbind", discard_const_p(char *, kwnames), &py_bind_handle)) {
34880 0 : return false;
34881 : }
34882 :
34883 1 : if (py_bind_handle == NULL) {
34884 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
34885 0 : return false;
34886 : }
34887 1 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
34888 1 : if (r->in.bind_handle == NULL) {
34889 0 : PyErr_NoMemory();
34890 0 : return false;
34891 : }
34892 1 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
34893 1 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
34894 0 : PyErr_NoMemory();
34895 0 : return false;
34896 : }
34897 1 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
34898 1 : return true;
34899 : }
34900 :
34901 1 : static PyObject *unpack_py_drsuapi_DsUnbind_args_out(struct drsuapi_DsUnbind *r)
34902 : {
34903 : PyObject *result;
34904 : PyObject *py_bind_handle;
34905 1 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, r->out.bind_handle, r->out.bind_handle);
34906 1 : result = py_bind_handle;
34907 1 : if (!W_ERROR_IS_OK(r->out.result)) {
34908 0 : PyErr_SetWERROR(r->out.result);
34909 0 : return NULL;
34910 : }
34911 :
34912 1 : return result;
34913 : }
34914 :
34915 :
34916 0 : static PyObject *py_drsuapi_DsReplicaSync_in_get_bind_handle(PyObject *obj, void *closure)
34917 : {
34918 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(obj);
34919 : PyObject *py_bind_handle;
34920 0 : if (object->in.bind_handle == NULL) {
34921 0 : Py_RETURN_NONE;
34922 : }
34923 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
34924 0 : return py_bind_handle;
34925 : }
34926 :
34927 0 : static int py_drsuapi_DsReplicaSync_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
34928 : {
34929 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(py_obj);
34930 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
34931 0 : if (value == NULL) {
34932 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
34933 0 : return -1;
34934 : }
34935 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
34936 0 : if (object->in.bind_handle == NULL) {
34937 0 : PyErr_NoMemory();
34938 0 : return -1;
34939 : }
34940 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
34941 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
34942 0 : PyErr_NoMemory();
34943 0 : return -1;
34944 : }
34945 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
34946 0 : return 0;
34947 : }
34948 :
34949 0 : static PyObject *py_drsuapi_DsReplicaSync_in_get_level(PyObject *obj, void *closure)
34950 : {
34951 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(obj);
34952 : PyObject *py_level;
34953 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
34954 0 : return py_level;
34955 : }
34956 :
34957 0 : static int py_drsuapi_DsReplicaSync_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
34958 : {
34959 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(py_obj);
34960 0 : if (value == NULL) {
34961 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
34962 0 : return -1;
34963 : }
34964 : {
34965 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
34966 0 : if (PyLong_Check(value)) {
34967 : unsigned long long test_var;
34968 0 : test_var = PyLong_AsUnsignedLongLong(value);
34969 0 : if (PyErr_Occurred() != NULL) {
34970 0 : return -1;
34971 : }
34972 0 : if (test_var > uint_max) {
34973 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34974 : PyLong_Type.tp_name, uint_max, test_var);
34975 0 : return -1;
34976 : }
34977 0 : object->in.level = test_var;
34978 : } else {
34979 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34980 : PyLong_Type.tp_name);
34981 0 : return -1;
34982 : }
34983 : }
34984 0 : return 0;
34985 : }
34986 :
34987 0 : static PyObject *py_drsuapi_DsReplicaSync_in_get_req(PyObject *obj, void *closure)
34988 : {
34989 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(obj);
34990 : PyObject *py_req;
34991 0 : if (object->in.req == NULL) {
34992 0 : Py_RETURN_NONE;
34993 : }
34994 0 : py_req = pyrpc_import_union(&drsuapi_DsReplicaSyncRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsReplicaSyncRequest");
34995 0 : if (py_req == NULL) {
34996 0 : return NULL;
34997 : }
34998 0 : return py_req;
34999 : }
35000 :
35001 0 : static int py_drsuapi_DsReplicaSync_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
35002 : {
35003 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(py_obj);
35004 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
35005 0 : if (value == NULL) {
35006 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
35007 0 : return -1;
35008 : }
35009 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
35010 0 : if (object->in.req == NULL) {
35011 0 : PyErr_NoMemory();
35012 0 : return -1;
35013 : }
35014 : {
35015 : union drsuapi_DsReplicaSyncRequest *req_switch_1;
35016 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");
35017 0 : if (req_switch_1 == NULL) {
35018 0 : return -1;
35019 : }
35020 0 : object->in.req = req_switch_1;
35021 : }
35022 0 : return 0;
35023 : }
35024 :
35025 0 : static PyObject *py_drsuapi_DsReplicaSync_get_result(PyObject *obj, void *closure)
35026 : {
35027 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(obj);
35028 : PyObject *py_result;
35029 0 : py_result = PyErr_FromWERROR(object->out.result);
35030 0 : return py_result;
35031 : }
35032 :
35033 0 : static int py_drsuapi_DsReplicaSync_set_result(PyObject *py_obj, PyObject *value, void *closure)
35034 : {
35035 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(py_obj);
35036 0 : if (value == NULL) {
35037 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
35038 0 : return -1;
35039 : }
35040 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
35041 0 : return 0;
35042 : }
35043 :
35044 : static PyGetSetDef py_drsuapi_DsReplicaSync_getsetters[] = {
35045 : {
35046 : .name = discard_const_p(char, "in_bind_handle"),
35047 : .get = py_drsuapi_DsReplicaSync_in_get_bind_handle,
35048 : .set = py_drsuapi_DsReplicaSync_in_set_bind_handle,
35049 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
35050 : },
35051 : {
35052 : .name = discard_const_p(char, "in_level"),
35053 : .get = py_drsuapi_DsReplicaSync_in_get_level,
35054 : .set = py_drsuapi_DsReplicaSync_in_set_level,
35055 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
35056 : },
35057 : {
35058 : .name = discard_const_p(char, "in_req"),
35059 : .get = py_drsuapi_DsReplicaSync_in_get_req,
35060 : .set = py_drsuapi_DsReplicaSync_in_set_req,
35061 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaSyncRequest")
35062 : },
35063 : {
35064 : .name = discard_const_p(char, "result"),
35065 : .get = py_drsuapi_DsReplicaSync_get_result,
35066 : .set = py_drsuapi_DsReplicaSync_set_result,
35067 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
35068 : },
35069 : { .name = NULL }
35070 : };
35071 :
35072 0 : static PyObject *py_drsuapi_DsReplicaSync_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
35073 : {
35074 0 : PyObject *self = pytalloc_new(struct drsuapi_DsReplicaSync, type);
35075 0 : struct drsuapi_DsReplicaSync *_self = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(self);
35076 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
35077 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
35078 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsReplicaSyncRequest);
35079 0 : return self;
35080 : }
35081 :
35082 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
35083 : {
35084 :
35085 :
35086 0 : return PyLong_FromLong(2);
35087 : }
35088 :
35089 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
35090 : {
35091 0 : const struct ndr_interface_call *call = NULL;
35092 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(py_obj);
35093 0 : PyObject *ret = NULL;
35094 0 : struct ndr_push *push = NULL;
35095 : DATA_BLOB blob;
35096 : enum ndr_err_code err;
35097 :
35098 0 : if (ndr_table_drsuapi.num_calls < 3) {
35099 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaSync_ndr_pack");
35100 0 : return NULL;
35101 : }
35102 0 : call = &ndr_table_drsuapi.calls[2];
35103 :
35104 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
35105 0 : if (push == NULL) {
35106 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
35107 0 : return NULL;
35108 : }
35109 :
35110 0 : push->flags |= ndr_push_flags;
35111 :
35112 0 : err = call->ndr_push(push, ndr_inout_flags, object);
35113 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
35114 0 : TALLOC_FREE(push);
35115 0 : PyErr_SetNdrError(err);
35116 0 : return NULL;
35117 : }
35118 0 : blob = ndr_push_blob(push);
35119 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
35120 0 : TALLOC_FREE(push);
35121 0 : return ret;
35122 : }
35123 :
35124 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35125 : {
35126 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
35127 0 : PyObject *bigendian_obj = NULL;
35128 0 : PyObject *ndr64_obj = NULL;
35129 0 : uint32_t ndr_push_flags = 0;
35130 :
35131 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
35132 : discard_const_p(char *, kwnames),
35133 : &bigendian_obj,
35134 : &ndr64_obj)) {
35135 0 : return NULL;
35136 : }
35137 :
35138 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35139 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
35140 : }
35141 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35142 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
35143 : }
35144 :
35145 0 : return py_drsuapi_DsReplicaSync_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
35146 : }
35147 :
35148 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35149 : {
35150 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
35151 0 : PyObject *bigendian_obj = NULL;
35152 0 : PyObject *ndr64_obj = NULL;
35153 0 : uint32_t ndr_push_flags = 0;
35154 :
35155 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
35156 : discard_const_p(char *, kwnames),
35157 : &bigendian_obj,
35158 : &ndr64_obj)) {
35159 0 : return NULL;
35160 : }
35161 :
35162 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35163 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
35164 : }
35165 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35166 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
35167 : }
35168 :
35169 0 : return py_drsuapi_DsReplicaSync_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
35170 : }
35171 :
35172 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
35173 : {
35174 0 : const struct ndr_interface_call *call = NULL;
35175 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(py_obj);
35176 0 : struct ndr_pull *pull = NULL;
35177 : enum ndr_err_code err;
35178 :
35179 0 : if (ndr_table_drsuapi.num_calls < 3) {
35180 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaSync_ndr_unpack");
35181 0 : return NULL;
35182 : }
35183 0 : call = &ndr_table_drsuapi.calls[2];
35184 :
35185 0 : pull = ndr_pull_init_blob(blob, object);
35186 0 : if (pull == NULL) {
35187 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
35188 0 : return NULL;
35189 : }
35190 :
35191 0 : pull->flags |= ndr_pull_flags;
35192 :
35193 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
35194 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
35195 0 : TALLOC_FREE(pull);
35196 0 : PyErr_SetNdrError(err);
35197 0 : return NULL;
35198 : }
35199 0 : if (!allow_remaining) {
35200 : uint32_t highest_ofs;
35201 :
35202 0 : if (pull->offset > pull->relative_highest_offset) {
35203 0 : highest_ofs = pull->offset;
35204 : } else {
35205 0 : highest_ofs = pull->relative_highest_offset;
35206 : }
35207 0 : if (highest_ofs < pull->data_size) {
35208 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
35209 : "not all bytes consumed ofs[%u] size[%u]",
35210 : highest_ofs, pull->data_size);
35211 0 : TALLOC_FREE(pull);
35212 0 : PyErr_SetNdrError(err);
35213 0 : return NULL;
35214 : }
35215 : }
35216 :
35217 0 : TALLOC_FREE(pull);
35218 0 : Py_RETURN_NONE;
35219 : }
35220 :
35221 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35222 : {
35223 : DATA_BLOB blob;
35224 0 : Py_ssize_t blob_length = 0;
35225 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
35226 0 : PyObject *bigendian_obj = NULL;
35227 0 : PyObject *ndr64_obj = NULL;
35228 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
35229 0 : PyObject *allow_remaining_obj = NULL;
35230 0 : bool allow_remaining = false;
35231 :
35232 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
35233 : discard_const_p(char *, kwnames),
35234 : &blob.data, &blob_length,
35235 : &bigendian_obj,
35236 : &ndr64_obj,
35237 : &allow_remaining_obj)) {
35238 0 : return NULL;
35239 : }
35240 0 : blob.length = blob_length;
35241 :
35242 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35243 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
35244 : }
35245 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35246 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
35247 : }
35248 :
35249 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
35250 0 : allow_remaining = true;
35251 : }
35252 :
35253 0 : return py_drsuapi_DsReplicaSync_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
35254 : }
35255 :
35256 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35257 : {
35258 : DATA_BLOB blob;
35259 0 : Py_ssize_t blob_length = 0;
35260 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
35261 0 : PyObject *bigendian_obj = NULL;
35262 0 : PyObject *ndr64_obj = NULL;
35263 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
35264 0 : PyObject *allow_remaining_obj = NULL;
35265 0 : bool allow_remaining = false;
35266 :
35267 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
35268 : discard_const_p(char *, kwnames),
35269 : &blob.data, &blob_length,
35270 : &bigendian_obj,
35271 : &ndr64_obj,
35272 : &allow_remaining_obj)) {
35273 0 : return NULL;
35274 : }
35275 0 : blob.length = blob_length;
35276 :
35277 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35278 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
35279 : }
35280 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35281 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
35282 : }
35283 :
35284 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
35285 0 : allow_remaining = true;
35286 : }
35287 :
35288 0 : return py_drsuapi_DsReplicaSync_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
35289 : }
35290 :
35291 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
35292 : {
35293 0 : const struct ndr_interface_call *call = NULL;
35294 0 : struct drsuapi_DsReplicaSync *object = (struct drsuapi_DsReplicaSync *)pytalloc_get_ptr(py_obj);
35295 : PyObject *ret;
35296 : char *retstr;
35297 :
35298 0 : if (ndr_table_drsuapi.num_calls < 3) {
35299 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaSync_ndr_print");
35300 0 : return NULL;
35301 : }
35302 0 : call = &ndr_table_drsuapi.calls[2];
35303 :
35304 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
35305 0 : ret = PyUnicode_FromString(retstr);
35306 0 : TALLOC_FREE(retstr);
35307 :
35308 0 : return ret;
35309 : }
35310 :
35311 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
35312 : {
35313 0 : return py_drsuapi_DsReplicaSync_ndr_print(py_obj, "drsuapi_DsReplicaSync_in", NDR_IN);
35314 : }
35315 :
35316 0 : static PyObject *py_drsuapi_DsReplicaSync_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
35317 : {
35318 0 : return py_drsuapi_DsReplicaSync_ndr_print(py_obj, "drsuapi_DsReplicaSync_out", NDR_OUT);
35319 : }
35320 :
35321 : static PyMethodDef py_drsuapi_DsReplicaSync_methods[] = {
35322 : { "opnum", (PyCFunction)py_drsuapi_DsReplicaSync_ndr_opnum, METH_NOARGS|METH_CLASS,
35323 : "drsuapi.DsReplicaSync.opnum() -> 2 (0x02) " },
35324 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSync_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
35325 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
35326 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSync_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
35327 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
35328 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSync_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
35329 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
35330 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaSync_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
35331 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
35332 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaSync_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
35333 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaSync_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
35334 : { NULL, NULL, 0, NULL }
35335 : };
35336 :
35337 :
35338 : static PyTypeObject drsuapi_DsReplicaSync_Type = {
35339 : PyVarObject_HEAD_INIT(NULL, 0)
35340 : .tp_name = "drsuapi.DsReplicaSync",
35341 : .tp_getset = py_drsuapi_DsReplicaSync_getsetters,
35342 : .tp_methods = py_drsuapi_DsReplicaSync_methods,
35343 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
35344 : .tp_new = py_drsuapi_DsReplicaSync_new,
35345 : };
35346 :
35347 951 : static bool pack_py_drsuapi_DsReplicaSync_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaSync *r)
35348 : {
35349 : PyObject *py_bind_handle;
35350 : PyObject *py_level;
35351 : PyObject *py_req;
35352 951 : const char *kwnames[] = {
35353 : "bind_handle", "level", "req", NULL
35354 : };
35355 :
35356 951 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaSync", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
35357 0 : return false;
35358 : }
35359 :
35360 951 : if (py_bind_handle == NULL) {
35361 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
35362 0 : return false;
35363 : }
35364 951 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
35365 951 : if (r->in.bind_handle == NULL) {
35366 0 : PyErr_NoMemory();
35367 0 : return false;
35368 : }
35369 951 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
35370 951 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
35371 0 : PyErr_NoMemory();
35372 0 : return false;
35373 : }
35374 951 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
35375 951 : if (py_level == NULL) {
35376 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
35377 0 : return false;
35378 : }
35379 : {
35380 951 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
35381 951 : if (PyLong_Check(py_level)) {
35382 : unsigned long long test_var;
35383 951 : test_var = PyLong_AsUnsignedLongLong(py_level);
35384 951 : if (PyErr_Occurred() != NULL) {
35385 0 : return false;
35386 : }
35387 951 : if (test_var > uint_max) {
35388 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35389 : PyLong_Type.tp_name, uint_max, test_var);
35390 0 : return false;
35391 : }
35392 951 : r->in.level = test_var;
35393 : } else {
35394 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35395 : PyLong_Type.tp_name);
35396 0 : return false;
35397 : }
35398 : }
35399 951 : if (py_req == NULL) {
35400 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
35401 0 : return false;
35402 : }
35403 951 : r->in.req = talloc_ptrtype(r, r->in.req);
35404 951 : if (r->in.req == NULL) {
35405 0 : PyErr_NoMemory();
35406 0 : return false;
35407 : }
35408 : {
35409 : union drsuapi_DsReplicaSyncRequest *req_switch_1;
35410 951 : req_switch_1 = (union drsuapi_DsReplicaSyncRequest *)pyrpc_export_union(&drsuapi_DsReplicaSyncRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaSyncRequest");
35411 951 : if (req_switch_1 == NULL) {
35412 0 : return false;
35413 : }
35414 951 : r->in.req = req_switch_1;
35415 : }
35416 951 : return true;
35417 : }
35418 :
35419 951 : static PyObject *unpack_py_drsuapi_DsReplicaSync_args_out(struct drsuapi_DsReplicaSync *r)
35420 : {
35421 : PyObject *result;
35422 951 : result = Py_None;
35423 951 : Py_INCREF(result);
35424 951 : if (!W_ERROR_IS_OK(r->out.result)) {
35425 2 : PyErr_SetWERROR(r->out.result);
35426 2 : return NULL;
35427 : }
35428 :
35429 949 : return result;
35430 : }
35431 :
35432 :
35433 0 : static PyObject *py_drsuapi_DsGetNCChanges_in_get_bind_handle(PyObject *obj, void *closure)
35434 : {
35435 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(obj);
35436 : PyObject *py_bind_handle;
35437 0 : if (object->in.bind_handle == NULL) {
35438 0 : Py_RETURN_NONE;
35439 : }
35440 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
35441 0 : return py_bind_handle;
35442 : }
35443 :
35444 0 : static int py_drsuapi_DsGetNCChanges_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
35445 : {
35446 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35447 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
35448 0 : if (value == NULL) {
35449 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
35450 0 : return -1;
35451 : }
35452 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
35453 0 : if (object->in.bind_handle == NULL) {
35454 0 : PyErr_NoMemory();
35455 0 : return -1;
35456 : }
35457 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
35458 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
35459 0 : PyErr_NoMemory();
35460 0 : return -1;
35461 : }
35462 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
35463 0 : return 0;
35464 : }
35465 :
35466 0 : static PyObject *py_drsuapi_DsGetNCChanges_in_get_level(PyObject *obj, void *closure)
35467 : {
35468 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(obj);
35469 : PyObject *py_level;
35470 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
35471 0 : return py_level;
35472 : }
35473 :
35474 0 : static int py_drsuapi_DsGetNCChanges_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
35475 : {
35476 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35477 0 : if (value == NULL) {
35478 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
35479 0 : return -1;
35480 : }
35481 : {
35482 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
35483 0 : if (PyLong_Check(value)) {
35484 : unsigned long long test_var;
35485 0 : test_var = PyLong_AsUnsignedLongLong(value);
35486 0 : if (PyErr_Occurred() != NULL) {
35487 0 : return -1;
35488 : }
35489 0 : if (test_var > uint_max) {
35490 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35491 : PyLong_Type.tp_name, uint_max, test_var);
35492 0 : return -1;
35493 : }
35494 0 : object->in.level = test_var;
35495 : } else {
35496 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35497 : PyLong_Type.tp_name);
35498 0 : return -1;
35499 : }
35500 : }
35501 0 : return 0;
35502 : }
35503 :
35504 0 : static PyObject *py_drsuapi_DsGetNCChanges_in_get_req(PyObject *obj, void *closure)
35505 : {
35506 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(obj);
35507 : PyObject *py_req;
35508 0 : if (object->in.req == NULL) {
35509 0 : Py_RETURN_NONE;
35510 : }
35511 0 : py_req = pyrpc_import_union(&drsuapi_DsGetNCChangesRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetNCChangesRequest");
35512 0 : if (py_req == NULL) {
35513 0 : return NULL;
35514 : }
35515 0 : return py_req;
35516 : }
35517 :
35518 0 : static int py_drsuapi_DsGetNCChanges_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
35519 : {
35520 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35521 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
35522 0 : if (value == NULL) {
35523 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
35524 0 : return -1;
35525 : }
35526 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
35527 0 : if (object->in.req == NULL) {
35528 0 : PyErr_NoMemory();
35529 0 : return -1;
35530 : }
35531 : {
35532 : union drsuapi_DsGetNCChangesRequest *req_switch_1;
35533 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");
35534 0 : if (req_switch_1 == NULL) {
35535 0 : return -1;
35536 : }
35537 0 : object->in.req = req_switch_1;
35538 : }
35539 0 : return 0;
35540 : }
35541 :
35542 0 : static PyObject *py_drsuapi_DsGetNCChanges_out_get_level_out(PyObject *obj, void *closure)
35543 : {
35544 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(obj);
35545 : PyObject *py_level_out;
35546 0 : if (object->out.level_out == NULL) {
35547 0 : Py_RETURN_NONE;
35548 : }
35549 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
35550 0 : return py_level_out;
35551 : }
35552 :
35553 0 : static int py_drsuapi_DsGetNCChanges_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
35554 : {
35555 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35556 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
35557 0 : if (value == NULL) {
35558 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
35559 0 : return -1;
35560 : }
35561 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
35562 0 : if (object->out.level_out == NULL) {
35563 0 : PyErr_NoMemory();
35564 0 : return -1;
35565 : }
35566 : {
35567 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
35568 0 : if (PyLong_Check(value)) {
35569 : unsigned long long test_var;
35570 0 : test_var = PyLong_AsUnsignedLongLong(value);
35571 0 : if (PyErr_Occurred() != NULL) {
35572 0 : return -1;
35573 : }
35574 0 : if (test_var > uint_max) {
35575 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35576 : PyLong_Type.tp_name, uint_max, test_var);
35577 0 : return -1;
35578 : }
35579 0 : *object->out.level_out = test_var;
35580 : } else {
35581 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35582 : PyLong_Type.tp_name);
35583 0 : return -1;
35584 : }
35585 : }
35586 0 : return 0;
35587 : }
35588 :
35589 0 : static PyObject *py_drsuapi_DsGetNCChanges_out_get_ctr(PyObject *obj, void *closure)
35590 : {
35591 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(obj);
35592 : PyObject *py_ctr;
35593 0 : if (object->out.ctr == NULL) {
35594 0 : Py_RETURN_NONE;
35595 : }
35596 0 : py_ctr = pyrpc_import_union(&drsuapi_DsGetNCChangesCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsGetNCChangesCtr");
35597 0 : if (py_ctr == NULL) {
35598 0 : return NULL;
35599 : }
35600 0 : return py_ctr;
35601 : }
35602 :
35603 0 : static int py_drsuapi_DsGetNCChanges_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
35604 : {
35605 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35606 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
35607 0 : if (value == NULL) {
35608 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
35609 0 : return -1;
35610 : }
35611 0 : object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
35612 0 : if (object->out.ctr == NULL) {
35613 0 : PyErr_NoMemory();
35614 0 : return -1;
35615 : }
35616 : {
35617 : union drsuapi_DsGetNCChangesCtr *ctr_switch_1;
35618 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");
35619 0 : if (ctr_switch_1 == NULL) {
35620 0 : return -1;
35621 : }
35622 0 : object->out.ctr = ctr_switch_1;
35623 : }
35624 0 : return 0;
35625 : }
35626 :
35627 0 : static PyObject *py_drsuapi_DsGetNCChanges_get_result(PyObject *obj, void *closure)
35628 : {
35629 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(obj);
35630 : PyObject *py_result;
35631 0 : py_result = PyErr_FromWERROR(object->out.result);
35632 0 : return py_result;
35633 : }
35634 :
35635 0 : static int py_drsuapi_DsGetNCChanges_set_result(PyObject *py_obj, PyObject *value, void *closure)
35636 : {
35637 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35638 0 : if (value == NULL) {
35639 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
35640 0 : return -1;
35641 : }
35642 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
35643 0 : return 0;
35644 : }
35645 :
35646 : static PyGetSetDef py_drsuapi_DsGetNCChanges_getsetters[] = {
35647 : {
35648 : .name = discard_const_p(char, "in_bind_handle"),
35649 : .get = py_drsuapi_DsGetNCChanges_in_get_bind_handle,
35650 : .set = py_drsuapi_DsGetNCChanges_in_set_bind_handle,
35651 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
35652 : },
35653 : {
35654 : .name = discard_const_p(char, "in_level"),
35655 : .get = py_drsuapi_DsGetNCChanges_in_get_level,
35656 : .set = py_drsuapi_DsGetNCChanges_in_set_level,
35657 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
35658 : },
35659 : {
35660 : .name = discard_const_p(char, "in_req"),
35661 : .get = py_drsuapi_DsGetNCChanges_in_get_req,
35662 : .set = py_drsuapi_DsGetNCChanges_in_set_req,
35663 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesRequest")
35664 : },
35665 : {
35666 : .name = discard_const_p(char, "out_level_out"),
35667 : .get = py_drsuapi_DsGetNCChanges_out_get_level_out,
35668 : .set = py_drsuapi_DsGetNCChanges_out_set_level_out,
35669 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
35670 : },
35671 : {
35672 : .name = discard_const_p(char, "out_ctr"),
35673 : .get = py_drsuapi_DsGetNCChanges_out_get_ctr,
35674 : .set = py_drsuapi_DsGetNCChanges_out_set_ctr,
35675 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNCChangesCtr")
35676 : },
35677 : {
35678 : .name = discard_const_p(char, "result"),
35679 : .get = py_drsuapi_DsGetNCChanges_get_result,
35680 : .set = py_drsuapi_DsGetNCChanges_set_result,
35681 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
35682 : },
35683 : { .name = NULL }
35684 : };
35685 :
35686 0 : static PyObject *py_drsuapi_DsGetNCChanges_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
35687 : {
35688 0 : PyObject *self = pytalloc_new(struct drsuapi_DsGetNCChanges, type);
35689 0 : struct drsuapi_DsGetNCChanges *_self = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(self);
35690 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
35691 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
35692 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesRequest);
35693 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
35694 0 : _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsGetNCChangesCtr);
35695 0 : return self;
35696 : }
35697 :
35698 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
35699 : {
35700 :
35701 :
35702 0 : return PyLong_FromLong(3);
35703 : }
35704 :
35705 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
35706 : {
35707 0 : const struct ndr_interface_call *call = NULL;
35708 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35709 0 : PyObject *ret = NULL;
35710 0 : struct ndr_push *push = NULL;
35711 : DATA_BLOB blob;
35712 : enum ndr_err_code err;
35713 :
35714 0 : if (ndr_table_drsuapi.num_calls < 4) {
35715 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNCChanges_ndr_pack");
35716 0 : return NULL;
35717 : }
35718 0 : call = &ndr_table_drsuapi.calls[3];
35719 :
35720 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
35721 0 : if (push == NULL) {
35722 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
35723 0 : return NULL;
35724 : }
35725 :
35726 0 : push->flags |= ndr_push_flags;
35727 :
35728 0 : err = call->ndr_push(push, ndr_inout_flags, object);
35729 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
35730 0 : TALLOC_FREE(push);
35731 0 : PyErr_SetNdrError(err);
35732 0 : return NULL;
35733 : }
35734 0 : blob = ndr_push_blob(push);
35735 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
35736 0 : TALLOC_FREE(push);
35737 0 : return ret;
35738 : }
35739 :
35740 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35741 : {
35742 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
35743 0 : PyObject *bigendian_obj = NULL;
35744 0 : PyObject *ndr64_obj = NULL;
35745 0 : uint32_t ndr_push_flags = 0;
35746 :
35747 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
35748 : discard_const_p(char *, kwnames),
35749 : &bigendian_obj,
35750 : &ndr64_obj)) {
35751 0 : return NULL;
35752 : }
35753 :
35754 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35755 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
35756 : }
35757 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35758 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
35759 : }
35760 :
35761 0 : return py_drsuapi_DsGetNCChanges_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
35762 : }
35763 :
35764 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35765 : {
35766 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
35767 0 : PyObject *bigendian_obj = NULL;
35768 0 : PyObject *ndr64_obj = NULL;
35769 0 : uint32_t ndr_push_flags = 0;
35770 :
35771 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
35772 : discard_const_p(char *, kwnames),
35773 : &bigendian_obj,
35774 : &ndr64_obj)) {
35775 0 : return NULL;
35776 : }
35777 :
35778 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35779 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
35780 : }
35781 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35782 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
35783 : }
35784 :
35785 0 : return py_drsuapi_DsGetNCChanges_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
35786 : }
35787 :
35788 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
35789 : {
35790 0 : const struct ndr_interface_call *call = NULL;
35791 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35792 0 : struct ndr_pull *pull = NULL;
35793 : enum ndr_err_code err;
35794 :
35795 0 : if (ndr_table_drsuapi.num_calls < 4) {
35796 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNCChanges_ndr_unpack");
35797 0 : return NULL;
35798 : }
35799 0 : call = &ndr_table_drsuapi.calls[3];
35800 :
35801 0 : pull = ndr_pull_init_blob(blob, object);
35802 0 : if (pull == NULL) {
35803 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
35804 0 : return NULL;
35805 : }
35806 :
35807 0 : pull->flags |= ndr_pull_flags;
35808 :
35809 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
35810 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
35811 0 : TALLOC_FREE(pull);
35812 0 : PyErr_SetNdrError(err);
35813 0 : return NULL;
35814 : }
35815 0 : if (!allow_remaining) {
35816 : uint32_t highest_ofs;
35817 :
35818 0 : if (pull->offset > pull->relative_highest_offset) {
35819 0 : highest_ofs = pull->offset;
35820 : } else {
35821 0 : highest_ofs = pull->relative_highest_offset;
35822 : }
35823 0 : if (highest_ofs < pull->data_size) {
35824 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
35825 : "not all bytes consumed ofs[%u] size[%u]",
35826 : highest_ofs, pull->data_size);
35827 0 : TALLOC_FREE(pull);
35828 0 : PyErr_SetNdrError(err);
35829 0 : return NULL;
35830 : }
35831 : }
35832 :
35833 0 : TALLOC_FREE(pull);
35834 0 : Py_RETURN_NONE;
35835 : }
35836 :
35837 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35838 : {
35839 : DATA_BLOB blob;
35840 0 : Py_ssize_t blob_length = 0;
35841 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
35842 0 : PyObject *bigendian_obj = NULL;
35843 0 : PyObject *ndr64_obj = NULL;
35844 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
35845 0 : PyObject *allow_remaining_obj = NULL;
35846 0 : bool allow_remaining = false;
35847 :
35848 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
35849 : discard_const_p(char *, kwnames),
35850 : &blob.data, &blob_length,
35851 : &bigendian_obj,
35852 : &ndr64_obj,
35853 : &allow_remaining_obj)) {
35854 0 : return NULL;
35855 : }
35856 0 : blob.length = blob_length;
35857 :
35858 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35859 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
35860 : }
35861 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35862 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
35863 : }
35864 :
35865 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
35866 0 : allow_remaining = true;
35867 : }
35868 :
35869 0 : return py_drsuapi_DsGetNCChanges_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
35870 : }
35871 :
35872 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35873 : {
35874 : DATA_BLOB blob;
35875 0 : Py_ssize_t blob_length = 0;
35876 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
35877 0 : PyObject *bigendian_obj = NULL;
35878 0 : PyObject *ndr64_obj = NULL;
35879 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
35880 0 : PyObject *allow_remaining_obj = NULL;
35881 0 : bool allow_remaining = false;
35882 :
35883 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
35884 : discard_const_p(char *, kwnames),
35885 : &blob.data, &blob_length,
35886 : &bigendian_obj,
35887 : &ndr64_obj,
35888 : &allow_remaining_obj)) {
35889 0 : return NULL;
35890 : }
35891 0 : blob.length = blob_length;
35892 :
35893 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35894 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
35895 : }
35896 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35897 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
35898 : }
35899 :
35900 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
35901 0 : allow_remaining = true;
35902 : }
35903 :
35904 0 : return py_drsuapi_DsGetNCChanges_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
35905 : }
35906 :
35907 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
35908 : {
35909 0 : const struct ndr_interface_call *call = NULL;
35910 0 : struct drsuapi_DsGetNCChanges *object = (struct drsuapi_DsGetNCChanges *)pytalloc_get_ptr(py_obj);
35911 : PyObject *ret;
35912 : char *retstr;
35913 :
35914 0 : if (ndr_table_drsuapi.num_calls < 4) {
35915 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNCChanges_ndr_print");
35916 0 : return NULL;
35917 : }
35918 0 : call = &ndr_table_drsuapi.calls[3];
35919 :
35920 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
35921 0 : ret = PyUnicode_FromString(retstr);
35922 0 : TALLOC_FREE(retstr);
35923 :
35924 0 : return ret;
35925 : }
35926 :
35927 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
35928 : {
35929 0 : return py_drsuapi_DsGetNCChanges_ndr_print(py_obj, "drsuapi_DsGetNCChanges_in", NDR_IN);
35930 : }
35931 :
35932 0 : static PyObject *py_drsuapi_DsGetNCChanges_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
35933 : {
35934 0 : return py_drsuapi_DsGetNCChanges_ndr_print(py_obj, "drsuapi_DsGetNCChanges_out", NDR_OUT);
35935 : }
35936 :
35937 : static PyMethodDef py_drsuapi_DsGetNCChanges_methods[] = {
35938 : { "opnum", (PyCFunction)py_drsuapi_DsGetNCChanges_ndr_opnum, METH_NOARGS|METH_CLASS,
35939 : "drsuapi.DsGetNCChanges.opnum() -> 3 (0x03) " },
35940 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChanges_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
35941 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
35942 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChanges_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
35943 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
35944 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChanges_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
35945 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
35946 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNCChanges_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
35947 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
35948 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetNCChanges_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
35949 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetNCChanges_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
35950 : { NULL, NULL, 0, NULL }
35951 : };
35952 :
35953 :
35954 : static PyTypeObject drsuapi_DsGetNCChanges_Type = {
35955 : PyVarObject_HEAD_INIT(NULL, 0)
35956 : .tp_name = "drsuapi.DsGetNCChanges",
35957 : .tp_getset = py_drsuapi_DsGetNCChanges_getsetters,
35958 : .tp_methods = py_drsuapi_DsGetNCChanges_methods,
35959 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
35960 : .tp_new = py_drsuapi_DsGetNCChanges_new,
35961 : };
35962 :
35963 2679 : static bool pack_py_drsuapi_DsGetNCChanges_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetNCChanges *r)
35964 : {
35965 : PyObject *py_bind_handle;
35966 : PyObject *py_level;
35967 : PyObject *py_req;
35968 2679 : const char *kwnames[] = {
35969 : "bind_handle", "level", "req", NULL
35970 : };
35971 :
35972 2679 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetNCChanges", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
35973 0 : return false;
35974 : }
35975 :
35976 2679 : if (py_bind_handle == NULL) {
35977 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
35978 0 : return false;
35979 : }
35980 2679 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
35981 2679 : if (r->in.bind_handle == NULL) {
35982 0 : PyErr_NoMemory();
35983 0 : return false;
35984 : }
35985 2679 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
35986 2679 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
35987 0 : PyErr_NoMemory();
35988 0 : return false;
35989 : }
35990 2679 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
35991 2679 : if (py_level == NULL) {
35992 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
35993 0 : return false;
35994 : }
35995 : {
35996 2679 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
35997 2679 : if (PyLong_Check(py_level)) {
35998 : unsigned long long test_var;
35999 2679 : test_var = PyLong_AsUnsignedLongLong(py_level);
36000 2679 : if (PyErr_Occurred() != NULL) {
36001 0 : return false;
36002 : }
36003 2679 : if (test_var > uint_max) {
36004 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
36005 : PyLong_Type.tp_name, uint_max, test_var);
36006 0 : return false;
36007 : }
36008 2679 : r->in.level = test_var;
36009 : } else {
36010 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
36011 : PyLong_Type.tp_name);
36012 0 : return false;
36013 : }
36014 : }
36015 2679 : if (py_req == NULL) {
36016 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
36017 0 : return false;
36018 : }
36019 2679 : r->in.req = talloc_ptrtype(r, r->in.req);
36020 2679 : if (r->in.req == NULL) {
36021 0 : PyErr_NoMemory();
36022 0 : return false;
36023 : }
36024 : {
36025 : union drsuapi_DsGetNCChangesRequest *req_switch_1;
36026 2679 : req_switch_1 = (union drsuapi_DsGetNCChangesRequest *)pyrpc_export_union(&drsuapi_DsGetNCChangesRequest_Type, r, r->in.level, py_req, "union drsuapi_DsGetNCChangesRequest");
36027 2679 : if (req_switch_1 == NULL) {
36028 0 : return false;
36029 : }
36030 2679 : r->in.req = req_switch_1;
36031 : }
36032 2679 : return true;
36033 : }
36034 :
36035 2679 : static PyObject *unpack_py_drsuapi_DsGetNCChanges_args_out(struct drsuapi_DsGetNCChanges *r)
36036 : {
36037 : PyObject *result;
36038 : PyObject *py_level_out;
36039 : PyObject *py_ctr;
36040 2679 : result = PyTuple_New(2);
36041 2679 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
36042 2679 : PyTuple_SetItem(result, 0, py_level_out);
36043 2679 : py_ctr = pyrpc_import_union(&drsuapi_DsGetNCChangesCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsGetNCChangesCtr");
36044 2679 : if (py_ctr == NULL) {
36045 0 : return NULL;
36046 : }
36047 2679 : PyTuple_SetItem(result, 1, py_ctr);
36048 2679 : if (!W_ERROR_IS_OK(r->out.result)) {
36049 102 : PyErr_SetWERROR(r->out.result);
36050 102 : return NULL;
36051 : }
36052 :
36053 2577 : return result;
36054 : }
36055 :
36056 :
36057 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_in_get_bind_handle(PyObject *obj, void *closure)
36058 : {
36059 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(obj);
36060 : PyObject *py_bind_handle;
36061 0 : if (object->in.bind_handle == NULL) {
36062 0 : Py_RETURN_NONE;
36063 : }
36064 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
36065 0 : return py_bind_handle;
36066 : }
36067 :
36068 0 : static int py_drsuapi_DsReplicaUpdateRefs_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
36069 : {
36070 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(py_obj);
36071 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
36072 0 : if (value == NULL) {
36073 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
36074 0 : return -1;
36075 : }
36076 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
36077 0 : if (object->in.bind_handle == NULL) {
36078 0 : PyErr_NoMemory();
36079 0 : return -1;
36080 : }
36081 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
36082 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
36083 0 : PyErr_NoMemory();
36084 0 : return -1;
36085 : }
36086 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
36087 0 : return 0;
36088 : }
36089 :
36090 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_in_get_level(PyObject *obj, void *closure)
36091 : {
36092 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(obj);
36093 : PyObject *py_level;
36094 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
36095 0 : return py_level;
36096 : }
36097 :
36098 0 : static int py_drsuapi_DsReplicaUpdateRefs_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
36099 : {
36100 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(py_obj);
36101 0 : if (value == NULL) {
36102 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
36103 0 : return -1;
36104 : }
36105 : {
36106 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
36107 0 : if (PyLong_Check(value)) {
36108 : unsigned long long test_var;
36109 0 : test_var = PyLong_AsUnsignedLongLong(value);
36110 0 : if (PyErr_Occurred() != NULL) {
36111 0 : return -1;
36112 : }
36113 0 : if (test_var > uint_max) {
36114 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
36115 : PyLong_Type.tp_name, uint_max, test_var);
36116 0 : return -1;
36117 : }
36118 0 : object->in.level = test_var;
36119 : } else {
36120 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
36121 : PyLong_Type.tp_name);
36122 0 : return -1;
36123 : }
36124 : }
36125 0 : return 0;
36126 : }
36127 :
36128 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_in_get_req(PyObject *obj, void *closure)
36129 : {
36130 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(obj);
36131 : PyObject *py_req;
36132 0 : py_req = pyrpc_import_union(&drsuapi_DsReplicaUpdateRefsRequest_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.req, "union drsuapi_DsReplicaUpdateRefsRequest");
36133 0 : if (py_req == NULL) {
36134 0 : return NULL;
36135 : }
36136 0 : return py_req;
36137 : }
36138 :
36139 0 : static int py_drsuapi_DsReplicaUpdateRefs_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
36140 : {
36141 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(py_obj);
36142 0 : if (value == NULL) {
36143 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
36144 0 : return -1;
36145 : }
36146 : {
36147 : union drsuapi_DsReplicaUpdateRefsRequest *req_switch_0;
36148 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");
36149 0 : if (req_switch_0 == NULL) {
36150 0 : return -1;
36151 : }
36152 0 : object->in.req = *req_switch_0;
36153 : }
36154 0 : return 0;
36155 : }
36156 :
36157 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_get_result(PyObject *obj, void *closure)
36158 : {
36159 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(obj);
36160 : PyObject *py_result;
36161 0 : py_result = PyErr_FromWERROR(object->out.result);
36162 0 : return py_result;
36163 : }
36164 :
36165 0 : static int py_drsuapi_DsReplicaUpdateRefs_set_result(PyObject *py_obj, PyObject *value, void *closure)
36166 : {
36167 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(py_obj);
36168 0 : if (value == NULL) {
36169 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
36170 0 : return -1;
36171 : }
36172 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
36173 0 : return 0;
36174 : }
36175 :
36176 : static PyGetSetDef py_drsuapi_DsReplicaUpdateRefs_getsetters[] = {
36177 : {
36178 : .name = discard_const_p(char, "in_bind_handle"),
36179 : .get = py_drsuapi_DsReplicaUpdateRefs_in_get_bind_handle,
36180 : .set = py_drsuapi_DsReplicaUpdateRefs_in_set_bind_handle,
36181 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
36182 : },
36183 : {
36184 : .name = discard_const_p(char, "in_level"),
36185 : .get = py_drsuapi_DsReplicaUpdateRefs_in_get_level,
36186 : .set = py_drsuapi_DsReplicaUpdateRefs_in_set_level,
36187 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
36188 : },
36189 : {
36190 : .name = discard_const_p(char, "in_req"),
36191 : .get = py_drsuapi_DsReplicaUpdateRefs_in_get_req,
36192 : .set = py_drsuapi_DsReplicaUpdateRefs_in_set_req,
36193 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaUpdateRefsRequest")
36194 : },
36195 : {
36196 : .name = discard_const_p(char, "result"),
36197 : .get = py_drsuapi_DsReplicaUpdateRefs_get_result,
36198 : .set = py_drsuapi_DsReplicaUpdateRefs_set_result,
36199 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
36200 : },
36201 : { .name = NULL }
36202 : };
36203 :
36204 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
36205 : {
36206 0 : PyObject *self = pytalloc_new(struct drsuapi_DsReplicaUpdateRefs, type);
36207 0 : struct drsuapi_DsReplicaUpdateRefs *_self = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(self);
36208 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
36209 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
36210 0 : return self;
36211 : }
36212 :
36213 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
36214 : {
36215 :
36216 :
36217 0 : return PyLong_FromLong(4);
36218 : }
36219 :
36220 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
36221 : {
36222 0 : const struct ndr_interface_call *call = NULL;
36223 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(py_obj);
36224 0 : PyObject *ret = NULL;
36225 0 : struct ndr_push *push = NULL;
36226 : DATA_BLOB blob;
36227 : enum ndr_err_code err;
36228 :
36229 0 : if (ndr_table_drsuapi.num_calls < 5) {
36230 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaUpdateRefs_ndr_pack");
36231 0 : return NULL;
36232 : }
36233 0 : call = &ndr_table_drsuapi.calls[4];
36234 :
36235 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
36236 0 : if (push == NULL) {
36237 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
36238 0 : return NULL;
36239 : }
36240 :
36241 0 : push->flags |= ndr_push_flags;
36242 :
36243 0 : err = call->ndr_push(push, ndr_inout_flags, object);
36244 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
36245 0 : TALLOC_FREE(push);
36246 0 : PyErr_SetNdrError(err);
36247 0 : return NULL;
36248 : }
36249 0 : blob = ndr_push_blob(push);
36250 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
36251 0 : TALLOC_FREE(push);
36252 0 : return ret;
36253 : }
36254 :
36255 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36256 : {
36257 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
36258 0 : PyObject *bigendian_obj = NULL;
36259 0 : PyObject *ndr64_obj = NULL;
36260 0 : uint32_t ndr_push_flags = 0;
36261 :
36262 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
36263 : discard_const_p(char *, kwnames),
36264 : &bigendian_obj,
36265 : &ndr64_obj)) {
36266 0 : return NULL;
36267 : }
36268 :
36269 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36270 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
36271 : }
36272 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36273 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
36274 : }
36275 :
36276 0 : return py_drsuapi_DsReplicaUpdateRefs_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
36277 : }
36278 :
36279 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36280 : {
36281 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
36282 0 : PyObject *bigendian_obj = NULL;
36283 0 : PyObject *ndr64_obj = NULL;
36284 0 : uint32_t ndr_push_flags = 0;
36285 :
36286 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
36287 : discard_const_p(char *, kwnames),
36288 : &bigendian_obj,
36289 : &ndr64_obj)) {
36290 0 : return NULL;
36291 : }
36292 :
36293 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36294 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
36295 : }
36296 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36297 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
36298 : }
36299 :
36300 0 : return py_drsuapi_DsReplicaUpdateRefs_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
36301 : }
36302 :
36303 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
36304 : {
36305 0 : const struct ndr_interface_call *call = NULL;
36306 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(py_obj);
36307 0 : struct ndr_pull *pull = NULL;
36308 : enum ndr_err_code err;
36309 :
36310 0 : if (ndr_table_drsuapi.num_calls < 5) {
36311 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaUpdateRefs_ndr_unpack");
36312 0 : return NULL;
36313 : }
36314 0 : call = &ndr_table_drsuapi.calls[4];
36315 :
36316 0 : pull = ndr_pull_init_blob(blob, object);
36317 0 : if (pull == NULL) {
36318 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
36319 0 : return NULL;
36320 : }
36321 :
36322 0 : pull->flags |= ndr_pull_flags;
36323 :
36324 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
36325 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
36326 0 : TALLOC_FREE(pull);
36327 0 : PyErr_SetNdrError(err);
36328 0 : return NULL;
36329 : }
36330 0 : if (!allow_remaining) {
36331 : uint32_t highest_ofs;
36332 :
36333 0 : if (pull->offset > pull->relative_highest_offset) {
36334 0 : highest_ofs = pull->offset;
36335 : } else {
36336 0 : highest_ofs = pull->relative_highest_offset;
36337 : }
36338 0 : if (highest_ofs < pull->data_size) {
36339 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
36340 : "not all bytes consumed ofs[%u] size[%u]",
36341 : highest_ofs, pull->data_size);
36342 0 : TALLOC_FREE(pull);
36343 0 : PyErr_SetNdrError(err);
36344 0 : return NULL;
36345 : }
36346 : }
36347 :
36348 0 : TALLOC_FREE(pull);
36349 0 : Py_RETURN_NONE;
36350 : }
36351 :
36352 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36353 : {
36354 : DATA_BLOB blob;
36355 0 : Py_ssize_t blob_length = 0;
36356 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
36357 0 : PyObject *bigendian_obj = NULL;
36358 0 : PyObject *ndr64_obj = NULL;
36359 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
36360 0 : PyObject *allow_remaining_obj = NULL;
36361 0 : bool allow_remaining = false;
36362 :
36363 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
36364 : discard_const_p(char *, kwnames),
36365 : &blob.data, &blob_length,
36366 : &bigendian_obj,
36367 : &ndr64_obj,
36368 : &allow_remaining_obj)) {
36369 0 : return NULL;
36370 : }
36371 0 : blob.length = blob_length;
36372 :
36373 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36374 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
36375 : }
36376 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36377 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
36378 : }
36379 :
36380 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
36381 0 : allow_remaining = true;
36382 : }
36383 :
36384 0 : return py_drsuapi_DsReplicaUpdateRefs_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
36385 : }
36386 :
36387 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36388 : {
36389 : DATA_BLOB blob;
36390 0 : Py_ssize_t blob_length = 0;
36391 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
36392 0 : PyObject *bigendian_obj = NULL;
36393 0 : PyObject *ndr64_obj = NULL;
36394 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
36395 0 : PyObject *allow_remaining_obj = NULL;
36396 0 : bool allow_remaining = false;
36397 :
36398 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
36399 : discard_const_p(char *, kwnames),
36400 : &blob.data, &blob_length,
36401 : &bigendian_obj,
36402 : &ndr64_obj,
36403 : &allow_remaining_obj)) {
36404 0 : return NULL;
36405 : }
36406 0 : blob.length = blob_length;
36407 :
36408 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36409 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
36410 : }
36411 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36412 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
36413 : }
36414 :
36415 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
36416 0 : allow_remaining = true;
36417 : }
36418 :
36419 0 : return py_drsuapi_DsReplicaUpdateRefs_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
36420 : }
36421 :
36422 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
36423 : {
36424 0 : const struct ndr_interface_call *call = NULL;
36425 0 : struct drsuapi_DsReplicaUpdateRefs *object = (struct drsuapi_DsReplicaUpdateRefs *)pytalloc_get_ptr(py_obj);
36426 : PyObject *ret;
36427 : char *retstr;
36428 :
36429 0 : if (ndr_table_drsuapi.num_calls < 5) {
36430 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaUpdateRefs_ndr_print");
36431 0 : return NULL;
36432 : }
36433 0 : call = &ndr_table_drsuapi.calls[4];
36434 :
36435 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
36436 0 : ret = PyUnicode_FromString(retstr);
36437 0 : TALLOC_FREE(retstr);
36438 :
36439 0 : return ret;
36440 : }
36441 :
36442 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
36443 : {
36444 0 : return py_drsuapi_DsReplicaUpdateRefs_ndr_print(py_obj, "drsuapi_DsReplicaUpdateRefs_in", NDR_IN);
36445 : }
36446 :
36447 0 : static PyObject *py_drsuapi_DsReplicaUpdateRefs_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
36448 : {
36449 0 : return py_drsuapi_DsReplicaUpdateRefs_ndr_print(py_obj, "drsuapi_DsReplicaUpdateRefs_out", NDR_OUT);
36450 : }
36451 :
36452 : static PyMethodDef py_drsuapi_DsReplicaUpdateRefs_methods[] = {
36453 : { "opnum", (PyCFunction)py_drsuapi_DsReplicaUpdateRefs_ndr_opnum, METH_NOARGS|METH_CLASS,
36454 : "drsuapi.DsReplicaUpdateRefs.opnum() -> 4 (0x04) " },
36455 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefs_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
36456 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
36457 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefs_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
36458 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
36459 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefs_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
36460 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
36461 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaUpdateRefs_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
36462 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
36463 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaUpdateRefs_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
36464 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaUpdateRefs_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
36465 : { NULL, NULL, 0, NULL }
36466 : };
36467 :
36468 :
36469 : static PyTypeObject drsuapi_DsReplicaUpdateRefs_Type = {
36470 : PyVarObject_HEAD_INIT(NULL, 0)
36471 : .tp_name = "drsuapi.DsReplicaUpdateRefs",
36472 : .tp_getset = py_drsuapi_DsReplicaUpdateRefs_getsetters,
36473 : .tp_methods = py_drsuapi_DsReplicaUpdateRefs_methods,
36474 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
36475 : .tp_new = py_drsuapi_DsReplicaUpdateRefs_new,
36476 : };
36477 :
36478 165 : static bool pack_py_drsuapi_DsReplicaUpdateRefs_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaUpdateRefs *r)
36479 : {
36480 : PyObject *py_bind_handle;
36481 : PyObject *py_level;
36482 : PyObject *py_req;
36483 165 : const char *kwnames[] = {
36484 : "bind_handle", "level", "req", NULL
36485 : };
36486 :
36487 165 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaUpdateRefs", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
36488 0 : return false;
36489 : }
36490 :
36491 165 : if (py_bind_handle == NULL) {
36492 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
36493 0 : return false;
36494 : }
36495 165 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
36496 165 : if (r->in.bind_handle == NULL) {
36497 0 : PyErr_NoMemory();
36498 0 : return false;
36499 : }
36500 165 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
36501 165 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
36502 0 : PyErr_NoMemory();
36503 0 : return false;
36504 : }
36505 165 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
36506 165 : if (py_level == NULL) {
36507 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
36508 0 : return false;
36509 : }
36510 : {
36511 165 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
36512 165 : if (PyLong_Check(py_level)) {
36513 : unsigned long long test_var;
36514 165 : test_var = PyLong_AsUnsignedLongLong(py_level);
36515 165 : if (PyErr_Occurred() != NULL) {
36516 0 : return false;
36517 : }
36518 165 : if (test_var > uint_max) {
36519 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
36520 : PyLong_Type.tp_name, uint_max, test_var);
36521 0 : return false;
36522 : }
36523 165 : r->in.level = test_var;
36524 : } else {
36525 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
36526 : PyLong_Type.tp_name);
36527 0 : return false;
36528 : }
36529 : }
36530 165 : if (py_req == NULL) {
36531 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
36532 0 : return false;
36533 : }
36534 : {
36535 : union drsuapi_DsReplicaUpdateRefsRequest *req_switch_0;
36536 165 : req_switch_0 = (union drsuapi_DsReplicaUpdateRefsRequest *)pyrpc_export_union(&drsuapi_DsReplicaUpdateRefsRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaUpdateRefsRequest");
36537 165 : if (req_switch_0 == NULL) {
36538 0 : return false;
36539 : }
36540 165 : r->in.req = *req_switch_0;
36541 : }
36542 165 : return true;
36543 : }
36544 :
36545 165 : static PyObject *unpack_py_drsuapi_DsReplicaUpdateRefs_args_out(struct drsuapi_DsReplicaUpdateRefs *r)
36546 : {
36547 : PyObject *result;
36548 165 : result = Py_None;
36549 165 : Py_INCREF(result);
36550 165 : if (!W_ERROR_IS_OK(r->out.result)) {
36551 0 : PyErr_SetWERROR(r->out.result);
36552 0 : return NULL;
36553 : }
36554 :
36555 165 : return result;
36556 : }
36557 :
36558 :
36559 0 : static PyObject *py_drsuapi_DsReplicaAdd_in_get_bind_handle(PyObject *obj, void *closure)
36560 : {
36561 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(obj);
36562 : PyObject *py_bind_handle;
36563 0 : if (object->in.bind_handle == NULL) {
36564 0 : Py_RETURN_NONE;
36565 : }
36566 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
36567 0 : return py_bind_handle;
36568 : }
36569 :
36570 0 : static int py_drsuapi_DsReplicaAdd_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
36571 : {
36572 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(py_obj);
36573 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
36574 0 : if (value == NULL) {
36575 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
36576 0 : return -1;
36577 : }
36578 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
36579 0 : if (object->in.bind_handle == NULL) {
36580 0 : PyErr_NoMemory();
36581 0 : return -1;
36582 : }
36583 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
36584 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
36585 0 : PyErr_NoMemory();
36586 0 : return -1;
36587 : }
36588 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
36589 0 : return 0;
36590 : }
36591 :
36592 0 : static PyObject *py_drsuapi_DsReplicaAdd_in_get_level(PyObject *obj, void *closure)
36593 : {
36594 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(obj);
36595 : PyObject *py_level;
36596 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
36597 0 : return py_level;
36598 : }
36599 :
36600 0 : static int py_drsuapi_DsReplicaAdd_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
36601 : {
36602 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(py_obj);
36603 0 : if (value == NULL) {
36604 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
36605 0 : return -1;
36606 : }
36607 : {
36608 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
36609 0 : if (PyLong_Check(value)) {
36610 : unsigned long long test_var;
36611 0 : test_var = PyLong_AsUnsignedLongLong(value);
36612 0 : if (PyErr_Occurred() != NULL) {
36613 0 : return -1;
36614 : }
36615 0 : if (test_var > uint_max) {
36616 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
36617 : PyLong_Type.tp_name, uint_max, test_var);
36618 0 : return -1;
36619 : }
36620 0 : object->in.level = test_var;
36621 : } else {
36622 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
36623 : PyLong_Type.tp_name);
36624 0 : return -1;
36625 : }
36626 : }
36627 0 : return 0;
36628 : }
36629 :
36630 0 : static PyObject *py_drsuapi_DsReplicaAdd_in_get_req(PyObject *obj, void *closure)
36631 : {
36632 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(obj);
36633 : PyObject *py_req;
36634 0 : py_req = pyrpc_import_union(&drsuapi_DsReplicaAddRequest_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.req, "union drsuapi_DsReplicaAddRequest");
36635 0 : if (py_req == NULL) {
36636 0 : return NULL;
36637 : }
36638 0 : return py_req;
36639 : }
36640 :
36641 0 : static int py_drsuapi_DsReplicaAdd_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
36642 : {
36643 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(py_obj);
36644 0 : if (value == NULL) {
36645 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
36646 0 : return -1;
36647 : }
36648 : {
36649 : union drsuapi_DsReplicaAddRequest *req_switch_0;
36650 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");
36651 0 : if (req_switch_0 == NULL) {
36652 0 : return -1;
36653 : }
36654 0 : object->in.req = *req_switch_0;
36655 : }
36656 0 : return 0;
36657 : }
36658 :
36659 0 : static PyObject *py_drsuapi_DsReplicaAdd_get_result(PyObject *obj, void *closure)
36660 : {
36661 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(obj);
36662 : PyObject *py_result;
36663 0 : py_result = PyErr_FromWERROR(object->out.result);
36664 0 : return py_result;
36665 : }
36666 :
36667 0 : static int py_drsuapi_DsReplicaAdd_set_result(PyObject *py_obj, PyObject *value, void *closure)
36668 : {
36669 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(py_obj);
36670 0 : if (value == NULL) {
36671 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
36672 0 : return -1;
36673 : }
36674 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
36675 0 : return 0;
36676 : }
36677 :
36678 : static PyGetSetDef py_drsuapi_DsReplicaAdd_getsetters[] = {
36679 : {
36680 : .name = discard_const_p(char, "in_bind_handle"),
36681 : .get = py_drsuapi_DsReplicaAdd_in_get_bind_handle,
36682 : .set = py_drsuapi_DsReplicaAdd_in_set_bind_handle,
36683 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
36684 : },
36685 : {
36686 : .name = discard_const_p(char, "in_level"),
36687 : .get = py_drsuapi_DsReplicaAdd_in_get_level,
36688 : .set = py_drsuapi_DsReplicaAdd_in_set_level,
36689 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
36690 : },
36691 : {
36692 : .name = discard_const_p(char, "in_req"),
36693 : .get = py_drsuapi_DsReplicaAdd_in_get_req,
36694 : .set = py_drsuapi_DsReplicaAdd_in_set_req,
36695 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaAddRequest")
36696 : },
36697 : {
36698 : .name = discard_const_p(char, "result"),
36699 : .get = py_drsuapi_DsReplicaAdd_get_result,
36700 : .set = py_drsuapi_DsReplicaAdd_set_result,
36701 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
36702 : },
36703 : { .name = NULL }
36704 : };
36705 :
36706 0 : static PyObject *py_drsuapi_DsReplicaAdd_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
36707 : {
36708 0 : PyObject *self = pytalloc_new(struct drsuapi_DsReplicaAdd, type);
36709 0 : struct drsuapi_DsReplicaAdd *_self = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(self);
36710 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
36711 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
36712 0 : return self;
36713 : }
36714 :
36715 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
36716 : {
36717 :
36718 :
36719 0 : return PyLong_FromLong(5);
36720 : }
36721 :
36722 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
36723 : {
36724 0 : const struct ndr_interface_call *call = NULL;
36725 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(py_obj);
36726 0 : PyObject *ret = NULL;
36727 0 : struct ndr_push *push = NULL;
36728 : DATA_BLOB blob;
36729 : enum ndr_err_code err;
36730 :
36731 0 : if (ndr_table_drsuapi.num_calls < 6) {
36732 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaAdd_ndr_pack");
36733 0 : return NULL;
36734 : }
36735 0 : call = &ndr_table_drsuapi.calls[5];
36736 :
36737 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
36738 0 : if (push == NULL) {
36739 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
36740 0 : return NULL;
36741 : }
36742 :
36743 0 : push->flags |= ndr_push_flags;
36744 :
36745 0 : err = call->ndr_push(push, ndr_inout_flags, object);
36746 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
36747 0 : TALLOC_FREE(push);
36748 0 : PyErr_SetNdrError(err);
36749 0 : return NULL;
36750 : }
36751 0 : blob = ndr_push_blob(push);
36752 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
36753 0 : TALLOC_FREE(push);
36754 0 : return ret;
36755 : }
36756 :
36757 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36758 : {
36759 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
36760 0 : PyObject *bigendian_obj = NULL;
36761 0 : PyObject *ndr64_obj = NULL;
36762 0 : uint32_t ndr_push_flags = 0;
36763 :
36764 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
36765 : discard_const_p(char *, kwnames),
36766 : &bigendian_obj,
36767 : &ndr64_obj)) {
36768 0 : return NULL;
36769 : }
36770 :
36771 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36772 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
36773 : }
36774 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36775 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
36776 : }
36777 :
36778 0 : return py_drsuapi_DsReplicaAdd_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
36779 : }
36780 :
36781 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36782 : {
36783 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
36784 0 : PyObject *bigendian_obj = NULL;
36785 0 : PyObject *ndr64_obj = NULL;
36786 0 : uint32_t ndr_push_flags = 0;
36787 :
36788 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
36789 : discard_const_p(char *, kwnames),
36790 : &bigendian_obj,
36791 : &ndr64_obj)) {
36792 0 : return NULL;
36793 : }
36794 :
36795 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36796 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
36797 : }
36798 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36799 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
36800 : }
36801 :
36802 0 : return py_drsuapi_DsReplicaAdd_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
36803 : }
36804 :
36805 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
36806 : {
36807 0 : const struct ndr_interface_call *call = NULL;
36808 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(py_obj);
36809 0 : struct ndr_pull *pull = NULL;
36810 : enum ndr_err_code err;
36811 :
36812 0 : if (ndr_table_drsuapi.num_calls < 6) {
36813 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaAdd_ndr_unpack");
36814 0 : return NULL;
36815 : }
36816 0 : call = &ndr_table_drsuapi.calls[5];
36817 :
36818 0 : pull = ndr_pull_init_blob(blob, object);
36819 0 : if (pull == NULL) {
36820 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
36821 0 : return NULL;
36822 : }
36823 :
36824 0 : pull->flags |= ndr_pull_flags;
36825 :
36826 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
36827 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
36828 0 : TALLOC_FREE(pull);
36829 0 : PyErr_SetNdrError(err);
36830 0 : return NULL;
36831 : }
36832 0 : if (!allow_remaining) {
36833 : uint32_t highest_ofs;
36834 :
36835 0 : if (pull->offset > pull->relative_highest_offset) {
36836 0 : highest_ofs = pull->offset;
36837 : } else {
36838 0 : highest_ofs = pull->relative_highest_offset;
36839 : }
36840 0 : if (highest_ofs < pull->data_size) {
36841 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
36842 : "not all bytes consumed ofs[%u] size[%u]",
36843 : highest_ofs, pull->data_size);
36844 0 : TALLOC_FREE(pull);
36845 0 : PyErr_SetNdrError(err);
36846 0 : return NULL;
36847 : }
36848 : }
36849 :
36850 0 : TALLOC_FREE(pull);
36851 0 : Py_RETURN_NONE;
36852 : }
36853 :
36854 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36855 : {
36856 : DATA_BLOB blob;
36857 0 : Py_ssize_t blob_length = 0;
36858 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
36859 0 : PyObject *bigendian_obj = NULL;
36860 0 : PyObject *ndr64_obj = NULL;
36861 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
36862 0 : PyObject *allow_remaining_obj = NULL;
36863 0 : bool allow_remaining = false;
36864 :
36865 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
36866 : discard_const_p(char *, kwnames),
36867 : &blob.data, &blob_length,
36868 : &bigendian_obj,
36869 : &ndr64_obj,
36870 : &allow_remaining_obj)) {
36871 0 : return NULL;
36872 : }
36873 0 : blob.length = blob_length;
36874 :
36875 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36876 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
36877 : }
36878 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36879 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
36880 : }
36881 :
36882 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
36883 0 : allow_remaining = true;
36884 : }
36885 :
36886 0 : return py_drsuapi_DsReplicaAdd_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
36887 : }
36888 :
36889 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36890 : {
36891 : DATA_BLOB blob;
36892 0 : Py_ssize_t blob_length = 0;
36893 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
36894 0 : PyObject *bigendian_obj = NULL;
36895 0 : PyObject *ndr64_obj = NULL;
36896 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
36897 0 : PyObject *allow_remaining_obj = NULL;
36898 0 : bool allow_remaining = false;
36899 :
36900 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
36901 : discard_const_p(char *, kwnames),
36902 : &blob.data, &blob_length,
36903 : &bigendian_obj,
36904 : &ndr64_obj,
36905 : &allow_remaining_obj)) {
36906 0 : return NULL;
36907 : }
36908 0 : blob.length = blob_length;
36909 :
36910 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36911 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
36912 : }
36913 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36914 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
36915 : }
36916 :
36917 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
36918 0 : allow_remaining = true;
36919 : }
36920 :
36921 0 : return py_drsuapi_DsReplicaAdd_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
36922 : }
36923 :
36924 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
36925 : {
36926 0 : const struct ndr_interface_call *call = NULL;
36927 0 : struct drsuapi_DsReplicaAdd *object = (struct drsuapi_DsReplicaAdd *)pytalloc_get_ptr(py_obj);
36928 : PyObject *ret;
36929 : char *retstr;
36930 :
36931 0 : if (ndr_table_drsuapi.num_calls < 6) {
36932 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaAdd_ndr_print");
36933 0 : return NULL;
36934 : }
36935 0 : call = &ndr_table_drsuapi.calls[5];
36936 :
36937 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
36938 0 : ret = PyUnicode_FromString(retstr);
36939 0 : TALLOC_FREE(retstr);
36940 :
36941 0 : return ret;
36942 : }
36943 :
36944 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
36945 : {
36946 0 : return py_drsuapi_DsReplicaAdd_ndr_print(py_obj, "drsuapi_DsReplicaAdd_in", NDR_IN);
36947 : }
36948 :
36949 0 : static PyObject *py_drsuapi_DsReplicaAdd_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
36950 : {
36951 0 : return py_drsuapi_DsReplicaAdd_ndr_print(py_obj, "drsuapi_DsReplicaAdd_out", NDR_OUT);
36952 : }
36953 :
36954 : static PyMethodDef py_drsuapi_DsReplicaAdd_methods[] = {
36955 : { "opnum", (PyCFunction)py_drsuapi_DsReplicaAdd_ndr_opnum, METH_NOARGS|METH_CLASS,
36956 : "drsuapi.DsReplicaAdd.opnum() -> 5 (0x05) " },
36957 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAdd_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
36958 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
36959 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAdd_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
36960 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
36961 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAdd_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
36962 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
36963 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaAdd_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
36964 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
36965 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaAdd_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
36966 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaAdd_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
36967 : { NULL, NULL, 0, NULL }
36968 : };
36969 :
36970 :
36971 : static PyTypeObject drsuapi_DsReplicaAdd_Type = {
36972 : PyVarObject_HEAD_INIT(NULL, 0)
36973 : .tp_name = "drsuapi.DsReplicaAdd",
36974 : .tp_getset = py_drsuapi_DsReplicaAdd_getsetters,
36975 : .tp_methods = py_drsuapi_DsReplicaAdd_methods,
36976 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
36977 : .tp_new = py_drsuapi_DsReplicaAdd_new,
36978 : };
36979 :
36980 0 : static bool pack_py_drsuapi_DsReplicaAdd_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaAdd *r)
36981 : {
36982 : PyObject *py_bind_handle;
36983 : PyObject *py_level;
36984 : PyObject *py_req;
36985 0 : const char *kwnames[] = {
36986 : "bind_handle", "level", "req", NULL
36987 : };
36988 :
36989 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaAdd", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
36990 0 : return false;
36991 : }
36992 :
36993 0 : if (py_bind_handle == NULL) {
36994 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
36995 0 : return false;
36996 : }
36997 0 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
36998 0 : if (r->in.bind_handle == NULL) {
36999 0 : PyErr_NoMemory();
37000 0 : return false;
37001 : }
37002 0 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
37003 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
37004 0 : PyErr_NoMemory();
37005 0 : return false;
37006 : }
37007 0 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
37008 0 : if (py_level == NULL) {
37009 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
37010 0 : return false;
37011 : }
37012 : {
37013 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
37014 0 : if (PyLong_Check(py_level)) {
37015 : unsigned long long test_var;
37016 0 : test_var = PyLong_AsUnsignedLongLong(py_level);
37017 0 : if (PyErr_Occurred() != NULL) {
37018 0 : return false;
37019 : }
37020 0 : if (test_var > uint_max) {
37021 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
37022 : PyLong_Type.tp_name, uint_max, test_var);
37023 0 : return false;
37024 : }
37025 0 : r->in.level = test_var;
37026 : } else {
37027 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
37028 : PyLong_Type.tp_name);
37029 0 : return false;
37030 : }
37031 : }
37032 0 : if (py_req == NULL) {
37033 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
37034 0 : return false;
37035 : }
37036 : {
37037 : union drsuapi_DsReplicaAddRequest *req_switch_0;
37038 0 : req_switch_0 = (union drsuapi_DsReplicaAddRequest *)pyrpc_export_union(&drsuapi_DsReplicaAddRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaAddRequest");
37039 0 : if (req_switch_0 == NULL) {
37040 0 : return false;
37041 : }
37042 0 : r->in.req = *req_switch_0;
37043 : }
37044 0 : return true;
37045 : }
37046 :
37047 0 : static PyObject *unpack_py_drsuapi_DsReplicaAdd_args_out(struct drsuapi_DsReplicaAdd *r)
37048 : {
37049 : PyObject *result;
37050 0 : result = Py_None;
37051 0 : Py_INCREF(result);
37052 0 : if (!W_ERROR_IS_OK(r->out.result)) {
37053 0 : PyErr_SetWERROR(r->out.result);
37054 0 : return NULL;
37055 : }
37056 :
37057 0 : return result;
37058 : }
37059 :
37060 :
37061 0 : static PyObject *py_drsuapi_DsReplicaDel_in_get_bind_handle(PyObject *obj, void *closure)
37062 : {
37063 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(obj);
37064 : PyObject *py_bind_handle;
37065 0 : if (object->in.bind_handle == NULL) {
37066 0 : Py_RETURN_NONE;
37067 : }
37068 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
37069 0 : return py_bind_handle;
37070 : }
37071 :
37072 0 : static int py_drsuapi_DsReplicaDel_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
37073 : {
37074 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(py_obj);
37075 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
37076 0 : if (value == NULL) {
37077 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
37078 0 : return -1;
37079 : }
37080 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
37081 0 : if (object->in.bind_handle == NULL) {
37082 0 : PyErr_NoMemory();
37083 0 : return -1;
37084 : }
37085 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
37086 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
37087 0 : PyErr_NoMemory();
37088 0 : return -1;
37089 : }
37090 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
37091 0 : return 0;
37092 : }
37093 :
37094 0 : static PyObject *py_drsuapi_DsReplicaDel_in_get_level(PyObject *obj, void *closure)
37095 : {
37096 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(obj);
37097 : PyObject *py_level;
37098 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
37099 0 : return py_level;
37100 : }
37101 :
37102 0 : static int py_drsuapi_DsReplicaDel_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
37103 : {
37104 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(py_obj);
37105 0 : if (value == NULL) {
37106 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
37107 0 : return -1;
37108 : }
37109 : {
37110 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
37111 0 : if (PyLong_Check(value)) {
37112 : unsigned long long test_var;
37113 0 : test_var = PyLong_AsUnsignedLongLong(value);
37114 0 : if (PyErr_Occurred() != NULL) {
37115 0 : return -1;
37116 : }
37117 0 : if (test_var > uint_max) {
37118 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
37119 : PyLong_Type.tp_name, uint_max, test_var);
37120 0 : return -1;
37121 : }
37122 0 : object->in.level = test_var;
37123 : } else {
37124 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
37125 : PyLong_Type.tp_name);
37126 0 : return -1;
37127 : }
37128 : }
37129 0 : return 0;
37130 : }
37131 :
37132 0 : static PyObject *py_drsuapi_DsReplicaDel_in_get_req(PyObject *obj, void *closure)
37133 : {
37134 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(obj);
37135 : PyObject *py_req;
37136 0 : py_req = pyrpc_import_union(&drsuapi_DsReplicaDelRequest_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.req, "union drsuapi_DsReplicaDelRequest");
37137 0 : if (py_req == NULL) {
37138 0 : return NULL;
37139 : }
37140 0 : return py_req;
37141 : }
37142 :
37143 0 : static int py_drsuapi_DsReplicaDel_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
37144 : {
37145 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(py_obj);
37146 0 : if (value == NULL) {
37147 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
37148 0 : return -1;
37149 : }
37150 : {
37151 : union drsuapi_DsReplicaDelRequest *req_switch_0;
37152 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");
37153 0 : if (req_switch_0 == NULL) {
37154 0 : return -1;
37155 : }
37156 0 : object->in.req = *req_switch_0;
37157 : }
37158 0 : return 0;
37159 : }
37160 :
37161 0 : static PyObject *py_drsuapi_DsReplicaDel_get_result(PyObject *obj, void *closure)
37162 : {
37163 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(obj);
37164 : PyObject *py_result;
37165 0 : py_result = PyErr_FromWERROR(object->out.result);
37166 0 : return py_result;
37167 : }
37168 :
37169 0 : static int py_drsuapi_DsReplicaDel_set_result(PyObject *py_obj, PyObject *value, void *closure)
37170 : {
37171 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(py_obj);
37172 0 : if (value == NULL) {
37173 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
37174 0 : return -1;
37175 : }
37176 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
37177 0 : return 0;
37178 : }
37179 :
37180 : static PyGetSetDef py_drsuapi_DsReplicaDel_getsetters[] = {
37181 : {
37182 : .name = discard_const_p(char, "in_bind_handle"),
37183 : .get = py_drsuapi_DsReplicaDel_in_get_bind_handle,
37184 : .set = py_drsuapi_DsReplicaDel_in_set_bind_handle,
37185 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
37186 : },
37187 : {
37188 : .name = discard_const_p(char, "in_level"),
37189 : .get = py_drsuapi_DsReplicaDel_in_get_level,
37190 : .set = py_drsuapi_DsReplicaDel_in_set_level,
37191 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
37192 : },
37193 : {
37194 : .name = discard_const_p(char, "in_req"),
37195 : .get = py_drsuapi_DsReplicaDel_in_get_req,
37196 : .set = py_drsuapi_DsReplicaDel_in_set_req,
37197 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaDelRequest")
37198 : },
37199 : {
37200 : .name = discard_const_p(char, "result"),
37201 : .get = py_drsuapi_DsReplicaDel_get_result,
37202 : .set = py_drsuapi_DsReplicaDel_set_result,
37203 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
37204 : },
37205 : { .name = NULL }
37206 : };
37207 :
37208 0 : static PyObject *py_drsuapi_DsReplicaDel_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
37209 : {
37210 0 : PyObject *self = pytalloc_new(struct drsuapi_DsReplicaDel, type);
37211 0 : struct drsuapi_DsReplicaDel *_self = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(self);
37212 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
37213 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
37214 0 : return self;
37215 : }
37216 :
37217 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
37218 : {
37219 :
37220 :
37221 0 : return PyLong_FromLong(6);
37222 : }
37223 :
37224 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
37225 : {
37226 0 : const struct ndr_interface_call *call = NULL;
37227 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(py_obj);
37228 0 : PyObject *ret = NULL;
37229 0 : struct ndr_push *push = NULL;
37230 : DATA_BLOB blob;
37231 : enum ndr_err_code err;
37232 :
37233 0 : if (ndr_table_drsuapi.num_calls < 7) {
37234 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaDel_ndr_pack");
37235 0 : return NULL;
37236 : }
37237 0 : call = &ndr_table_drsuapi.calls[6];
37238 :
37239 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
37240 0 : if (push == NULL) {
37241 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
37242 0 : return NULL;
37243 : }
37244 :
37245 0 : push->flags |= ndr_push_flags;
37246 :
37247 0 : err = call->ndr_push(push, ndr_inout_flags, object);
37248 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
37249 0 : TALLOC_FREE(push);
37250 0 : PyErr_SetNdrError(err);
37251 0 : return NULL;
37252 : }
37253 0 : blob = ndr_push_blob(push);
37254 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
37255 0 : TALLOC_FREE(push);
37256 0 : return ret;
37257 : }
37258 :
37259 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
37260 : {
37261 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
37262 0 : PyObject *bigendian_obj = NULL;
37263 0 : PyObject *ndr64_obj = NULL;
37264 0 : uint32_t ndr_push_flags = 0;
37265 :
37266 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
37267 : discard_const_p(char *, kwnames),
37268 : &bigendian_obj,
37269 : &ndr64_obj)) {
37270 0 : return NULL;
37271 : }
37272 :
37273 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
37274 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
37275 : }
37276 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
37277 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
37278 : }
37279 :
37280 0 : return py_drsuapi_DsReplicaDel_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
37281 : }
37282 :
37283 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
37284 : {
37285 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
37286 0 : PyObject *bigendian_obj = NULL;
37287 0 : PyObject *ndr64_obj = NULL;
37288 0 : uint32_t ndr_push_flags = 0;
37289 :
37290 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
37291 : discard_const_p(char *, kwnames),
37292 : &bigendian_obj,
37293 : &ndr64_obj)) {
37294 0 : return NULL;
37295 : }
37296 :
37297 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
37298 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
37299 : }
37300 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
37301 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
37302 : }
37303 :
37304 0 : return py_drsuapi_DsReplicaDel_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
37305 : }
37306 :
37307 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
37308 : {
37309 0 : const struct ndr_interface_call *call = NULL;
37310 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(py_obj);
37311 0 : struct ndr_pull *pull = NULL;
37312 : enum ndr_err_code err;
37313 :
37314 0 : if (ndr_table_drsuapi.num_calls < 7) {
37315 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaDel_ndr_unpack");
37316 0 : return NULL;
37317 : }
37318 0 : call = &ndr_table_drsuapi.calls[6];
37319 :
37320 0 : pull = ndr_pull_init_blob(blob, object);
37321 0 : if (pull == NULL) {
37322 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
37323 0 : return NULL;
37324 : }
37325 :
37326 0 : pull->flags |= ndr_pull_flags;
37327 :
37328 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
37329 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
37330 0 : TALLOC_FREE(pull);
37331 0 : PyErr_SetNdrError(err);
37332 0 : return NULL;
37333 : }
37334 0 : if (!allow_remaining) {
37335 : uint32_t highest_ofs;
37336 :
37337 0 : if (pull->offset > pull->relative_highest_offset) {
37338 0 : highest_ofs = pull->offset;
37339 : } else {
37340 0 : highest_ofs = pull->relative_highest_offset;
37341 : }
37342 0 : if (highest_ofs < pull->data_size) {
37343 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
37344 : "not all bytes consumed ofs[%u] size[%u]",
37345 : highest_ofs, pull->data_size);
37346 0 : TALLOC_FREE(pull);
37347 0 : PyErr_SetNdrError(err);
37348 0 : return NULL;
37349 : }
37350 : }
37351 :
37352 0 : TALLOC_FREE(pull);
37353 0 : Py_RETURN_NONE;
37354 : }
37355 :
37356 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
37357 : {
37358 : DATA_BLOB blob;
37359 0 : Py_ssize_t blob_length = 0;
37360 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
37361 0 : PyObject *bigendian_obj = NULL;
37362 0 : PyObject *ndr64_obj = NULL;
37363 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
37364 0 : PyObject *allow_remaining_obj = NULL;
37365 0 : bool allow_remaining = false;
37366 :
37367 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
37368 : discard_const_p(char *, kwnames),
37369 : &blob.data, &blob_length,
37370 : &bigendian_obj,
37371 : &ndr64_obj,
37372 : &allow_remaining_obj)) {
37373 0 : return NULL;
37374 : }
37375 0 : blob.length = blob_length;
37376 :
37377 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
37378 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
37379 : }
37380 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
37381 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
37382 : }
37383 :
37384 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
37385 0 : allow_remaining = true;
37386 : }
37387 :
37388 0 : return py_drsuapi_DsReplicaDel_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
37389 : }
37390 :
37391 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
37392 : {
37393 : DATA_BLOB blob;
37394 0 : Py_ssize_t blob_length = 0;
37395 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
37396 0 : PyObject *bigendian_obj = NULL;
37397 0 : PyObject *ndr64_obj = NULL;
37398 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
37399 0 : PyObject *allow_remaining_obj = NULL;
37400 0 : bool allow_remaining = false;
37401 :
37402 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
37403 : discard_const_p(char *, kwnames),
37404 : &blob.data, &blob_length,
37405 : &bigendian_obj,
37406 : &ndr64_obj,
37407 : &allow_remaining_obj)) {
37408 0 : return NULL;
37409 : }
37410 0 : blob.length = blob_length;
37411 :
37412 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
37413 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
37414 : }
37415 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
37416 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
37417 : }
37418 :
37419 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
37420 0 : allow_remaining = true;
37421 : }
37422 :
37423 0 : return py_drsuapi_DsReplicaDel_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
37424 : }
37425 :
37426 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
37427 : {
37428 0 : const struct ndr_interface_call *call = NULL;
37429 0 : struct drsuapi_DsReplicaDel *object = (struct drsuapi_DsReplicaDel *)pytalloc_get_ptr(py_obj);
37430 : PyObject *ret;
37431 : char *retstr;
37432 :
37433 0 : if (ndr_table_drsuapi.num_calls < 7) {
37434 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaDel_ndr_print");
37435 0 : return NULL;
37436 : }
37437 0 : call = &ndr_table_drsuapi.calls[6];
37438 :
37439 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
37440 0 : ret = PyUnicode_FromString(retstr);
37441 0 : TALLOC_FREE(retstr);
37442 :
37443 0 : return ret;
37444 : }
37445 :
37446 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
37447 : {
37448 0 : return py_drsuapi_DsReplicaDel_ndr_print(py_obj, "drsuapi_DsReplicaDel_in", NDR_IN);
37449 : }
37450 :
37451 0 : static PyObject *py_drsuapi_DsReplicaDel_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
37452 : {
37453 0 : return py_drsuapi_DsReplicaDel_ndr_print(py_obj, "drsuapi_DsReplicaDel_out", NDR_OUT);
37454 : }
37455 :
37456 : static PyMethodDef py_drsuapi_DsReplicaDel_methods[] = {
37457 : { "opnum", (PyCFunction)py_drsuapi_DsReplicaDel_ndr_opnum, METH_NOARGS|METH_CLASS,
37458 : "drsuapi.DsReplicaDel.opnum() -> 6 (0x06) " },
37459 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDel_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
37460 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
37461 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDel_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
37462 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
37463 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDel_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
37464 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
37465 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaDel_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
37466 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
37467 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaDel_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
37468 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaDel_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
37469 : { NULL, NULL, 0, NULL }
37470 : };
37471 :
37472 :
37473 : static PyTypeObject drsuapi_DsReplicaDel_Type = {
37474 : PyVarObject_HEAD_INIT(NULL, 0)
37475 : .tp_name = "drsuapi.DsReplicaDel",
37476 : .tp_getset = py_drsuapi_DsReplicaDel_getsetters,
37477 : .tp_methods = py_drsuapi_DsReplicaDel_methods,
37478 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
37479 : .tp_new = py_drsuapi_DsReplicaDel_new,
37480 : };
37481 :
37482 0 : static bool pack_py_drsuapi_DsReplicaDel_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaDel *r)
37483 : {
37484 : PyObject *py_bind_handle;
37485 : PyObject *py_level;
37486 : PyObject *py_req;
37487 0 : const char *kwnames[] = {
37488 : "bind_handle", "level", "req", NULL
37489 : };
37490 :
37491 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaDel", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
37492 0 : return false;
37493 : }
37494 :
37495 0 : if (py_bind_handle == NULL) {
37496 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
37497 0 : return false;
37498 : }
37499 0 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
37500 0 : if (r->in.bind_handle == NULL) {
37501 0 : PyErr_NoMemory();
37502 0 : return false;
37503 : }
37504 0 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
37505 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
37506 0 : PyErr_NoMemory();
37507 0 : return false;
37508 : }
37509 0 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
37510 0 : if (py_level == NULL) {
37511 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
37512 0 : return false;
37513 : }
37514 : {
37515 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
37516 0 : if (PyLong_Check(py_level)) {
37517 : unsigned long long test_var;
37518 0 : test_var = PyLong_AsUnsignedLongLong(py_level);
37519 0 : if (PyErr_Occurred() != NULL) {
37520 0 : return false;
37521 : }
37522 0 : if (test_var > uint_max) {
37523 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
37524 : PyLong_Type.tp_name, uint_max, test_var);
37525 0 : return false;
37526 : }
37527 0 : r->in.level = test_var;
37528 : } else {
37529 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
37530 : PyLong_Type.tp_name);
37531 0 : return false;
37532 : }
37533 : }
37534 0 : if (py_req == NULL) {
37535 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
37536 0 : return false;
37537 : }
37538 : {
37539 : union drsuapi_DsReplicaDelRequest *req_switch_0;
37540 0 : req_switch_0 = (union drsuapi_DsReplicaDelRequest *)pyrpc_export_union(&drsuapi_DsReplicaDelRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaDelRequest");
37541 0 : if (req_switch_0 == NULL) {
37542 0 : return false;
37543 : }
37544 0 : r->in.req = *req_switch_0;
37545 : }
37546 0 : return true;
37547 : }
37548 :
37549 0 : static PyObject *unpack_py_drsuapi_DsReplicaDel_args_out(struct drsuapi_DsReplicaDel *r)
37550 : {
37551 : PyObject *result;
37552 0 : result = Py_None;
37553 0 : Py_INCREF(result);
37554 0 : if (!W_ERROR_IS_OK(r->out.result)) {
37555 0 : PyErr_SetWERROR(r->out.result);
37556 0 : return NULL;
37557 : }
37558 :
37559 0 : return result;
37560 : }
37561 :
37562 :
37563 0 : static PyObject *py_drsuapi_DsReplicaMod_in_get_bind_handle(PyObject *obj, void *closure)
37564 : {
37565 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(obj);
37566 : PyObject *py_bind_handle;
37567 0 : if (object->in.bind_handle == NULL) {
37568 0 : Py_RETURN_NONE;
37569 : }
37570 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
37571 0 : return py_bind_handle;
37572 : }
37573 :
37574 0 : static int py_drsuapi_DsReplicaMod_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
37575 : {
37576 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(py_obj);
37577 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
37578 0 : if (value == NULL) {
37579 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
37580 0 : return -1;
37581 : }
37582 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
37583 0 : if (object->in.bind_handle == NULL) {
37584 0 : PyErr_NoMemory();
37585 0 : return -1;
37586 : }
37587 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
37588 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
37589 0 : PyErr_NoMemory();
37590 0 : return -1;
37591 : }
37592 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
37593 0 : return 0;
37594 : }
37595 :
37596 0 : static PyObject *py_drsuapi_DsReplicaMod_in_get_level(PyObject *obj, void *closure)
37597 : {
37598 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(obj);
37599 : PyObject *py_level;
37600 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
37601 0 : return py_level;
37602 : }
37603 :
37604 0 : static int py_drsuapi_DsReplicaMod_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
37605 : {
37606 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(py_obj);
37607 0 : if (value == NULL) {
37608 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
37609 0 : return -1;
37610 : }
37611 : {
37612 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
37613 0 : if (PyLong_Check(value)) {
37614 : unsigned long long test_var;
37615 0 : test_var = PyLong_AsUnsignedLongLong(value);
37616 0 : if (PyErr_Occurred() != NULL) {
37617 0 : return -1;
37618 : }
37619 0 : if (test_var > uint_max) {
37620 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
37621 : PyLong_Type.tp_name, uint_max, test_var);
37622 0 : return -1;
37623 : }
37624 0 : object->in.level = test_var;
37625 : } else {
37626 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
37627 : PyLong_Type.tp_name);
37628 0 : return -1;
37629 : }
37630 : }
37631 0 : return 0;
37632 : }
37633 :
37634 0 : static PyObject *py_drsuapi_DsReplicaMod_in_get_req(PyObject *obj, void *closure)
37635 : {
37636 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(obj);
37637 : PyObject *py_req;
37638 0 : py_req = pyrpc_import_union(&drsuapi_DsReplicaModRequest_Type, pytalloc_get_mem_ctx(obj), object->in.level, &object->in.req, "union drsuapi_DsReplicaModRequest");
37639 0 : if (py_req == NULL) {
37640 0 : return NULL;
37641 : }
37642 0 : return py_req;
37643 : }
37644 :
37645 0 : static int py_drsuapi_DsReplicaMod_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
37646 : {
37647 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(py_obj);
37648 0 : if (value == NULL) {
37649 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
37650 0 : return -1;
37651 : }
37652 : {
37653 : union drsuapi_DsReplicaModRequest *req_switch_0;
37654 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");
37655 0 : if (req_switch_0 == NULL) {
37656 0 : return -1;
37657 : }
37658 0 : object->in.req = *req_switch_0;
37659 : }
37660 0 : return 0;
37661 : }
37662 :
37663 0 : static PyObject *py_drsuapi_DsReplicaMod_get_result(PyObject *obj, void *closure)
37664 : {
37665 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(obj);
37666 : PyObject *py_result;
37667 0 : py_result = PyErr_FromWERROR(object->out.result);
37668 0 : return py_result;
37669 : }
37670 :
37671 0 : static int py_drsuapi_DsReplicaMod_set_result(PyObject *py_obj, PyObject *value, void *closure)
37672 : {
37673 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(py_obj);
37674 0 : if (value == NULL) {
37675 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
37676 0 : return -1;
37677 : }
37678 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
37679 0 : return 0;
37680 : }
37681 :
37682 : static PyGetSetDef py_drsuapi_DsReplicaMod_getsetters[] = {
37683 : {
37684 : .name = discard_const_p(char, "in_bind_handle"),
37685 : .get = py_drsuapi_DsReplicaMod_in_get_bind_handle,
37686 : .set = py_drsuapi_DsReplicaMod_in_set_bind_handle,
37687 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
37688 : },
37689 : {
37690 : .name = discard_const_p(char, "in_level"),
37691 : .get = py_drsuapi_DsReplicaMod_in_get_level,
37692 : .set = py_drsuapi_DsReplicaMod_in_set_level,
37693 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
37694 : },
37695 : {
37696 : .name = discard_const_p(char, "in_req"),
37697 : .get = py_drsuapi_DsReplicaMod_in_get_req,
37698 : .set = py_drsuapi_DsReplicaMod_in_set_req,
37699 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaModRequest")
37700 : },
37701 : {
37702 : .name = discard_const_p(char, "result"),
37703 : .get = py_drsuapi_DsReplicaMod_get_result,
37704 : .set = py_drsuapi_DsReplicaMod_set_result,
37705 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
37706 : },
37707 : { .name = NULL }
37708 : };
37709 :
37710 0 : static PyObject *py_drsuapi_DsReplicaMod_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
37711 : {
37712 0 : PyObject *self = pytalloc_new(struct drsuapi_DsReplicaMod, type);
37713 0 : struct drsuapi_DsReplicaMod *_self = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(self);
37714 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
37715 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
37716 0 : return self;
37717 : }
37718 :
37719 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
37720 : {
37721 :
37722 :
37723 0 : return PyLong_FromLong(7);
37724 : }
37725 :
37726 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
37727 : {
37728 0 : const struct ndr_interface_call *call = NULL;
37729 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(py_obj);
37730 0 : PyObject *ret = NULL;
37731 0 : struct ndr_push *push = NULL;
37732 : DATA_BLOB blob;
37733 : enum ndr_err_code err;
37734 :
37735 0 : if (ndr_table_drsuapi.num_calls < 8) {
37736 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaMod_ndr_pack");
37737 0 : return NULL;
37738 : }
37739 0 : call = &ndr_table_drsuapi.calls[7];
37740 :
37741 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
37742 0 : if (push == NULL) {
37743 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
37744 0 : return NULL;
37745 : }
37746 :
37747 0 : push->flags |= ndr_push_flags;
37748 :
37749 0 : err = call->ndr_push(push, ndr_inout_flags, object);
37750 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
37751 0 : TALLOC_FREE(push);
37752 0 : PyErr_SetNdrError(err);
37753 0 : return NULL;
37754 : }
37755 0 : blob = ndr_push_blob(push);
37756 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
37757 0 : TALLOC_FREE(push);
37758 0 : return ret;
37759 : }
37760 :
37761 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
37762 : {
37763 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
37764 0 : PyObject *bigendian_obj = NULL;
37765 0 : PyObject *ndr64_obj = NULL;
37766 0 : uint32_t ndr_push_flags = 0;
37767 :
37768 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
37769 : discard_const_p(char *, kwnames),
37770 : &bigendian_obj,
37771 : &ndr64_obj)) {
37772 0 : return NULL;
37773 : }
37774 :
37775 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
37776 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
37777 : }
37778 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
37779 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
37780 : }
37781 :
37782 0 : return py_drsuapi_DsReplicaMod_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
37783 : }
37784 :
37785 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
37786 : {
37787 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
37788 0 : PyObject *bigendian_obj = NULL;
37789 0 : PyObject *ndr64_obj = NULL;
37790 0 : uint32_t ndr_push_flags = 0;
37791 :
37792 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
37793 : discard_const_p(char *, kwnames),
37794 : &bigendian_obj,
37795 : &ndr64_obj)) {
37796 0 : return NULL;
37797 : }
37798 :
37799 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
37800 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
37801 : }
37802 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
37803 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
37804 : }
37805 :
37806 0 : return py_drsuapi_DsReplicaMod_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
37807 : }
37808 :
37809 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
37810 : {
37811 0 : const struct ndr_interface_call *call = NULL;
37812 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(py_obj);
37813 0 : struct ndr_pull *pull = NULL;
37814 : enum ndr_err_code err;
37815 :
37816 0 : if (ndr_table_drsuapi.num_calls < 8) {
37817 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaMod_ndr_unpack");
37818 0 : return NULL;
37819 : }
37820 0 : call = &ndr_table_drsuapi.calls[7];
37821 :
37822 0 : pull = ndr_pull_init_blob(blob, object);
37823 0 : if (pull == NULL) {
37824 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
37825 0 : return NULL;
37826 : }
37827 :
37828 0 : pull->flags |= ndr_pull_flags;
37829 :
37830 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
37831 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
37832 0 : TALLOC_FREE(pull);
37833 0 : PyErr_SetNdrError(err);
37834 0 : return NULL;
37835 : }
37836 0 : if (!allow_remaining) {
37837 : uint32_t highest_ofs;
37838 :
37839 0 : if (pull->offset > pull->relative_highest_offset) {
37840 0 : highest_ofs = pull->offset;
37841 : } else {
37842 0 : highest_ofs = pull->relative_highest_offset;
37843 : }
37844 0 : if (highest_ofs < pull->data_size) {
37845 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
37846 : "not all bytes consumed ofs[%u] size[%u]",
37847 : highest_ofs, pull->data_size);
37848 0 : TALLOC_FREE(pull);
37849 0 : PyErr_SetNdrError(err);
37850 0 : return NULL;
37851 : }
37852 : }
37853 :
37854 0 : TALLOC_FREE(pull);
37855 0 : Py_RETURN_NONE;
37856 : }
37857 :
37858 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
37859 : {
37860 : DATA_BLOB blob;
37861 0 : Py_ssize_t blob_length = 0;
37862 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
37863 0 : PyObject *bigendian_obj = NULL;
37864 0 : PyObject *ndr64_obj = NULL;
37865 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
37866 0 : PyObject *allow_remaining_obj = NULL;
37867 0 : bool allow_remaining = false;
37868 :
37869 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
37870 : discard_const_p(char *, kwnames),
37871 : &blob.data, &blob_length,
37872 : &bigendian_obj,
37873 : &ndr64_obj,
37874 : &allow_remaining_obj)) {
37875 0 : return NULL;
37876 : }
37877 0 : blob.length = blob_length;
37878 :
37879 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
37880 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
37881 : }
37882 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
37883 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
37884 : }
37885 :
37886 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
37887 0 : allow_remaining = true;
37888 : }
37889 :
37890 0 : return py_drsuapi_DsReplicaMod_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
37891 : }
37892 :
37893 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
37894 : {
37895 : DATA_BLOB blob;
37896 0 : Py_ssize_t blob_length = 0;
37897 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
37898 0 : PyObject *bigendian_obj = NULL;
37899 0 : PyObject *ndr64_obj = NULL;
37900 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
37901 0 : PyObject *allow_remaining_obj = NULL;
37902 0 : bool allow_remaining = false;
37903 :
37904 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
37905 : discard_const_p(char *, kwnames),
37906 : &blob.data, &blob_length,
37907 : &bigendian_obj,
37908 : &ndr64_obj,
37909 : &allow_remaining_obj)) {
37910 0 : return NULL;
37911 : }
37912 0 : blob.length = blob_length;
37913 :
37914 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
37915 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
37916 : }
37917 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
37918 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
37919 : }
37920 :
37921 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
37922 0 : allow_remaining = true;
37923 : }
37924 :
37925 0 : return py_drsuapi_DsReplicaMod_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
37926 : }
37927 :
37928 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
37929 : {
37930 0 : const struct ndr_interface_call *call = NULL;
37931 0 : struct drsuapi_DsReplicaMod *object = (struct drsuapi_DsReplicaMod *)pytalloc_get_ptr(py_obj);
37932 : PyObject *ret;
37933 : char *retstr;
37934 :
37935 0 : if (ndr_table_drsuapi.num_calls < 8) {
37936 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaMod_ndr_print");
37937 0 : return NULL;
37938 : }
37939 0 : call = &ndr_table_drsuapi.calls[7];
37940 :
37941 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
37942 0 : ret = PyUnicode_FromString(retstr);
37943 0 : TALLOC_FREE(retstr);
37944 :
37945 0 : return ret;
37946 : }
37947 :
37948 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
37949 : {
37950 0 : return py_drsuapi_DsReplicaMod_ndr_print(py_obj, "drsuapi_DsReplicaMod_in", NDR_IN);
37951 : }
37952 :
37953 0 : static PyObject *py_drsuapi_DsReplicaMod_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
37954 : {
37955 0 : return py_drsuapi_DsReplicaMod_ndr_print(py_obj, "drsuapi_DsReplicaMod_out", NDR_OUT);
37956 : }
37957 :
37958 : static PyMethodDef py_drsuapi_DsReplicaMod_methods[] = {
37959 : { "opnum", (PyCFunction)py_drsuapi_DsReplicaMod_ndr_opnum, METH_NOARGS|METH_CLASS,
37960 : "drsuapi.DsReplicaMod.opnum() -> 7 (0x07) " },
37961 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMod_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
37962 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
37963 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMod_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
37964 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
37965 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMod_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
37966 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
37967 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaMod_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
37968 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
37969 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaMod_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
37970 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaMod_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
37971 : { NULL, NULL, 0, NULL }
37972 : };
37973 :
37974 :
37975 : static PyTypeObject drsuapi_DsReplicaMod_Type = {
37976 : PyVarObject_HEAD_INIT(NULL, 0)
37977 : .tp_name = "drsuapi.DsReplicaMod",
37978 : .tp_getset = py_drsuapi_DsReplicaMod_getsetters,
37979 : .tp_methods = py_drsuapi_DsReplicaMod_methods,
37980 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
37981 : .tp_new = py_drsuapi_DsReplicaMod_new,
37982 : };
37983 :
37984 0 : static bool pack_py_drsuapi_DsReplicaMod_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaMod *r)
37985 : {
37986 : PyObject *py_bind_handle;
37987 : PyObject *py_level;
37988 : PyObject *py_req;
37989 0 : const char *kwnames[] = {
37990 : "bind_handle", "level", "req", NULL
37991 : };
37992 :
37993 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaMod", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
37994 0 : return false;
37995 : }
37996 :
37997 0 : if (py_bind_handle == NULL) {
37998 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
37999 0 : return false;
38000 : }
38001 0 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
38002 0 : if (r->in.bind_handle == NULL) {
38003 0 : PyErr_NoMemory();
38004 0 : return false;
38005 : }
38006 0 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
38007 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
38008 0 : PyErr_NoMemory();
38009 0 : return false;
38010 : }
38011 0 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
38012 0 : if (py_level == NULL) {
38013 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
38014 0 : return false;
38015 : }
38016 : {
38017 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
38018 0 : if (PyLong_Check(py_level)) {
38019 : unsigned long long test_var;
38020 0 : test_var = PyLong_AsUnsignedLongLong(py_level);
38021 0 : if (PyErr_Occurred() != NULL) {
38022 0 : return false;
38023 : }
38024 0 : if (test_var > uint_max) {
38025 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
38026 : PyLong_Type.tp_name, uint_max, test_var);
38027 0 : return false;
38028 : }
38029 0 : r->in.level = test_var;
38030 : } else {
38031 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
38032 : PyLong_Type.tp_name);
38033 0 : return false;
38034 : }
38035 : }
38036 0 : if (py_req == NULL) {
38037 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
38038 0 : return false;
38039 : }
38040 : {
38041 : union drsuapi_DsReplicaModRequest *req_switch_0;
38042 0 : req_switch_0 = (union drsuapi_DsReplicaModRequest *)pyrpc_export_union(&drsuapi_DsReplicaModRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaModRequest");
38043 0 : if (req_switch_0 == NULL) {
38044 0 : return false;
38045 : }
38046 0 : r->in.req = *req_switch_0;
38047 : }
38048 0 : return true;
38049 : }
38050 :
38051 0 : static PyObject *unpack_py_drsuapi_DsReplicaMod_args_out(struct drsuapi_DsReplicaMod *r)
38052 : {
38053 : PyObject *result;
38054 0 : result = Py_None;
38055 0 : Py_INCREF(result);
38056 0 : if (!W_ERROR_IS_OK(r->out.result)) {
38057 0 : PyErr_SetWERROR(r->out.result);
38058 0 : return NULL;
38059 : }
38060 :
38061 0 : return result;
38062 : }
38063 :
38064 :
38065 0 : static PyObject *py_drsuapi_DsGetMemberships_in_get_bind_handle(PyObject *obj, void *closure)
38066 : {
38067 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(obj);
38068 : PyObject *py_bind_handle;
38069 0 : if (object->in.bind_handle == NULL) {
38070 0 : Py_RETURN_NONE;
38071 : }
38072 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
38073 0 : return py_bind_handle;
38074 : }
38075 :
38076 0 : static int py_drsuapi_DsGetMemberships_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
38077 : {
38078 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38079 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
38080 0 : if (value == NULL) {
38081 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
38082 0 : return -1;
38083 : }
38084 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
38085 0 : if (object->in.bind_handle == NULL) {
38086 0 : PyErr_NoMemory();
38087 0 : return -1;
38088 : }
38089 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
38090 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
38091 0 : PyErr_NoMemory();
38092 0 : return -1;
38093 : }
38094 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
38095 0 : return 0;
38096 : }
38097 :
38098 0 : static PyObject *py_drsuapi_DsGetMemberships_in_get_level(PyObject *obj, void *closure)
38099 : {
38100 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(obj);
38101 : PyObject *py_level;
38102 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
38103 0 : return py_level;
38104 : }
38105 :
38106 0 : static int py_drsuapi_DsGetMemberships_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
38107 : {
38108 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38109 0 : if (value == NULL) {
38110 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
38111 0 : return -1;
38112 : }
38113 : {
38114 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
38115 0 : if (PyLong_Check(value)) {
38116 : unsigned long long test_var;
38117 0 : test_var = PyLong_AsUnsignedLongLong(value);
38118 0 : if (PyErr_Occurred() != NULL) {
38119 0 : return -1;
38120 : }
38121 0 : if (test_var > uint_max) {
38122 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
38123 : PyLong_Type.tp_name, uint_max, test_var);
38124 0 : return -1;
38125 : }
38126 0 : object->in.level = test_var;
38127 : } else {
38128 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
38129 : PyLong_Type.tp_name);
38130 0 : return -1;
38131 : }
38132 : }
38133 0 : return 0;
38134 : }
38135 :
38136 0 : static PyObject *py_drsuapi_DsGetMemberships_in_get_req(PyObject *obj, void *closure)
38137 : {
38138 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(obj);
38139 : PyObject *py_req;
38140 0 : if (object->in.req == NULL) {
38141 0 : Py_RETURN_NONE;
38142 : }
38143 0 : py_req = pyrpc_import_union(&drsuapi_DsGetMembershipsRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetMembershipsRequest");
38144 0 : if (py_req == NULL) {
38145 0 : return NULL;
38146 : }
38147 0 : return py_req;
38148 : }
38149 :
38150 0 : static int py_drsuapi_DsGetMemberships_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
38151 : {
38152 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38153 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
38154 0 : if (value == NULL) {
38155 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
38156 0 : return -1;
38157 : }
38158 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
38159 0 : if (object->in.req == NULL) {
38160 0 : PyErr_NoMemory();
38161 0 : return -1;
38162 : }
38163 : {
38164 : union drsuapi_DsGetMembershipsRequest *req_switch_1;
38165 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");
38166 0 : if (req_switch_1 == NULL) {
38167 0 : return -1;
38168 : }
38169 0 : object->in.req = req_switch_1;
38170 : }
38171 0 : return 0;
38172 : }
38173 :
38174 0 : static PyObject *py_drsuapi_DsGetMemberships_out_get_level_out(PyObject *obj, void *closure)
38175 : {
38176 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(obj);
38177 : PyObject *py_level_out;
38178 0 : if (object->out.level_out == NULL) {
38179 0 : Py_RETURN_NONE;
38180 : }
38181 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
38182 0 : return py_level_out;
38183 : }
38184 :
38185 0 : static int py_drsuapi_DsGetMemberships_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
38186 : {
38187 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38188 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
38189 0 : if (value == NULL) {
38190 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
38191 0 : return -1;
38192 : }
38193 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
38194 0 : if (object->out.level_out == NULL) {
38195 0 : PyErr_NoMemory();
38196 0 : return -1;
38197 : }
38198 : {
38199 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
38200 0 : if (PyLong_Check(value)) {
38201 : unsigned long long test_var;
38202 0 : test_var = PyLong_AsUnsignedLongLong(value);
38203 0 : if (PyErr_Occurred() != NULL) {
38204 0 : return -1;
38205 : }
38206 0 : if (test_var > uint_max) {
38207 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
38208 : PyLong_Type.tp_name, uint_max, test_var);
38209 0 : return -1;
38210 : }
38211 0 : *object->out.level_out = test_var;
38212 : } else {
38213 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
38214 : PyLong_Type.tp_name);
38215 0 : return -1;
38216 : }
38217 : }
38218 0 : return 0;
38219 : }
38220 :
38221 0 : static PyObject *py_drsuapi_DsGetMemberships_out_get_ctr(PyObject *obj, void *closure)
38222 : {
38223 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(obj);
38224 : PyObject *py_ctr;
38225 0 : if (object->out.ctr == NULL) {
38226 0 : Py_RETURN_NONE;
38227 : }
38228 0 : py_ctr = pyrpc_import_union(&drsuapi_DsGetMembershipsCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsGetMembershipsCtr");
38229 0 : if (py_ctr == NULL) {
38230 0 : return NULL;
38231 : }
38232 0 : return py_ctr;
38233 : }
38234 :
38235 0 : static int py_drsuapi_DsGetMemberships_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
38236 : {
38237 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38238 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
38239 0 : if (value == NULL) {
38240 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
38241 0 : return -1;
38242 : }
38243 0 : object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
38244 0 : if (object->out.ctr == NULL) {
38245 0 : PyErr_NoMemory();
38246 0 : return -1;
38247 : }
38248 : {
38249 : union drsuapi_DsGetMembershipsCtr *ctr_switch_1;
38250 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");
38251 0 : if (ctr_switch_1 == NULL) {
38252 0 : return -1;
38253 : }
38254 0 : object->out.ctr = ctr_switch_1;
38255 : }
38256 0 : return 0;
38257 : }
38258 :
38259 0 : static PyObject *py_drsuapi_DsGetMemberships_get_result(PyObject *obj, void *closure)
38260 : {
38261 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(obj);
38262 : PyObject *py_result;
38263 0 : py_result = PyErr_FromWERROR(object->out.result);
38264 0 : return py_result;
38265 : }
38266 :
38267 0 : static int py_drsuapi_DsGetMemberships_set_result(PyObject *py_obj, PyObject *value, void *closure)
38268 : {
38269 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38270 0 : if (value == NULL) {
38271 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
38272 0 : return -1;
38273 : }
38274 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
38275 0 : return 0;
38276 : }
38277 :
38278 : static PyGetSetDef py_drsuapi_DsGetMemberships_getsetters[] = {
38279 : {
38280 : .name = discard_const_p(char, "in_bind_handle"),
38281 : .get = py_drsuapi_DsGetMemberships_in_get_bind_handle,
38282 : .set = py_drsuapi_DsGetMemberships_in_set_bind_handle,
38283 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
38284 : },
38285 : {
38286 : .name = discard_const_p(char, "in_level"),
38287 : .get = py_drsuapi_DsGetMemberships_in_get_level,
38288 : .set = py_drsuapi_DsGetMemberships_in_set_level,
38289 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
38290 : },
38291 : {
38292 : .name = discard_const_p(char, "in_req"),
38293 : .get = py_drsuapi_DsGetMemberships_in_get_req,
38294 : .set = py_drsuapi_DsGetMemberships_in_set_req,
38295 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMembershipsRequest")
38296 : },
38297 : {
38298 : .name = discard_const_p(char, "out_level_out"),
38299 : .get = py_drsuapi_DsGetMemberships_out_get_level_out,
38300 : .set = py_drsuapi_DsGetMemberships_out_set_level_out,
38301 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
38302 : },
38303 : {
38304 : .name = discard_const_p(char, "out_ctr"),
38305 : .get = py_drsuapi_DsGetMemberships_out_get_ctr,
38306 : .set = py_drsuapi_DsGetMemberships_out_set_ctr,
38307 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMembershipsCtr")
38308 : },
38309 : {
38310 : .name = discard_const_p(char, "result"),
38311 : .get = py_drsuapi_DsGetMemberships_get_result,
38312 : .set = py_drsuapi_DsGetMemberships_set_result,
38313 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
38314 : },
38315 : { .name = NULL }
38316 : };
38317 :
38318 0 : static PyObject *py_drsuapi_DsGetMemberships_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
38319 : {
38320 0 : PyObject *self = pytalloc_new(struct drsuapi_DsGetMemberships, type);
38321 0 : struct drsuapi_DsGetMemberships *_self = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(self);
38322 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
38323 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
38324 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsRequest);
38325 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
38326 0 : _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsGetMembershipsCtr);
38327 0 : return self;
38328 : }
38329 :
38330 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
38331 : {
38332 :
38333 :
38334 0 : return PyLong_FromLong(9);
38335 : }
38336 :
38337 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
38338 : {
38339 0 : const struct ndr_interface_call *call = NULL;
38340 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38341 0 : PyObject *ret = NULL;
38342 0 : struct ndr_push *push = NULL;
38343 : DATA_BLOB blob;
38344 : enum ndr_err_code err;
38345 :
38346 0 : if (ndr_table_drsuapi.num_calls < 10) {
38347 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships_ndr_pack");
38348 0 : return NULL;
38349 : }
38350 0 : call = &ndr_table_drsuapi.calls[9];
38351 :
38352 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
38353 0 : if (push == NULL) {
38354 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
38355 0 : return NULL;
38356 : }
38357 :
38358 0 : push->flags |= ndr_push_flags;
38359 :
38360 0 : err = call->ndr_push(push, ndr_inout_flags, object);
38361 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
38362 0 : TALLOC_FREE(push);
38363 0 : PyErr_SetNdrError(err);
38364 0 : return NULL;
38365 : }
38366 0 : blob = ndr_push_blob(push);
38367 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
38368 0 : TALLOC_FREE(push);
38369 0 : return ret;
38370 : }
38371 :
38372 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
38373 : {
38374 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
38375 0 : PyObject *bigendian_obj = NULL;
38376 0 : PyObject *ndr64_obj = NULL;
38377 0 : uint32_t ndr_push_flags = 0;
38378 :
38379 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
38380 : discard_const_p(char *, kwnames),
38381 : &bigendian_obj,
38382 : &ndr64_obj)) {
38383 0 : return NULL;
38384 : }
38385 :
38386 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
38387 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
38388 : }
38389 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
38390 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
38391 : }
38392 :
38393 0 : return py_drsuapi_DsGetMemberships_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
38394 : }
38395 :
38396 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
38397 : {
38398 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
38399 0 : PyObject *bigendian_obj = NULL;
38400 0 : PyObject *ndr64_obj = NULL;
38401 0 : uint32_t ndr_push_flags = 0;
38402 :
38403 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
38404 : discard_const_p(char *, kwnames),
38405 : &bigendian_obj,
38406 : &ndr64_obj)) {
38407 0 : return NULL;
38408 : }
38409 :
38410 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
38411 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
38412 : }
38413 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
38414 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
38415 : }
38416 :
38417 0 : return py_drsuapi_DsGetMemberships_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
38418 : }
38419 :
38420 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
38421 : {
38422 0 : const struct ndr_interface_call *call = NULL;
38423 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38424 0 : struct ndr_pull *pull = NULL;
38425 : enum ndr_err_code err;
38426 :
38427 0 : if (ndr_table_drsuapi.num_calls < 10) {
38428 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships_ndr_unpack");
38429 0 : return NULL;
38430 : }
38431 0 : call = &ndr_table_drsuapi.calls[9];
38432 :
38433 0 : pull = ndr_pull_init_blob(blob, object);
38434 0 : if (pull == NULL) {
38435 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
38436 0 : return NULL;
38437 : }
38438 :
38439 0 : pull->flags |= ndr_pull_flags;
38440 :
38441 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
38442 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
38443 0 : TALLOC_FREE(pull);
38444 0 : PyErr_SetNdrError(err);
38445 0 : return NULL;
38446 : }
38447 0 : if (!allow_remaining) {
38448 : uint32_t highest_ofs;
38449 :
38450 0 : if (pull->offset > pull->relative_highest_offset) {
38451 0 : highest_ofs = pull->offset;
38452 : } else {
38453 0 : highest_ofs = pull->relative_highest_offset;
38454 : }
38455 0 : if (highest_ofs < pull->data_size) {
38456 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
38457 : "not all bytes consumed ofs[%u] size[%u]",
38458 : highest_ofs, pull->data_size);
38459 0 : TALLOC_FREE(pull);
38460 0 : PyErr_SetNdrError(err);
38461 0 : return NULL;
38462 : }
38463 : }
38464 :
38465 0 : TALLOC_FREE(pull);
38466 0 : Py_RETURN_NONE;
38467 : }
38468 :
38469 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
38470 : {
38471 : DATA_BLOB blob;
38472 0 : Py_ssize_t blob_length = 0;
38473 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
38474 0 : PyObject *bigendian_obj = NULL;
38475 0 : PyObject *ndr64_obj = NULL;
38476 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
38477 0 : PyObject *allow_remaining_obj = NULL;
38478 0 : bool allow_remaining = false;
38479 :
38480 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
38481 : discard_const_p(char *, kwnames),
38482 : &blob.data, &blob_length,
38483 : &bigendian_obj,
38484 : &ndr64_obj,
38485 : &allow_remaining_obj)) {
38486 0 : return NULL;
38487 : }
38488 0 : blob.length = blob_length;
38489 :
38490 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
38491 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
38492 : }
38493 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
38494 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
38495 : }
38496 :
38497 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
38498 0 : allow_remaining = true;
38499 : }
38500 :
38501 0 : return py_drsuapi_DsGetMemberships_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
38502 : }
38503 :
38504 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
38505 : {
38506 : DATA_BLOB blob;
38507 0 : Py_ssize_t blob_length = 0;
38508 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
38509 0 : PyObject *bigendian_obj = NULL;
38510 0 : PyObject *ndr64_obj = NULL;
38511 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
38512 0 : PyObject *allow_remaining_obj = NULL;
38513 0 : bool allow_remaining = false;
38514 :
38515 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
38516 : discard_const_p(char *, kwnames),
38517 : &blob.data, &blob_length,
38518 : &bigendian_obj,
38519 : &ndr64_obj,
38520 : &allow_remaining_obj)) {
38521 0 : return NULL;
38522 : }
38523 0 : blob.length = blob_length;
38524 :
38525 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
38526 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
38527 : }
38528 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
38529 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
38530 : }
38531 :
38532 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
38533 0 : allow_remaining = true;
38534 : }
38535 :
38536 0 : return py_drsuapi_DsGetMemberships_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
38537 : }
38538 :
38539 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
38540 : {
38541 0 : const struct ndr_interface_call *call = NULL;
38542 0 : struct drsuapi_DsGetMemberships *object = (struct drsuapi_DsGetMemberships *)pytalloc_get_ptr(py_obj);
38543 : PyObject *ret;
38544 : char *retstr;
38545 :
38546 0 : if (ndr_table_drsuapi.num_calls < 10) {
38547 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships_ndr_print");
38548 0 : return NULL;
38549 : }
38550 0 : call = &ndr_table_drsuapi.calls[9];
38551 :
38552 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
38553 0 : ret = PyUnicode_FromString(retstr);
38554 0 : TALLOC_FREE(retstr);
38555 :
38556 0 : return ret;
38557 : }
38558 :
38559 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
38560 : {
38561 0 : return py_drsuapi_DsGetMemberships_ndr_print(py_obj, "drsuapi_DsGetMemberships_in", NDR_IN);
38562 : }
38563 :
38564 0 : static PyObject *py_drsuapi_DsGetMemberships_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
38565 : {
38566 0 : return py_drsuapi_DsGetMemberships_ndr_print(py_obj, "drsuapi_DsGetMemberships_out", NDR_OUT);
38567 : }
38568 :
38569 : static PyMethodDef py_drsuapi_DsGetMemberships_methods[] = {
38570 : { "opnum", (PyCFunction)py_drsuapi_DsGetMemberships_ndr_opnum, METH_NOARGS|METH_CLASS,
38571 : "drsuapi.DsGetMemberships.opnum() -> 9 (0x09) " },
38572 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
38573 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
38574 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
38575 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
38576 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
38577 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
38578 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
38579 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
38580 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetMemberships_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
38581 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetMemberships_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
38582 : { NULL, NULL, 0, NULL }
38583 : };
38584 :
38585 :
38586 : static PyTypeObject drsuapi_DsGetMemberships_Type = {
38587 : PyVarObject_HEAD_INIT(NULL, 0)
38588 : .tp_name = "drsuapi.DsGetMemberships",
38589 : .tp_getset = py_drsuapi_DsGetMemberships_getsetters,
38590 : .tp_methods = py_drsuapi_DsGetMemberships_methods,
38591 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
38592 : .tp_new = py_drsuapi_DsGetMemberships_new,
38593 : };
38594 :
38595 0 : static bool pack_py_drsuapi_DsGetMemberships_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetMemberships *r)
38596 : {
38597 : PyObject *py_bind_handle;
38598 : PyObject *py_level;
38599 : PyObject *py_req;
38600 0 : const char *kwnames[] = {
38601 : "bind_handle", "level", "req", NULL
38602 : };
38603 :
38604 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetMemberships", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
38605 0 : return false;
38606 : }
38607 :
38608 0 : if (py_bind_handle == NULL) {
38609 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
38610 0 : return false;
38611 : }
38612 0 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
38613 0 : if (r->in.bind_handle == NULL) {
38614 0 : PyErr_NoMemory();
38615 0 : return false;
38616 : }
38617 0 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
38618 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
38619 0 : PyErr_NoMemory();
38620 0 : return false;
38621 : }
38622 0 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
38623 0 : if (py_level == NULL) {
38624 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
38625 0 : return false;
38626 : }
38627 : {
38628 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
38629 0 : if (PyLong_Check(py_level)) {
38630 : unsigned long long test_var;
38631 0 : test_var = PyLong_AsUnsignedLongLong(py_level);
38632 0 : if (PyErr_Occurred() != NULL) {
38633 0 : return false;
38634 : }
38635 0 : if (test_var > uint_max) {
38636 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
38637 : PyLong_Type.tp_name, uint_max, test_var);
38638 0 : return false;
38639 : }
38640 0 : r->in.level = test_var;
38641 : } else {
38642 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
38643 : PyLong_Type.tp_name);
38644 0 : return false;
38645 : }
38646 : }
38647 0 : if (py_req == NULL) {
38648 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
38649 0 : return false;
38650 : }
38651 0 : r->in.req = talloc_ptrtype(r, r->in.req);
38652 0 : if (r->in.req == NULL) {
38653 0 : PyErr_NoMemory();
38654 0 : return false;
38655 : }
38656 : {
38657 : union drsuapi_DsGetMembershipsRequest *req_switch_1;
38658 0 : req_switch_1 = (union drsuapi_DsGetMembershipsRequest *)pyrpc_export_union(&drsuapi_DsGetMembershipsRequest_Type, r, r->in.level, py_req, "union drsuapi_DsGetMembershipsRequest");
38659 0 : if (req_switch_1 == NULL) {
38660 0 : return false;
38661 : }
38662 0 : r->in.req = req_switch_1;
38663 : }
38664 0 : return true;
38665 : }
38666 :
38667 0 : static PyObject *unpack_py_drsuapi_DsGetMemberships_args_out(struct drsuapi_DsGetMemberships *r)
38668 : {
38669 : PyObject *result;
38670 : PyObject *py_level_out;
38671 : PyObject *py_ctr;
38672 0 : result = PyTuple_New(2);
38673 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
38674 0 : PyTuple_SetItem(result, 0, py_level_out);
38675 0 : py_ctr = pyrpc_import_union(&drsuapi_DsGetMembershipsCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsGetMembershipsCtr");
38676 0 : if (py_ctr == NULL) {
38677 0 : return NULL;
38678 : }
38679 0 : PyTuple_SetItem(result, 1, py_ctr);
38680 0 : if (!W_ERROR_IS_OK(r->out.result)) {
38681 0 : PyErr_SetWERROR(r->out.result);
38682 0 : return NULL;
38683 : }
38684 :
38685 0 : return result;
38686 : }
38687 :
38688 :
38689 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_in_get_bind_handle(PyObject *obj, void *closure)
38690 : {
38691 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(obj);
38692 : PyObject *py_bind_handle;
38693 0 : if (object->in.bind_handle == NULL) {
38694 0 : Py_RETURN_NONE;
38695 : }
38696 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
38697 0 : return py_bind_handle;
38698 : }
38699 :
38700 0 : static int py_drsuapi_DsGetNT4ChangeLog_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
38701 : {
38702 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
38703 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
38704 0 : if (value == NULL) {
38705 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
38706 0 : return -1;
38707 : }
38708 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
38709 0 : if (object->in.bind_handle == NULL) {
38710 0 : PyErr_NoMemory();
38711 0 : return -1;
38712 : }
38713 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
38714 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
38715 0 : PyErr_NoMemory();
38716 0 : return -1;
38717 : }
38718 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
38719 0 : return 0;
38720 : }
38721 :
38722 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_in_get_level(PyObject *obj, void *closure)
38723 : {
38724 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(obj);
38725 : PyObject *py_level;
38726 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
38727 0 : return py_level;
38728 : }
38729 :
38730 0 : static int py_drsuapi_DsGetNT4ChangeLog_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
38731 : {
38732 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
38733 0 : if (value == NULL) {
38734 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
38735 0 : return -1;
38736 : }
38737 : {
38738 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
38739 0 : if (PyLong_Check(value)) {
38740 : unsigned long long test_var;
38741 0 : test_var = PyLong_AsUnsignedLongLong(value);
38742 0 : if (PyErr_Occurred() != NULL) {
38743 0 : return -1;
38744 : }
38745 0 : if (test_var > uint_max) {
38746 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
38747 : PyLong_Type.tp_name, uint_max, test_var);
38748 0 : return -1;
38749 : }
38750 0 : object->in.level = test_var;
38751 : } else {
38752 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
38753 : PyLong_Type.tp_name);
38754 0 : return -1;
38755 : }
38756 : }
38757 0 : return 0;
38758 : }
38759 :
38760 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_in_get_req(PyObject *obj, void *closure)
38761 : {
38762 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(obj);
38763 : PyObject *py_req;
38764 0 : if (object->in.req == NULL) {
38765 0 : Py_RETURN_NONE;
38766 : }
38767 0 : py_req = pyrpc_import_union(&drsuapi_DsGetNT4ChangeLogRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetNT4ChangeLogRequest");
38768 0 : if (py_req == NULL) {
38769 0 : return NULL;
38770 : }
38771 0 : return py_req;
38772 : }
38773 :
38774 0 : static int py_drsuapi_DsGetNT4ChangeLog_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
38775 : {
38776 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
38777 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
38778 0 : if (value == NULL) {
38779 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
38780 0 : return -1;
38781 : }
38782 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
38783 0 : if (object->in.req == NULL) {
38784 0 : PyErr_NoMemory();
38785 0 : return -1;
38786 : }
38787 : {
38788 : union drsuapi_DsGetNT4ChangeLogRequest *req_switch_1;
38789 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");
38790 0 : if (req_switch_1 == NULL) {
38791 0 : return -1;
38792 : }
38793 0 : object->in.req = req_switch_1;
38794 : }
38795 0 : return 0;
38796 : }
38797 :
38798 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_out_get_level_out(PyObject *obj, void *closure)
38799 : {
38800 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(obj);
38801 : PyObject *py_level_out;
38802 0 : if (object->out.level_out == NULL) {
38803 0 : Py_RETURN_NONE;
38804 : }
38805 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
38806 0 : return py_level_out;
38807 : }
38808 :
38809 0 : static int py_drsuapi_DsGetNT4ChangeLog_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
38810 : {
38811 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
38812 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
38813 0 : if (value == NULL) {
38814 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
38815 0 : return -1;
38816 : }
38817 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
38818 0 : if (object->out.level_out == NULL) {
38819 0 : PyErr_NoMemory();
38820 0 : return -1;
38821 : }
38822 : {
38823 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
38824 0 : if (PyLong_Check(value)) {
38825 : unsigned long long test_var;
38826 0 : test_var = PyLong_AsUnsignedLongLong(value);
38827 0 : if (PyErr_Occurred() != NULL) {
38828 0 : return -1;
38829 : }
38830 0 : if (test_var > uint_max) {
38831 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
38832 : PyLong_Type.tp_name, uint_max, test_var);
38833 0 : return -1;
38834 : }
38835 0 : *object->out.level_out = test_var;
38836 : } else {
38837 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
38838 : PyLong_Type.tp_name);
38839 0 : return -1;
38840 : }
38841 : }
38842 0 : return 0;
38843 : }
38844 :
38845 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_out_get_info(PyObject *obj, void *closure)
38846 : {
38847 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(obj);
38848 : PyObject *py_info;
38849 0 : if (object->out.info == NULL) {
38850 0 : Py_RETURN_NONE;
38851 : }
38852 0 : py_info = pyrpc_import_union(&drsuapi_DsGetNT4ChangeLogInfo_Type, object->out.info, *object->out.level_out, object->out.info, "union drsuapi_DsGetNT4ChangeLogInfo");
38853 0 : if (py_info == NULL) {
38854 0 : return NULL;
38855 : }
38856 0 : return py_info;
38857 : }
38858 :
38859 0 : static int py_drsuapi_DsGetNT4ChangeLog_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
38860 : {
38861 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
38862 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
38863 0 : if (value == NULL) {
38864 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
38865 0 : return -1;
38866 : }
38867 0 : object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
38868 0 : if (object->out.info == NULL) {
38869 0 : PyErr_NoMemory();
38870 0 : return -1;
38871 : }
38872 : {
38873 : union drsuapi_DsGetNT4ChangeLogInfo *info_switch_1;
38874 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");
38875 0 : if (info_switch_1 == NULL) {
38876 0 : return -1;
38877 : }
38878 0 : object->out.info = info_switch_1;
38879 : }
38880 0 : return 0;
38881 : }
38882 :
38883 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_get_result(PyObject *obj, void *closure)
38884 : {
38885 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(obj);
38886 : PyObject *py_result;
38887 0 : py_result = PyErr_FromWERROR(object->out.result);
38888 0 : return py_result;
38889 : }
38890 :
38891 0 : static int py_drsuapi_DsGetNT4ChangeLog_set_result(PyObject *py_obj, PyObject *value, void *closure)
38892 : {
38893 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
38894 0 : if (value == NULL) {
38895 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
38896 0 : return -1;
38897 : }
38898 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
38899 0 : return 0;
38900 : }
38901 :
38902 : static PyGetSetDef py_drsuapi_DsGetNT4ChangeLog_getsetters[] = {
38903 : {
38904 : .name = discard_const_p(char, "in_bind_handle"),
38905 : .get = py_drsuapi_DsGetNT4ChangeLog_in_get_bind_handle,
38906 : .set = py_drsuapi_DsGetNT4ChangeLog_in_set_bind_handle,
38907 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
38908 : },
38909 : {
38910 : .name = discard_const_p(char, "in_level"),
38911 : .get = py_drsuapi_DsGetNT4ChangeLog_in_get_level,
38912 : .set = py_drsuapi_DsGetNT4ChangeLog_in_set_level,
38913 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
38914 : },
38915 : {
38916 : .name = discard_const_p(char, "in_req"),
38917 : .get = py_drsuapi_DsGetNT4ChangeLog_in_get_req,
38918 : .set = py_drsuapi_DsGetNT4ChangeLog_in_set_req,
38919 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNT4ChangeLogRequest")
38920 : },
38921 : {
38922 : .name = discard_const_p(char, "out_level_out"),
38923 : .get = py_drsuapi_DsGetNT4ChangeLog_out_get_level_out,
38924 : .set = py_drsuapi_DsGetNT4ChangeLog_out_set_level_out,
38925 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
38926 : },
38927 : {
38928 : .name = discard_const_p(char, "out_info"),
38929 : .get = py_drsuapi_DsGetNT4ChangeLog_out_get_info,
38930 : .set = py_drsuapi_DsGetNT4ChangeLog_out_set_info,
38931 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetNT4ChangeLogInfo")
38932 : },
38933 : {
38934 : .name = discard_const_p(char, "result"),
38935 : .get = py_drsuapi_DsGetNT4ChangeLog_get_result,
38936 : .set = py_drsuapi_DsGetNT4ChangeLog_set_result,
38937 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
38938 : },
38939 : { .name = NULL }
38940 : };
38941 :
38942 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
38943 : {
38944 0 : PyObject *self = pytalloc_new(struct drsuapi_DsGetNT4ChangeLog, type);
38945 0 : struct drsuapi_DsGetNT4ChangeLog *_self = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(self);
38946 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
38947 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
38948 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogRequest);
38949 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
38950 0 : _self->out.info = talloc_zero(mem_ctx, union drsuapi_DsGetNT4ChangeLogInfo);
38951 0 : return self;
38952 : }
38953 :
38954 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
38955 : {
38956 :
38957 :
38958 0 : return PyLong_FromLong(11);
38959 : }
38960 :
38961 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
38962 : {
38963 0 : const struct ndr_interface_call *call = NULL;
38964 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
38965 0 : PyObject *ret = NULL;
38966 0 : struct ndr_push *push = NULL;
38967 : DATA_BLOB blob;
38968 : enum ndr_err_code err;
38969 :
38970 0 : if (ndr_table_drsuapi.num_calls < 12) {
38971 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNT4ChangeLog_ndr_pack");
38972 0 : return NULL;
38973 : }
38974 0 : call = &ndr_table_drsuapi.calls[11];
38975 :
38976 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
38977 0 : if (push == NULL) {
38978 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
38979 0 : return NULL;
38980 : }
38981 :
38982 0 : push->flags |= ndr_push_flags;
38983 :
38984 0 : err = call->ndr_push(push, ndr_inout_flags, object);
38985 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
38986 0 : TALLOC_FREE(push);
38987 0 : PyErr_SetNdrError(err);
38988 0 : return NULL;
38989 : }
38990 0 : blob = ndr_push_blob(push);
38991 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
38992 0 : TALLOC_FREE(push);
38993 0 : return ret;
38994 : }
38995 :
38996 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
38997 : {
38998 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
38999 0 : PyObject *bigendian_obj = NULL;
39000 0 : PyObject *ndr64_obj = NULL;
39001 0 : uint32_t ndr_push_flags = 0;
39002 :
39003 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
39004 : discard_const_p(char *, kwnames),
39005 : &bigendian_obj,
39006 : &ndr64_obj)) {
39007 0 : return NULL;
39008 : }
39009 :
39010 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
39011 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
39012 : }
39013 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
39014 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
39015 : }
39016 :
39017 0 : return py_drsuapi_DsGetNT4ChangeLog_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
39018 : }
39019 :
39020 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
39021 : {
39022 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
39023 0 : PyObject *bigendian_obj = NULL;
39024 0 : PyObject *ndr64_obj = NULL;
39025 0 : uint32_t ndr_push_flags = 0;
39026 :
39027 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
39028 : discard_const_p(char *, kwnames),
39029 : &bigendian_obj,
39030 : &ndr64_obj)) {
39031 0 : return NULL;
39032 : }
39033 :
39034 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
39035 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
39036 : }
39037 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
39038 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
39039 : }
39040 :
39041 0 : return py_drsuapi_DsGetNT4ChangeLog_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
39042 : }
39043 :
39044 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
39045 : {
39046 0 : const struct ndr_interface_call *call = NULL;
39047 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
39048 0 : struct ndr_pull *pull = NULL;
39049 : enum ndr_err_code err;
39050 :
39051 0 : if (ndr_table_drsuapi.num_calls < 12) {
39052 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNT4ChangeLog_ndr_unpack");
39053 0 : return NULL;
39054 : }
39055 0 : call = &ndr_table_drsuapi.calls[11];
39056 :
39057 0 : pull = ndr_pull_init_blob(blob, object);
39058 0 : if (pull == NULL) {
39059 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
39060 0 : return NULL;
39061 : }
39062 :
39063 0 : pull->flags |= ndr_pull_flags;
39064 :
39065 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
39066 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
39067 0 : TALLOC_FREE(pull);
39068 0 : PyErr_SetNdrError(err);
39069 0 : return NULL;
39070 : }
39071 0 : if (!allow_remaining) {
39072 : uint32_t highest_ofs;
39073 :
39074 0 : if (pull->offset > pull->relative_highest_offset) {
39075 0 : highest_ofs = pull->offset;
39076 : } else {
39077 0 : highest_ofs = pull->relative_highest_offset;
39078 : }
39079 0 : if (highest_ofs < pull->data_size) {
39080 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
39081 : "not all bytes consumed ofs[%u] size[%u]",
39082 : highest_ofs, pull->data_size);
39083 0 : TALLOC_FREE(pull);
39084 0 : PyErr_SetNdrError(err);
39085 0 : return NULL;
39086 : }
39087 : }
39088 :
39089 0 : TALLOC_FREE(pull);
39090 0 : Py_RETURN_NONE;
39091 : }
39092 :
39093 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
39094 : {
39095 : DATA_BLOB blob;
39096 0 : Py_ssize_t blob_length = 0;
39097 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
39098 0 : PyObject *bigendian_obj = NULL;
39099 0 : PyObject *ndr64_obj = NULL;
39100 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
39101 0 : PyObject *allow_remaining_obj = NULL;
39102 0 : bool allow_remaining = false;
39103 :
39104 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
39105 : discard_const_p(char *, kwnames),
39106 : &blob.data, &blob_length,
39107 : &bigendian_obj,
39108 : &ndr64_obj,
39109 : &allow_remaining_obj)) {
39110 0 : return NULL;
39111 : }
39112 0 : blob.length = blob_length;
39113 :
39114 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
39115 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
39116 : }
39117 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
39118 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
39119 : }
39120 :
39121 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
39122 0 : allow_remaining = true;
39123 : }
39124 :
39125 0 : return py_drsuapi_DsGetNT4ChangeLog_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
39126 : }
39127 :
39128 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
39129 : {
39130 : DATA_BLOB blob;
39131 0 : Py_ssize_t blob_length = 0;
39132 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
39133 0 : PyObject *bigendian_obj = NULL;
39134 0 : PyObject *ndr64_obj = NULL;
39135 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
39136 0 : PyObject *allow_remaining_obj = NULL;
39137 0 : bool allow_remaining = false;
39138 :
39139 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
39140 : discard_const_p(char *, kwnames),
39141 : &blob.data, &blob_length,
39142 : &bigendian_obj,
39143 : &ndr64_obj,
39144 : &allow_remaining_obj)) {
39145 0 : return NULL;
39146 : }
39147 0 : blob.length = blob_length;
39148 :
39149 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
39150 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
39151 : }
39152 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
39153 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
39154 : }
39155 :
39156 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
39157 0 : allow_remaining = true;
39158 : }
39159 :
39160 0 : return py_drsuapi_DsGetNT4ChangeLog_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
39161 : }
39162 :
39163 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
39164 : {
39165 0 : const struct ndr_interface_call *call = NULL;
39166 0 : struct drsuapi_DsGetNT4ChangeLog *object = (struct drsuapi_DsGetNT4ChangeLog *)pytalloc_get_ptr(py_obj);
39167 : PyObject *ret;
39168 : char *retstr;
39169 :
39170 0 : if (ndr_table_drsuapi.num_calls < 12) {
39171 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetNT4ChangeLog_ndr_print");
39172 0 : return NULL;
39173 : }
39174 0 : call = &ndr_table_drsuapi.calls[11];
39175 :
39176 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
39177 0 : ret = PyUnicode_FromString(retstr);
39178 0 : TALLOC_FREE(retstr);
39179 :
39180 0 : return ret;
39181 : }
39182 :
39183 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
39184 : {
39185 0 : return py_drsuapi_DsGetNT4ChangeLog_ndr_print(py_obj, "drsuapi_DsGetNT4ChangeLog_in", NDR_IN);
39186 : }
39187 :
39188 0 : static PyObject *py_drsuapi_DsGetNT4ChangeLog_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
39189 : {
39190 0 : return py_drsuapi_DsGetNT4ChangeLog_ndr_print(py_obj, "drsuapi_DsGetNT4ChangeLog_out", NDR_OUT);
39191 : }
39192 :
39193 : static PyMethodDef py_drsuapi_DsGetNT4ChangeLog_methods[] = {
39194 : { "opnum", (PyCFunction)py_drsuapi_DsGetNT4ChangeLog_ndr_opnum, METH_NOARGS|METH_CLASS,
39195 : "drsuapi.DsGetNT4ChangeLog.opnum() -> 11 (0x0b) " },
39196 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLog_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
39197 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
39198 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLog_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
39199 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
39200 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLog_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
39201 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
39202 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetNT4ChangeLog_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
39203 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
39204 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetNT4ChangeLog_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
39205 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetNT4ChangeLog_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
39206 : { NULL, NULL, 0, NULL }
39207 : };
39208 :
39209 :
39210 : static PyTypeObject drsuapi_DsGetNT4ChangeLog_Type = {
39211 : PyVarObject_HEAD_INIT(NULL, 0)
39212 : .tp_name = "drsuapi.DsGetNT4ChangeLog",
39213 : .tp_getset = py_drsuapi_DsGetNT4ChangeLog_getsetters,
39214 : .tp_methods = py_drsuapi_DsGetNT4ChangeLog_methods,
39215 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
39216 : .tp_new = py_drsuapi_DsGetNT4ChangeLog_new,
39217 : };
39218 :
39219 0 : static bool pack_py_drsuapi_DsGetNT4ChangeLog_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetNT4ChangeLog *r)
39220 : {
39221 : PyObject *py_bind_handle;
39222 : PyObject *py_level;
39223 : PyObject *py_req;
39224 0 : const char *kwnames[] = {
39225 : "bind_handle", "level", "req", NULL
39226 : };
39227 :
39228 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetNT4ChangeLog", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
39229 0 : return false;
39230 : }
39231 :
39232 0 : if (py_bind_handle == NULL) {
39233 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
39234 0 : return false;
39235 : }
39236 0 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
39237 0 : if (r->in.bind_handle == NULL) {
39238 0 : PyErr_NoMemory();
39239 0 : return false;
39240 : }
39241 0 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
39242 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
39243 0 : PyErr_NoMemory();
39244 0 : return false;
39245 : }
39246 0 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
39247 0 : if (py_level == NULL) {
39248 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
39249 0 : return false;
39250 : }
39251 : {
39252 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
39253 0 : if (PyLong_Check(py_level)) {
39254 : unsigned long long test_var;
39255 0 : test_var = PyLong_AsUnsignedLongLong(py_level);
39256 0 : if (PyErr_Occurred() != NULL) {
39257 0 : return false;
39258 : }
39259 0 : if (test_var > uint_max) {
39260 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
39261 : PyLong_Type.tp_name, uint_max, test_var);
39262 0 : return false;
39263 : }
39264 0 : r->in.level = test_var;
39265 : } else {
39266 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
39267 : PyLong_Type.tp_name);
39268 0 : return false;
39269 : }
39270 : }
39271 0 : if (py_req == NULL) {
39272 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
39273 0 : return false;
39274 : }
39275 0 : r->in.req = talloc_ptrtype(r, r->in.req);
39276 0 : if (r->in.req == NULL) {
39277 0 : PyErr_NoMemory();
39278 0 : return false;
39279 : }
39280 : {
39281 : union drsuapi_DsGetNT4ChangeLogRequest *req_switch_1;
39282 0 : req_switch_1 = (union drsuapi_DsGetNT4ChangeLogRequest *)pyrpc_export_union(&drsuapi_DsGetNT4ChangeLogRequest_Type, r, r->in.level, py_req, "union drsuapi_DsGetNT4ChangeLogRequest");
39283 0 : if (req_switch_1 == NULL) {
39284 0 : return false;
39285 : }
39286 0 : r->in.req = req_switch_1;
39287 : }
39288 0 : return true;
39289 : }
39290 :
39291 0 : static PyObject *unpack_py_drsuapi_DsGetNT4ChangeLog_args_out(struct drsuapi_DsGetNT4ChangeLog *r)
39292 : {
39293 : PyObject *result;
39294 : PyObject *py_level_out;
39295 : PyObject *py_info;
39296 0 : result = PyTuple_New(2);
39297 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
39298 0 : PyTuple_SetItem(result, 0, py_level_out);
39299 0 : py_info = pyrpc_import_union(&drsuapi_DsGetNT4ChangeLogInfo_Type, r->out.info, *r->out.level_out, r->out.info, "union drsuapi_DsGetNT4ChangeLogInfo");
39300 0 : if (py_info == NULL) {
39301 0 : return NULL;
39302 : }
39303 0 : PyTuple_SetItem(result, 1, py_info);
39304 0 : if (!W_ERROR_IS_OK(r->out.result)) {
39305 0 : PyErr_SetWERROR(r->out.result);
39306 0 : return NULL;
39307 : }
39308 :
39309 0 : return result;
39310 : }
39311 :
39312 :
39313 0 : static PyObject *py_drsuapi_DsCrackNames_in_get_bind_handle(PyObject *obj, void *closure)
39314 : {
39315 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(obj);
39316 : PyObject *py_bind_handle;
39317 0 : if (object->in.bind_handle == NULL) {
39318 0 : Py_RETURN_NONE;
39319 : }
39320 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
39321 0 : return py_bind_handle;
39322 : }
39323 :
39324 0 : static int py_drsuapi_DsCrackNames_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
39325 : {
39326 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39327 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
39328 0 : if (value == NULL) {
39329 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
39330 0 : return -1;
39331 : }
39332 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
39333 0 : if (object->in.bind_handle == NULL) {
39334 0 : PyErr_NoMemory();
39335 0 : return -1;
39336 : }
39337 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
39338 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
39339 0 : PyErr_NoMemory();
39340 0 : return -1;
39341 : }
39342 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
39343 0 : return 0;
39344 : }
39345 :
39346 0 : static PyObject *py_drsuapi_DsCrackNames_in_get_level(PyObject *obj, void *closure)
39347 : {
39348 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(obj);
39349 : PyObject *py_level;
39350 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
39351 0 : return py_level;
39352 : }
39353 :
39354 0 : static int py_drsuapi_DsCrackNames_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
39355 : {
39356 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39357 0 : if (value == NULL) {
39358 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
39359 0 : return -1;
39360 : }
39361 : {
39362 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
39363 0 : if (PyLong_Check(value)) {
39364 : unsigned long long test_var;
39365 0 : test_var = PyLong_AsUnsignedLongLong(value);
39366 0 : if (PyErr_Occurred() != NULL) {
39367 0 : return -1;
39368 : }
39369 0 : if (test_var > uint_max) {
39370 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
39371 : PyLong_Type.tp_name, uint_max, test_var);
39372 0 : return -1;
39373 : }
39374 0 : object->in.level = test_var;
39375 : } else {
39376 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
39377 : PyLong_Type.tp_name);
39378 0 : return -1;
39379 : }
39380 : }
39381 0 : return 0;
39382 : }
39383 :
39384 0 : static PyObject *py_drsuapi_DsCrackNames_in_get_req(PyObject *obj, void *closure)
39385 : {
39386 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(obj);
39387 : PyObject *py_req;
39388 0 : if (object->in.req == NULL) {
39389 0 : Py_RETURN_NONE;
39390 : }
39391 0 : py_req = pyrpc_import_union(&drsuapi_DsNameRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsNameRequest");
39392 0 : if (py_req == NULL) {
39393 0 : return NULL;
39394 : }
39395 0 : return py_req;
39396 : }
39397 :
39398 0 : static int py_drsuapi_DsCrackNames_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
39399 : {
39400 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39401 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
39402 0 : if (value == NULL) {
39403 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
39404 0 : return -1;
39405 : }
39406 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
39407 0 : if (object->in.req == NULL) {
39408 0 : PyErr_NoMemory();
39409 0 : return -1;
39410 : }
39411 : {
39412 : union drsuapi_DsNameRequest *req_switch_1;
39413 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");
39414 0 : if (req_switch_1 == NULL) {
39415 0 : return -1;
39416 : }
39417 0 : object->in.req = req_switch_1;
39418 : }
39419 0 : return 0;
39420 : }
39421 :
39422 0 : static PyObject *py_drsuapi_DsCrackNames_out_get_level_out(PyObject *obj, void *closure)
39423 : {
39424 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(obj);
39425 : PyObject *py_level_out;
39426 0 : if (object->out.level_out == NULL) {
39427 0 : Py_RETURN_NONE;
39428 : }
39429 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
39430 0 : return py_level_out;
39431 : }
39432 :
39433 0 : static int py_drsuapi_DsCrackNames_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
39434 : {
39435 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39436 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
39437 0 : if (value == NULL) {
39438 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
39439 0 : return -1;
39440 : }
39441 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
39442 0 : if (object->out.level_out == NULL) {
39443 0 : PyErr_NoMemory();
39444 0 : return -1;
39445 : }
39446 : {
39447 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
39448 0 : if (PyLong_Check(value)) {
39449 : unsigned long long test_var;
39450 0 : test_var = PyLong_AsUnsignedLongLong(value);
39451 0 : if (PyErr_Occurred() != NULL) {
39452 0 : return -1;
39453 : }
39454 0 : if (test_var > uint_max) {
39455 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
39456 : PyLong_Type.tp_name, uint_max, test_var);
39457 0 : return -1;
39458 : }
39459 0 : *object->out.level_out = test_var;
39460 : } else {
39461 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
39462 : PyLong_Type.tp_name);
39463 0 : return -1;
39464 : }
39465 : }
39466 0 : return 0;
39467 : }
39468 :
39469 0 : static PyObject *py_drsuapi_DsCrackNames_out_get_ctr(PyObject *obj, void *closure)
39470 : {
39471 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(obj);
39472 : PyObject *py_ctr;
39473 0 : if (object->out.ctr == NULL) {
39474 0 : Py_RETURN_NONE;
39475 : }
39476 0 : py_ctr = pyrpc_import_union(&drsuapi_DsNameCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsNameCtr");
39477 0 : if (py_ctr == NULL) {
39478 0 : return NULL;
39479 : }
39480 0 : return py_ctr;
39481 : }
39482 :
39483 0 : static int py_drsuapi_DsCrackNames_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
39484 : {
39485 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39486 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
39487 0 : if (value == NULL) {
39488 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
39489 0 : return -1;
39490 : }
39491 0 : object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
39492 0 : if (object->out.ctr == NULL) {
39493 0 : PyErr_NoMemory();
39494 0 : return -1;
39495 : }
39496 : {
39497 : union drsuapi_DsNameCtr *ctr_switch_1;
39498 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");
39499 0 : if (ctr_switch_1 == NULL) {
39500 0 : return -1;
39501 : }
39502 0 : object->out.ctr = ctr_switch_1;
39503 : }
39504 0 : return 0;
39505 : }
39506 :
39507 0 : static PyObject *py_drsuapi_DsCrackNames_get_result(PyObject *obj, void *closure)
39508 : {
39509 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(obj);
39510 : PyObject *py_result;
39511 0 : py_result = PyErr_FromWERROR(object->out.result);
39512 0 : return py_result;
39513 : }
39514 :
39515 0 : static int py_drsuapi_DsCrackNames_set_result(PyObject *py_obj, PyObject *value, void *closure)
39516 : {
39517 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39518 0 : if (value == NULL) {
39519 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
39520 0 : return -1;
39521 : }
39522 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
39523 0 : return 0;
39524 : }
39525 :
39526 : static PyGetSetDef py_drsuapi_DsCrackNames_getsetters[] = {
39527 : {
39528 : .name = discard_const_p(char, "in_bind_handle"),
39529 : .get = py_drsuapi_DsCrackNames_in_get_bind_handle,
39530 : .set = py_drsuapi_DsCrackNames_in_set_bind_handle,
39531 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
39532 : },
39533 : {
39534 : .name = discard_const_p(char, "in_level"),
39535 : .get = py_drsuapi_DsCrackNames_in_get_level,
39536 : .set = py_drsuapi_DsCrackNames_in_set_level,
39537 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
39538 : },
39539 : {
39540 : .name = discard_const_p(char, "in_req"),
39541 : .get = py_drsuapi_DsCrackNames_in_get_req,
39542 : .set = py_drsuapi_DsCrackNames_in_set_req,
39543 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameRequest")
39544 : },
39545 : {
39546 : .name = discard_const_p(char, "out_level_out"),
39547 : .get = py_drsuapi_DsCrackNames_out_get_level_out,
39548 : .set = py_drsuapi_DsCrackNames_out_set_level_out,
39549 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
39550 : },
39551 : {
39552 : .name = discard_const_p(char, "out_ctr"),
39553 : .get = py_drsuapi_DsCrackNames_out_get_ctr,
39554 : .set = py_drsuapi_DsCrackNames_out_set_ctr,
39555 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsNameCtr")
39556 : },
39557 : {
39558 : .name = discard_const_p(char, "result"),
39559 : .get = py_drsuapi_DsCrackNames_get_result,
39560 : .set = py_drsuapi_DsCrackNames_set_result,
39561 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
39562 : },
39563 : { .name = NULL }
39564 : };
39565 :
39566 0 : static PyObject *py_drsuapi_DsCrackNames_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
39567 : {
39568 0 : PyObject *self = pytalloc_new(struct drsuapi_DsCrackNames, type);
39569 0 : struct drsuapi_DsCrackNames *_self = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(self);
39570 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
39571 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
39572 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsNameRequest);
39573 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
39574 0 : _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsNameCtr);
39575 0 : return self;
39576 : }
39577 :
39578 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
39579 : {
39580 :
39581 :
39582 0 : return PyLong_FromLong(12);
39583 : }
39584 :
39585 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
39586 : {
39587 0 : const struct ndr_interface_call *call = NULL;
39588 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39589 0 : PyObject *ret = NULL;
39590 0 : struct ndr_push *push = NULL;
39591 : DATA_BLOB blob;
39592 : enum ndr_err_code err;
39593 :
39594 0 : if (ndr_table_drsuapi.num_calls < 13) {
39595 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsCrackNames_ndr_pack");
39596 0 : return NULL;
39597 : }
39598 0 : call = &ndr_table_drsuapi.calls[12];
39599 :
39600 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
39601 0 : if (push == NULL) {
39602 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
39603 0 : return NULL;
39604 : }
39605 :
39606 0 : push->flags |= ndr_push_flags;
39607 :
39608 0 : err = call->ndr_push(push, ndr_inout_flags, object);
39609 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
39610 0 : TALLOC_FREE(push);
39611 0 : PyErr_SetNdrError(err);
39612 0 : return NULL;
39613 : }
39614 0 : blob = ndr_push_blob(push);
39615 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
39616 0 : TALLOC_FREE(push);
39617 0 : return ret;
39618 : }
39619 :
39620 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
39621 : {
39622 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
39623 0 : PyObject *bigendian_obj = NULL;
39624 0 : PyObject *ndr64_obj = NULL;
39625 0 : uint32_t ndr_push_flags = 0;
39626 :
39627 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
39628 : discard_const_p(char *, kwnames),
39629 : &bigendian_obj,
39630 : &ndr64_obj)) {
39631 0 : return NULL;
39632 : }
39633 :
39634 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
39635 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
39636 : }
39637 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
39638 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
39639 : }
39640 :
39641 0 : return py_drsuapi_DsCrackNames_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
39642 : }
39643 :
39644 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
39645 : {
39646 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
39647 0 : PyObject *bigendian_obj = NULL;
39648 0 : PyObject *ndr64_obj = NULL;
39649 0 : uint32_t ndr_push_flags = 0;
39650 :
39651 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
39652 : discard_const_p(char *, kwnames),
39653 : &bigendian_obj,
39654 : &ndr64_obj)) {
39655 0 : return NULL;
39656 : }
39657 :
39658 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
39659 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
39660 : }
39661 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
39662 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
39663 : }
39664 :
39665 0 : return py_drsuapi_DsCrackNames_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
39666 : }
39667 :
39668 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
39669 : {
39670 0 : const struct ndr_interface_call *call = NULL;
39671 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39672 0 : struct ndr_pull *pull = NULL;
39673 : enum ndr_err_code err;
39674 :
39675 0 : if (ndr_table_drsuapi.num_calls < 13) {
39676 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsCrackNames_ndr_unpack");
39677 0 : return NULL;
39678 : }
39679 0 : call = &ndr_table_drsuapi.calls[12];
39680 :
39681 0 : pull = ndr_pull_init_blob(blob, object);
39682 0 : if (pull == NULL) {
39683 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
39684 0 : return NULL;
39685 : }
39686 :
39687 0 : pull->flags |= ndr_pull_flags;
39688 :
39689 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
39690 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
39691 0 : TALLOC_FREE(pull);
39692 0 : PyErr_SetNdrError(err);
39693 0 : return NULL;
39694 : }
39695 0 : if (!allow_remaining) {
39696 : uint32_t highest_ofs;
39697 :
39698 0 : if (pull->offset > pull->relative_highest_offset) {
39699 0 : highest_ofs = pull->offset;
39700 : } else {
39701 0 : highest_ofs = pull->relative_highest_offset;
39702 : }
39703 0 : if (highest_ofs < pull->data_size) {
39704 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
39705 : "not all bytes consumed ofs[%u] size[%u]",
39706 : highest_ofs, pull->data_size);
39707 0 : TALLOC_FREE(pull);
39708 0 : PyErr_SetNdrError(err);
39709 0 : return NULL;
39710 : }
39711 : }
39712 :
39713 0 : TALLOC_FREE(pull);
39714 0 : Py_RETURN_NONE;
39715 : }
39716 :
39717 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
39718 : {
39719 : DATA_BLOB blob;
39720 0 : Py_ssize_t blob_length = 0;
39721 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
39722 0 : PyObject *bigendian_obj = NULL;
39723 0 : PyObject *ndr64_obj = NULL;
39724 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
39725 0 : PyObject *allow_remaining_obj = NULL;
39726 0 : bool allow_remaining = false;
39727 :
39728 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
39729 : discard_const_p(char *, kwnames),
39730 : &blob.data, &blob_length,
39731 : &bigendian_obj,
39732 : &ndr64_obj,
39733 : &allow_remaining_obj)) {
39734 0 : return NULL;
39735 : }
39736 0 : blob.length = blob_length;
39737 :
39738 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
39739 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
39740 : }
39741 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
39742 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
39743 : }
39744 :
39745 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
39746 0 : allow_remaining = true;
39747 : }
39748 :
39749 0 : return py_drsuapi_DsCrackNames_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
39750 : }
39751 :
39752 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
39753 : {
39754 : DATA_BLOB blob;
39755 0 : Py_ssize_t blob_length = 0;
39756 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
39757 0 : PyObject *bigendian_obj = NULL;
39758 0 : PyObject *ndr64_obj = NULL;
39759 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
39760 0 : PyObject *allow_remaining_obj = NULL;
39761 0 : bool allow_remaining = false;
39762 :
39763 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
39764 : discard_const_p(char *, kwnames),
39765 : &blob.data, &blob_length,
39766 : &bigendian_obj,
39767 : &ndr64_obj,
39768 : &allow_remaining_obj)) {
39769 0 : return NULL;
39770 : }
39771 0 : blob.length = blob_length;
39772 :
39773 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
39774 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
39775 : }
39776 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
39777 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
39778 : }
39779 :
39780 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
39781 0 : allow_remaining = true;
39782 : }
39783 :
39784 0 : return py_drsuapi_DsCrackNames_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
39785 : }
39786 :
39787 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
39788 : {
39789 0 : const struct ndr_interface_call *call = NULL;
39790 0 : struct drsuapi_DsCrackNames *object = (struct drsuapi_DsCrackNames *)pytalloc_get_ptr(py_obj);
39791 : PyObject *ret;
39792 : char *retstr;
39793 :
39794 0 : if (ndr_table_drsuapi.num_calls < 13) {
39795 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsCrackNames_ndr_print");
39796 0 : return NULL;
39797 : }
39798 0 : call = &ndr_table_drsuapi.calls[12];
39799 :
39800 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
39801 0 : ret = PyUnicode_FromString(retstr);
39802 0 : TALLOC_FREE(retstr);
39803 :
39804 0 : return ret;
39805 : }
39806 :
39807 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
39808 : {
39809 0 : return py_drsuapi_DsCrackNames_ndr_print(py_obj, "drsuapi_DsCrackNames_in", NDR_IN);
39810 : }
39811 :
39812 0 : static PyObject *py_drsuapi_DsCrackNames_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
39813 : {
39814 0 : return py_drsuapi_DsCrackNames_ndr_print(py_obj, "drsuapi_DsCrackNames_out", NDR_OUT);
39815 : }
39816 :
39817 : static PyMethodDef py_drsuapi_DsCrackNames_methods[] = {
39818 : { "opnum", (PyCFunction)py_drsuapi_DsCrackNames_ndr_opnum, METH_NOARGS|METH_CLASS,
39819 : "drsuapi.DsCrackNames.opnum() -> 12 (0x0c) " },
39820 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsCrackNames_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
39821 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
39822 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsCrackNames_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
39823 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
39824 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsCrackNames_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
39825 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
39826 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsCrackNames_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
39827 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
39828 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsCrackNames_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
39829 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsCrackNames_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
39830 : { NULL, NULL, 0, NULL }
39831 : };
39832 :
39833 :
39834 : static PyTypeObject drsuapi_DsCrackNames_Type = {
39835 : PyVarObject_HEAD_INIT(NULL, 0)
39836 : .tp_name = "drsuapi.DsCrackNames",
39837 : .tp_getset = py_drsuapi_DsCrackNames_getsetters,
39838 : .tp_methods = py_drsuapi_DsCrackNames_methods,
39839 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
39840 : .tp_new = py_drsuapi_DsCrackNames_new,
39841 : };
39842 :
39843 24 : static bool pack_py_drsuapi_DsCrackNames_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsCrackNames *r)
39844 : {
39845 : PyObject *py_bind_handle;
39846 : PyObject *py_level;
39847 : PyObject *py_req;
39848 24 : const char *kwnames[] = {
39849 : "bind_handle", "level", "req", NULL
39850 : };
39851 :
39852 24 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsCrackNames", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
39853 0 : return false;
39854 : }
39855 :
39856 24 : if (py_bind_handle == NULL) {
39857 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
39858 0 : return false;
39859 : }
39860 24 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
39861 24 : if (r->in.bind_handle == NULL) {
39862 0 : PyErr_NoMemory();
39863 0 : return false;
39864 : }
39865 24 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
39866 24 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
39867 0 : PyErr_NoMemory();
39868 0 : return false;
39869 : }
39870 24 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
39871 24 : if (py_level == NULL) {
39872 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
39873 0 : return false;
39874 : }
39875 : {
39876 24 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
39877 24 : if (PyLong_Check(py_level)) {
39878 : unsigned long long test_var;
39879 24 : test_var = PyLong_AsUnsignedLongLong(py_level);
39880 24 : if (PyErr_Occurred() != NULL) {
39881 0 : return false;
39882 : }
39883 24 : if (test_var > uint_max) {
39884 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
39885 : PyLong_Type.tp_name, uint_max, test_var);
39886 0 : return false;
39887 : }
39888 24 : r->in.level = test_var;
39889 : } else {
39890 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
39891 : PyLong_Type.tp_name);
39892 0 : return false;
39893 : }
39894 : }
39895 24 : if (py_req == NULL) {
39896 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
39897 0 : return false;
39898 : }
39899 24 : r->in.req = talloc_ptrtype(r, r->in.req);
39900 24 : if (r->in.req == NULL) {
39901 0 : PyErr_NoMemory();
39902 0 : return false;
39903 : }
39904 : {
39905 : union drsuapi_DsNameRequest *req_switch_1;
39906 24 : req_switch_1 = (union drsuapi_DsNameRequest *)pyrpc_export_union(&drsuapi_DsNameRequest_Type, r, r->in.level, py_req, "union drsuapi_DsNameRequest");
39907 24 : if (req_switch_1 == NULL) {
39908 0 : return false;
39909 : }
39910 24 : r->in.req = req_switch_1;
39911 : }
39912 24 : return true;
39913 : }
39914 :
39915 24 : static PyObject *unpack_py_drsuapi_DsCrackNames_args_out(struct drsuapi_DsCrackNames *r)
39916 : {
39917 : PyObject *result;
39918 : PyObject *py_level_out;
39919 : PyObject *py_ctr;
39920 24 : result = PyTuple_New(2);
39921 24 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
39922 24 : PyTuple_SetItem(result, 0, py_level_out);
39923 24 : py_ctr = pyrpc_import_union(&drsuapi_DsNameCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsNameCtr");
39924 24 : if (py_ctr == NULL) {
39925 0 : return NULL;
39926 : }
39927 24 : PyTuple_SetItem(result, 1, py_ctr);
39928 24 : if (!W_ERROR_IS_OK(r->out.result)) {
39929 0 : PyErr_SetWERROR(r->out.result);
39930 0 : return NULL;
39931 : }
39932 :
39933 24 : return result;
39934 : }
39935 :
39936 :
39937 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_in_get_bind_handle(PyObject *obj, void *closure)
39938 : {
39939 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(obj);
39940 : PyObject *py_bind_handle;
39941 0 : if (object->in.bind_handle == NULL) {
39942 0 : Py_RETURN_NONE;
39943 : }
39944 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
39945 0 : return py_bind_handle;
39946 : }
39947 :
39948 0 : static int py_drsuapi_DsWriteAccountSpn_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
39949 : {
39950 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
39951 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
39952 0 : if (value == NULL) {
39953 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
39954 0 : return -1;
39955 : }
39956 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
39957 0 : if (object->in.bind_handle == NULL) {
39958 0 : PyErr_NoMemory();
39959 0 : return -1;
39960 : }
39961 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
39962 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
39963 0 : PyErr_NoMemory();
39964 0 : return -1;
39965 : }
39966 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
39967 0 : return 0;
39968 : }
39969 :
39970 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_in_get_level(PyObject *obj, void *closure)
39971 : {
39972 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(obj);
39973 : PyObject *py_level;
39974 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
39975 0 : return py_level;
39976 : }
39977 :
39978 0 : static int py_drsuapi_DsWriteAccountSpn_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
39979 : {
39980 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
39981 0 : if (value == NULL) {
39982 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
39983 0 : return -1;
39984 : }
39985 : {
39986 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
39987 0 : if (PyLong_Check(value)) {
39988 : unsigned long long test_var;
39989 0 : test_var = PyLong_AsUnsignedLongLong(value);
39990 0 : if (PyErr_Occurred() != NULL) {
39991 0 : return -1;
39992 : }
39993 0 : if (test_var > uint_max) {
39994 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
39995 : PyLong_Type.tp_name, uint_max, test_var);
39996 0 : return -1;
39997 : }
39998 0 : object->in.level = test_var;
39999 : } else {
40000 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
40001 : PyLong_Type.tp_name);
40002 0 : return -1;
40003 : }
40004 : }
40005 0 : return 0;
40006 : }
40007 :
40008 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_in_get_req(PyObject *obj, void *closure)
40009 : {
40010 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(obj);
40011 : PyObject *py_req;
40012 0 : if (object->in.req == NULL) {
40013 0 : Py_RETURN_NONE;
40014 : }
40015 0 : py_req = pyrpc_import_union(&drsuapi_DsWriteAccountSpnRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsWriteAccountSpnRequest");
40016 0 : if (py_req == NULL) {
40017 0 : return NULL;
40018 : }
40019 0 : return py_req;
40020 : }
40021 :
40022 0 : static int py_drsuapi_DsWriteAccountSpn_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
40023 : {
40024 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
40025 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
40026 0 : if (value == NULL) {
40027 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
40028 0 : return -1;
40029 : }
40030 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
40031 0 : if (object->in.req == NULL) {
40032 0 : PyErr_NoMemory();
40033 0 : return -1;
40034 : }
40035 : {
40036 : union drsuapi_DsWriteAccountSpnRequest *req_switch_1;
40037 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");
40038 0 : if (req_switch_1 == NULL) {
40039 0 : return -1;
40040 : }
40041 0 : object->in.req = req_switch_1;
40042 : }
40043 0 : return 0;
40044 : }
40045 :
40046 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_out_get_level_out(PyObject *obj, void *closure)
40047 : {
40048 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(obj);
40049 : PyObject *py_level_out;
40050 0 : if (object->out.level_out == NULL) {
40051 0 : Py_RETURN_NONE;
40052 : }
40053 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
40054 0 : return py_level_out;
40055 : }
40056 :
40057 0 : static int py_drsuapi_DsWriteAccountSpn_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
40058 : {
40059 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
40060 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
40061 0 : if (value == NULL) {
40062 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
40063 0 : return -1;
40064 : }
40065 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
40066 0 : if (object->out.level_out == NULL) {
40067 0 : PyErr_NoMemory();
40068 0 : return -1;
40069 : }
40070 : {
40071 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
40072 0 : if (PyLong_Check(value)) {
40073 : unsigned long long test_var;
40074 0 : test_var = PyLong_AsUnsignedLongLong(value);
40075 0 : if (PyErr_Occurred() != NULL) {
40076 0 : return -1;
40077 : }
40078 0 : if (test_var > uint_max) {
40079 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
40080 : PyLong_Type.tp_name, uint_max, test_var);
40081 0 : return -1;
40082 : }
40083 0 : *object->out.level_out = test_var;
40084 : } else {
40085 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
40086 : PyLong_Type.tp_name);
40087 0 : return -1;
40088 : }
40089 : }
40090 0 : return 0;
40091 : }
40092 :
40093 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_out_get_res(PyObject *obj, void *closure)
40094 : {
40095 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(obj);
40096 : PyObject *py_res;
40097 0 : if (object->out.res == NULL) {
40098 0 : Py_RETURN_NONE;
40099 : }
40100 0 : py_res = pyrpc_import_union(&drsuapi_DsWriteAccountSpnResult_Type, object->out.res, *object->out.level_out, object->out.res, "union drsuapi_DsWriteAccountSpnResult");
40101 0 : if (py_res == NULL) {
40102 0 : return NULL;
40103 : }
40104 0 : return py_res;
40105 : }
40106 :
40107 0 : static int py_drsuapi_DsWriteAccountSpn_out_set_res(PyObject *py_obj, PyObject *value, void *closure)
40108 : {
40109 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
40110 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.res));
40111 0 : if (value == NULL) {
40112 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.res");
40113 0 : return -1;
40114 : }
40115 0 : object->out.res = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.res);
40116 0 : if (object->out.res == NULL) {
40117 0 : PyErr_NoMemory();
40118 0 : return -1;
40119 : }
40120 : {
40121 : union drsuapi_DsWriteAccountSpnResult *res_switch_1;
40122 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");
40123 0 : if (res_switch_1 == NULL) {
40124 0 : return -1;
40125 : }
40126 0 : object->out.res = res_switch_1;
40127 : }
40128 0 : return 0;
40129 : }
40130 :
40131 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_get_result(PyObject *obj, void *closure)
40132 : {
40133 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(obj);
40134 : PyObject *py_result;
40135 0 : py_result = PyErr_FromWERROR(object->out.result);
40136 0 : return py_result;
40137 : }
40138 :
40139 0 : static int py_drsuapi_DsWriteAccountSpn_set_result(PyObject *py_obj, PyObject *value, void *closure)
40140 : {
40141 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
40142 0 : if (value == NULL) {
40143 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
40144 0 : return -1;
40145 : }
40146 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
40147 0 : return 0;
40148 : }
40149 :
40150 : static PyGetSetDef py_drsuapi_DsWriteAccountSpn_getsetters[] = {
40151 : {
40152 : .name = discard_const_p(char, "in_bind_handle"),
40153 : .get = py_drsuapi_DsWriteAccountSpn_in_get_bind_handle,
40154 : .set = py_drsuapi_DsWriteAccountSpn_in_set_bind_handle,
40155 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
40156 : },
40157 : {
40158 : .name = discard_const_p(char, "in_level"),
40159 : .get = py_drsuapi_DsWriteAccountSpn_in_get_level,
40160 : .set = py_drsuapi_DsWriteAccountSpn_in_set_level,
40161 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
40162 : },
40163 : {
40164 : .name = discard_const_p(char, "in_req"),
40165 : .get = py_drsuapi_DsWriteAccountSpn_in_get_req,
40166 : .set = py_drsuapi_DsWriteAccountSpn_in_set_req,
40167 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsWriteAccountSpnRequest")
40168 : },
40169 : {
40170 : .name = discard_const_p(char, "out_level_out"),
40171 : .get = py_drsuapi_DsWriteAccountSpn_out_get_level_out,
40172 : .set = py_drsuapi_DsWriteAccountSpn_out_set_level_out,
40173 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
40174 : },
40175 : {
40176 : .name = discard_const_p(char, "out_res"),
40177 : .get = py_drsuapi_DsWriteAccountSpn_out_get_res,
40178 : .set = py_drsuapi_DsWriteAccountSpn_out_set_res,
40179 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsWriteAccountSpnResult")
40180 : },
40181 : {
40182 : .name = discard_const_p(char, "result"),
40183 : .get = py_drsuapi_DsWriteAccountSpn_get_result,
40184 : .set = py_drsuapi_DsWriteAccountSpn_set_result,
40185 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
40186 : },
40187 : { .name = NULL }
40188 : };
40189 :
40190 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
40191 : {
40192 0 : PyObject *self = pytalloc_new(struct drsuapi_DsWriteAccountSpn, type);
40193 0 : struct drsuapi_DsWriteAccountSpn *_self = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(self);
40194 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
40195 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
40196 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnRequest);
40197 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
40198 0 : _self->out.res = talloc_zero(mem_ctx, union drsuapi_DsWriteAccountSpnResult);
40199 0 : return self;
40200 : }
40201 :
40202 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
40203 : {
40204 :
40205 :
40206 0 : return PyLong_FromLong(13);
40207 : }
40208 :
40209 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
40210 : {
40211 0 : const struct ndr_interface_call *call = NULL;
40212 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
40213 0 : PyObject *ret = NULL;
40214 0 : struct ndr_push *push = NULL;
40215 : DATA_BLOB blob;
40216 : enum ndr_err_code err;
40217 :
40218 0 : if (ndr_table_drsuapi.num_calls < 14) {
40219 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsWriteAccountSpn_ndr_pack");
40220 0 : return NULL;
40221 : }
40222 0 : call = &ndr_table_drsuapi.calls[13];
40223 :
40224 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
40225 0 : if (push == NULL) {
40226 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
40227 0 : return NULL;
40228 : }
40229 :
40230 0 : push->flags |= ndr_push_flags;
40231 :
40232 0 : err = call->ndr_push(push, ndr_inout_flags, object);
40233 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
40234 0 : TALLOC_FREE(push);
40235 0 : PyErr_SetNdrError(err);
40236 0 : return NULL;
40237 : }
40238 0 : blob = ndr_push_blob(push);
40239 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
40240 0 : TALLOC_FREE(push);
40241 0 : return ret;
40242 : }
40243 :
40244 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
40245 : {
40246 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
40247 0 : PyObject *bigendian_obj = NULL;
40248 0 : PyObject *ndr64_obj = NULL;
40249 0 : uint32_t ndr_push_flags = 0;
40250 :
40251 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
40252 : discard_const_p(char *, kwnames),
40253 : &bigendian_obj,
40254 : &ndr64_obj)) {
40255 0 : return NULL;
40256 : }
40257 :
40258 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
40259 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
40260 : }
40261 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
40262 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
40263 : }
40264 :
40265 0 : return py_drsuapi_DsWriteAccountSpn_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
40266 : }
40267 :
40268 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
40269 : {
40270 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
40271 0 : PyObject *bigendian_obj = NULL;
40272 0 : PyObject *ndr64_obj = NULL;
40273 0 : uint32_t ndr_push_flags = 0;
40274 :
40275 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
40276 : discard_const_p(char *, kwnames),
40277 : &bigendian_obj,
40278 : &ndr64_obj)) {
40279 0 : return NULL;
40280 : }
40281 :
40282 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
40283 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
40284 : }
40285 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
40286 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
40287 : }
40288 :
40289 0 : return py_drsuapi_DsWriteAccountSpn_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
40290 : }
40291 :
40292 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
40293 : {
40294 0 : const struct ndr_interface_call *call = NULL;
40295 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
40296 0 : struct ndr_pull *pull = NULL;
40297 : enum ndr_err_code err;
40298 :
40299 0 : if (ndr_table_drsuapi.num_calls < 14) {
40300 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsWriteAccountSpn_ndr_unpack");
40301 0 : return NULL;
40302 : }
40303 0 : call = &ndr_table_drsuapi.calls[13];
40304 :
40305 0 : pull = ndr_pull_init_blob(blob, object);
40306 0 : if (pull == NULL) {
40307 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
40308 0 : return NULL;
40309 : }
40310 :
40311 0 : pull->flags |= ndr_pull_flags;
40312 :
40313 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
40314 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
40315 0 : TALLOC_FREE(pull);
40316 0 : PyErr_SetNdrError(err);
40317 0 : return NULL;
40318 : }
40319 0 : if (!allow_remaining) {
40320 : uint32_t highest_ofs;
40321 :
40322 0 : if (pull->offset > pull->relative_highest_offset) {
40323 0 : highest_ofs = pull->offset;
40324 : } else {
40325 0 : highest_ofs = pull->relative_highest_offset;
40326 : }
40327 0 : if (highest_ofs < pull->data_size) {
40328 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
40329 : "not all bytes consumed ofs[%u] size[%u]",
40330 : highest_ofs, pull->data_size);
40331 0 : TALLOC_FREE(pull);
40332 0 : PyErr_SetNdrError(err);
40333 0 : return NULL;
40334 : }
40335 : }
40336 :
40337 0 : TALLOC_FREE(pull);
40338 0 : Py_RETURN_NONE;
40339 : }
40340 :
40341 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
40342 : {
40343 : DATA_BLOB blob;
40344 0 : Py_ssize_t blob_length = 0;
40345 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
40346 0 : PyObject *bigendian_obj = NULL;
40347 0 : PyObject *ndr64_obj = NULL;
40348 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
40349 0 : PyObject *allow_remaining_obj = NULL;
40350 0 : bool allow_remaining = false;
40351 :
40352 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
40353 : discard_const_p(char *, kwnames),
40354 : &blob.data, &blob_length,
40355 : &bigendian_obj,
40356 : &ndr64_obj,
40357 : &allow_remaining_obj)) {
40358 0 : return NULL;
40359 : }
40360 0 : blob.length = blob_length;
40361 :
40362 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
40363 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
40364 : }
40365 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
40366 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
40367 : }
40368 :
40369 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
40370 0 : allow_remaining = true;
40371 : }
40372 :
40373 0 : return py_drsuapi_DsWriteAccountSpn_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
40374 : }
40375 :
40376 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
40377 : {
40378 : DATA_BLOB blob;
40379 0 : Py_ssize_t blob_length = 0;
40380 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
40381 0 : PyObject *bigendian_obj = NULL;
40382 0 : PyObject *ndr64_obj = NULL;
40383 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
40384 0 : PyObject *allow_remaining_obj = NULL;
40385 0 : bool allow_remaining = false;
40386 :
40387 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
40388 : discard_const_p(char *, kwnames),
40389 : &blob.data, &blob_length,
40390 : &bigendian_obj,
40391 : &ndr64_obj,
40392 : &allow_remaining_obj)) {
40393 0 : return NULL;
40394 : }
40395 0 : blob.length = blob_length;
40396 :
40397 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
40398 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
40399 : }
40400 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
40401 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
40402 : }
40403 :
40404 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
40405 0 : allow_remaining = true;
40406 : }
40407 :
40408 0 : return py_drsuapi_DsWriteAccountSpn_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
40409 : }
40410 :
40411 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
40412 : {
40413 0 : const struct ndr_interface_call *call = NULL;
40414 0 : struct drsuapi_DsWriteAccountSpn *object = (struct drsuapi_DsWriteAccountSpn *)pytalloc_get_ptr(py_obj);
40415 : PyObject *ret;
40416 : char *retstr;
40417 :
40418 0 : if (ndr_table_drsuapi.num_calls < 14) {
40419 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsWriteAccountSpn_ndr_print");
40420 0 : return NULL;
40421 : }
40422 0 : call = &ndr_table_drsuapi.calls[13];
40423 :
40424 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
40425 0 : ret = PyUnicode_FromString(retstr);
40426 0 : TALLOC_FREE(retstr);
40427 :
40428 0 : return ret;
40429 : }
40430 :
40431 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
40432 : {
40433 0 : return py_drsuapi_DsWriteAccountSpn_ndr_print(py_obj, "drsuapi_DsWriteAccountSpn_in", NDR_IN);
40434 : }
40435 :
40436 0 : static PyObject *py_drsuapi_DsWriteAccountSpn_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
40437 : {
40438 0 : return py_drsuapi_DsWriteAccountSpn_ndr_print(py_obj, "drsuapi_DsWriteAccountSpn_out", NDR_OUT);
40439 : }
40440 :
40441 : static PyMethodDef py_drsuapi_DsWriteAccountSpn_methods[] = {
40442 : { "opnum", (PyCFunction)py_drsuapi_DsWriteAccountSpn_ndr_opnum, METH_NOARGS|METH_CLASS,
40443 : "drsuapi.DsWriteAccountSpn.opnum() -> 13 (0x0d) " },
40444 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpn_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
40445 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
40446 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpn_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
40447 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
40448 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpn_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
40449 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
40450 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsWriteAccountSpn_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
40451 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
40452 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsWriteAccountSpn_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
40453 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsWriteAccountSpn_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
40454 : { NULL, NULL, 0, NULL }
40455 : };
40456 :
40457 :
40458 : static PyTypeObject drsuapi_DsWriteAccountSpn_Type = {
40459 : PyVarObject_HEAD_INIT(NULL, 0)
40460 : .tp_name = "drsuapi.DsWriteAccountSpn",
40461 : .tp_getset = py_drsuapi_DsWriteAccountSpn_getsetters,
40462 : .tp_methods = py_drsuapi_DsWriteAccountSpn_methods,
40463 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
40464 : .tp_new = py_drsuapi_DsWriteAccountSpn_new,
40465 : };
40466 :
40467 2 : static bool pack_py_drsuapi_DsWriteAccountSpn_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsWriteAccountSpn *r)
40468 : {
40469 : PyObject *py_bind_handle;
40470 : PyObject *py_level;
40471 : PyObject *py_req;
40472 2 : const char *kwnames[] = {
40473 : "bind_handle", "level", "req", NULL
40474 : };
40475 :
40476 2 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsWriteAccountSpn", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
40477 0 : return false;
40478 : }
40479 :
40480 2 : if (py_bind_handle == NULL) {
40481 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
40482 0 : return false;
40483 : }
40484 2 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
40485 2 : if (r->in.bind_handle == NULL) {
40486 0 : PyErr_NoMemory();
40487 0 : return false;
40488 : }
40489 2 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
40490 2 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
40491 0 : PyErr_NoMemory();
40492 0 : return false;
40493 : }
40494 2 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
40495 2 : if (py_level == NULL) {
40496 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
40497 0 : return false;
40498 : }
40499 : {
40500 2 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
40501 2 : if (PyLong_Check(py_level)) {
40502 : unsigned long long test_var;
40503 2 : test_var = PyLong_AsUnsignedLongLong(py_level);
40504 2 : if (PyErr_Occurred() != NULL) {
40505 0 : return false;
40506 : }
40507 2 : if (test_var > uint_max) {
40508 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
40509 : PyLong_Type.tp_name, uint_max, test_var);
40510 0 : return false;
40511 : }
40512 2 : r->in.level = test_var;
40513 : } else {
40514 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
40515 : PyLong_Type.tp_name);
40516 0 : return false;
40517 : }
40518 : }
40519 2 : if (py_req == NULL) {
40520 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
40521 0 : return false;
40522 : }
40523 2 : r->in.req = talloc_ptrtype(r, r->in.req);
40524 2 : if (r->in.req == NULL) {
40525 0 : PyErr_NoMemory();
40526 0 : return false;
40527 : }
40528 : {
40529 : union drsuapi_DsWriteAccountSpnRequest *req_switch_1;
40530 2 : req_switch_1 = (union drsuapi_DsWriteAccountSpnRequest *)pyrpc_export_union(&drsuapi_DsWriteAccountSpnRequest_Type, r, r->in.level, py_req, "union drsuapi_DsWriteAccountSpnRequest");
40531 2 : if (req_switch_1 == NULL) {
40532 0 : return false;
40533 : }
40534 2 : r->in.req = req_switch_1;
40535 : }
40536 2 : return true;
40537 : }
40538 :
40539 2 : static PyObject *unpack_py_drsuapi_DsWriteAccountSpn_args_out(struct drsuapi_DsWriteAccountSpn *r)
40540 : {
40541 : PyObject *result;
40542 : PyObject *py_level_out;
40543 : PyObject *py_res;
40544 2 : result = PyTuple_New(2);
40545 2 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
40546 2 : PyTuple_SetItem(result, 0, py_level_out);
40547 2 : py_res = pyrpc_import_union(&drsuapi_DsWriteAccountSpnResult_Type, r->out.res, *r->out.level_out, r->out.res, "union drsuapi_DsWriteAccountSpnResult");
40548 2 : if (py_res == NULL) {
40549 0 : return NULL;
40550 : }
40551 2 : PyTuple_SetItem(result, 1, py_res);
40552 2 : if (!W_ERROR_IS_OK(r->out.result)) {
40553 0 : PyErr_SetWERROR(r->out.result);
40554 0 : return NULL;
40555 : }
40556 :
40557 2 : return result;
40558 : }
40559 :
40560 :
40561 0 : static PyObject *py_drsuapi_DsRemoveDSServer_in_get_bind_handle(PyObject *obj, void *closure)
40562 : {
40563 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(obj);
40564 : PyObject *py_bind_handle;
40565 0 : if (object->in.bind_handle == NULL) {
40566 0 : Py_RETURN_NONE;
40567 : }
40568 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
40569 0 : return py_bind_handle;
40570 : }
40571 :
40572 0 : static int py_drsuapi_DsRemoveDSServer_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
40573 : {
40574 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
40575 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
40576 0 : if (value == NULL) {
40577 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
40578 0 : return -1;
40579 : }
40580 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
40581 0 : if (object->in.bind_handle == NULL) {
40582 0 : PyErr_NoMemory();
40583 0 : return -1;
40584 : }
40585 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
40586 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
40587 0 : PyErr_NoMemory();
40588 0 : return -1;
40589 : }
40590 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
40591 0 : return 0;
40592 : }
40593 :
40594 0 : static PyObject *py_drsuapi_DsRemoveDSServer_in_get_level(PyObject *obj, void *closure)
40595 : {
40596 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(obj);
40597 : PyObject *py_level;
40598 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
40599 0 : return py_level;
40600 : }
40601 :
40602 0 : static int py_drsuapi_DsRemoveDSServer_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
40603 : {
40604 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
40605 0 : if (value == NULL) {
40606 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
40607 0 : return -1;
40608 : }
40609 : {
40610 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
40611 0 : if (PyLong_Check(value)) {
40612 : unsigned long long test_var;
40613 0 : test_var = PyLong_AsUnsignedLongLong(value);
40614 0 : if (PyErr_Occurred() != NULL) {
40615 0 : return -1;
40616 : }
40617 0 : if (test_var > uint_max) {
40618 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
40619 : PyLong_Type.tp_name, uint_max, test_var);
40620 0 : return -1;
40621 : }
40622 0 : object->in.level = test_var;
40623 : } else {
40624 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
40625 : PyLong_Type.tp_name);
40626 0 : return -1;
40627 : }
40628 : }
40629 0 : return 0;
40630 : }
40631 :
40632 0 : static PyObject *py_drsuapi_DsRemoveDSServer_in_get_req(PyObject *obj, void *closure)
40633 : {
40634 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(obj);
40635 : PyObject *py_req;
40636 0 : if (object->in.req == NULL) {
40637 0 : Py_RETURN_NONE;
40638 : }
40639 0 : py_req = pyrpc_import_union(&drsuapi_DsRemoveDSServerRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsRemoveDSServerRequest");
40640 0 : if (py_req == NULL) {
40641 0 : return NULL;
40642 : }
40643 0 : return py_req;
40644 : }
40645 :
40646 0 : static int py_drsuapi_DsRemoveDSServer_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
40647 : {
40648 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
40649 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
40650 0 : if (value == NULL) {
40651 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
40652 0 : return -1;
40653 : }
40654 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
40655 0 : if (object->in.req == NULL) {
40656 0 : PyErr_NoMemory();
40657 0 : return -1;
40658 : }
40659 : {
40660 : union drsuapi_DsRemoveDSServerRequest *req_switch_1;
40661 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");
40662 0 : if (req_switch_1 == NULL) {
40663 0 : return -1;
40664 : }
40665 0 : object->in.req = req_switch_1;
40666 : }
40667 0 : return 0;
40668 : }
40669 :
40670 0 : static PyObject *py_drsuapi_DsRemoveDSServer_out_get_level_out(PyObject *obj, void *closure)
40671 : {
40672 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(obj);
40673 : PyObject *py_level_out;
40674 0 : if (object->out.level_out == NULL) {
40675 0 : Py_RETURN_NONE;
40676 : }
40677 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
40678 0 : return py_level_out;
40679 : }
40680 :
40681 0 : static int py_drsuapi_DsRemoveDSServer_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
40682 : {
40683 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
40684 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
40685 0 : if (value == NULL) {
40686 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
40687 0 : return -1;
40688 : }
40689 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
40690 0 : if (object->out.level_out == NULL) {
40691 0 : PyErr_NoMemory();
40692 0 : return -1;
40693 : }
40694 : {
40695 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
40696 0 : if (PyLong_Check(value)) {
40697 : unsigned long long test_var;
40698 0 : test_var = PyLong_AsUnsignedLongLong(value);
40699 0 : if (PyErr_Occurred() != NULL) {
40700 0 : return -1;
40701 : }
40702 0 : if (test_var > uint_max) {
40703 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
40704 : PyLong_Type.tp_name, uint_max, test_var);
40705 0 : return -1;
40706 : }
40707 0 : *object->out.level_out = test_var;
40708 : } else {
40709 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
40710 : PyLong_Type.tp_name);
40711 0 : return -1;
40712 : }
40713 : }
40714 0 : return 0;
40715 : }
40716 :
40717 0 : static PyObject *py_drsuapi_DsRemoveDSServer_out_get_res(PyObject *obj, void *closure)
40718 : {
40719 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(obj);
40720 : PyObject *py_res;
40721 0 : if (object->out.res == NULL) {
40722 0 : Py_RETURN_NONE;
40723 : }
40724 0 : py_res = pyrpc_import_union(&drsuapi_DsRemoveDSServerResult_Type, object->out.res, *object->out.level_out, object->out.res, "union drsuapi_DsRemoveDSServerResult");
40725 0 : if (py_res == NULL) {
40726 0 : return NULL;
40727 : }
40728 0 : return py_res;
40729 : }
40730 :
40731 0 : static int py_drsuapi_DsRemoveDSServer_out_set_res(PyObject *py_obj, PyObject *value, void *closure)
40732 : {
40733 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
40734 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.res));
40735 0 : if (value == NULL) {
40736 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.res");
40737 0 : return -1;
40738 : }
40739 0 : object->out.res = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.res);
40740 0 : if (object->out.res == NULL) {
40741 0 : PyErr_NoMemory();
40742 0 : return -1;
40743 : }
40744 : {
40745 : union drsuapi_DsRemoveDSServerResult *res_switch_1;
40746 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");
40747 0 : if (res_switch_1 == NULL) {
40748 0 : return -1;
40749 : }
40750 0 : object->out.res = res_switch_1;
40751 : }
40752 0 : return 0;
40753 : }
40754 :
40755 0 : static PyObject *py_drsuapi_DsRemoveDSServer_get_result(PyObject *obj, void *closure)
40756 : {
40757 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(obj);
40758 : PyObject *py_result;
40759 0 : py_result = PyErr_FromWERROR(object->out.result);
40760 0 : return py_result;
40761 : }
40762 :
40763 0 : static int py_drsuapi_DsRemoveDSServer_set_result(PyObject *py_obj, PyObject *value, void *closure)
40764 : {
40765 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
40766 0 : if (value == NULL) {
40767 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
40768 0 : return -1;
40769 : }
40770 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
40771 0 : return 0;
40772 : }
40773 :
40774 : static PyGetSetDef py_drsuapi_DsRemoveDSServer_getsetters[] = {
40775 : {
40776 : .name = discard_const_p(char, "in_bind_handle"),
40777 : .get = py_drsuapi_DsRemoveDSServer_in_get_bind_handle,
40778 : .set = py_drsuapi_DsRemoveDSServer_in_set_bind_handle,
40779 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
40780 : },
40781 : {
40782 : .name = discard_const_p(char, "in_level"),
40783 : .get = py_drsuapi_DsRemoveDSServer_in_get_level,
40784 : .set = py_drsuapi_DsRemoveDSServer_in_set_level,
40785 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
40786 : },
40787 : {
40788 : .name = discard_const_p(char, "in_req"),
40789 : .get = py_drsuapi_DsRemoveDSServer_in_get_req,
40790 : .set = py_drsuapi_DsRemoveDSServer_in_set_req,
40791 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsRemoveDSServerRequest")
40792 : },
40793 : {
40794 : .name = discard_const_p(char, "out_level_out"),
40795 : .get = py_drsuapi_DsRemoveDSServer_out_get_level_out,
40796 : .set = py_drsuapi_DsRemoveDSServer_out_set_level_out,
40797 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
40798 : },
40799 : {
40800 : .name = discard_const_p(char, "out_res"),
40801 : .get = py_drsuapi_DsRemoveDSServer_out_get_res,
40802 : .set = py_drsuapi_DsRemoveDSServer_out_set_res,
40803 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsRemoveDSServerResult")
40804 : },
40805 : {
40806 : .name = discard_const_p(char, "result"),
40807 : .get = py_drsuapi_DsRemoveDSServer_get_result,
40808 : .set = py_drsuapi_DsRemoveDSServer_set_result,
40809 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
40810 : },
40811 : { .name = NULL }
40812 : };
40813 :
40814 0 : static PyObject *py_drsuapi_DsRemoveDSServer_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
40815 : {
40816 0 : PyObject *self = pytalloc_new(struct drsuapi_DsRemoveDSServer, type);
40817 0 : struct drsuapi_DsRemoveDSServer *_self = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(self);
40818 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
40819 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
40820 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerRequest);
40821 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
40822 0 : _self->out.res = talloc_zero(mem_ctx, union drsuapi_DsRemoveDSServerResult);
40823 0 : return self;
40824 : }
40825 :
40826 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
40827 : {
40828 :
40829 :
40830 0 : return PyLong_FromLong(14);
40831 : }
40832 :
40833 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
40834 : {
40835 0 : const struct ndr_interface_call *call = NULL;
40836 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
40837 0 : PyObject *ret = NULL;
40838 0 : struct ndr_push *push = NULL;
40839 : DATA_BLOB blob;
40840 : enum ndr_err_code err;
40841 :
40842 0 : if (ndr_table_drsuapi.num_calls < 15) {
40843 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsRemoveDSServer_ndr_pack");
40844 0 : return NULL;
40845 : }
40846 0 : call = &ndr_table_drsuapi.calls[14];
40847 :
40848 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
40849 0 : if (push == NULL) {
40850 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
40851 0 : return NULL;
40852 : }
40853 :
40854 0 : push->flags |= ndr_push_flags;
40855 :
40856 0 : err = call->ndr_push(push, ndr_inout_flags, object);
40857 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
40858 0 : TALLOC_FREE(push);
40859 0 : PyErr_SetNdrError(err);
40860 0 : return NULL;
40861 : }
40862 0 : blob = ndr_push_blob(push);
40863 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
40864 0 : TALLOC_FREE(push);
40865 0 : return ret;
40866 : }
40867 :
40868 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
40869 : {
40870 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
40871 0 : PyObject *bigendian_obj = NULL;
40872 0 : PyObject *ndr64_obj = NULL;
40873 0 : uint32_t ndr_push_flags = 0;
40874 :
40875 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
40876 : discard_const_p(char *, kwnames),
40877 : &bigendian_obj,
40878 : &ndr64_obj)) {
40879 0 : return NULL;
40880 : }
40881 :
40882 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
40883 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
40884 : }
40885 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
40886 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
40887 : }
40888 :
40889 0 : return py_drsuapi_DsRemoveDSServer_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
40890 : }
40891 :
40892 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
40893 : {
40894 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
40895 0 : PyObject *bigendian_obj = NULL;
40896 0 : PyObject *ndr64_obj = NULL;
40897 0 : uint32_t ndr_push_flags = 0;
40898 :
40899 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
40900 : discard_const_p(char *, kwnames),
40901 : &bigendian_obj,
40902 : &ndr64_obj)) {
40903 0 : return NULL;
40904 : }
40905 :
40906 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
40907 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
40908 : }
40909 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
40910 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
40911 : }
40912 :
40913 0 : return py_drsuapi_DsRemoveDSServer_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
40914 : }
40915 :
40916 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
40917 : {
40918 0 : const struct ndr_interface_call *call = NULL;
40919 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
40920 0 : struct ndr_pull *pull = NULL;
40921 : enum ndr_err_code err;
40922 :
40923 0 : if (ndr_table_drsuapi.num_calls < 15) {
40924 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsRemoveDSServer_ndr_unpack");
40925 0 : return NULL;
40926 : }
40927 0 : call = &ndr_table_drsuapi.calls[14];
40928 :
40929 0 : pull = ndr_pull_init_blob(blob, object);
40930 0 : if (pull == NULL) {
40931 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
40932 0 : return NULL;
40933 : }
40934 :
40935 0 : pull->flags |= ndr_pull_flags;
40936 :
40937 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
40938 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
40939 0 : TALLOC_FREE(pull);
40940 0 : PyErr_SetNdrError(err);
40941 0 : return NULL;
40942 : }
40943 0 : if (!allow_remaining) {
40944 : uint32_t highest_ofs;
40945 :
40946 0 : if (pull->offset > pull->relative_highest_offset) {
40947 0 : highest_ofs = pull->offset;
40948 : } else {
40949 0 : highest_ofs = pull->relative_highest_offset;
40950 : }
40951 0 : if (highest_ofs < pull->data_size) {
40952 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
40953 : "not all bytes consumed ofs[%u] size[%u]",
40954 : highest_ofs, pull->data_size);
40955 0 : TALLOC_FREE(pull);
40956 0 : PyErr_SetNdrError(err);
40957 0 : return NULL;
40958 : }
40959 : }
40960 :
40961 0 : TALLOC_FREE(pull);
40962 0 : Py_RETURN_NONE;
40963 : }
40964 :
40965 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
40966 : {
40967 : DATA_BLOB blob;
40968 0 : Py_ssize_t blob_length = 0;
40969 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
40970 0 : PyObject *bigendian_obj = NULL;
40971 0 : PyObject *ndr64_obj = NULL;
40972 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
40973 0 : PyObject *allow_remaining_obj = NULL;
40974 0 : bool allow_remaining = false;
40975 :
40976 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
40977 : discard_const_p(char *, kwnames),
40978 : &blob.data, &blob_length,
40979 : &bigendian_obj,
40980 : &ndr64_obj,
40981 : &allow_remaining_obj)) {
40982 0 : return NULL;
40983 : }
40984 0 : blob.length = blob_length;
40985 :
40986 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
40987 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
40988 : }
40989 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
40990 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
40991 : }
40992 :
40993 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
40994 0 : allow_remaining = true;
40995 : }
40996 :
40997 0 : return py_drsuapi_DsRemoveDSServer_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
40998 : }
40999 :
41000 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
41001 : {
41002 : DATA_BLOB blob;
41003 0 : Py_ssize_t blob_length = 0;
41004 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
41005 0 : PyObject *bigendian_obj = NULL;
41006 0 : PyObject *ndr64_obj = NULL;
41007 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
41008 0 : PyObject *allow_remaining_obj = NULL;
41009 0 : bool allow_remaining = false;
41010 :
41011 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
41012 : discard_const_p(char *, kwnames),
41013 : &blob.data, &blob_length,
41014 : &bigendian_obj,
41015 : &ndr64_obj,
41016 : &allow_remaining_obj)) {
41017 0 : return NULL;
41018 : }
41019 0 : blob.length = blob_length;
41020 :
41021 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
41022 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
41023 : }
41024 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
41025 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
41026 : }
41027 :
41028 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
41029 0 : allow_remaining = true;
41030 : }
41031 :
41032 0 : return py_drsuapi_DsRemoveDSServer_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
41033 : }
41034 :
41035 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
41036 : {
41037 0 : const struct ndr_interface_call *call = NULL;
41038 0 : struct drsuapi_DsRemoveDSServer *object = (struct drsuapi_DsRemoveDSServer *)pytalloc_get_ptr(py_obj);
41039 : PyObject *ret;
41040 : char *retstr;
41041 :
41042 0 : if (ndr_table_drsuapi.num_calls < 15) {
41043 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsRemoveDSServer_ndr_print");
41044 0 : return NULL;
41045 : }
41046 0 : call = &ndr_table_drsuapi.calls[14];
41047 :
41048 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
41049 0 : ret = PyUnicode_FromString(retstr);
41050 0 : TALLOC_FREE(retstr);
41051 :
41052 0 : return ret;
41053 : }
41054 :
41055 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
41056 : {
41057 0 : return py_drsuapi_DsRemoveDSServer_ndr_print(py_obj, "drsuapi_DsRemoveDSServer_in", NDR_IN);
41058 : }
41059 :
41060 0 : static PyObject *py_drsuapi_DsRemoveDSServer_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
41061 : {
41062 0 : return py_drsuapi_DsRemoveDSServer_ndr_print(py_obj, "drsuapi_DsRemoveDSServer_out", NDR_OUT);
41063 : }
41064 :
41065 : static PyMethodDef py_drsuapi_DsRemoveDSServer_methods[] = {
41066 : { "opnum", (PyCFunction)py_drsuapi_DsRemoveDSServer_ndr_opnum, METH_NOARGS|METH_CLASS,
41067 : "drsuapi.DsRemoveDSServer.opnum() -> 14 (0x0e) " },
41068 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServer_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
41069 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
41070 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServer_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
41071 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
41072 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServer_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
41073 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
41074 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsRemoveDSServer_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
41075 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
41076 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsRemoveDSServer_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
41077 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsRemoveDSServer_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
41078 : { NULL, NULL, 0, NULL }
41079 : };
41080 :
41081 :
41082 : static PyTypeObject drsuapi_DsRemoveDSServer_Type = {
41083 : PyVarObject_HEAD_INIT(NULL, 0)
41084 : .tp_name = "drsuapi.DsRemoveDSServer",
41085 : .tp_getset = py_drsuapi_DsRemoveDSServer_getsetters,
41086 : .tp_methods = py_drsuapi_DsRemoveDSServer_methods,
41087 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
41088 : .tp_new = py_drsuapi_DsRemoveDSServer_new,
41089 : };
41090 :
41091 3 : static bool pack_py_drsuapi_DsRemoveDSServer_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsRemoveDSServer *r)
41092 : {
41093 : PyObject *py_bind_handle;
41094 : PyObject *py_level;
41095 : PyObject *py_req;
41096 3 : const char *kwnames[] = {
41097 : "bind_handle", "level", "req", NULL
41098 : };
41099 :
41100 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsRemoveDSServer", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
41101 0 : return false;
41102 : }
41103 :
41104 3 : if (py_bind_handle == NULL) {
41105 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
41106 0 : return false;
41107 : }
41108 3 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
41109 3 : if (r->in.bind_handle == NULL) {
41110 0 : PyErr_NoMemory();
41111 0 : return false;
41112 : }
41113 3 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
41114 3 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
41115 0 : PyErr_NoMemory();
41116 0 : return false;
41117 : }
41118 3 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
41119 3 : if (py_level == NULL) {
41120 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
41121 0 : return false;
41122 : }
41123 : {
41124 3 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
41125 3 : if (PyLong_Check(py_level)) {
41126 : unsigned long long test_var;
41127 3 : test_var = PyLong_AsUnsignedLongLong(py_level);
41128 3 : if (PyErr_Occurred() != NULL) {
41129 0 : return false;
41130 : }
41131 3 : if (test_var > uint_max) {
41132 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
41133 : PyLong_Type.tp_name, uint_max, test_var);
41134 0 : return false;
41135 : }
41136 3 : r->in.level = test_var;
41137 : } else {
41138 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
41139 : PyLong_Type.tp_name);
41140 0 : return false;
41141 : }
41142 : }
41143 3 : if (py_req == NULL) {
41144 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
41145 0 : return false;
41146 : }
41147 3 : r->in.req = talloc_ptrtype(r, r->in.req);
41148 3 : if (r->in.req == NULL) {
41149 0 : PyErr_NoMemory();
41150 0 : return false;
41151 : }
41152 : {
41153 : union drsuapi_DsRemoveDSServerRequest *req_switch_1;
41154 3 : req_switch_1 = (union drsuapi_DsRemoveDSServerRequest *)pyrpc_export_union(&drsuapi_DsRemoveDSServerRequest_Type, r, r->in.level, py_req, "union drsuapi_DsRemoveDSServerRequest");
41155 3 : if (req_switch_1 == NULL) {
41156 0 : return false;
41157 : }
41158 3 : r->in.req = req_switch_1;
41159 : }
41160 3 : return true;
41161 : }
41162 :
41163 3 : static PyObject *unpack_py_drsuapi_DsRemoveDSServer_args_out(struct drsuapi_DsRemoveDSServer *r)
41164 : {
41165 : PyObject *result;
41166 : PyObject *py_level_out;
41167 : PyObject *py_res;
41168 3 : result = PyTuple_New(2);
41169 3 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
41170 3 : PyTuple_SetItem(result, 0, py_level_out);
41171 3 : py_res = pyrpc_import_union(&drsuapi_DsRemoveDSServerResult_Type, r->out.res, *r->out.level_out, r->out.res, "union drsuapi_DsRemoveDSServerResult");
41172 3 : if (py_res == NULL) {
41173 0 : return NULL;
41174 : }
41175 3 : PyTuple_SetItem(result, 1, py_res);
41176 3 : if (!W_ERROR_IS_OK(r->out.result)) {
41177 0 : PyErr_SetWERROR(r->out.result);
41178 0 : return NULL;
41179 : }
41180 :
41181 3 : return result;
41182 : }
41183 :
41184 :
41185 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_in_get_bind_handle(PyObject *obj, void *closure)
41186 : {
41187 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(obj);
41188 : PyObject *py_bind_handle;
41189 0 : if (object->in.bind_handle == NULL) {
41190 0 : Py_RETURN_NONE;
41191 : }
41192 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
41193 0 : return py_bind_handle;
41194 : }
41195 :
41196 0 : static int py_drsuapi_DsGetDomainControllerInfo_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
41197 : {
41198 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41199 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
41200 0 : if (value == NULL) {
41201 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
41202 0 : return -1;
41203 : }
41204 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
41205 0 : if (object->in.bind_handle == NULL) {
41206 0 : PyErr_NoMemory();
41207 0 : return -1;
41208 : }
41209 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
41210 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
41211 0 : PyErr_NoMemory();
41212 0 : return -1;
41213 : }
41214 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
41215 0 : return 0;
41216 : }
41217 :
41218 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_in_get_level(PyObject *obj, void *closure)
41219 : {
41220 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(obj);
41221 : PyObject *py_level;
41222 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
41223 0 : return py_level;
41224 : }
41225 :
41226 0 : static int py_drsuapi_DsGetDomainControllerInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
41227 : {
41228 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41229 0 : if (value == NULL) {
41230 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
41231 0 : return -1;
41232 : }
41233 : {
41234 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
41235 0 : if (PyLong_Check(value)) {
41236 : unsigned long long test_var;
41237 0 : test_var = PyLong_AsUnsignedLongLong(value);
41238 0 : if (PyErr_Occurred() != NULL) {
41239 0 : return -1;
41240 : }
41241 0 : if (test_var > uint_max) {
41242 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
41243 : PyLong_Type.tp_name, uint_max, test_var);
41244 0 : return -1;
41245 : }
41246 0 : object->in.level = test_var;
41247 : } else {
41248 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
41249 : PyLong_Type.tp_name);
41250 0 : return -1;
41251 : }
41252 : }
41253 0 : return 0;
41254 : }
41255 :
41256 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_in_get_req(PyObject *obj, void *closure)
41257 : {
41258 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(obj);
41259 : PyObject *py_req;
41260 0 : if (object->in.req == NULL) {
41261 0 : Py_RETURN_NONE;
41262 : }
41263 0 : py_req = pyrpc_import_union(&drsuapi_DsGetDCInfoRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetDCInfoRequest");
41264 0 : if (py_req == NULL) {
41265 0 : return NULL;
41266 : }
41267 0 : return py_req;
41268 : }
41269 :
41270 0 : static int py_drsuapi_DsGetDomainControllerInfo_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
41271 : {
41272 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41273 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
41274 0 : if (value == NULL) {
41275 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
41276 0 : return -1;
41277 : }
41278 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
41279 0 : if (object->in.req == NULL) {
41280 0 : PyErr_NoMemory();
41281 0 : return -1;
41282 : }
41283 : {
41284 : union drsuapi_DsGetDCInfoRequest *req_switch_1;
41285 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");
41286 0 : if (req_switch_1 == NULL) {
41287 0 : return -1;
41288 : }
41289 0 : object->in.req = req_switch_1;
41290 : }
41291 0 : return 0;
41292 : }
41293 :
41294 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_out_get_level_out(PyObject *obj, void *closure)
41295 : {
41296 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(obj);
41297 : PyObject *py_level_out;
41298 0 : if (object->out.level_out == NULL) {
41299 0 : Py_RETURN_NONE;
41300 : }
41301 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
41302 0 : return py_level_out;
41303 : }
41304 :
41305 0 : static int py_drsuapi_DsGetDomainControllerInfo_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
41306 : {
41307 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41308 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
41309 0 : if (value == NULL) {
41310 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
41311 0 : return -1;
41312 : }
41313 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
41314 0 : if (object->out.level_out == NULL) {
41315 0 : PyErr_NoMemory();
41316 0 : return -1;
41317 : }
41318 : {
41319 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
41320 0 : if (PyLong_Check(value)) {
41321 : unsigned long long test_var;
41322 0 : test_var = PyLong_AsUnsignedLongLong(value);
41323 0 : if (PyErr_Occurred() != NULL) {
41324 0 : return -1;
41325 : }
41326 0 : if (test_var > uint_max) {
41327 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
41328 : PyLong_Type.tp_name, uint_max, test_var);
41329 0 : return -1;
41330 : }
41331 0 : *object->out.level_out = test_var;
41332 : } else {
41333 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
41334 : PyLong_Type.tp_name);
41335 0 : return -1;
41336 : }
41337 : }
41338 0 : return 0;
41339 : }
41340 :
41341 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_out_get_ctr(PyObject *obj, void *closure)
41342 : {
41343 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(obj);
41344 : PyObject *py_ctr;
41345 0 : if (object->out.ctr == NULL) {
41346 0 : Py_RETURN_NONE;
41347 : }
41348 0 : py_ctr = pyrpc_import_union(&drsuapi_DsGetDCInfoCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsGetDCInfoCtr");
41349 0 : if (py_ctr == NULL) {
41350 0 : return NULL;
41351 : }
41352 0 : return py_ctr;
41353 : }
41354 :
41355 0 : static int py_drsuapi_DsGetDomainControllerInfo_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
41356 : {
41357 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41358 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
41359 0 : if (value == NULL) {
41360 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
41361 0 : return -1;
41362 : }
41363 0 : object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
41364 0 : if (object->out.ctr == NULL) {
41365 0 : PyErr_NoMemory();
41366 0 : return -1;
41367 : }
41368 : {
41369 : union drsuapi_DsGetDCInfoCtr *ctr_switch_1;
41370 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");
41371 0 : if (ctr_switch_1 == NULL) {
41372 0 : return -1;
41373 : }
41374 0 : object->out.ctr = ctr_switch_1;
41375 : }
41376 0 : return 0;
41377 : }
41378 :
41379 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_get_result(PyObject *obj, void *closure)
41380 : {
41381 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(obj);
41382 : PyObject *py_result;
41383 0 : py_result = PyErr_FromWERROR(object->out.result);
41384 0 : return py_result;
41385 : }
41386 :
41387 0 : static int py_drsuapi_DsGetDomainControllerInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
41388 : {
41389 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41390 0 : if (value == NULL) {
41391 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
41392 0 : return -1;
41393 : }
41394 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
41395 0 : return 0;
41396 : }
41397 :
41398 : static PyGetSetDef py_drsuapi_DsGetDomainControllerInfo_getsetters[] = {
41399 : {
41400 : .name = discard_const_p(char, "in_bind_handle"),
41401 : .get = py_drsuapi_DsGetDomainControllerInfo_in_get_bind_handle,
41402 : .set = py_drsuapi_DsGetDomainControllerInfo_in_set_bind_handle,
41403 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
41404 : },
41405 : {
41406 : .name = discard_const_p(char, "in_level"),
41407 : .get = py_drsuapi_DsGetDomainControllerInfo_in_get_level,
41408 : .set = py_drsuapi_DsGetDomainControllerInfo_in_set_level,
41409 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
41410 : },
41411 : {
41412 : .name = discard_const_p(char, "in_req"),
41413 : .get = py_drsuapi_DsGetDomainControllerInfo_in_get_req,
41414 : .set = py_drsuapi_DsGetDomainControllerInfo_in_set_req,
41415 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfoRequest")
41416 : },
41417 : {
41418 : .name = discard_const_p(char, "out_level_out"),
41419 : .get = py_drsuapi_DsGetDomainControllerInfo_out_get_level_out,
41420 : .set = py_drsuapi_DsGetDomainControllerInfo_out_set_level_out,
41421 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfoCtrLevels")
41422 : },
41423 : {
41424 : .name = discard_const_p(char, "out_ctr"),
41425 : .get = py_drsuapi_DsGetDomainControllerInfo_out_get_ctr,
41426 : .set = py_drsuapi_DsGetDomainControllerInfo_out_set_ctr,
41427 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetDCInfoCtr")
41428 : },
41429 : {
41430 : .name = discard_const_p(char, "result"),
41431 : .get = py_drsuapi_DsGetDomainControllerInfo_get_result,
41432 : .set = py_drsuapi_DsGetDomainControllerInfo_set_result,
41433 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
41434 : },
41435 : { .name = NULL }
41436 : };
41437 :
41438 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
41439 : {
41440 0 : PyObject *self = pytalloc_new(struct drsuapi_DsGetDomainControllerInfo, type);
41441 0 : struct drsuapi_DsGetDomainControllerInfo *_self = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(self);
41442 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
41443 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
41444 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoRequest);
41445 0 : _self->out.level_out = talloc_zero(mem_ctx, enum drsuapi_DsGetDCInfoCtrLevels);
41446 0 : _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsGetDCInfoCtr);
41447 0 : return self;
41448 : }
41449 :
41450 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
41451 : {
41452 :
41453 :
41454 0 : return PyLong_FromLong(16);
41455 : }
41456 :
41457 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
41458 : {
41459 0 : const struct ndr_interface_call *call = NULL;
41460 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41461 0 : PyObject *ret = NULL;
41462 0 : struct ndr_push *push = NULL;
41463 : DATA_BLOB blob;
41464 : enum ndr_err_code err;
41465 :
41466 0 : if (ndr_table_drsuapi.num_calls < 17) {
41467 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetDomainControllerInfo_ndr_pack");
41468 0 : return NULL;
41469 : }
41470 0 : call = &ndr_table_drsuapi.calls[16];
41471 :
41472 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
41473 0 : if (push == NULL) {
41474 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
41475 0 : return NULL;
41476 : }
41477 :
41478 0 : push->flags |= ndr_push_flags;
41479 :
41480 0 : err = call->ndr_push(push, ndr_inout_flags, object);
41481 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
41482 0 : TALLOC_FREE(push);
41483 0 : PyErr_SetNdrError(err);
41484 0 : return NULL;
41485 : }
41486 0 : blob = ndr_push_blob(push);
41487 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
41488 0 : TALLOC_FREE(push);
41489 0 : return ret;
41490 : }
41491 :
41492 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
41493 : {
41494 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
41495 0 : PyObject *bigendian_obj = NULL;
41496 0 : PyObject *ndr64_obj = NULL;
41497 0 : uint32_t ndr_push_flags = 0;
41498 :
41499 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
41500 : discard_const_p(char *, kwnames),
41501 : &bigendian_obj,
41502 : &ndr64_obj)) {
41503 0 : return NULL;
41504 : }
41505 :
41506 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
41507 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
41508 : }
41509 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
41510 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
41511 : }
41512 :
41513 0 : return py_drsuapi_DsGetDomainControllerInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
41514 : }
41515 :
41516 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
41517 : {
41518 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
41519 0 : PyObject *bigendian_obj = NULL;
41520 0 : PyObject *ndr64_obj = NULL;
41521 0 : uint32_t ndr_push_flags = 0;
41522 :
41523 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
41524 : discard_const_p(char *, kwnames),
41525 : &bigendian_obj,
41526 : &ndr64_obj)) {
41527 0 : return NULL;
41528 : }
41529 :
41530 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
41531 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
41532 : }
41533 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
41534 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
41535 : }
41536 :
41537 0 : return py_drsuapi_DsGetDomainControllerInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
41538 : }
41539 :
41540 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
41541 : {
41542 0 : const struct ndr_interface_call *call = NULL;
41543 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41544 0 : struct ndr_pull *pull = NULL;
41545 : enum ndr_err_code err;
41546 :
41547 0 : if (ndr_table_drsuapi.num_calls < 17) {
41548 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetDomainControllerInfo_ndr_unpack");
41549 0 : return NULL;
41550 : }
41551 0 : call = &ndr_table_drsuapi.calls[16];
41552 :
41553 0 : pull = ndr_pull_init_blob(blob, object);
41554 0 : if (pull == NULL) {
41555 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
41556 0 : return NULL;
41557 : }
41558 :
41559 0 : pull->flags |= ndr_pull_flags;
41560 :
41561 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
41562 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
41563 0 : TALLOC_FREE(pull);
41564 0 : PyErr_SetNdrError(err);
41565 0 : return NULL;
41566 : }
41567 0 : if (!allow_remaining) {
41568 : uint32_t highest_ofs;
41569 :
41570 0 : if (pull->offset > pull->relative_highest_offset) {
41571 0 : highest_ofs = pull->offset;
41572 : } else {
41573 0 : highest_ofs = pull->relative_highest_offset;
41574 : }
41575 0 : if (highest_ofs < pull->data_size) {
41576 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
41577 : "not all bytes consumed ofs[%u] size[%u]",
41578 : highest_ofs, pull->data_size);
41579 0 : TALLOC_FREE(pull);
41580 0 : PyErr_SetNdrError(err);
41581 0 : return NULL;
41582 : }
41583 : }
41584 :
41585 0 : TALLOC_FREE(pull);
41586 0 : Py_RETURN_NONE;
41587 : }
41588 :
41589 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
41590 : {
41591 : DATA_BLOB blob;
41592 0 : Py_ssize_t blob_length = 0;
41593 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
41594 0 : PyObject *bigendian_obj = NULL;
41595 0 : PyObject *ndr64_obj = NULL;
41596 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
41597 0 : PyObject *allow_remaining_obj = NULL;
41598 0 : bool allow_remaining = false;
41599 :
41600 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
41601 : discard_const_p(char *, kwnames),
41602 : &blob.data, &blob_length,
41603 : &bigendian_obj,
41604 : &ndr64_obj,
41605 : &allow_remaining_obj)) {
41606 0 : return NULL;
41607 : }
41608 0 : blob.length = blob_length;
41609 :
41610 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
41611 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
41612 : }
41613 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
41614 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
41615 : }
41616 :
41617 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
41618 0 : allow_remaining = true;
41619 : }
41620 :
41621 0 : return py_drsuapi_DsGetDomainControllerInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
41622 : }
41623 :
41624 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
41625 : {
41626 : DATA_BLOB blob;
41627 0 : Py_ssize_t blob_length = 0;
41628 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
41629 0 : PyObject *bigendian_obj = NULL;
41630 0 : PyObject *ndr64_obj = NULL;
41631 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
41632 0 : PyObject *allow_remaining_obj = NULL;
41633 0 : bool allow_remaining = false;
41634 :
41635 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
41636 : discard_const_p(char *, kwnames),
41637 : &blob.data, &blob_length,
41638 : &bigendian_obj,
41639 : &ndr64_obj,
41640 : &allow_remaining_obj)) {
41641 0 : return NULL;
41642 : }
41643 0 : blob.length = blob_length;
41644 :
41645 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
41646 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
41647 : }
41648 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
41649 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
41650 : }
41651 :
41652 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
41653 0 : allow_remaining = true;
41654 : }
41655 :
41656 0 : return py_drsuapi_DsGetDomainControllerInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
41657 : }
41658 :
41659 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
41660 : {
41661 0 : const struct ndr_interface_call *call = NULL;
41662 0 : struct drsuapi_DsGetDomainControllerInfo *object = (struct drsuapi_DsGetDomainControllerInfo *)pytalloc_get_ptr(py_obj);
41663 : PyObject *ret;
41664 : char *retstr;
41665 :
41666 0 : if (ndr_table_drsuapi.num_calls < 17) {
41667 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetDomainControllerInfo_ndr_print");
41668 0 : return NULL;
41669 : }
41670 0 : call = &ndr_table_drsuapi.calls[16];
41671 :
41672 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
41673 0 : ret = PyUnicode_FromString(retstr);
41674 0 : TALLOC_FREE(retstr);
41675 :
41676 0 : return ret;
41677 : }
41678 :
41679 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
41680 : {
41681 0 : return py_drsuapi_DsGetDomainControllerInfo_ndr_print(py_obj, "drsuapi_DsGetDomainControllerInfo_in", NDR_IN);
41682 : }
41683 :
41684 0 : static PyObject *py_drsuapi_DsGetDomainControllerInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
41685 : {
41686 0 : return py_drsuapi_DsGetDomainControllerInfo_ndr_print(py_obj, "drsuapi_DsGetDomainControllerInfo_out", NDR_OUT);
41687 : }
41688 :
41689 : static PyMethodDef py_drsuapi_DsGetDomainControllerInfo_methods[] = {
41690 : { "opnum", (PyCFunction)py_drsuapi_DsGetDomainControllerInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
41691 : "drsuapi.DsGetDomainControllerInfo.opnum() -> 16 (0x10) " },
41692 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDomainControllerInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
41693 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
41694 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDomainControllerInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
41695 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
41696 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDomainControllerInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
41697 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
41698 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetDomainControllerInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
41699 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
41700 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetDomainControllerInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
41701 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetDomainControllerInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
41702 : { NULL, NULL, 0, NULL }
41703 : };
41704 :
41705 :
41706 : static PyTypeObject drsuapi_DsGetDomainControllerInfo_Type = {
41707 : PyVarObject_HEAD_INIT(NULL, 0)
41708 : .tp_name = "drsuapi.DsGetDomainControllerInfo",
41709 : .tp_getset = py_drsuapi_DsGetDomainControllerInfo_getsetters,
41710 : .tp_methods = py_drsuapi_DsGetDomainControllerInfo_methods,
41711 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
41712 : .tp_new = py_drsuapi_DsGetDomainControllerInfo_new,
41713 : };
41714 :
41715 0 : static bool pack_py_drsuapi_DsGetDomainControllerInfo_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetDomainControllerInfo *r)
41716 : {
41717 : PyObject *py_bind_handle;
41718 : PyObject *py_level;
41719 : PyObject *py_req;
41720 0 : const char *kwnames[] = {
41721 : "bind_handle", "level", "req", NULL
41722 : };
41723 :
41724 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetDomainControllerInfo", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
41725 0 : return false;
41726 : }
41727 :
41728 0 : if (py_bind_handle == NULL) {
41729 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
41730 0 : return false;
41731 : }
41732 0 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
41733 0 : if (r->in.bind_handle == NULL) {
41734 0 : PyErr_NoMemory();
41735 0 : return false;
41736 : }
41737 0 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
41738 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
41739 0 : PyErr_NoMemory();
41740 0 : return false;
41741 : }
41742 0 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
41743 0 : if (py_level == NULL) {
41744 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
41745 0 : return false;
41746 : }
41747 : {
41748 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
41749 0 : if (PyLong_Check(py_level)) {
41750 : unsigned long long test_var;
41751 0 : test_var = PyLong_AsUnsignedLongLong(py_level);
41752 0 : if (PyErr_Occurred() != NULL) {
41753 0 : return false;
41754 : }
41755 0 : if (test_var > uint_max) {
41756 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
41757 : PyLong_Type.tp_name, uint_max, test_var);
41758 0 : return false;
41759 : }
41760 0 : r->in.level = test_var;
41761 : } else {
41762 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
41763 : PyLong_Type.tp_name);
41764 0 : return false;
41765 : }
41766 : }
41767 0 : if (py_req == NULL) {
41768 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
41769 0 : return false;
41770 : }
41771 0 : r->in.req = talloc_ptrtype(r, r->in.req);
41772 0 : if (r->in.req == NULL) {
41773 0 : PyErr_NoMemory();
41774 0 : return false;
41775 : }
41776 : {
41777 : union drsuapi_DsGetDCInfoRequest *req_switch_1;
41778 0 : req_switch_1 = (union drsuapi_DsGetDCInfoRequest *)pyrpc_export_union(&drsuapi_DsGetDCInfoRequest_Type, r, r->in.level, py_req, "union drsuapi_DsGetDCInfoRequest");
41779 0 : if (req_switch_1 == NULL) {
41780 0 : return false;
41781 : }
41782 0 : r->in.req = req_switch_1;
41783 : }
41784 0 : return true;
41785 : }
41786 :
41787 0 : static PyObject *unpack_py_drsuapi_DsGetDomainControllerInfo_args_out(struct drsuapi_DsGetDomainControllerInfo *r)
41788 : {
41789 : PyObject *result;
41790 : PyObject *py_level_out;
41791 : PyObject *py_ctr;
41792 0 : result = PyTuple_New(2);
41793 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
41794 0 : PyTuple_SetItem(result, 0, py_level_out);
41795 0 : py_ctr = pyrpc_import_union(&drsuapi_DsGetDCInfoCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsGetDCInfoCtr");
41796 0 : if (py_ctr == NULL) {
41797 0 : return NULL;
41798 : }
41799 0 : PyTuple_SetItem(result, 1, py_ctr);
41800 0 : if (!W_ERROR_IS_OK(r->out.result)) {
41801 0 : PyErr_SetWERROR(r->out.result);
41802 0 : return NULL;
41803 : }
41804 :
41805 0 : return result;
41806 : }
41807 :
41808 :
41809 0 : static PyObject *py_drsuapi_DsAddEntry_in_get_bind_handle(PyObject *obj, void *closure)
41810 : {
41811 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(obj);
41812 : PyObject *py_bind_handle;
41813 0 : if (object->in.bind_handle == NULL) {
41814 0 : Py_RETURN_NONE;
41815 : }
41816 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
41817 0 : return py_bind_handle;
41818 : }
41819 :
41820 0 : static int py_drsuapi_DsAddEntry_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
41821 : {
41822 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
41823 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
41824 0 : if (value == NULL) {
41825 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
41826 0 : return -1;
41827 : }
41828 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
41829 0 : if (object->in.bind_handle == NULL) {
41830 0 : PyErr_NoMemory();
41831 0 : return -1;
41832 : }
41833 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
41834 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
41835 0 : PyErr_NoMemory();
41836 0 : return -1;
41837 : }
41838 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
41839 0 : return 0;
41840 : }
41841 :
41842 0 : static PyObject *py_drsuapi_DsAddEntry_in_get_level(PyObject *obj, void *closure)
41843 : {
41844 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(obj);
41845 : PyObject *py_level;
41846 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
41847 0 : return py_level;
41848 : }
41849 :
41850 0 : static int py_drsuapi_DsAddEntry_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
41851 : {
41852 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
41853 0 : if (value == NULL) {
41854 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
41855 0 : return -1;
41856 : }
41857 : {
41858 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
41859 0 : if (PyLong_Check(value)) {
41860 : unsigned long long test_var;
41861 0 : test_var = PyLong_AsUnsignedLongLong(value);
41862 0 : if (PyErr_Occurred() != NULL) {
41863 0 : return -1;
41864 : }
41865 0 : if (test_var > uint_max) {
41866 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
41867 : PyLong_Type.tp_name, uint_max, test_var);
41868 0 : return -1;
41869 : }
41870 0 : object->in.level = test_var;
41871 : } else {
41872 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
41873 : PyLong_Type.tp_name);
41874 0 : return -1;
41875 : }
41876 : }
41877 0 : return 0;
41878 : }
41879 :
41880 0 : static PyObject *py_drsuapi_DsAddEntry_in_get_req(PyObject *obj, void *closure)
41881 : {
41882 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(obj);
41883 : PyObject *py_req;
41884 0 : if (object->in.req == NULL) {
41885 0 : Py_RETURN_NONE;
41886 : }
41887 0 : py_req = pyrpc_import_union(&drsuapi_DsAddEntryRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsAddEntryRequest");
41888 0 : if (py_req == NULL) {
41889 0 : return NULL;
41890 : }
41891 0 : return py_req;
41892 : }
41893 :
41894 0 : static int py_drsuapi_DsAddEntry_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
41895 : {
41896 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
41897 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
41898 0 : if (value == NULL) {
41899 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
41900 0 : return -1;
41901 : }
41902 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
41903 0 : if (object->in.req == NULL) {
41904 0 : PyErr_NoMemory();
41905 0 : return -1;
41906 : }
41907 : {
41908 : union drsuapi_DsAddEntryRequest *req_switch_1;
41909 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");
41910 0 : if (req_switch_1 == NULL) {
41911 0 : return -1;
41912 : }
41913 0 : object->in.req = req_switch_1;
41914 : }
41915 0 : return 0;
41916 : }
41917 :
41918 0 : static PyObject *py_drsuapi_DsAddEntry_out_get_level_out(PyObject *obj, void *closure)
41919 : {
41920 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(obj);
41921 : PyObject *py_level_out;
41922 0 : if (object->out.level_out == NULL) {
41923 0 : Py_RETURN_NONE;
41924 : }
41925 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
41926 0 : return py_level_out;
41927 : }
41928 :
41929 0 : static int py_drsuapi_DsAddEntry_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
41930 : {
41931 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
41932 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
41933 0 : if (value == NULL) {
41934 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
41935 0 : return -1;
41936 : }
41937 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
41938 0 : if (object->out.level_out == NULL) {
41939 0 : PyErr_NoMemory();
41940 0 : return -1;
41941 : }
41942 : {
41943 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
41944 0 : if (PyLong_Check(value)) {
41945 : unsigned long long test_var;
41946 0 : test_var = PyLong_AsUnsignedLongLong(value);
41947 0 : if (PyErr_Occurred() != NULL) {
41948 0 : return -1;
41949 : }
41950 0 : if (test_var > uint_max) {
41951 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
41952 : PyLong_Type.tp_name, uint_max, test_var);
41953 0 : return -1;
41954 : }
41955 0 : *object->out.level_out = test_var;
41956 : } else {
41957 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
41958 : PyLong_Type.tp_name);
41959 0 : return -1;
41960 : }
41961 : }
41962 0 : return 0;
41963 : }
41964 :
41965 0 : static PyObject *py_drsuapi_DsAddEntry_out_get_ctr(PyObject *obj, void *closure)
41966 : {
41967 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(obj);
41968 : PyObject *py_ctr;
41969 0 : if (object->out.ctr == NULL) {
41970 0 : Py_RETURN_NONE;
41971 : }
41972 0 : py_ctr = pyrpc_import_union(&drsuapi_DsAddEntryCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsAddEntryCtr");
41973 0 : if (py_ctr == NULL) {
41974 0 : return NULL;
41975 : }
41976 0 : return py_ctr;
41977 : }
41978 :
41979 0 : static int py_drsuapi_DsAddEntry_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
41980 : {
41981 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
41982 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
41983 0 : if (value == NULL) {
41984 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
41985 0 : return -1;
41986 : }
41987 0 : object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
41988 0 : if (object->out.ctr == NULL) {
41989 0 : PyErr_NoMemory();
41990 0 : return -1;
41991 : }
41992 : {
41993 : union drsuapi_DsAddEntryCtr *ctr_switch_1;
41994 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");
41995 0 : if (ctr_switch_1 == NULL) {
41996 0 : return -1;
41997 : }
41998 0 : object->out.ctr = ctr_switch_1;
41999 : }
42000 0 : return 0;
42001 : }
42002 :
42003 0 : static PyObject *py_drsuapi_DsAddEntry_get_result(PyObject *obj, void *closure)
42004 : {
42005 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(obj);
42006 : PyObject *py_result;
42007 0 : py_result = PyErr_FromWERROR(object->out.result);
42008 0 : return py_result;
42009 : }
42010 :
42011 0 : static int py_drsuapi_DsAddEntry_set_result(PyObject *py_obj, PyObject *value, void *closure)
42012 : {
42013 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
42014 0 : if (value == NULL) {
42015 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
42016 0 : return -1;
42017 : }
42018 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
42019 0 : return 0;
42020 : }
42021 :
42022 : static PyGetSetDef py_drsuapi_DsAddEntry_getsetters[] = {
42023 : {
42024 : .name = discard_const_p(char, "in_bind_handle"),
42025 : .get = py_drsuapi_DsAddEntry_in_get_bind_handle,
42026 : .set = py_drsuapi_DsAddEntry_in_set_bind_handle,
42027 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
42028 : },
42029 : {
42030 : .name = discard_const_p(char, "in_level"),
42031 : .get = py_drsuapi_DsAddEntry_in_get_level,
42032 : .set = py_drsuapi_DsAddEntry_in_set_level,
42033 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
42034 : },
42035 : {
42036 : .name = discard_const_p(char, "in_req"),
42037 : .get = py_drsuapi_DsAddEntry_in_get_req,
42038 : .set = py_drsuapi_DsAddEntry_in_set_req,
42039 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntryRequest")
42040 : },
42041 : {
42042 : .name = discard_const_p(char, "out_level_out"),
42043 : .get = py_drsuapi_DsAddEntry_out_get_level_out,
42044 : .set = py_drsuapi_DsAddEntry_out_set_level_out,
42045 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
42046 : },
42047 : {
42048 : .name = discard_const_p(char, "out_ctr"),
42049 : .get = py_drsuapi_DsAddEntry_out_get_ctr,
42050 : .set = py_drsuapi_DsAddEntry_out_set_ctr,
42051 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsAddEntryCtr")
42052 : },
42053 : {
42054 : .name = discard_const_p(char, "result"),
42055 : .get = py_drsuapi_DsAddEntry_get_result,
42056 : .set = py_drsuapi_DsAddEntry_set_result,
42057 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
42058 : },
42059 : { .name = NULL }
42060 : };
42061 :
42062 0 : static PyObject *py_drsuapi_DsAddEntry_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
42063 : {
42064 0 : PyObject *self = pytalloc_new(struct drsuapi_DsAddEntry, type);
42065 0 : struct drsuapi_DsAddEntry *_self = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(self);
42066 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
42067 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
42068 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsAddEntryRequest);
42069 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
42070 0 : _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsAddEntryCtr);
42071 0 : return self;
42072 : }
42073 :
42074 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
42075 : {
42076 :
42077 :
42078 0 : return PyLong_FromLong(17);
42079 : }
42080 :
42081 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
42082 : {
42083 0 : const struct ndr_interface_call *call = NULL;
42084 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
42085 0 : PyObject *ret = NULL;
42086 0 : struct ndr_push *push = NULL;
42087 : DATA_BLOB blob;
42088 : enum ndr_err_code err;
42089 :
42090 0 : if (ndr_table_drsuapi.num_calls < 18) {
42091 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsAddEntry_ndr_pack");
42092 0 : return NULL;
42093 : }
42094 0 : call = &ndr_table_drsuapi.calls[17];
42095 :
42096 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
42097 0 : if (push == NULL) {
42098 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
42099 0 : return NULL;
42100 : }
42101 :
42102 0 : push->flags |= ndr_push_flags;
42103 :
42104 0 : err = call->ndr_push(push, ndr_inout_flags, object);
42105 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
42106 0 : TALLOC_FREE(push);
42107 0 : PyErr_SetNdrError(err);
42108 0 : return NULL;
42109 : }
42110 0 : blob = ndr_push_blob(push);
42111 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
42112 0 : TALLOC_FREE(push);
42113 0 : return ret;
42114 : }
42115 :
42116 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
42117 : {
42118 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
42119 0 : PyObject *bigendian_obj = NULL;
42120 0 : PyObject *ndr64_obj = NULL;
42121 0 : uint32_t ndr_push_flags = 0;
42122 :
42123 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
42124 : discard_const_p(char *, kwnames),
42125 : &bigendian_obj,
42126 : &ndr64_obj)) {
42127 0 : return NULL;
42128 : }
42129 :
42130 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
42131 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
42132 : }
42133 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
42134 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
42135 : }
42136 :
42137 0 : return py_drsuapi_DsAddEntry_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
42138 : }
42139 :
42140 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
42141 : {
42142 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
42143 0 : PyObject *bigendian_obj = NULL;
42144 0 : PyObject *ndr64_obj = NULL;
42145 0 : uint32_t ndr_push_flags = 0;
42146 :
42147 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
42148 : discard_const_p(char *, kwnames),
42149 : &bigendian_obj,
42150 : &ndr64_obj)) {
42151 0 : return NULL;
42152 : }
42153 :
42154 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
42155 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
42156 : }
42157 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
42158 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
42159 : }
42160 :
42161 0 : return py_drsuapi_DsAddEntry_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
42162 : }
42163 :
42164 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
42165 : {
42166 0 : const struct ndr_interface_call *call = NULL;
42167 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
42168 0 : struct ndr_pull *pull = NULL;
42169 : enum ndr_err_code err;
42170 :
42171 0 : if (ndr_table_drsuapi.num_calls < 18) {
42172 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsAddEntry_ndr_unpack");
42173 0 : return NULL;
42174 : }
42175 0 : call = &ndr_table_drsuapi.calls[17];
42176 :
42177 0 : pull = ndr_pull_init_blob(blob, object);
42178 0 : if (pull == NULL) {
42179 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
42180 0 : return NULL;
42181 : }
42182 :
42183 0 : pull->flags |= ndr_pull_flags;
42184 :
42185 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
42186 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
42187 0 : TALLOC_FREE(pull);
42188 0 : PyErr_SetNdrError(err);
42189 0 : return NULL;
42190 : }
42191 0 : if (!allow_remaining) {
42192 : uint32_t highest_ofs;
42193 :
42194 0 : if (pull->offset > pull->relative_highest_offset) {
42195 0 : highest_ofs = pull->offset;
42196 : } else {
42197 0 : highest_ofs = pull->relative_highest_offset;
42198 : }
42199 0 : if (highest_ofs < pull->data_size) {
42200 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
42201 : "not all bytes consumed ofs[%u] size[%u]",
42202 : highest_ofs, pull->data_size);
42203 0 : TALLOC_FREE(pull);
42204 0 : PyErr_SetNdrError(err);
42205 0 : return NULL;
42206 : }
42207 : }
42208 :
42209 0 : TALLOC_FREE(pull);
42210 0 : Py_RETURN_NONE;
42211 : }
42212 :
42213 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
42214 : {
42215 : DATA_BLOB blob;
42216 0 : Py_ssize_t blob_length = 0;
42217 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
42218 0 : PyObject *bigendian_obj = NULL;
42219 0 : PyObject *ndr64_obj = NULL;
42220 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
42221 0 : PyObject *allow_remaining_obj = NULL;
42222 0 : bool allow_remaining = false;
42223 :
42224 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
42225 : discard_const_p(char *, kwnames),
42226 : &blob.data, &blob_length,
42227 : &bigendian_obj,
42228 : &ndr64_obj,
42229 : &allow_remaining_obj)) {
42230 0 : return NULL;
42231 : }
42232 0 : blob.length = blob_length;
42233 :
42234 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
42235 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
42236 : }
42237 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
42238 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
42239 : }
42240 :
42241 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
42242 0 : allow_remaining = true;
42243 : }
42244 :
42245 0 : return py_drsuapi_DsAddEntry_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
42246 : }
42247 :
42248 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
42249 : {
42250 : DATA_BLOB blob;
42251 0 : Py_ssize_t blob_length = 0;
42252 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
42253 0 : PyObject *bigendian_obj = NULL;
42254 0 : PyObject *ndr64_obj = NULL;
42255 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
42256 0 : PyObject *allow_remaining_obj = NULL;
42257 0 : bool allow_remaining = false;
42258 :
42259 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
42260 : discard_const_p(char *, kwnames),
42261 : &blob.data, &blob_length,
42262 : &bigendian_obj,
42263 : &ndr64_obj,
42264 : &allow_remaining_obj)) {
42265 0 : return NULL;
42266 : }
42267 0 : blob.length = blob_length;
42268 :
42269 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
42270 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
42271 : }
42272 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
42273 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
42274 : }
42275 :
42276 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
42277 0 : allow_remaining = true;
42278 : }
42279 :
42280 0 : return py_drsuapi_DsAddEntry_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
42281 : }
42282 :
42283 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
42284 : {
42285 0 : const struct ndr_interface_call *call = NULL;
42286 0 : struct drsuapi_DsAddEntry *object = (struct drsuapi_DsAddEntry *)pytalloc_get_ptr(py_obj);
42287 : PyObject *ret;
42288 : char *retstr;
42289 :
42290 0 : if (ndr_table_drsuapi.num_calls < 18) {
42291 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsAddEntry_ndr_print");
42292 0 : return NULL;
42293 : }
42294 0 : call = &ndr_table_drsuapi.calls[17];
42295 :
42296 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
42297 0 : ret = PyUnicode_FromString(retstr);
42298 0 : TALLOC_FREE(retstr);
42299 :
42300 0 : return ret;
42301 : }
42302 :
42303 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
42304 : {
42305 0 : return py_drsuapi_DsAddEntry_ndr_print(py_obj, "drsuapi_DsAddEntry_in", NDR_IN);
42306 : }
42307 :
42308 0 : static PyObject *py_drsuapi_DsAddEntry_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
42309 : {
42310 0 : return py_drsuapi_DsAddEntry_ndr_print(py_obj, "drsuapi_DsAddEntry_out", NDR_OUT);
42311 : }
42312 :
42313 : static PyMethodDef py_drsuapi_DsAddEntry_methods[] = {
42314 : { "opnum", (PyCFunction)py_drsuapi_DsAddEntry_ndr_opnum, METH_NOARGS|METH_CLASS,
42315 : "drsuapi.DsAddEntry.opnum() -> 17 (0x11) " },
42316 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
42317 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
42318 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
42319 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
42320 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
42321 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
42322 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsAddEntry_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
42323 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
42324 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsAddEntry_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
42325 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsAddEntry_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
42326 : { NULL, NULL, 0, NULL }
42327 : };
42328 :
42329 :
42330 : static PyTypeObject drsuapi_DsAddEntry_Type = {
42331 : PyVarObject_HEAD_INIT(NULL, 0)
42332 : .tp_name = "drsuapi.DsAddEntry",
42333 : .tp_getset = py_drsuapi_DsAddEntry_getsetters,
42334 : .tp_methods = py_drsuapi_DsAddEntry_methods,
42335 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
42336 : .tp_new = py_drsuapi_DsAddEntry_new,
42337 : };
42338 :
42339 84 : static bool pack_py_drsuapi_DsAddEntry_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsAddEntry *r)
42340 : {
42341 : PyObject *py_bind_handle;
42342 : PyObject *py_level;
42343 : PyObject *py_req;
42344 84 : const char *kwnames[] = {
42345 : "bind_handle", "level", "req", NULL
42346 : };
42347 :
42348 84 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsAddEntry", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
42349 0 : return false;
42350 : }
42351 :
42352 84 : if (py_bind_handle == NULL) {
42353 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
42354 0 : return false;
42355 : }
42356 84 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
42357 84 : if (r->in.bind_handle == NULL) {
42358 0 : PyErr_NoMemory();
42359 0 : return false;
42360 : }
42361 84 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
42362 84 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
42363 0 : PyErr_NoMemory();
42364 0 : return false;
42365 : }
42366 84 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
42367 84 : if (py_level == NULL) {
42368 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
42369 0 : return false;
42370 : }
42371 : {
42372 84 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
42373 84 : if (PyLong_Check(py_level)) {
42374 : unsigned long long test_var;
42375 84 : test_var = PyLong_AsUnsignedLongLong(py_level);
42376 84 : if (PyErr_Occurred() != NULL) {
42377 0 : return false;
42378 : }
42379 84 : if (test_var > uint_max) {
42380 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
42381 : PyLong_Type.tp_name, uint_max, test_var);
42382 0 : return false;
42383 : }
42384 84 : r->in.level = test_var;
42385 : } else {
42386 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
42387 : PyLong_Type.tp_name);
42388 0 : return false;
42389 : }
42390 : }
42391 84 : if (py_req == NULL) {
42392 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
42393 0 : return false;
42394 : }
42395 84 : r->in.req = talloc_ptrtype(r, r->in.req);
42396 84 : if (r->in.req == NULL) {
42397 0 : PyErr_NoMemory();
42398 0 : return false;
42399 : }
42400 : {
42401 : union drsuapi_DsAddEntryRequest *req_switch_1;
42402 84 : req_switch_1 = (union drsuapi_DsAddEntryRequest *)pyrpc_export_union(&drsuapi_DsAddEntryRequest_Type, r, r->in.level, py_req, "union drsuapi_DsAddEntryRequest");
42403 84 : if (req_switch_1 == NULL) {
42404 0 : return false;
42405 : }
42406 84 : r->in.req = req_switch_1;
42407 : }
42408 84 : return true;
42409 : }
42410 :
42411 84 : static PyObject *unpack_py_drsuapi_DsAddEntry_args_out(struct drsuapi_DsAddEntry *r)
42412 : {
42413 : PyObject *result;
42414 : PyObject *py_level_out;
42415 : PyObject *py_ctr;
42416 84 : result = PyTuple_New(2);
42417 84 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
42418 84 : PyTuple_SetItem(result, 0, py_level_out);
42419 84 : py_ctr = pyrpc_import_union(&drsuapi_DsAddEntryCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsAddEntryCtr");
42420 84 : if (py_ctr == NULL) {
42421 0 : return NULL;
42422 : }
42423 84 : PyTuple_SetItem(result, 1, py_ctr);
42424 84 : if (!W_ERROR_IS_OK(r->out.result)) {
42425 0 : PyErr_SetWERROR(r->out.result);
42426 0 : return NULL;
42427 : }
42428 :
42429 84 : return result;
42430 : }
42431 :
42432 :
42433 0 : static PyObject *py_drsuapi_DsExecuteKCC_in_get_bind_handle(PyObject *obj, void *closure)
42434 : {
42435 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(obj);
42436 : PyObject *py_bind_handle;
42437 0 : if (object->in.bind_handle == NULL) {
42438 0 : Py_RETURN_NONE;
42439 : }
42440 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
42441 0 : return py_bind_handle;
42442 : }
42443 :
42444 0 : static int py_drsuapi_DsExecuteKCC_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
42445 : {
42446 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(py_obj);
42447 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
42448 0 : if (value == NULL) {
42449 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
42450 0 : return -1;
42451 : }
42452 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
42453 0 : if (object->in.bind_handle == NULL) {
42454 0 : PyErr_NoMemory();
42455 0 : return -1;
42456 : }
42457 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
42458 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
42459 0 : PyErr_NoMemory();
42460 0 : return -1;
42461 : }
42462 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
42463 0 : return 0;
42464 : }
42465 :
42466 0 : static PyObject *py_drsuapi_DsExecuteKCC_in_get_level(PyObject *obj, void *closure)
42467 : {
42468 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(obj);
42469 : PyObject *py_level;
42470 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
42471 0 : return py_level;
42472 : }
42473 :
42474 0 : static int py_drsuapi_DsExecuteKCC_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
42475 : {
42476 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(py_obj);
42477 0 : if (value == NULL) {
42478 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
42479 0 : return -1;
42480 : }
42481 : {
42482 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
42483 0 : if (PyLong_Check(value)) {
42484 : unsigned long long test_var;
42485 0 : test_var = PyLong_AsUnsignedLongLong(value);
42486 0 : if (PyErr_Occurred() != NULL) {
42487 0 : return -1;
42488 : }
42489 0 : if (test_var > uint_max) {
42490 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
42491 : PyLong_Type.tp_name, uint_max, test_var);
42492 0 : return -1;
42493 : }
42494 0 : object->in.level = test_var;
42495 : } else {
42496 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
42497 : PyLong_Type.tp_name);
42498 0 : return -1;
42499 : }
42500 : }
42501 0 : return 0;
42502 : }
42503 :
42504 0 : static PyObject *py_drsuapi_DsExecuteKCC_in_get_req(PyObject *obj, void *closure)
42505 : {
42506 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(obj);
42507 : PyObject *py_req;
42508 0 : if (object->in.req == NULL) {
42509 0 : Py_RETURN_NONE;
42510 : }
42511 0 : py_req = pyrpc_import_union(&drsuapi_DsExecuteKCCRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsExecuteKCCRequest");
42512 0 : if (py_req == NULL) {
42513 0 : return NULL;
42514 : }
42515 0 : return py_req;
42516 : }
42517 :
42518 0 : static int py_drsuapi_DsExecuteKCC_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
42519 : {
42520 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(py_obj);
42521 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
42522 0 : if (value == NULL) {
42523 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
42524 0 : return -1;
42525 : }
42526 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
42527 0 : if (object->in.req == NULL) {
42528 0 : PyErr_NoMemory();
42529 0 : return -1;
42530 : }
42531 : {
42532 : union drsuapi_DsExecuteKCCRequest *req_switch_1;
42533 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");
42534 0 : if (req_switch_1 == NULL) {
42535 0 : return -1;
42536 : }
42537 0 : object->in.req = req_switch_1;
42538 : }
42539 0 : return 0;
42540 : }
42541 :
42542 0 : static PyObject *py_drsuapi_DsExecuteKCC_get_result(PyObject *obj, void *closure)
42543 : {
42544 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(obj);
42545 : PyObject *py_result;
42546 0 : py_result = PyErr_FromWERROR(object->out.result);
42547 0 : return py_result;
42548 : }
42549 :
42550 0 : static int py_drsuapi_DsExecuteKCC_set_result(PyObject *py_obj, PyObject *value, void *closure)
42551 : {
42552 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(py_obj);
42553 0 : if (value == NULL) {
42554 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
42555 0 : return -1;
42556 : }
42557 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
42558 0 : return 0;
42559 : }
42560 :
42561 : static PyGetSetDef py_drsuapi_DsExecuteKCC_getsetters[] = {
42562 : {
42563 : .name = discard_const_p(char, "in_bind_handle"),
42564 : .get = py_drsuapi_DsExecuteKCC_in_get_bind_handle,
42565 : .set = py_drsuapi_DsExecuteKCC_in_set_bind_handle,
42566 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
42567 : },
42568 : {
42569 : .name = discard_const_p(char, "in_level"),
42570 : .get = py_drsuapi_DsExecuteKCC_in_get_level,
42571 : .set = py_drsuapi_DsExecuteKCC_in_set_level,
42572 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
42573 : },
42574 : {
42575 : .name = discard_const_p(char, "in_req"),
42576 : .get = py_drsuapi_DsExecuteKCC_in_get_req,
42577 : .set = py_drsuapi_DsExecuteKCC_in_set_req,
42578 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsExecuteKCCRequest")
42579 : },
42580 : {
42581 : .name = discard_const_p(char, "result"),
42582 : .get = py_drsuapi_DsExecuteKCC_get_result,
42583 : .set = py_drsuapi_DsExecuteKCC_set_result,
42584 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
42585 : },
42586 : { .name = NULL }
42587 : };
42588 :
42589 0 : static PyObject *py_drsuapi_DsExecuteKCC_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
42590 : {
42591 0 : PyObject *self = pytalloc_new(struct drsuapi_DsExecuteKCC, type);
42592 0 : struct drsuapi_DsExecuteKCC *_self = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(self);
42593 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
42594 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
42595 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsExecuteKCCRequest);
42596 0 : return self;
42597 : }
42598 :
42599 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
42600 : {
42601 :
42602 :
42603 0 : return PyLong_FromLong(18);
42604 : }
42605 :
42606 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
42607 : {
42608 0 : const struct ndr_interface_call *call = NULL;
42609 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(py_obj);
42610 0 : PyObject *ret = NULL;
42611 0 : struct ndr_push *push = NULL;
42612 : DATA_BLOB blob;
42613 : enum ndr_err_code err;
42614 :
42615 0 : if (ndr_table_drsuapi.num_calls < 19) {
42616 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsExecuteKCC_ndr_pack");
42617 0 : return NULL;
42618 : }
42619 0 : call = &ndr_table_drsuapi.calls[18];
42620 :
42621 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
42622 0 : if (push == NULL) {
42623 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
42624 0 : return NULL;
42625 : }
42626 :
42627 0 : push->flags |= ndr_push_flags;
42628 :
42629 0 : err = call->ndr_push(push, ndr_inout_flags, object);
42630 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
42631 0 : TALLOC_FREE(push);
42632 0 : PyErr_SetNdrError(err);
42633 0 : return NULL;
42634 : }
42635 0 : blob = ndr_push_blob(push);
42636 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
42637 0 : TALLOC_FREE(push);
42638 0 : return ret;
42639 : }
42640 :
42641 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
42642 : {
42643 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
42644 0 : PyObject *bigendian_obj = NULL;
42645 0 : PyObject *ndr64_obj = NULL;
42646 0 : uint32_t ndr_push_flags = 0;
42647 :
42648 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
42649 : discard_const_p(char *, kwnames),
42650 : &bigendian_obj,
42651 : &ndr64_obj)) {
42652 0 : return NULL;
42653 : }
42654 :
42655 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
42656 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
42657 : }
42658 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
42659 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
42660 : }
42661 :
42662 0 : return py_drsuapi_DsExecuteKCC_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
42663 : }
42664 :
42665 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
42666 : {
42667 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
42668 0 : PyObject *bigendian_obj = NULL;
42669 0 : PyObject *ndr64_obj = NULL;
42670 0 : uint32_t ndr_push_flags = 0;
42671 :
42672 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
42673 : discard_const_p(char *, kwnames),
42674 : &bigendian_obj,
42675 : &ndr64_obj)) {
42676 0 : return NULL;
42677 : }
42678 :
42679 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
42680 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
42681 : }
42682 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
42683 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
42684 : }
42685 :
42686 0 : return py_drsuapi_DsExecuteKCC_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
42687 : }
42688 :
42689 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
42690 : {
42691 0 : const struct ndr_interface_call *call = NULL;
42692 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(py_obj);
42693 0 : struct ndr_pull *pull = NULL;
42694 : enum ndr_err_code err;
42695 :
42696 0 : if (ndr_table_drsuapi.num_calls < 19) {
42697 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsExecuteKCC_ndr_unpack");
42698 0 : return NULL;
42699 : }
42700 0 : call = &ndr_table_drsuapi.calls[18];
42701 :
42702 0 : pull = ndr_pull_init_blob(blob, object);
42703 0 : if (pull == NULL) {
42704 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
42705 0 : return NULL;
42706 : }
42707 :
42708 0 : pull->flags |= ndr_pull_flags;
42709 :
42710 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
42711 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
42712 0 : TALLOC_FREE(pull);
42713 0 : PyErr_SetNdrError(err);
42714 0 : return NULL;
42715 : }
42716 0 : if (!allow_remaining) {
42717 : uint32_t highest_ofs;
42718 :
42719 0 : if (pull->offset > pull->relative_highest_offset) {
42720 0 : highest_ofs = pull->offset;
42721 : } else {
42722 0 : highest_ofs = pull->relative_highest_offset;
42723 : }
42724 0 : if (highest_ofs < pull->data_size) {
42725 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
42726 : "not all bytes consumed ofs[%u] size[%u]",
42727 : highest_ofs, pull->data_size);
42728 0 : TALLOC_FREE(pull);
42729 0 : PyErr_SetNdrError(err);
42730 0 : return NULL;
42731 : }
42732 : }
42733 :
42734 0 : TALLOC_FREE(pull);
42735 0 : Py_RETURN_NONE;
42736 : }
42737 :
42738 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
42739 : {
42740 : DATA_BLOB blob;
42741 0 : Py_ssize_t blob_length = 0;
42742 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
42743 0 : PyObject *bigendian_obj = NULL;
42744 0 : PyObject *ndr64_obj = NULL;
42745 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
42746 0 : PyObject *allow_remaining_obj = NULL;
42747 0 : bool allow_remaining = false;
42748 :
42749 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
42750 : discard_const_p(char *, kwnames),
42751 : &blob.data, &blob_length,
42752 : &bigendian_obj,
42753 : &ndr64_obj,
42754 : &allow_remaining_obj)) {
42755 0 : return NULL;
42756 : }
42757 0 : blob.length = blob_length;
42758 :
42759 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
42760 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
42761 : }
42762 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
42763 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
42764 : }
42765 :
42766 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
42767 0 : allow_remaining = true;
42768 : }
42769 :
42770 0 : return py_drsuapi_DsExecuteKCC_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
42771 : }
42772 :
42773 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
42774 : {
42775 : DATA_BLOB blob;
42776 0 : Py_ssize_t blob_length = 0;
42777 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
42778 0 : PyObject *bigendian_obj = NULL;
42779 0 : PyObject *ndr64_obj = NULL;
42780 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
42781 0 : PyObject *allow_remaining_obj = NULL;
42782 0 : bool allow_remaining = false;
42783 :
42784 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
42785 : discard_const_p(char *, kwnames),
42786 : &blob.data, &blob_length,
42787 : &bigendian_obj,
42788 : &ndr64_obj,
42789 : &allow_remaining_obj)) {
42790 0 : return NULL;
42791 : }
42792 0 : blob.length = blob_length;
42793 :
42794 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
42795 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
42796 : }
42797 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
42798 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
42799 : }
42800 :
42801 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
42802 0 : allow_remaining = true;
42803 : }
42804 :
42805 0 : return py_drsuapi_DsExecuteKCC_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
42806 : }
42807 :
42808 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
42809 : {
42810 0 : const struct ndr_interface_call *call = NULL;
42811 0 : struct drsuapi_DsExecuteKCC *object = (struct drsuapi_DsExecuteKCC *)pytalloc_get_ptr(py_obj);
42812 : PyObject *ret;
42813 : char *retstr;
42814 :
42815 0 : if (ndr_table_drsuapi.num_calls < 19) {
42816 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsExecuteKCC_ndr_print");
42817 0 : return NULL;
42818 : }
42819 0 : call = &ndr_table_drsuapi.calls[18];
42820 :
42821 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
42822 0 : ret = PyUnicode_FromString(retstr);
42823 0 : TALLOC_FREE(retstr);
42824 :
42825 0 : return ret;
42826 : }
42827 :
42828 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
42829 : {
42830 0 : return py_drsuapi_DsExecuteKCC_ndr_print(py_obj, "drsuapi_DsExecuteKCC_in", NDR_IN);
42831 : }
42832 :
42833 0 : static PyObject *py_drsuapi_DsExecuteKCC_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
42834 : {
42835 0 : return py_drsuapi_DsExecuteKCC_ndr_print(py_obj, "drsuapi_DsExecuteKCC_out", NDR_OUT);
42836 : }
42837 :
42838 : static PyMethodDef py_drsuapi_DsExecuteKCC_methods[] = {
42839 : { "opnum", (PyCFunction)py_drsuapi_DsExecuteKCC_ndr_opnum, METH_NOARGS|METH_CLASS,
42840 : "drsuapi.DsExecuteKCC.opnum() -> 18 (0x12) " },
42841 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCC_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
42842 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
42843 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCC_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
42844 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
42845 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCC_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
42846 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
42847 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsExecuteKCC_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
42848 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
42849 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsExecuteKCC_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
42850 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsExecuteKCC_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
42851 : { NULL, NULL, 0, NULL }
42852 : };
42853 :
42854 :
42855 : static PyTypeObject drsuapi_DsExecuteKCC_Type = {
42856 : PyVarObject_HEAD_INIT(NULL, 0)
42857 : .tp_name = "drsuapi.DsExecuteKCC",
42858 : .tp_getset = py_drsuapi_DsExecuteKCC_getsetters,
42859 : .tp_methods = py_drsuapi_DsExecuteKCC_methods,
42860 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
42861 : .tp_new = py_drsuapi_DsExecuteKCC_new,
42862 : };
42863 :
42864 1 : static bool pack_py_drsuapi_DsExecuteKCC_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsExecuteKCC *r)
42865 : {
42866 : PyObject *py_bind_handle;
42867 : PyObject *py_level;
42868 : PyObject *py_req;
42869 1 : const char *kwnames[] = {
42870 : "bind_handle", "level", "req", NULL
42871 : };
42872 :
42873 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsExecuteKCC", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
42874 0 : return false;
42875 : }
42876 :
42877 1 : if (py_bind_handle == NULL) {
42878 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
42879 0 : return false;
42880 : }
42881 1 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
42882 1 : if (r->in.bind_handle == NULL) {
42883 0 : PyErr_NoMemory();
42884 0 : return false;
42885 : }
42886 1 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
42887 1 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
42888 0 : PyErr_NoMemory();
42889 0 : return false;
42890 : }
42891 1 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
42892 1 : if (py_level == NULL) {
42893 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
42894 0 : return false;
42895 : }
42896 : {
42897 1 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
42898 1 : if (PyLong_Check(py_level)) {
42899 : unsigned long long test_var;
42900 1 : test_var = PyLong_AsUnsignedLongLong(py_level);
42901 1 : if (PyErr_Occurred() != NULL) {
42902 0 : return false;
42903 : }
42904 1 : if (test_var > uint_max) {
42905 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
42906 : PyLong_Type.tp_name, uint_max, test_var);
42907 0 : return false;
42908 : }
42909 1 : r->in.level = test_var;
42910 : } else {
42911 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
42912 : PyLong_Type.tp_name);
42913 0 : return false;
42914 : }
42915 : }
42916 1 : if (py_req == NULL) {
42917 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
42918 0 : return false;
42919 : }
42920 1 : r->in.req = talloc_ptrtype(r, r->in.req);
42921 1 : if (r->in.req == NULL) {
42922 0 : PyErr_NoMemory();
42923 0 : return false;
42924 : }
42925 : {
42926 : union drsuapi_DsExecuteKCCRequest *req_switch_1;
42927 1 : req_switch_1 = (union drsuapi_DsExecuteKCCRequest *)pyrpc_export_union(&drsuapi_DsExecuteKCCRequest_Type, r, r->in.level, py_req, "union drsuapi_DsExecuteKCCRequest");
42928 1 : if (req_switch_1 == NULL) {
42929 0 : return false;
42930 : }
42931 1 : r->in.req = req_switch_1;
42932 : }
42933 1 : return true;
42934 : }
42935 :
42936 1 : static PyObject *unpack_py_drsuapi_DsExecuteKCC_args_out(struct drsuapi_DsExecuteKCC *r)
42937 : {
42938 : PyObject *result;
42939 1 : result = Py_None;
42940 1 : Py_INCREF(result);
42941 1 : if (!W_ERROR_IS_OK(r->out.result)) {
42942 0 : PyErr_SetWERROR(r->out.result);
42943 0 : return NULL;
42944 : }
42945 :
42946 1 : return result;
42947 : }
42948 :
42949 :
42950 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_in_get_bind_handle(PyObject *obj, void *closure)
42951 : {
42952 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(obj);
42953 : PyObject *py_bind_handle;
42954 0 : if (object->in.bind_handle == NULL) {
42955 0 : Py_RETURN_NONE;
42956 : }
42957 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
42958 0 : return py_bind_handle;
42959 : }
42960 :
42961 0 : static int py_drsuapi_DsReplicaGetInfo_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
42962 : {
42963 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
42964 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
42965 0 : if (value == NULL) {
42966 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
42967 0 : return -1;
42968 : }
42969 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
42970 0 : if (object->in.bind_handle == NULL) {
42971 0 : PyErr_NoMemory();
42972 0 : return -1;
42973 : }
42974 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
42975 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
42976 0 : PyErr_NoMemory();
42977 0 : return -1;
42978 : }
42979 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
42980 0 : return 0;
42981 : }
42982 :
42983 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_in_get_level(PyObject *obj, void *closure)
42984 : {
42985 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(obj);
42986 : PyObject *py_level;
42987 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
42988 0 : return py_level;
42989 : }
42990 :
42991 0 : static int py_drsuapi_DsReplicaGetInfo_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
42992 : {
42993 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
42994 0 : if (value == NULL) {
42995 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
42996 0 : return -1;
42997 : }
42998 : {
42999 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
43000 0 : if (PyLong_Check(value)) {
43001 : unsigned long long test_var;
43002 0 : test_var = PyLong_AsUnsignedLongLong(value);
43003 0 : if (PyErr_Occurred() != NULL) {
43004 0 : return -1;
43005 : }
43006 0 : if (test_var > uint_max) {
43007 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
43008 : PyLong_Type.tp_name, uint_max, test_var);
43009 0 : return -1;
43010 : }
43011 0 : object->in.level = test_var;
43012 : } else {
43013 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
43014 : PyLong_Type.tp_name);
43015 0 : return -1;
43016 : }
43017 : }
43018 0 : return 0;
43019 : }
43020 :
43021 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_in_get_req(PyObject *obj, void *closure)
43022 : {
43023 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(obj);
43024 : PyObject *py_req;
43025 0 : if (object->in.req == NULL) {
43026 0 : Py_RETURN_NONE;
43027 : }
43028 0 : py_req = pyrpc_import_union(&drsuapi_DsReplicaGetInfoRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsReplicaGetInfoRequest");
43029 0 : if (py_req == NULL) {
43030 0 : return NULL;
43031 : }
43032 0 : return py_req;
43033 : }
43034 :
43035 0 : static int py_drsuapi_DsReplicaGetInfo_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
43036 : {
43037 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
43038 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
43039 0 : if (value == NULL) {
43040 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
43041 0 : return -1;
43042 : }
43043 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
43044 0 : if (object->in.req == NULL) {
43045 0 : PyErr_NoMemory();
43046 0 : return -1;
43047 : }
43048 : {
43049 : union drsuapi_DsReplicaGetInfoRequest *req_switch_1;
43050 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");
43051 0 : if (req_switch_1 == NULL) {
43052 0 : return -1;
43053 : }
43054 0 : object->in.req = req_switch_1;
43055 : }
43056 0 : return 0;
43057 : }
43058 :
43059 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_out_get_info_type(PyObject *obj, void *closure)
43060 : {
43061 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(obj);
43062 : PyObject *py_info_type;
43063 0 : if (object->out.info_type == NULL) {
43064 0 : Py_RETURN_NONE;
43065 : }
43066 0 : py_info_type = PyLong_FromUnsignedLongLong((uint32_t)*object->out.info_type);
43067 0 : return py_info_type;
43068 : }
43069 :
43070 0 : static int py_drsuapi_DsReplicaGetInfo_out_set_info_type(PyObject *py_obj, PyObject *value, void *closure)
43071 : {
43072 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
43073 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info_type));
43074 0 : if (value == NULL) {
43075 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info_type");
43076 0 : return -1;
43077 : }
43078 0 : object->out.info_type = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info_type);
43079 0 : if (object->out.info_type == NULL) {
43080 0 : PyErr_NoMemory();
43081 0 : return -1;
43082 : }
43083 : {
43084 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.info_type));
43085 0 : if (PyLong_Check(value)) {
43086 : unsigned long long test_var;
43087 0 : test_var = PyLong_AsUnsignedLongLong(value);
43088 0 : if (PyErr_Occurred() != NULL) {
43089 0 : return -1;
43090 : }
43091 0 : if (test_var > uint_max) {
43092 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
43093 : PyLong_Type.tp_name, uint_max, test_var);
43094 0 : return -1;
43095 : }
43096 0 : *object->out.info_type = test_var;
43097 : } else {
43098 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
43099 : PyLong_Type.tp_name);
43100 0 : return -1;
43101 : }
43102 : }
43103 0 : return 0;
43104 : }
43105 :
43106 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_out_get_info(PyObject *obj, void *closure)
43107 : {
43108 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(obj);
43109 : PyObject *py_info;
43110 0 : if (object->out.info == NULL) {
43111 0 : Py_RETURN_NONE;
43112 : }
43113 0 : py_info = pyrpc_import_union(&drsuapi_DsReplicaInfo_Type, object->out.info, *object->out.info_type, object->out.info, "union drsuapi_DsReplicaInfo");
43114 0 : if (py_info == NULL) {
43115 0 : return NULL;
43116 : }
43117 0 : return py_info;
43118 : }
43119 :
43120 0 : static int py_drsuapi_DsReplicaGetInfo_out_set_info(PyObject *py_obj, PyObject *value, void *closure)
43121 : {
43122 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
43123 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.info));
43124 0 : if (value == NULL) {
43125 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.info");
43126 0 : return -1;
43127 : }
43128 0 : object->out.info = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.info);
43129 0 : if (object->out.info == NULL) {
43130 0 : PyErr_NoMemory();
43131 0 : return -1;
43132 : }
43133 : {
43134 : union drsuapi_DsReplicaInfo *info_switch_1;
43135 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");
43136 0 : if (info_switch_1 == NULL) {
43137 0 : return -1;
43138 : }
43139 0 : object->out.info = info_switch_1;
43140 : }
43141 0 : return 0;
43142 : }
43143 :
43144 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_get_result(PyObject *obj, void *closure)
43145 : {
43146 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(obj);
43147 : PyObject *py_result;
43148 0 : py_result = PyErr_FromWERROR(object->out.result);
43149 0 : return py_result;
43150 : }
43151 :
43152 0 : static int py_drsuapi_DsReplicaGetInfo_set_result(PyObject *py_obj, PyObject *value, void *closure)
43153 : {
43154 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
43155 0 : if (value == NULL) {
43156 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
43157 0 : return -1;
43158 : }
43159 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
43160 0 : return 0;
43161 : }
43162 :
43163 : static PyGetSetDef py_drsuapi_DsReplicaGetInfo_getsetters[] = {
43164 : {
43165 : .name = discard_const_p(char, "in_bind_handle"),
43166 : .get = py_drsuapi_DsReplicaGetInfo_in_get_bind_handle,
43167 : .set = py_drsuapi_DsReplicaGetInfo_in_set_bind_handle,
43168 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
43169 : },
43170 : {
43171 : .name = discard_const_p(char, "in_level"),
43172 : .get = py_drsuapi_DsReplicaGetInfo_in_get_level,
43173 : .set = py_drsuapi_DsReplicaGetInfo_in_set_level,
43174 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaGetInfoLevel")
43175 : },
43176 : {
43177 : .name = discard_const_p(char, "in_req"),
43178 : .get = py_drsuapi_DsReplicaGetInfo_in_get_req,
43179 : .set = py_drsuapi_DsReplicaGetInfo_in_set_req,
43180 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaGetInfoRequest")
43181 : },
43182 : {
43183 : .name = discard_const_p(char, "out_info_type"),
43184 : .get = py_drsuapi_DsReplicaGetInfo_out_get_info_type,
43185 : .set = py_drsuapi_DsReplicaGetInfo_out_set_info_type,
43186 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaInfoType")
43187 : },
43188 : {
43189 : .name = discard_const_p(char, "out_info"),
43190 : .get = py_drsuapi_DsReplicaGetInfo_out_get_info,
43191 : .set = py_drsuapi_DsReplicaGetInfo_out_set_info,
43192 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsReplicaInfo")
43193 : },
43194 : {
43195 : .name = discard_const_p(char, "result"),
43196 : .get = py_drsuapi_DsReplicaGetInfo_get_result,
43197 : .set = py_drsuapi_DsReplicaGetInfo_set_result,
43198 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
43199 : },
43200 : { .name = NULL }
43201 : };
43202 :
43203 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
43204 : {
43205 0 : PyObject *self = pytalloc_new(struct drsuapi_DsReplicaGetInfo, type);
43206 0 : struct drsuapi_DsReplicaGetInfo *_self = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(self);
43207 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
43208 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
43209 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsReplicaGetInfoRequest);
43210 0 : _self->out.info_type = talloc_zero(mem_ctx, enum drsuapi_DsReplicaInfoType);
43211 0 : _self->out.info = talloc_zero(mem_ctx, union drsuapi_DsReplicaInfo);
43212 0 : return self;
43213 : }
43214 :
43215 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
43216 : {
43217 :
43218 :
43219 0 : return PyLong_FromLong(19);
43220 : }
43221 :
43222 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
43223 : {
43224 0 : const struct ndr_interface_call *call = NULL;
43225 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
43226 0 : PyObject *ret = NULL;
43227 0 : struct ndr_push *push = NULL;
43228 : DATA_BLOB blob;
43229 : enum ndr_err_code err;
43230 :
43231 0 : if (ndr_table_drsuapi.num_calls < 20) {
43232 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaGetInfo_ndr_pack");
43233 0 : return NULL;
43234 : }
43235 0 : call = &ndr_table_drsuapi.calls[19];
43236 :
43237 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
43238 0 : if (push == NULL) {
43239 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
43240 0 : return NULL;
43241 : }
43242 :
43243 0 : push->flags |= ndr_push_flags;
43244 :
43245 0 : err = call->ndr_push(push, ndr_inout_flags, object);
43246 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
43247 0 : TALLOC_FREE(push);
43248 0 : PyErr_SetNdrError(err);
43249 0 : return NULL;
43250 : }
43251 0 : blob = ndr_push_blob(push);
43252 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
43253 0 : TALLOC_FREE(push);
43254 0 : return ret;
43255 : }
43256 :
43257 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
43258 : {
43259 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
43260 0 : PyObject *bigendian_obj = NULL;
43261 0 : PyObject *ndr64_obj = NULL;
43262 0 : uint32_t ndr_push_flags = 0;
43263 :
43264 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
43265 : discard_const_p(char *, kwnames),
43266 : &bigendian_obj,
43267 : &ndr64_obj)) {
43268 0 : return NULL;
43269 : }
43270 :
43271 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
43272 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
43273 : }
43274 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
43275 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
43276 : }
43277 :
43278 0 : return py_drsuapi_DsReplicaGetInfo_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
43279 : }
43280 :
43281 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
43282 : {
43283 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
43284 0 : PyObject *bigendian_obj = NULL;
43285 0 : PyObject *ndr64_obj = NULL;
43286 0 : uint32_t ndr_push_flags = 0;
43287 :
43288 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
43289 : discard_const_p(char *, kwnames),
43290 : &bigendian_obj,
43291 : &ndr64_obj)) {
43292 0 : return NULL;
43293 : }
43294 :
43295 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
43296 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
43297 : }
43298 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
43299 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
43300 : }
43301 :
43302 0 : return py_drsuapi_DsReplicaGetInfo_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
43303 : }
43304 :
43305 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
43306 : {
43307 0 : const struct ndr_interface_call *call = NULL;
43308 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
43309 0 : struct ndr_pull *pull = NULL;
43310 : enum ndr_err_code err;
43311 :
43312 0 : if (ndr_table_drsuapi.num_calls < 20) {
43313 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaGetInfo_ndr_unpack");
43314 0 : return NULL;
43315 : }
43316 0 : call = &ndr_table_drsuapi.calls[19];
43317 :
43318 0 : pull = ndr_pull_init_blob(blob, object);
43319 0 : if (pull == NULL) {
43320 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
43321 0 : return NULL;
43322 : }
43323 :
43324 0 : pull->flags |= ndr_pull_flags;
43325 :
43326 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
43327 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
43328 0 : TALLOC_FREE(pull);
43329 0 : PyErr_SetNdrError(err);
43330 0 : return NULL;
43331 : }
43332 0 : if (!allow_remaining) {
43333 : uint32_t highest_ofs;
43334 :
43335 0 : if (pull->offset > pull->relative_highest_offset) {
43336 0 : highest_ofs = pull->offset;
43337 : } else {
43338 0 : highest_ofs = pull->relative_highest_offset;
43339 : }
43340 0 : if (highest_ofs < pull->data_size) {
43341 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
43342 : "not all bytes consumed ofs[%u] size[%u]",
43343 : highest_ofs, pull->data_size);
43344 0 : TALLOC_FREE(pull);
43345 0 : PyErr_SetNdrError(err);
43346 0 : return NULL;
43347 : }
43348 : }
43349 :
43350 0 : TALLOC_FREE(pull);
43351 0 : Py_RETURN_NONE;
43352 : }
43353 :
43354 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
43355 : {
43356 : DATA_BLOB blob;
43357 0 : Py_ssize_t blob_length = 0;
43358 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
43359 0 : PyObject *bigendian_obj = NULL;
43360 0 : PyObject *ndr64_obj = NULL;
43361 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
43362 0 : PyObject *allow_remaining_obj = NULL;
43363 0 : bool allow_remaining = false;
43364 :
43365 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
43366 : discard_const_p(char *, kwnames),
43367 : &blob.data, &blob_length,
43368 : &bigendian_obj,
43369 : &ndr64_obj,
43370 : &allow_remaining_obj)) {
43371 0 : return NULL;
43372 : }
43373 0 : blob.length = blob_length;
43374 :
43375 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
43376 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
43377 : }
43378 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
43379 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
43380 : }
43381 :
43382 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
43383 0 : allow_remaining = true;
43384 : }
43385 :
43386 0 : return py_drsuapi_DsReplicaGetInfo_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
43387 : }
43388 :
43389 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
43390 : {
43391 : DATA_BLOB blob;
43392 0 : Py_ssize_t blob_length = 0;
43393 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
43394 0 : PyObject *bigendian_obj = NULL;
43395 0 : PyObject *ndr64_obj = NULL;
43396 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
43397 0 : PyObject *allow_remaining_obj = NULL;
43398 0 : bool allow_remaining = false;
43399 :
43400 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
43401 : discard_const_p(char *, kwnames),
43402 : &blob.data, &blob_length,
43403 : &bigendian_obj,
43404 : &ndr64_obj,
43405 : &allow_remaining_obj)) {
43406 0 : return NULL;
43407 : }
43408 0 : blob.length = blob_length;
43409 :
43410 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
43411 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
43412 : }
43413 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
43414 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
43415 : }
43416 :
43417 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
43418 0 : allow_remaining = true;
43419 : }
43420 :
43421 0 : return py_drsuapi_DsReplicaGetInfo_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
43422 : }
43423 :
43424 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
43425 : {
43426 0 : const struct ndr_interface_call *call = NULL;
43427 0 : struct drsuapi_DsReplicaGetInfo *object = (struct drsuapi_DsReplicaGetInfo *)pytalloc_get_ptr(py_obj);
43428 : PyObject *ret;
43429 : char *retstr;
43430 :
43431 0 : if (ndr_table_drsuapi.num_calls < 20) {
43432 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsReplicaGetInfo_ndr_print");
43433 0 : return NULL;
43434 : }
43435 0 : call = &ndr_table_drsuapi.calls[19];
43436 :
43437 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
43438 0 : ret = PyUnicode_FromString(retstr);
43439 0 : TALLOC_FREE(retstr);
43440 :
43441 0 : return ret;
43442 : }
43443 :
43444 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
43445 : {
43446 0 : return py_drsuapi_DsReplicaGetInfo_ndr_print(py_obj, "drsuapi_DsReplicaGetInfo_in", NDR_IN);
43447 : }
43448 :
43449 0 : static PyObject *py_drsuapi_DsReplicaGetInfo_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
43450 : {
43451 0 : return py_drsuapi_DsReplicaGetInfo_ndr_print(py_obj, "drsuapi_DsReplicaGetInfo_out", NDR_OUT);
43452 : }
43453 :
43454 : static PyMethodDef py_drsuapi_DsReplicaGetInfo_methods[] = {
43455 : { "opnum", (PyCFunction)py_drsuapi_DsReplicaGetInfo_ndr_opnum, METH_NOARGS|METH_CLASS,
43456 : "drsuapi.DsReplicaGetInfo.opnum() -> 19 (0x13) " },
43457 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfo_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
43458 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
43459 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfo_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
43460 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
43461 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfo_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
43462 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
43463 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsReplicaGetInfo_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
43464 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
43465 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsReplicaGetInfo_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
43466 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsReplicaGetInfo_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
43467 : { NULL, NULL, 0, NULL }
43468 : };
43469 :
43470 :
43471 : static PyTypeObject drsuapi_DsReplicaGetInfo_Type = {
43472 : PyVarObject_HEAD_INIT(NULL, 0)
43473 : .tp_name = "drsuapi.DsReplicaGetInfo",
43474 : .tp_getset = py_drsuapi_DsReplicaGetInfo_getsetters,
43475 : .tp_methods = py_drsuapi_DsReplicaGetInfo_methods,
43476 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
43477 : .tp_new = py_drsuapi_DsReplicaGetInfo_new,
43478 : };
43479 :
43480 18 : static bool pack_py_drsuapi_DsReplicaGetInfo_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsReplicaGetInfo *r)
43481 : {
43482 : PyObject *py_bind_handle;
43483 : PyObject *py_level;
43484 : PyObject *py_req;
43485 18 : const char *kwnames[] = {
43486 : "bind_handle", "level", "req", NULL
43487 : };
43488 :
43489 18 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsReplicaGetInfo", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
43490 0 : return false;
43491 : }
43492 :
43493 18 : if (py_bind_handle == NULL) {
43494 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
43495 0 : return false;
43496 : }
43497 18 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
43498 18 : if (r->in.bind_handle == NULL) {
43499 0 : PyErr_NoMemory();
43500 0 : return false;
43501 : }
43502 18 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
43503 18 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
43504 0 : PyErr_NoMemory();
43505 0 : return false;
43506 : }
43507 18 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
43508 18 : if (py_level == NULL) {
43509 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
43510 0 : return false;
43511 : }
43512 : {
43513 18 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
43514 18 : if (PyLong_Check(py_level)) {
43515 : unsigned long long test_var;
43516 18 : test_var = PyLong_AsUnsignedLongLong(py_level);
43517 18 : if (PyErr_Occurred() != NULL) {
43518 0 : return false;
43519 : }
43520 18 : if (test_var > uint_max) {
43521 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
43522 : PyLong_Type.tp_name, uint_max, test_var);
43523 0 : return false;
43524 : }
43525 18 : r->in.level = test_var;
43526 : } else {
43527 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
43528 : PyLong_Type.tp_name);
43529 0 : return false;
43530 : }
43531 : }
43532 18 : if (py_req == NULL) {
43533 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
43534 0 : return false;
43535 : }
43536 18 : r->in.req = talloc_ptrtype(r, r->in.req);
43537 18 : if (r->in.req == NULL) {
43538 0 : PyErr_NoMemory();
43539 0 : return false;
43540 : }
43541 : {
43542 : union drsuapi_DsReplicaGetInfoRequest *req_switch_1;
43543 18 : req_switch_1 = (union drsuapi_DsReplicaGetInfoRequest *)pyrpc_export_union(&drsuapi_DsReplicaGetInfoRequest_Type, r, r->in.level, py_req, "union drsuapi_DsReplicaGetInfoRequest");
43544 18 : if (req_switch_1 == NULL) {
43545 0 : return false;
43546 : }
43547 18 : r->in.req = req_switch_1;
43548 : }
43549 18 : return true;
43550 : }
43551 :
43552 18 : static PyObject *unpack_py_drsuapi_DsReplicaGetInfo_args_out(struct drsuapi_DsReplicaGetInfo *r)
43553 : {
43554 : PyObject *result;
43555 : PyObject *py_info_type;
43556 : PyObject *py_info;
43557 18 : result = PyTuple_New(2);
43558 18 : py_info_type = PyLong_FromUnsignedLongLong((uint32_t)*r->out.info_type);
43559 18 : PyTuple_SetItem(result, 0, py_info_type);
43560 18 : py_info = pyrpc_import_union(&drsuapi_DsReplicaInfo_Type, r->out.info, *r->out.info_type, r->out.info, "union drsuapi_DsReplicaInfo");
43561 18 : if (py_info == NULL) {
43562 0 : return NULL;
43563 : }
43564 18 : PyTuple_SetItem(result, 1, py_info);
43565 18 : if (!W_ERROR_IS_OK(r->out.result)) {
43566 0 : PyErr_SetWERROR(r->out.result);
43567 0 : return NULL;
43568 : }
43569 :
43570 18 : return result;
43571 : }
43572 :
43573 :
43574 0 : static PyObject *py_drsuapi_DsGetMemberships2_in_get_bind_handle(PyObject *obj, void *closure)
43575 : {
43576 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(obj);
43577 : PyObject *py_bind_handle;
43578 0 : if (object->in.bind_handle == NULL) {
43579 0 : Py_RETURN_NONE;
43580 : }
43581 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
43582 0 : return py_bind_handle;
43583 : }
43584 :
43585 0 : static int py_drsuapi_DsGetMemberships2_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
43586 : {
43587 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
43588 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
43589 0 : if (value == NULL) {
43590 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
43591 0 : return -1;
43592 : }
43593 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
43594 0 : if (object->in.bind_handle == NULL) {
43595 0 : PyErr_NoMemory();
43596 0 : return -1;
43597 : }
43598 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
43599 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
43600 0 : PyErr_NoMemory();
43601 0 : return -1;
43602 : }
43603 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
43604 0 : return 0;
43605 : }
43606 :
43607 0 : static PyObject *py_drsuapi_DsGetMemberships2_in_get_level(PyObject *obj, void *closure)
43608 : {
43609 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(obj);
43610 : PyObject *py_level;
43611 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
43612 0 : return py_level;
43613 : }
43614 :
43615 0 : static int py_drsuapi_DsGetMemberships2_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
43616 : {
43617 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
43618 0 : if (value == NULL) {
43619 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
43620 0 : return -1;
43621 : }
43622 : {
43623 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
43624 0 : if (PyLong_Check(value)) {
43625 : unsigned long long test_var;
43626 0 : test_var = PyLong_AsUnsignedLongLong(value);
43627 0 : if (PyErr_Occurred() != NULL) {
43628 0 : return -1;
43629 : }
43630 0 : if (test_var > uint_max) {
43631 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
43632 : PyLong_Type.tp_name, uint_max, test_var);
43633 0 : return -1;
43634 : }
43635 0 : object->in.level = test_var;
43636 : } else {
43637 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
43638 : PyLong_Type.tp_name);
43639 0 : return -1;
43640 : }
43641 : }
43642 0 : return 0;
43643 : }
43644 :
43645 0 : static PyObject *py_drsuapi_DsGetMemberships2_in_get_req(PyObject *obj, void *closure)
43646 : {
43647 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(obj);
43648 : PyObject *py_req;
43649 0 : if (object->in.req == NULL) {
43650 0 : Py_RETURN_NONE;
43651 : }
43652 0 : py_req = pyrpc_import_union(&drsuapi_DsGetMemberships2Request_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_DsGetMemberships2Request");
43653 0 : if (py_req == NULL) {
43654 0 : return NULL;
43655 : }
43656 0 : return py_req;
43657 : }
43658 :
43659 0 : static int py_drsuapi_DsGetMemberships2_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
43660 : {
43661 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
43662 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
43663 0 : if (value == NULL) {
43664 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
43665 0 : return -1;
43666 : }
43667 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
43668 0 : if (object->in.req == NULL) {
43669 0 : PyErr_NoMemory();
43670 0 : return -1;
43671 : }
43672 : {
43673 : union drsuapi_DsGetMemberships2Request *req_switch_1;
43674 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");
43675 0 : if (req_switch_1 == NULL) {
43676 0 : return -1;
43677 : }
43678 0 : object->in.req = req_switch_1;
43679 : }
43680 0 : return 0;
43681 : }
43682 :
43683 0 : static PyObject *py_drsuapi_DsGetMemberships2_out_get_level_out(PyObject *obj, void *closure)
43684 : {
43685 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(obj);
43686 : PyObject *py_level_out;
43687 0 : if (object->out.level_out == NULL) {
43688 0 : Py_RETURN_NONE;
43689 : }
43690 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
43691 0 : return py_level_out;
43692 : }
43693 :
43694 0 : static int py_drsuapi_DsGetMemberships2_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
43695 : {
43696 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
43697 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
43698 0 : if (value == NULL) {
43699 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
43700 0 : return -1;
43701 : }
43702 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
43703 0 : if (object->out.level_out == NULL) {
43704 0 : PyErr_NoMemory();
43705 0 : return -1;
43706 : }
43707 : {
43708 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
43709 0 : if (PyLong_Check(value)) {
43710 : unsigned long long test_var;
43711 0 : test_var = PyLong_AsUnsignedLongLong(value);
43712 0 : if (PyErr_Occurred() != NULL) {
43713 0 : return -1;
43714 : }
43715 0 : if (test_var > uint_max) {
43716 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
43717 : PyLong_Type.tp_name, uint_max, test_var);
43718 0 : return -1;
43719 : }
43720 0 : *object->out.level_out = test_var;
43721 : } else {
43722 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
43723 : PyLong_Type.tp_name);
43724 0 : return -1;
43725 : }
43726 : }
43727 0 : return 0;
43728 : }
43729 :
43730 0 : static PyObject *py_drsuapi_DsGetMemberships2_out_get_ctr(PyObject *obj, void *closure)
43731 : {
43732 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(obj);
43733 : PyObject *py_ctr;
43734 0 : if (object->out.ctr == NULL) {
43735 0 : Py_RETURN_NONE;
43736 : }
43737 0 : py_ctr = pyrpc_import_union(&drsuapi_DsGetMemberships2Ctr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_DsGetMemberships2Ctr");
43738 0 : if (py_ctr == NULL) {
43739 0 : return NULL;
43740 : }
43741 0 : return py_ctr;
43742 : }
43743 :
43744 0 : static int py_drsuapi_DsGetMemberships2_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
43745 : {
43746 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
43747 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
43748 0 : if (value == NULL) {
43749 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
43750 0 : return -1;
43751 : }
43752 0 : object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
43753 0 : if (object->out.ctr == NULL) {
43754 0 : PyErr_NoMemory();
43755 0 : return -1;
43756 : }
43757 : {
43758 : union drsuapi_DsGetMemberships2Ctr *ctr_switch_1;
43759 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");
43760 0 : if (ctr_switch_1 == NULL) {
43761 0 : return -1;
43762 : }
43763 0 : object->out.ctr = ctr_switch_1;
43764 : }
43765 0 : return 0;
43766 : }
43767 :
43768 0 : static PyObject *py_drsuapi_DsGetMemberships2_get_result(PyObject *obj, void *closure)
43769 : {
43770 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(obj);
43771 : PyObject *py_result;
43772 0 : py_result = PyErr_FromWERROR(object->out.result);
43773 0 : return py_result;
43774 : }
43775 :
43776 0 : static int py_drsuapi_DsGetMemberships2_set_result(PyObject *py_obj, PyObject *value, void *closure)
43777 : {
43778 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
43779 0 : if (value == NULL) {
43780 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
43781 0 : return -1;
43782 : }
43783 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
43784 0 : return 0;
43785 : }
43786 :
43787 : static PyGetSetDef py_drsuapi_DsGetMemberships2_getsetters[] = {
43788 : {
43789 : .name = discard_const_p(char, "in_bind_handle"),
43790 : .get = py_drsuapi_DsGetMemberships2_in_get_bind_handle,
43791 : .set = py_drsuapi_DsGetMemberships2_in_set_bind_handle,
43792 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
43793 : },
43794 : {
43795 : .name = discard_const_p(char, "in_level"),
43796 : .get = py_drsuapi_DsGetMemberships2_in_get_level,
43797 : .set = py_drsuapi_DsGetMemberships2_in_set_level,
43798 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
43799 : },
43800 : {
43801 : .name = discard_const_p(char, "in_req"),
43802 : .get = py_drsuapi_DsGetMemberships2_in_get_req,
43803 : .set = py_drsuapi_DsGetMemberships2_in_set_req,
43804 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMemberships2Request")
43805 : },
43806 : {
43807 : .name = discard_const_p(char, "out_level_out"),
43808 : .get = py_drsuapi_DsGetMemberships2_out_get_level_out,
43809 : .set = py_drsuapi_DsGetMemberships2_out_set_level_out,
43810 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
43811 : },
43812 : {
43813 : .name = discard_const_p(char, "out_ctr"),
43814 : .get = py_drsuapi_DsGetMemberships2_out_get_ctr,
43815 : .set = py_drsuapi_DsGetMemberships2_out_set_ctr,
43816 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_DsGetMemberships2Ctr")
43817 : },
43818 : {
43819 : .name = discard_const_p(char, "result"),
43820 : .get = py_drsuapi_DsGetMemberships2_get_result,
43821 : .set = py_drsuapi_DsGetMemberships2_set_result,
43822 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
43823 : },
43824 : { .name = NULL }
43825 : };
43826 :
43827 0 : static PyObject *py_drsuapi_DsGetMemberships2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
43828 : {
43829 0 : PyObject *self = pytalloc_new(struct drsuapi_DsGetMemberships2, type);
43830 0 : struct drsuapi_DsGetMemberships2 *_self = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(self);
43831 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
43832 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
43833 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Request);
43834 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
43835 0 : _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_DsGetMemberships2Ctr);
43836 0 : return self;
43837 : }
43838 :
43839 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
43840 : {
43841 :
43842 :
43843 0 : return PyLong_FromLong(21);
43844 : }
43845 :
43846 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
43847 : {
43848 0 : const struct ndr_interface_call *call = NULL;
43849 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
43850 0 : PyObject *ret = NULL;
43851 0 : struct ndr_push *push = NULL;
43852 : DATA_BLOB blob;
43853 : enum ndr_err_code err;
43854 :
43855 0 : if (ndr_table_drsuapi.num_calls < 22) {
43856 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships2_ndr_pack");
43857 0 : return NULL;
43858 : }
43859 0 : call = &ndr_table_drsuapi.calls[21];
43860 :
43861 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
43862 0 : if (push == NULL) {
43863 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
43864 0 : return NULL;
43865 : }
43866 :
43867 0 : push->flags |= ndr_push_flags;
43868 :
43869 0 : err = call->ndr_push(push, ndr_inout_flags, object);
43870 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
43871 0 : TALLOC_FREE(push);
43872 0 : PyErr_SetNdrError(err);
43873 0 : return NULL;
43874 : }
43875 0 : blob = ndr_push_blob(push);
43876 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
43877 0 : TALLOC_FREE(push);
43878 0 : return ret;
43879 : }
43880 :
43881 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
43882 : {
43883 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
43884 0 : PyObject *bigendian_obj = NULL;
43885 0 : PyObject *ndr64_obj = NULL;
43886 0 : uint32_t ndr_push_flags = 0;
43887 :
43888 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
43889 : discard_const_p(char *, kwnames),
43890 : &bigendian_obj,
43891 : &ndr64_obj)) {
43892 0 : return NULL;
43893 : }
43894 :
43895 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
43896 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
43897 : }
43898 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
43899 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
43900 : }
43901 :
43902 0 : return py_drsuapi_DsGetMemberships2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
43903 : }
43904 :
43905 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
43906 : {
43907 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
43908 0 : PyObject *bigendian_obj = NULL;
43909 0 : PyObject *ndr64_obj = NULL;
43910 0 : uint32_t ndr_push_flags = 0;
43911 :
43912 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
43913 : discard_const_p(char *, kwnames),
43914 : &bigendian_obj,
43915 : &ndr64_obj)) {
43916 0 : return NULL;
43917 : }
43918 :
43919 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
43920 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
43921 : }
43922 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
43923 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
43924 : }
43925 :
43926 0 : return py_drsuapi_DsGetMemberships2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
43927 : }
43928 :
43929 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
43930 : {
43931 0 : const struct ndr_interface_call *call = NULL;
43932 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
43933 0 : struct ndr_pull *pull = NULL;
43934 : enum ndr_err_code err;
43935 :
43936 0 : if (ndr_table_drsuapi.num_calls < 22) {
43937 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships2_ndr_unpack");
43938 0 : return NULL;
43939 : }
43940 0 : call = &ndr_table_drsuapi.calls[21];
43941 :
43942 0 : pull = ndr_pull_init_blob(blob, object);
43943 0 : if (pull == NULL) {
43944 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
43945 0 : return NULL;
43946 : }
43947 :
43948 0 : pull->flags |= ndr_pull_flags;
43949 :
43950 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
43951 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
43952 0 : TALLOC_FREE(pull);
43953 0 : PyErr_SetNdrError(err);
43954 0 : return NULL;
43955 : }
43956 0 : if (!allow_remaining) {
43957 : uint32_t highest_ofs;
43958 :
43959 0 : if (pull->offset > pull->relative_highest_offset) {
43960 0 : highest_ofs = pull->offset;
43961 : } else {
43962 0 : highest_ofs = pull->relative_highest_offset;
43963 : }
43964 0 : if (highest_ofs < pull->data_size) {
43965 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
43966 : "not all bytes consumed ofs[%u] size[%u]",
43967 : highest_ofs, pull->data_size);
43968 0 : TALLOC_FREE(pull);
43969 0 : PyErr_SetNdrError(err);
43970 0 : return NULL;
43971 : }
43972 : }
43973 :
43974 0 : TALLOC_FREE(pull);
43975 0 : Py_RETURN_NONE;
43976 : }
43977 :
43978 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
43979 : {
43980 : DATA_BLOB blob;
43981 0 : Py_ssize_t blob_length = 0;
43982 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
43983 0 : PyObject *bigendian_obj = NULL;
43984 0 : PyObject *ndr64_obj = NULL;
43985 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
43986 0 : PyObject *allow_remaining_obj = NULL;
43987 0 : bool allow_remaining = false;
43988 :
43989 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
43990 : discard_const_p(char *, kwnames),
43991 : &blob.data, &blob_length,
43992 : &bigendian_obj,
43993 : &ndr64_obj,
43994 : &allow_remaining_obj)) {
43995 0 : return NULL;
43996 : }
43997 0 : blob.length = blob_length;
43998 :
43999 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
44000 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
44001 : }
44002 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
44003 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
44004 : }
44005 :
44006 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
44007 0 : allow_remaining = true;
44008 : }
44009 :
44010 0 : return py_drsuapi_DsGetMemberships2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
44011 : }
44012 :
44013 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
44014 : {
44015 : DATA_BLOB blob;
44016 0 : Py_ssize_t blob_length = 0;
44017 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
44018 0 : PyObject *bigendian_obj = NULL;
44019 0 : PyObject *ndr64_obj = NULL;
44020 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
44021 0 : PyObject *allow_remaining_obj = NULL;
44022 0 : bool allow_remaining = false;
44023 :
44024 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
44025 : discard_const_p(char *, kwnames),
44026 : &blob.data, &blob_length,
44027 : &bigendian_obj,
44028 : &ndr64_obj,
44029 : &allow_remaining_obj)) {
44030 0 : return NULL;
44031 : }
44032 0 : blob.length = blob_length;
44033 :
44034 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
44035 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
44036 : }
44037 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
44038 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
44039 : }
44040 :
44041 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
44042 0 : allow_remaining = true;
44043 : }
44044 :
44045 0 : return py_drsuapi_DsGetMemberships2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
44046 : }
44047 :
44048 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
44049 : {
44050 0 : const struct ndr_interface_call *call = NULL;
44051 0 : struct drsuapi_DsGetMemberships2 *object = (struct drsuapi_DsGetMemberships2 *)pytalloc_get_ptr(py_obj);
44052 : PyObject *ret;
44053 : char *retstr;
44054 :
44055 0 : if (ndr_table_drsuapi.num_calls < 22) {
44056 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_DsGetMemberships2_ndr_print");
44057 0 : return NULL;
44058 : }
44059 0 : call = &ndr_table_drsuapi.calls[21];
44060 :
44061 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
44062 0 : ret = PyUnicode_FromString(retstr);
44063 0 : TALLOC_FREE(retstr);
44064 :
44065 0 : return ret;
44066 : }
44067 :
44068 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
44069 : {
44070 0 : return py_drsuapi_DsGetMemberships2_ndr_print(py_obj, "drsuapi_DsGetMemberships2_in", NDR_IN);
44071 : }
44072 :
44073 0 : static PyObject *py_drsuapi_DsGetMemberships2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
44074 : {
44075 0 : return py_drsuapi_DsGetMemberships2_ndr_print(py_obj, "drsuapi_DsGetMemberships2_out", NDR_OUT);
44076 : }
44077 :
44078 : static PyMethodDef py_drsuapi_DsGetMemberships2_methods[] = {
44079 : { "opnum", (PyCFunction)py_drsuapi_DsGetMemberships2_ndr_opnum, METH_NOARGS|METH_CLASS,
44080 : "drsuapi.DsGetMemberships2.opnum() -> 21 (0x15) " },
44081 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
44082 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
44083 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
44084 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
44085 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
44086 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
44087 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_DsGetMemberships2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
44088 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
44089 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_DsGetMemberships2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
44090 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_DsGetMemberships2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
44091 : { NULL, NULL, 0, NULL }
44092 : };
44093 :
44094 :
44095 : static PyTypeObject drsuapi_DsGetMemberships2_Type = {
44096 : PyVarObject_HEAD_INIT(NULL, 0)
44097 : .tp_name = "drsuapi.DsGetMemberships2",
44098 : .tp_getset = py_drsuapi_DsGetMemberships2_getsetters,
44099 : .tp_methods = py_drsuapi_DsGetMemberships2_methods,
44100 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
44101 : .tp_new = py_drsuapi_DsGetMemberships2_new,
44102 : };
44103 :
44104 0 : static bool pack_py_drsuapi_DsGetMemberships2_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_DsGetMemberships2 *r)
44105 : {
44106 : PyObject *py_bind_handle;
44107 : PyObject *py_level;
44108 : PyObject *py_req;
44109 0 : const char *kwnames[] = {
44110 : "bind_handle", "level", "req", NULL
44111 : };
44112 :
44113 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_DsGetMemberships2", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
44114 0 : return false;
44115 : }
44116 :
44117 0 : if (py_bind_handle == NULL) {
44118 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
44119 0 : return false;
44120 : }
44121 0 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
44122 0 : if (r->in.bind_handle == NULL) {
44123 0 : PyErr_NoMemory();
44124 0 : return false;
44125 : }
44126 0 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
44127 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
44128 0 : PyErr_NoMemory();
44129 0 : return false;
44130 : }
44131 0 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
44132 0 : if (py_level == NULL) {
44133 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
44134 0 : return false;
44135 : }
44136 : {
44137 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
44138 0 : if (PyLong_Check(py_level)) {
44139 : unsigned long long test_var;
44140 0 : test_var = PyLong_AsUnsignedLongLong(py_level);
44141 0 : if (PyErr_Occurred() != NULL) {
44142 0 : return false;
44143 : }
44144 0 : if (test_var > uint_max) {
44145 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
44146 : PyLong_Type.tp_name, uint_max, test_var);
44147 0 : return false;
44148 : }
44149 0 : r->in.level = test_var;
44150 : } else {
44151 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
44152 : PyLong_Type.tp_name);
44153 0 : return false;
44154 : }
44155 : }
44156 0 : if (py_req == NULL) {
44157 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
44158 0 : return false;
44159 : }
44160 0 : r->in.req = talloc_ptrtype(r, r->in.req);
44161 0 : if (r->in.req == NULL) {
44162 0 : PyErr_NoMemory();
44163 0 : return false;
44164 : }
44165 : {
44166 : union drsuapi_DsGetMemberships2Request *req_switch_1;
44167 0 : req_switch_1 = (union drsuapi_DsGetMemberships2Request *)pyrpc_export_union(&drsuapi_DsGetMemberships2Request_Type, r, r->in.level, py_req, "union drsuapi_DsGetMemberships2Request");
44168 0 : if (req_switch_1 == NULL) {
44169 0 : return false;
44170 : }
44171 0 : r->in.req = req_switch_1;
44172 : }
44173 0 : return true;
44174 : }
44175 :
44176 0 : static PyObject *unpack_py_drsuapi_DsGetMemberships2_args_out(struct drsuapi_DsGetMemberships2 *r)
44177 : {
44178 : PyObject *result;
44179 : PyObject *py_level_out;
44180 : PyObject *py_ctr;
44181 0 : result = PyTuple_New(2);
44182 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
44183 0 : PyTuple_SetItem(result, 0, py_level_out);
44184 0 : py_ctr = pyrpc_import_union(&drsuapi_DsGetMemberships2Ctr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_DsGetMemberships2Ctr");
44185 0 : if (py_ctr == NULL) {
44186 0 : return NULL;
44187 : }
44188 0 : PyTuple_SetItem(result, 1, py_ctr);
44189 0 : if (!W_ERROR_IS_OK(r->out.result)) {
44190 0 : PyErr_SetWERROR(r->out.result);
44191 0 : return NULL;
44192 : }
44193 :
44194 0 : return result;
44195 : }
44196 :
44197 :
44198 0 : static PyObject *py_drsuapi_QuerySitesByCost_in_get_bind_handle(PyObject *obj, void *closure)
44199 : {
44200 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(obj);
44201 : PyObject *py_bind_handle;
44202 0 : if (object->in.bind_handle == NULL) {
44203 0 : Py_RETURN_NONE;
44204 : }
44205 0 : py_bind_handle = pytalloc_reference_ex(policy_handle_Type, object->in.bind_handle, object->in.bind_handle);
44206 0 : return py_bind_handle;
44207 : }
44208 :
44209 0 : static int py_drsuapi_QuerySitesByCost_in_set_bind_handle(PyObject *py_obj, PyObject *value, void *closure)
44210 : {
44211 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44212 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.bind_handle));
44213 0 : if (value == NULL) {
44214 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.bind_handle");
44215 0 : return -1;
44216 : }
44217 0 : object->in.bind_handle = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.bind_handle);
44218 0 : if (object->in.bind_handle == NULL) {
44219 0 : PyErr_NoMemory();
44220 0 : return -1;
44221 : }
44222 0 : PY_CHECK_TYPE(policy_handle_Type, value, return -1;);
44223 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
44224 0 : PyErr_NoMemory();
44225 0 : return -1;
44226 : }
44227 0 : object->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(value);
44228 0 : return 0;
44229 : }
44230 :
44231 0 : static PyObject *py_drsuapi_QuerySitesByCost_in_get_level(PyObject *obj, void *closure)
44232 : {
44233 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(obj);
44234 : PyObject *py_level;
44235 0 : py_level = PyLong_FromUnsignedLongLong((uint32_t)object->in.level);
44236 0 : return py_level;
44237 : }
44238 :
44239 0 : static int py_drsuapi_QuerySitesByCost_in_set_level(PyObject *py_obj, PyObject *value, void *closure)
44240 : {
44241 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44242 0 : if (value == NULL) {
44243 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.level");
44244 0 : return -1;
44245 : }
44246 : {
44247 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.level));
44248 0 : if (PyLong_Check(value)) {
44249 : unsigned long long test_var;
44250 0 : test_var = PyLong_AsUnsignedLongLong(value);
44251 0 : if (PyErr_Occurred() != NULL) {
44252 0 : return -1;
44253 : }
44254 0 : if (test_var > uint_max) {
44255 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
44256 : PyLong_Type.tp_name, uint_max, test_var);
44257 0 : return -1;
44258 : }
44259 0 : object->in.level = test_var;
44260 : } else {
44261 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
44262 : PyLong_Type.tp_name);
44263 0 : return -1;
44264 : }
44265 : }
44266 0 : return 0;
44267 : }
44268 :
44269 0 : static PyObject *py_drsuapi_QuerySitesByCost_in_get_req(PyObject *obj, void *closure)
44270 : {
44271 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(obj);
44272 : PyObject *py_req;
44273 0 : if (object->in.req == NULL) {
44274 0 : Py_RETURN_NONE;
44275 : }
44276 0 : py_req = pyrpc_import_union(&drsuapi_QuerySitesByCostRequest_Type, object->in.req, object->in.level, object->in.req, "union drsuapi_QuerySitesByCostRequest");
44277 0 : if (py_req == NULL) {
44278 0 : return NULL;
44279 : }
44280 0 : return py_req;
44281 : }
44282 :
44283 0 : static int py_drsuapi_QuerySitesByCost_in_set_req(PyObject *py_obj, PyObject *value, void *closure)
44284 : {
44285 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44286 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.req));
44287 0 : if (value == NULL) {
44288 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.req");
44289 0 : return -1;
44290 : }
44291 0 : object->in.req = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.req);
44292 0 : if (object->in.req == NULL) {
44293 0 : PyErr_NoMemory();
44294 0 : return -1;
44295 : }
44296 : {
44297 : union drsuapi_QuerySitesByCostRequest *req_switch_1;
44298 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");
44299 0 : if (req_switch_1 == NULL) {
44300 0 : return -1;
44301 : }
44302 0 : object->in.req = req_switch_1;
44303 : }
44304 0 : return 0;
44305 : }
44306 :
44307 0 : static PyObject *py_drsuapi_QuerySitesByCost_out_get_level_out(PyObject *obj, void *closure)
44308 : {
44309 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(obj);
44310 : PyObject *py_level_out;
44311 0 : if (object->out.level_out == NULL) {
44312 0 : Py_RETURN_NONE;
44313 : }
44314 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*object->out.level_out);
44315 0 : return py_level_out;
44316 : }
44317 :
44318 0 : static int py_drsuapi_QuerySitesByCost_out_set_level_out(PyObject *py_obj, PyObject *value, void *closure)
44319 : {
44320 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44321 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.level_out));
44322 0 : if (value == NULL) {
44323 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.level_out");
44324 0 : return -1;
44325 : }
44326 0 : object->out.level_out = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.level_out);
44327 0 : if (object->out.level_out == NULL) {
44328 0 : PyErr_NoMemory();
44329 0 : return -1;
44330 : }
44331 : {
44332 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.level_out));
44333 0 : if (PyLong_Check(value)) {
44334 : unsigned long long test_var;
44335 0 : test_var = PyLong_AsUnsignedLongLong(value);
44336 0 : if (PyErr_Occurred() != NULL) {
44337 0 : return -1;
44338 : }
44339 0 : if (test_var > uint_max) {
44340 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
44341 : PyLong_Type.tp_name, uint_max, test_var);
44342 0 : return -1;
44343 : }
44344 0 : *object->out.level_out = test_var;
44345 : } else {
44346 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
44347 : PyLong_Type.tp_name);
44348 0 : return -1;
44349 : }
44350 : }
44351 0 : return 0;
44352 : }
44353 :
44354 0 : static PyObject *py_drsuapi_QuerySitesByCost_out_get_ctr(PyObject *obj, void *closure)
44355 : {
44356 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(obj);
44357 : PyObject *py_ctr;
44358 0 : if (object->out.ctr == NULL) {
44359 0 : Py_RETURN_NONE;
44360 : }
44361 0 : py_ctr = pyrpc_import_union(&drsuapi_QuerySitesByCostCtr_Type, object->out.ctr, *object->out.level_out, object->out.ctr, "union drsuapi_QuerySitesByCostCtr");
44362 0 : if (py_ctr == NULL) {
44363 0 : return NULL;
44364 : }
44365 0 : return py_ctr;
44366 : }
44367 :
44368 0 : static int py_drsuapi_QuerySitesByCost_out_set_ctr(PyObject *py_obj, PyObject *value, void *closure)
44369 : {
44370 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44371 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ctr));
44372 0 : if (value == NULL) {
44373 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ctr");
44374 0 : return -1;
44375 : }
44376 0 : object->out.ctr = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ctr);
44377 0 : if (object->out.ctr == NULL) {
44378 0 : PyErr_NoMemory();
44379 0 : return -1;
44380 : }
44381 : {
44382 : union drsuapi_QuerySitesByCostCtr *ctr_switch_1;
44383 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");
44384 0 : if (ctr_switch_1 == NULL) {
44385 0 : return -1;
44386 : }
44387 0 : object->out.ctr = ctr_switch_1;
44388 : }
44389 0 : return 0;
44390 : }
44391 :
44392 0 : static PyObject *py_drsuapi_QuerySitesByCost_get_result(PyObject *obj, void *closure)
44393 : {
44394 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(obj);
44395 : PyObject *py_result;
44396 0 : py_result = PyErr_FromWERROR(object->out.result);
44397 0 : return py_result;
44398 : }
44399 :
44400 0 : static int py_drsuapi_QuerySitesByCost_set_result(PyObject *py_obj, PyObject *value, void *closure)
44401 : {
44402 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44403 0 : if (value == NULL) {
44404 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
44405 0 : return -1;
44406 : }
44407 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
44408 0 : return 0;
44409 : }
44410 :
44411 : static PyGetSetDef py_drsuapi_QuerySitesByCost_getsetters[] = {
44412 : {
44413 : .name = discard_const_p(char, "in_bind_handle"),
44414 : .get = py_drsuapi_QuerySitesByCost_in_get_bind_handle,
44415 : .set = py_drsuapi_QuerySitesByCost_in_set_bind_handle,
44416 : .doc = discard_const_p(char, "PIDL-generated element of base type policy_handle")
44417 : },
44418 : {
44419 : .name = discard_const_p(char, "in_level"),
44420 : .get = py_drsuapi_QuerySitesByCost_in_get_level,
44421 : .set = py_drsuapi_QuerySitesByCost_in_set_level,
44422 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
44423 : },
44424 : {
44425 : .name = discard_const_p(char, "in_req"),
44426 : .get = py_drsuapi_QuerySitesByCost_in_get_req,
44427 : .set = py_drsuapi_QuerySitesByCost_in_set_req,
44428 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_QuerySitesByCostRequest")
44429 : },
44430 : {
44431 : .name = discard_const_p(char, "out_level_out"),
44432 : .get = py_drsuapi_QuerySitesByCost_out_get_level_out,
44433 : .set = py_drsuapi_QuerySitesByCost_out_set_level_out,
44434 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
44435 : },
44436 : {
44437 : .name = discard_const_p(char, "out_ctr"),
44438 : .get = py_drsuapi_QuerySitesByCost_out_get_ctr,
44439 : .set = py_drsuapi_QuerySitesByCost_out_set_ctr,
44440 : .doc = discard_const_p(char, "PIDL-generated element of base type drsuapi_QuerySitesByCostCtr")
44441 : },
44442 : {
44443 : .name = discard_const_p(char, "result"),
44444 : .get = py_drsuapi_QuerySitesByCost_get_result,
44445 : .set = py_drsuapi_QuerySitesByCost_set_result,
44446 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
44447 : },
44448 : { .name = NULL }
44449 : };
44450 :
44451 0 : static PyObject *py_drsuapi_QuerySitesByCost_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
44452 : {
44453 0 : PyObject *self = pytalloc_new(struct drsuapi_QuerySitesByCost, type);
44454 0 : struct drsuapi_QuerySitesByCost *_self = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(self);
44455 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
44456 0 : _self->in.bind_handle = talloc_zero(mem_ctx, struct policy_handle);
44457 0 : _self->in.req = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostRequest);
44458 0 : _self->out.level_out = talloc_zero(mem_ctx, uint32_t);
44459 0 : _self->out.ctr = talloc_zero(mem_ctx, union drsuapi_QuerySitesByCostCtr);
44460 0 : return self;
44461 : }
44462 :
44463 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
44464 : {
44465 :
44466 :
44467 0 : return PyLong_FromLong(24);
44468 : }
44469 :
44470 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_pack(PyObject *py_obj, int ndr_inout_flags, uint32_t ndr_push_flags)
44471 : {
44472 0 : const struct ndr_interface_call *call = NULL;
44473 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44474 0 : PyObject *ret = NULL;
44475 0 : struct ndr_push *push = NULL;
44476 : DATA_BLOB blob;
44477 : enum ndr_err_code err;
44478 :
44479 0 : if (ndr_table_drsuapi.num_calls < 25) {
44480 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_QuerySitesByCost_ndr_pack");
44481 0 : return NULL;
44482 : }
44483 0 : call = &ndr_table_drsuapi.calls[24];
44484 :
44485 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
44486 0 : if (push == NULL) {
44487 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
44488 0 : return NULL;
44489 : }
44490 :
44491 0 : push->flags |= ndr_push_flags;
44492 :
44493 0 : err = call->ndr_push(push, ndr_inout_flags, object);
44494 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
44495 0 : TALLOC_FREE(push);
44496 0 : PyErr_SetNdrError(err);
44497 0 : return NULL;
44498 : }
44499 0 : blob = ndr_push_blob(push);
44500 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
44501 0 : TALLOC_FREE(push);
44502 0 : return ret;
44503 : }
44504 :
44505 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
44506 : {
44507 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
44508 0 : PyObject *bigendian_obj = NULL;
44509 0 : PyObject *ndr64_obj = NULL;
44510 0 : uint32_t ndr_push_flags = 0;
44511 :
44512 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
44513 : discard_const_p(char *, kwnames),
44514 : &bigendian_obj,
44515 : &ndr64_obj)) {
44516 0 : return NULL;
44517 : }
44518 :
44519 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
44520 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
44521 : }
44522 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
44523 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
44524 : }
44525 :
44526 0 : return py_drsuapi_QuerySitesByCost_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
44527 : }
44528 :
44529 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
44530 : {
44531 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
44532 0 : PyObject *bigendian_obj = NULL;
44533 0 : PyObject *ndr64_obj = NULL;
44534 0 : uint32_t ndr_push_flags = 0;
44535 :
44536 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
44537 : discard_const_p(char *, kwnames),
44538 : &bigendian_obj,
44539 : &ndr64_obj)) {
44540 0 : return NULL;
44541 : }
44542 :
44543 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
44544 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
44545 : }
44546 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
44547 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
44548 : }
44549 :
44550 0 : return py_drsuapi_QuerySitesByCost_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
44551 : }
44552 :
44553 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, int ndr_inout_flags, uint32_t ndr_pull_flags, bool allow_remaining)
44554 : {
44555 0 : const struct ndr_interface_call *call = NULL;
44556 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44557 0 : struct ndr_pull *pull = NULL;
44558 : enum ndr_err_code err;
44559 :
44560 0 : if (ndr_table_drsuapi.num_calls < 25) {
44561 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_QuerySitesByCost_ndr_unpack");
44562 0 : return NULL;
44563 : }
44564 0 : call = &ndr_table_drsuapi.calls[24];
44565 :
44566 0 : pull = ndr_pull_init_blob(blob, object);
44567 0 : if (pull == NULL) {
44568 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
44569 0 : return NULL;
44570 : }
44571 :
44572 0 : pull->flags |= ndr_pull_flags;
44573 :
44574 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
44575 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
44576 0 : TALLOC_FREE(pull);
44577 0 : PyErr_SetNdrError(err);
44578 0 : return NULL;
44579 : }
44580 0 : if (!allow_remaining) {
44581 : uint32_t highest_ofs;
44582 :
44583 0 : if (pull->offset > pull->relative_highest_offset) {
44584 0 : highest_ofs = pull->offset;
44585 : } else {
44586 0 : highest_ofs = pull->relative_highest_offset;
44587 : }
44588 0 : if (highest_ofs < pull->data_size) {
44589 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
44590 : "not all bytes consumed ofs[%u] size[%u]",
44591 : highest_ofs, pull->data_size);
44592 0 : TALLOC_FREE(pull);
44593 0 : PyErr_SetNdrError(err);
44594 0 : return NULL;
44595 : }
44596 : }
44597 :
44598 0 : TALLOC_FREE(pull);
44599 0 : Py_RETURN_NONE;
44600 : }
44601 :
44602 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
44603 : {
44604 : DATA_BLOB blob;
44605 0 : Py_ssize_t blob_length = 0;
44606 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
44607 0 : PyObject *bigendian_obj = NULL;
44608 0 : PyObject *ndr64_obj = NULL;
44609 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
44610 0 : PyObject *allow_remaining_obj = NULL;
44611 0 : bool allow_remaining = false;
44612 :
44613 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
44614 : discard_const_p(char *, kwnames),
44615 : &blob.data, &blob_length,
44616 : &bigendian_obj,
44617 : &ndr64_obj,
44618 : &allow_remaining_obj)) {
44619 0 : return NULL;
44620 : }
44621 0 : blob.length = blob_length;
44622 :
44623 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
44624 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
44625 : }
44626 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
44627 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
44628 : }
44629 :
44630 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
44631 0 : allow_remaining = true;
44632 : }
44633 :
44634 0 : return py_drsuapi_QuerySitesByCost_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
44635 : }
44636 :
44637 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
44638 : {
44639 : DATA_BLOB blob;
44640 0 : Py_ssize_t blob_length = 0;
44641 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
44642 0 : PyObject *bigendian_obj = NULL;
44643 0 : PyObject *ndr64_obj = NULL;
44644 0 : uint32_t ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
44645 0 : PyObject *allow_remaining_obj = NULL;
44646 0 : bool allow_remaining = false;
44647 :
44648 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
44649 : discard_const_p(char *, kwnames),
44650 : &blob.data, &blob_length,
44651 : &bigendian_obj,
44652 : &ndr64_obj,
44653 : &allow_remaining_obj)) {
44654 0 : return NULL;
44655 : }
44656 0 : blob.length = blob_length;
44657 :
44658 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
44659 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
44660 : }
44661 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
44662 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
44663 : }
44664 :
44665 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
44666 0 : allow_remaining = true;
44667 : }
44668 :
44669 0 : return py_drsuapi_QuerySitesByCost_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
44670 : }
44671 :
44672 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_print(PyObject *py_obj, const char *name, int ndr_inout_flags)
44673 : {
44674 0 : const struct ndr_interface_call *call = NULL;
44675 0 : struct drsuapi_QuerySitesByCost *object = (struct drsuapi_QuerySitesByCost *)pytalloc_get_ptr(py_obj);
44676 : PyObject *ret;
44677 : char *retstr;
44678 :
44679 0 : if (ndr_table_drsuapi.num_calls < 25) {
44680 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_drsuapi_QuerySitesByCost_ndr_print");
44681 0 : return NULL;
44682 : }
44683 0 : call = &ndr_table_drsuapi.calls[24];
44684 :
44685 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
44686 0 : ret = PyUnicode_FromString(retstr);
44687 0 : TALLOC_FREE(retstr);
44688 :
44689 0 : return ret;
44690 : }
44691 :
44692 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
44693 : {
44694 0 : return py_drsuapi_QuerySitesByCost_ndr_print(py_obj, "drsuapi_QuerySitesByCost_in", NDR_IN);
44695 : }
44696 :
44697 0 : static PyObject *py_drsuapi_QuerySitesByCost_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
44698 : {
44699 0 : return py_drsuapi_QuerySitesByCost_ndr_print(py_obj, "drsuapi_QuerySitesByCost_out", NDR_OUT);
44700 : }
44701 :
44702 : static PyMethodDef py_drsuapi_QuerySitesByCost_methods[] = {
44703 : { "opnum", (PyCFunction)py_drsuapi_QuerySitesByCost_ndr_opnum, METH_NOARGS|METH_CLASS,
44704 : "drsuapi.QuerySitesByCost.opnum() -> 24 (0x18) " },
44705 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCost_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
44706 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
44707 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCost_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
44708 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
44709 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCost_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
44710 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
44711 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_drsuapi_QuerySitesByCost_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
44712 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
44713 : { "__ndr_print_in__", (PyCFunction)py_drsuapi_QuerySitesByCost_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
44714 : { "__ndr_print_out__", (PyCFunction)py_drsuapi_QuerySitesByCost_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
44715 : { NULL, NULL, 0, NULL }
44716 : };
44717 :
44718 :
44719 : static PyTypeObject drsuapi_QuerySitesByCost_Type = {
44720 : PyVarObject_HEAD_INIT(NULL, 0)
44721 : .tp_name = "drsuapi.QuerySitesByCost",
44722 : .tp_getset = py_drsuapi_QuerySitesByCost_getsetters,
44723 : .tp_methods = py_drsuapi_QuerySitesByCost_methods,
44724 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
44725 : .tp_new = py_drsuapi_QuerySitesByCost_new,
44726 : };
44727 :
44728 0 : static bool pack_py_drsuapi_QuerySitesByCost_args_in(PyObject *args, PyObject *kwargs, struct drsuapi_QuerySitesByCost *r)
44729 : {
44730 : PyObject *py_bind_handle;
44731 : PyObject *py_level;
44732 : PyObject *py_req;
44733 0 : const char *kwnames[] = {
44734 : "bind_handle", "level", "req", NULL
44735 : };
44736 :
44737 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:drsuapi_QuerySitesByCost", discard_const_p(char *, kwnames), &py_bind_handle, &py_level, &py_req)) {
44738 0 : return false;
44739 : }
44740 :
44741 0 : if (py_bind_handle == NULL) {
44742 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.bind_handle");
44743 0 : return false;
44744 : }
44745 0 : r->in.bind_handle = talloc_ptrtype(r, r->in.bind_handle);
44746 0 : if (r->in.bind_handle == NULL) {
44747 0 : PyErr_NoMemory();
44748 0 : return false;
44749 : }
44750 0 : PY_CHECK_TYPE(policy_handle_Type, py_bind_handle, return false;);
44751 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_bind_handle)) == NULL) {
44752 0 : PyErr_NoMemory();
44753 0 : return false;
44754 : }
44755 0 : r->in.bind_handle = (struct policy_handle *)pytalloc_get_ptr(py_bind_handle);
44756 0 : if (py_level == NULL) {
44757 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.level");
44758 0 : return false;
44759 : }
44760 : {
44761 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.level));
44762 0 : if (PyLong_Check(py_level)) {
44763 : unsigned long long test_var;
44764 0 : test_var = PyLong_AsUnsignedLongLong(py_level);
44765 0 : if (PyErr_Occurred() != NULL) {
44766 0 : return false;
44767 : }
44768 0 : if (test_var > uint_max) {
44769 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
44770 : PyLong_Type.tp_name, uint_max, test_var);
44771 0 : return false;
44772 : }
44773 0 : r->in.level = test_var;
44774 : } else {
44775 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
44776 : PyLong_Type.tp_name);
44777 0 : return false;
44778 : }
44779 : }
44780 0 : if (py_req == NULL) {
44781 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.req");
44782 0 : return false;
44783 : }
44784 0 : r->in.req = talloc_ptrtype(r, r->in.req);
44785 0 : if (r->in.req == NULL) {
44786 0 : PyErr_NoMemory();
44787 0 : return false;
44788 : }
44789 : {
44790 : union drsuapi_QuerySitesByCostRequest *req_switch_1;
44791 0 : req_switch_1 = (union drsuapi_QuerySitesByCostRequest *)pyrpc_export_union(&drsuapi_QuerySitesByCostRequest_Type, r, r->in.level, py_req, "union drsuapi_QuerySitesByCostRequest");
44792 0 : if (req_switch_1 == NULL) {
44793 0 : return false;
44794 : }
44795 0 : r->in.req = req_switch_1;
44796 : }
44797 0 : return true;
44798 : }
44799 :
44800 0 : static PyObject *unpack_py_drsuapi_QuerySitesByCost_args_out(struct drsuapi_QuerySitesByCost *r)
44801 : {
44802 : PyObject *result;
44803 : PyObject *py_level_out;
44804 : PyObject *py_ctr;
44805 0 : result = PyTuple_New(2);
44806 0 : py_level_out = PyLong_FromUnsignedLongLong((uint32_t)*r->out.level_out);
44807 0 : PyTuple_SetItem(result, 0, py_level_out);
44808 0 : py_ctr = pyrpc_import_union(&drsuapi_QuerySitesByCostCtr_Type, r->out.ctr, *r->out.level_out, r->out.ctr, "union drsuapi_QuerySitesByCostCtr");
44809 0 : if (py_ctr == NULL) {
44810 0 : return NULL;
44811 : }
44812 0 : PyTuple_SetItem(result, 1, py_ctr);
44813 0 : if (!W_ERROR_IS_OK(r->out.result)) {
44814 0 : PyErr_SetWERROR(r->out.result);
44815 0 : return NULL;
44816 : }
44817 :
44818 0 : return result;
44819 : }
44820 :
44821 : const struct PyNdrRpcMethodDef py_ndr_drsuapi_methods[] = {
44822 : { "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 },
44823 : { "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 },
44824 : { "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 },
44825 : { "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 },
44826 : { "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 },
44827 : { "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 },
44828 : { "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 },
44829 : { "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 },
44830 : { "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 },
44831 : { "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 },
44832 : { "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 },
44833 : { "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 },
44834 : { "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 },
44835 : { "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 },
44836 : { "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 },
44837 : { "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 },
44838 : { "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 },
44839 : { "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 },
44840 : { "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 },
44841 : {0}
44842 : };
44843 :
44844 1819 : static PyObject *interface_drsuapi_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
44845 : {
44846 1819 : return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_drsuapi);
44847 : }
44848 :
44849 : #define PY_DOC_DRSUAPI "Active Directory Replication"
44850 : static PyTypeObject drsuapi_InterfaceType = {
44851 : PyVarObject_HEAD_INIT(NULL, 0)
44852 : .tp_name = "drsuapi.drsuapi",
44853 : .tp_basicsize = sizeof(dcerpc_InterfaceObject),
44854 : .tp_doc = "drsuapi(binding, lp_ctx=None, credentials=None) -> connection\n"
44855 : "\n"
44856 : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
44857 : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
44858 : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_DRSUAPI,
44859 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
44860 : .tp_new = interface_drsuapi_new,
44861 : };
44862 :
44863 0 : static PyObject *syntax_drsuapi_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
44864 : {
44865 0 : return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_drsuapi.syntax_id);
44866 : }
44867 :
44868 : #define PY_DOC_DRSUAPI_SYNTAX "Active Directory Replication"
44869 : static PyTypeObject drsuapi_SyntaxType = {
44870 : PyVarObject_HEAD_INIT(NULL, 0)
44871 : .tp_name = "drsuapi.drsuapi_abstract_syntax",
44872 : .tp_doc = "drsuapi_abstract_syntax()\n"PY_DOC_DRSUAPI_SYNTAX,
44873 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
44874 : .tp_new = syntax_drsuapi_new,
44875 : };
44876 :
44877 : static PyMethodDef drsuapi_methods[] = {
44878 : { NULL, NULL, 0, NULL }
44879 : };
44880 :
44881 : static struct PyModuleDef moduledef = {
44882 : PyModuleDef_HEAD_INIT,
44883 : .m_name = "drsuapi",
44884 : .m_doc = "drsuapi DCE/RPC",
44885 : .m_size = -1,
44886 : .m_methods = drsuapi_methods,
44887 : };
44888 3505 : MODULE_INIT_FUNC(drsuapi)
44889 : {
44890 3505 : PyObject *m = NULL;
44891 3505 : PyObject *dep_samba_dcerpc_security = NULL;
44892 3505 : PyObject *dep_samba_dcerpc_misc = NULL;
44893 3505 : PyObject *dep_samba_dcerpc_lsa = NULL;
44894 3505 : PyObject *dep_samba_dcerpc_samr = NULL;
44895 3505 : PyObject *dep_talloc = NULL;
44896 3505 : PyObject *dep_samba_dcerpc_base = NULL;
44897 :
44898 3505 : dep_samba_dcerpc_security = PyImport_ImportModule("samba.dcerpc.security");
44899 3505 : if (dep_samba_dcerpc_security == NULL)
44900 0 : goto out;
44901 :
44902 3505 : dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
44903 3505 : if (dep_samba_dcerpc_misc == NULL)
44904 0 : goto out;
44905 :
44906 3505 : dep_samba_dcerpc_lsa = PyImport_ImportModule("samba.dcerpc.lsa");
44907 3505 : if (dep_samba_dcerpc_lsa == NULL)
44908 0 : goto out;
44909 :
44910 3505 : dep_samba_dcerpc_samr = PyImport_ImportModule("samba.dcerpc.samr");
44911 3505 : if (dep_samba_dcerpc_samr == NULL)
44912 0 : goto out;
44913 :
44914 3505 : dep_talloc = PyImport_ImportModule("talloc");
44915 3505 : if (dep_talloc == NULL)
44916 0 : goto out;
44917 :
44918 3505 : dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
44919 3505 : if (dep_samba_dcerpc_base == NULL)
44920 0 : goto out;
44921 :
44922 3505 : GUID_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "GUID");
44923 3505 : if (GUID_Type == NULL)
44924 0 : goto out;
44925 :
44926 3505 : BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
44927 3505 : if (BaseObject_Type == NULL)
44928 0 : goto out;
44929 :
44930 3505 : dom_sid_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_security, "dom_sid");
44931 3505 : if (dom_sid_Type == NULL)
44932 0 : goto out;
44933 :
44934 3505 : lsa_String_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_lsa, "String");
44935 3505 : if (lsa_String_Type == NULL)
44936 0 : goto out;
44937 :
44938 3505 : policy_handle_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "policy_handle");
44939 3505 : if (policy_handle_Type == NULL)
44940 0 : goto out;
44941 :
44942 3505 : ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
44943 3505 : if (ClientConnection_Type == NULL)
44944 0 : goto out;
44945 :
44946 3505 : ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
44947 3505 : if (ndr_syntax_id_Type == NULL)
44948 0 : goto out;
44949 :
44950 3505 : drsuapi_DsBindInfo24_Type.tp_base = BaseObject_Type;
44951 3505 : drsuapi_DsBindInfo24_Type.tp_basicsize = pytalloc_BaseObject_size();
44952 :
44953 3505 : drsuapi_DsBindInfo28_Type.tp_base = BaseObject_Type;
44954 3505 : drsuapi_DsBindInfo28_Type.tp_basicsize = pytalloc_BaseObject_size();
44955 :
44956 3505 : drsuapi_DsBindInfo32_Type.tp_base = BaseObject_Type;
44957 3505 : drsuapi_DsBindInfo32_Type.tp_basicsize = pytalloc_BaseObject_size();
44958 :
44959 3505 : drsuapi_DsBindInfo48_Type.tp_base = BaseObject_Type;
44960 3505 : drsuapi_DsBindInfo48_Type.tp_basicsize = pytalloc_BaseObject_size();
44961 :
44962 3505 : drsuapi_DsBindInfo52_Type.tp_base = BaseObject_Type;
44963 3505 : drsuapi_DsBindInfo52_Type.tp_basicsize = pytalloc_BaseObject_size();
44964 :
44965 3505 : drsuapi_DsBindInfoFallBack_Type.tp_base = BaseObject_Type;
44966 3505 : drsuapi_DsBindInfoFallBack_Type.tp_basicsize = pytalloc_BaseObject_size();
44967 :
44968 3505 : drsuapi_DsBindInfo_Type.tp_base = BaseObject_Type;
44969 3505 : drsuapi_DsBindInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
44970 :
44971 3505 : drsuapi_DsBindInfoCtr_Type.tp_base = BaseObject_Type;
44972 3505 : drsuapi_DsBindInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
44973 :
44974 3505 : drsuapi_DsReplicaObjectIdentifier_Type.tp_base = BaseObject_Type;
44975 3505 : drsuapi_DsReplicaObjectIdentifier_Type.tp_basicsize = pytalloc_BaseObject_size();
44976 :
44977 3505 : drsuapi_DsReplicaSyncRequest1_Type.tp_base = BaseObject_Type;
44978 3505 : drsuapi_DsReplicaSyncRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
44979 :
44980 3505 : drsuapi_DsReplicaSyncRequest_Type.tp_base = BaseObject_Type;
44981 3505 : drsuapi_DsReplicaSyncRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
44982 :
44983 3505 : drsuapi_DsReplicaHighWaterMark_Type.tp_base = BaseObject_Type;
44984 3505 : drsuapi_DsReplicaHighWaterMark_Type.tp_basicsize = pytalloc_BaseObject_size();
44985 :
44986 3505 : drsuapi_DsReplicaCursor_Type.tp_base = BaseObject_Type;
44987 3505 : drsuapi_DsReplicaCursor_Type.tp_basicsize = pytalloc_BaseObject_size();
44988 :
44989 3505 : drsuapi_DsReplicaCursorCtrEx_Type.tp_base = BaseObject_Type;
44990 3505 : drsuapi_DsReplicaCursorCtrEx_Type.tp_basicsize = pytalloc_BaseObject_size();
44991 :
44992 3505 : drsuapi_DsGetNCChangesRequest5_Type.tp_base = BaseObject_Type;
44993 3505 : drsuapi_DsGetNCChangesRequest5_Type.tp_basicsize = pytalloc_BaseObject_size();
44994 :
44995 3505 : drsuapi_DsReplicaOID_Type.tp_base = BaseObject_Type;
44996 3505 : drsuapi_DsReplicaOID_Type.tp_basicsize = pytalloc_BaseObject_size();
44997 :
44998 3505 : drsuapi_DsReplicaOIDMapping_Type.tp_base = BaseObject_Type;
44999 3505 : drsuapi_DsReplicaOIDMapping_Type.tp_basicsize = pytalloc_BaseObject_size();
45000 :
45001 3505 : drsuapi_DsReplicaOIDMapping_Ctr_Type.tp_base = BaseObject_Type;
45002 3505 : drsuapi_DsReplicaOIDMapping_Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
45003 :
45004 3505 : drsuapi_DsPartialAttributeSet_Type.tp_base = BaseObject_Type;
45005 3505 : drsuapi_DsPartialAttributeSet_Type.tp_basicsize = pytalloc_BaseObject_size();
45006 :
45007 3505 : drsuapi_DsGetNCChangesRequest8_Type.tp_base = BaseObject_Type;
45008 3505 : drsuapi_DsGetNCChangesRequest8_Type.tp_basicsize = pytalloc_BaseObject_size();
45009 :
45010 3505 : drsuapi_DsGetNCChangesRequest10_Type.tp_base = BaseObject_Type;
45011 3505 : drsuapi_DsGetNCChangesRequest10_Type.tp_basicsize = pytalloc_BaseObject_size();
45012 :
45013 3505 : drsuapi_DsGetNCChangesRequest_Type.tp_base = BaseObject_Type;
45014 3505 : drsuapi_DsGetNCChangesRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45015 :
45016 3505 : drsuapi_DsReplicaCursor2_Type.tp_base = BaseObject_Type;
45017 3505 : drsuapi_DsReplicaCursor2_Type.tp_basicsize = pytalloc_BaseObject_size();
45018 :
45019 3505 : drsuapi_DsReplicaCursor2CtrEx_Type.tp_base = BaseObject_Type;
45020 3505 : drsuapi_DsReplicaCursor2CtrEx_Type.tp_basicsize = pytalloc_BaseObject_size();
45021 :
45022 3505 : drsuapi_DsAttributeValue_Type.tp_base = BaseObject_Type;
45023 3505 : drsuapi_DsAttributeValue_Type.tp_basicsize = pytalloc_BaseObject_size();
45024 :
45025 3505 : drsuapi_DsAttributeValueCtr_Type.tp_base = BaseObject_Type;
45026 3505 : drsuapi_DsAttributeValueCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45027 :
45028 3505 : drsuapi_DsReplicaObjectIdentifier3_Type.tp_base = BaseObject_Type;
45029 3505 : drsuapi_DsReplicaObjectIdentifier3_Type.tp_basicsize = pytalloc_BaseObject_size();
45030 :
45031 3505 : drsuapi_DsReplicaObjectIdentifier3Binary_Type.tp_base = BaseObject_Type;
45032 3505 : drsuapi_DsReplicaObjectIdentifier3Binary_Type.tp_basicsize = pytalloc_BaseObject_size();
45033 :
45034 3505 : drsuapi_DsReplicaAttribute_Type.tp_base = BaseObject_Type;
45035 3505 : drsuapi_DsReplicaAttribute_Type.tp_basicsize = pytalloc_BaseObject_size();
45036 :
45037 3505 : drsuapi_DsReplicaAttributeCtr_Type.tp_base = BaseObject_Type;
45038 3505 : drsuapi_DsReplicaAttributeCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45039 :
45040 3505 : drsuapi_DsReplicaObject_Type.tp_base = BaseObject_Type;
45041 3505 : drsuapi_DsReplicaObject_Type.tp_basicsize = pytalloc_BaseObject_size();
45042 :
45043 3505 : drsuapi_DsReplicaMetaData_Type.tp_base = BaseObject_Type;
45044 3505 : drsuapi_DsReplicaMetaData_Type.tp_basicsize = pytalloc_BaseObject_size();
45045 :
45046 3505 : drsuapi_DsReplicaMetaDataCtr_Type.tp_base = BaseObject_Type;
45047 3505 : drsuapi_DsReplicaMetaDataCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45048 :
45049 3505 : drsuapi_DsReplicaObjectListItemEx_Type.tp_base = BaseObject_Type;
45050 3505 : drsuapi_DsReplicaObjectListItemEx_Type.tp_basicsize = pytalloc_BaseObject_size();
45051 :
45052 3505 : drsuapi_DsGetNCChangesCtr1_Type.tp_base = BaseObject_Type;
45053 3505 : drsuapi_DsGetNCChangesCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
45054 :
45055 3505 : drsuapi_DsReplicaLinkedAttribute_Type.tp_base = BaseObject_Type;
45056 3505 : drsuapi_DsReplicaLinkedAttribute_Type.tp_basicsize = pytalloc_BaseObject_size();
45057 :
45058 3505 : drsuapi_DsGetNCChangesCtr6_Type.tp_base = BaseObject_Type;
45059 3505 : drsuapi_DsGetNCChangesCtr6_Type.tp_basicsize = pytalloc_BaseObject_size();
45060 :
45061 3505 : drsuapi_DsGetNCChangesCtr1TS_Type.tp_base = BaseObject_Type;
45062 3505 : drsuapi_DsGetNCChangesCtr1TS_Type.tp_basicsize = pytalloc_BaseObject_size();
45063 :
45064 3505 : drsuapi_DsGetNCChangesCtr6TS_Type.tp_base = BaseObject_Type;
45065 3505 : drsuapi_DsGetNCChangesCtr6TS_Type.tp_basicsize = pytalloc_BaseObject_size();
45066 :
45067 3505 : drsuapi_DsGetNCChangesMSZIPCtr1_Type.tp_base = BaseObject_Type;
45068 3505 : drsuapi_DsGetNCChangesMSZIPCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
45069 :
45070 3505 : drsuapi_DsGetNCChangesMSZIPCtr6_Type.tp_base = BaseObject_Type;
45071 3505 : drsuapi_DsGetNCChangesMSZIPCtr6_Type.tp_basicsize = pytalloc_BaseObject_size();
45072 :
45073 3505 : drsuapi_DsGetNCChangesXPRESSCtr1_Type.tp_base = BaseObject_Type;
45074 3505 : drsuapi_DsGetNCChangesXPRESSCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
45075 :
45076 3505 : drsuapi_DsGetNCChangesXPRESSCtr6_Type.tp_base = BaseObject_Type;
45077 3505 : drsuapi_DsGetNCChangesXPRESSCtr6_Type.tp_basicsize = pytalloc_BaseObject_size();
45078 :
45079 3505 : drsuapi_DsGetNCChangesCompressedCtr_Type.tp_base = BaseObject_Type;
45080 3505 : drsuapi_DsGetNCChangesCompressedCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45081 :
45082 3505 : drsuapi_DsGetNCChangesCtr2_Type.tp_base = BaseObject_Type;
45083 3505 : drsuapi_DsGetNCChangesCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
45084 :
45085 3505 : drsuapi_DsGetNCChangesCtr7_Type.tp_base = BaseObject_Type;
45086 3505 : drsuapi_DsGetNCChangesCtr7_Type.tp_basicsize = pytalloc_BaseObject_size();
45087 :
45088 3505 : drsuapi_DsGetNCChangesCtr_Type.tp_base = BaseObject_Type;
45089 3505 : drsuapi_DsGetNCChangesCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45090 :
45091 3505 : drsuapi_DsReplicaUpdateRefsRequest1_Type.tp_base = BaseObject_Type;
45092 3505 : drsuapi_DsReplicaUpdateRefsRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45093 :
45094 3505 : drsuapi_DsReplicaUpdateRefsRequest_Type.tp_base = BaseObject_Type;
45095 3505 : drsuapi_DsReplicaUpdateRefsRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45096 :
45097 3505 : drsuapi_DsReplicaAddRequest1_Type.tp_base = BaseObject_Type;
45098 3505 : drsuapi_DsReplicaAddRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45099 :
45100 3505 : drsuapi_DsReplicaAddRequest2_Type.tp_base = BaseObject_Type;
45101 3505 : drsuapi_DsReplicaAddRequest2_Type.tp_basicsize = pytalloc_BaseObject_size();
45102 :
45103 3505 : drsuapi_DsReplicaAddRequest_Type.tp_base = BaseObject_Type;
45104 3505 : drsuapi_DsReplicaAddRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45105 :
45106 3505 : drsuapi_DsReplicaDelRequest1_Type.tp_base = BaseObject_Type;
45107 3505 : drsuapi_DsReplicaDelRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45108 :
45109 3505 : drsuapi_DsReplicaDelRequest_Type.tp_base = BaseObject_Type;
45110 3505 : drsuapi_DsReplicaDelRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45111 :
45112 3505 : drsuapi_DsReplicaModRequest1_Type.tp_base = BaseObject_Type;
45113 3505 : drsuapi_DsReplicaModRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45114 :
45115 3505 : drsuapi_DsReplicaModRequest_Type.tp_base = BaseObject_Type;
45116 3505 : drsuapi_DsReplicaModRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45117 :
45118 3505 : drsuapi_DsGetMembershipsCtr1_Type.tp_base = BaseObject_Type;
45119 3505 : drsuapi_DsGetMembershipsCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
45120 :
45121 3505 : drsuapi_DsGetMembershipsCtr_Type.tp_base = BaseObject_Type;
45122 3505 : drsuapi_DsGetMembershipsCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45123 :
45124 3505 : drsuapi_DsGetMembershipsRequest1_Type.tp_base = BaseObject_Type;
45125 3505 : drsuapi_DsGetMembershipsRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45126 :
45127 3505 : drsuapi_DsGetMembershipsRequest_Type.tp_base = BaseObject_Type;
45128 3505 : drsuapi_DsGetMembershipsRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45129 :
45130 3505 : drsuapi_DsGetNT4ChangeLogRequest1_Type.tp_base = BaseObject_Type;
45131 3505 : drsuapi_DsGetNT4ChangeLogRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45132 :
45133 3505 : drsuapi_DsGetNT4ChangeLogRequest_Type.tp_base = BaseObject_Type;
45134 3505 : drsuapi_DsGetNT4ChangeLogRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45135 :
45136 3505 : drsuapi_DsGetNT4ChangeLogInfo1_Type.tp_base = BaseObject_Type;
45137 3505 : drsuapi_DsGetNT4ChangeLogInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
45138 :
45139 3505 : drsuapi_DsGetNT4ChangeLogInfo_Type.tp_base = BaseObject_Type;
45140 3505 : drsuapi_DsGetNT4ChangeLogInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
45141 :
45142 3505 : drsuapi_DsNameString_Type.tp_base = BaseObject_Type;
45143 3505 : drsuapi_DsNameString_Type.tp_basicsize = pytalloc_BaseObject_size();
45144 :
45145 3505 : drsuapi_DsNameRequest1_Type.tp_base = BaseObject_Type;
45146 3505 : drsuapi_DsNameRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45147 :
45148 3505 : drsuapi_DsNameRequest_Type.tp_base = BaseObject_Type;
45149 3505 : drsuapi_DsNameRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45150 :
45151 3505 : drsuapi_DsNameInfo1_Type.tp_base = BaseObject_Type;
45152 3505 : drsuapi_DsNameInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
45153 :
45154 3505 : drsuapi_DsNameCtr1_Type.tp_base = BaseObject_Type;
45155 3505 : drsuapi_DsNameCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
45156 :
45157 3505 : drsuapi_DsNameCtr_Type.tp_base = BaseObject_Type;
45158 3505 : drsuapi_DsNameCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45159 :
45160 3505 : drsuapi_DsWriteAccountSpnRequest1_Type.tp_base = BaseObject_Type;
45161 3505 : drsuapi_DsWriteAccountSpnRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45162 :
45163 3505 : drsuapi_DsWriteAccountSpnRequest_Type.tp_base = BaseObject_Type;
45164 3505 : drsuapi_DsWriteAccountSpnRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45165 :
45166 3505 : drsuapi_DsWriteAccountSpnResult1_Type.tp_base = BaseObject_Type;
45167 3505 : drsuapi_DsWriteAccountSpnResult1_Type.tp_basicsize = pytalloc_BaseObject_size();
45168 :
45169 3505 : drsuapi_DsWriteAccountSpnResult_Type.tp_base = BaseObject_Type;
45170 3505 : drsuapi_DsWriteAccountSpnResult_Type.tp_basicsize = pytalloc_BaseObject_size();
45171 :
45172 3505 : drsuapi_DsRemoveDSServerRequest1_Type.tp_base = BaseObject_Type;
45173 3505 : drsuapi_DsRemoveDSServerRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45174 :
45175 3505 : drsuapi_DsRemoveDSServerRequest_Type.tp_base = BaseObject_Type;
45176 3505 : drsuapi_DsRemoveDSServerRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45177 :
45178 3505 : drsuapi_DsRemoveDSServerResult1_Type.tp_base = BaseObject_Type;
45179 3505 : drsuapi_DsRemoveDSServerResult1_Type.tp_basicsize = pytalloc_BaseObject_size();
45180 :
45181 3505 : drsuapi_DsRemoveDSServerResult_Type.tp_base = BaseObject_Type;
45182 3505 : drsuapi_DsRemoveDSServerResult_Type.tp_basicsize = pytalloc_BaseObject_size();
45183 :
45184 3505 : drsuapi_DsGetDCInfoRequest1_Type.tp_base = BaseObject_Type;
45185 3505 : drsuapi_DsGetDCInfoRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45186 :
45187 3505 : drsuapi_DsGetDCInfoRequest_Type.tp_base = BaseObject_Type;
45188 3505 : drsuapi_DsGetDCInfoRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45189 :
45190 3505 : drsuapi_DsGetDCInfo1_Type.tp_base = BaseObject_Type;
45191 3505 : drsuapi_DsGetDCInfo1_Type.tp_basicsize = pytalloc_BaseObject_size();
45192 :
45193 3505 : drsuapi_DsGetDCInfoCtr1_Type.tp_base = BaseObject_Type;
45194 3505 : drsuapi_DsGetDCInfoCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
45195 :
45196 3505 : drsuapi_DsGetDCInfo2_Type.tp_base = BaseObject_Type;
45197 3505 : drsuapi_DsGetDCInfo2_Type.tp_basicsize = pytalloc_BaseObject_size();
45198 :
45199 3505 : drsuapi_DsGetDCInfoCtr2_Type.tp_base = BaseObject_Type;
45200 3505 : drsuapi_DsGetDCInfoCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
45201 :
45202 3505 : drsuapi_DsGetDCInfo3_Type.tp_base = BaseObject_Type;
45203 3505 : drsuapi_DsGetDCInfo3_Type.tp_basicsize = pytalloc_BaseObject_size();
45204 :
45205 3505 : drsuapi_DsGetDCInfoCtr3_Type.tp_base = BaseObject_Type;
45206 3505 : drsuapi_DsGetDCInfoCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
45207 :
45208 3505 : drsuapi_DsGetDCConnection01_Type.tp_base = BaseObject_Type;
45209 3505 : drsuapi_DsGetDCConnection01_Type.tp_basicsize = pytalloc_BaseObject_size();
45210 :
45211 3505 : drsuapi_DsGetDCConnectionCtr01_Type.tp_base = BaseObject_Type;
45212 3505 : drsuapi_DsGetDCConnectionCtr01_Type.tp_basicsize = pytalloc_BaseObject_size();
45213 :
45214 3505 : drsuapi_DsGetDCInfoCtr_Type.tp_base = BaseObject_Type;
45215 3505 : drsuapi_DsGetDCInfoCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45216 :
45217 3505 : drsuapi_DsReplicaObjectListItem_Type.tp_base = BaseObject_Type;
45218 3505 : drsuapi_DsReplicaObjectListItem_Type.tp_basicsize = pytalloc_BaseObject_size();
45219 :
45220 3505 : drsuapi_DsAddEntryRequest2_Type.tp_base = BaseObject_Type;
45221 3505 : drsuapi_DsAddEntryRequest2_Type.tp_basicsize = pytalloc_BaseObject_size();
45222 :
45223 3505 : drsuapi_SecBuffer_Type.tp_base = BaseObject_Type;
45224 3505 : drsuapi_SecBuffer_Type.tp_basicsize = pytalloc_BaseObject_size();
45225 :
45226 3505 : drsuapi_SecBufferDesc_Type.tp_base = BaseObject_Type;
45227 3505 : drsuapi_SecBufferDesc_Type.tp_basicsize = pytalloc_BaseObject_size();
45228 :
45229 3505 : drsuapi_DsAddEntryRequest3_Type.tp_base = BaseObject_Type;
45230 3505 : drsuapi_DsAddEntryRequest3_Type.tp_basicsize = pytalloc_BaseObject_size();
45231 :
45232 3505 : drsuapi_DsAddEntryRequest_Type.tp_base = BaseObject_Type;
45233 3505 : drsuapi_DsAddEntryRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45234 :
45235 3505 : drsuapi_DsAddEntryErrorInfoX_Type.tp_base = BaseObject_Type;
45236 3505 : drsuapi_DsAddEntryErrorInfoX_Type.tp_basicsize = pytalloc_BaseObject_size();
45237 :
45238 3505 : drsuapi_DsAddEntry_AttrErr_V1_Type.tp_base = BaseObject_Type;
45239 3505 : drsuapi_DsAddEntry_AttrErr_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45240 :
45241 3505 : drsuapi_DsAddEntry_AttrErrListItem_V1_Type.tp_base = BaseObject_Type;
45242 3505 : drsuapi_DsAddEntry_AttrErrListItem_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45243 :
45244 3505 : drsuapi_DsAddEntryErrorInfo_Attr_V1_Type.tp_base = BaseObject_Type;
45245 3505 : drsuapi_DsAddEntryErrorInfo_Attr_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45246 :
45247 3505 : drsuapi_DsAddEntryErrorInfo_Name_V1_Type.tp_base = BaseObject_Type;
45248 3505 : drsuapi_DsAddEntryErrorInfo_Name_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45249 :
45250 3505 : drsuapi_NameResOp_V1_Type.tp_base = BaseObject_Type;
45251 3505 : drsuapi_NameResOp_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45252 :
45253 3505 : drsuapi_DsaAddressListItem_V1_Type.tp_base = BaseObject_Type;
45254 3505 : drsuapi_DsaAddressListItem_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45255 :
45256 3505 : drsuapi_DsAddEntry_RefErrListItem_V1_Type.tp_base = BaseObject_Type;
45257 3505 : drsuapi_DsAddEntry_RefErrListItem_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45258 :
45259 3505 : drsuapi_DsAddEntryErrorInfo_Referr_V1_Type.tp_base = BaseObject_Type;
45260 3505 : drsuapi_DsAddEntryErrorInfo_Referr_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45261 :
45262 3505 : drsuapi_DsAddEntryErrorInfo_Type.tp_base = BaseObject_Type;
45263 3505 : drsuapi_DsAddEntryErrorInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
45264 :
45265 3505 : drsuapi_DsAddEntry_ErrData_V1_Type.tp_base = BaseObject_Type;
45266 3505 : drsuapi_DsAddEntry_ErrData_V1_Type.tp_basicsize = pytalloc_BaseObject_size();
45267 :
45268 3505 : drsuapi_DsAddEntry_ErrData_Type.tp_base = BaseObject_Type;
45269 3505 : drsuapi_DsAddEntry_ErrData_Type.tp_basicsize = pytalloc_BaseObject_size();
45270 :
45271 3505 : drsuapi_DsReplicaObjectIdentifier2_Type.tp_base = BaseObject_Type;
45272 3505 : drsuapi_DsReplicaObjectIdentifier2_Type.tp_basicsize = pytalloc_BaseObject_size();
45273 :
45274 3505 : drsuapi_DsAddEntryCtr2_Type.tp_base = BaseObject_Type;
45275 3505 : drsuapi_DsAddEntryCtr2_Type.tp_basicsize = pytalloc_BaseObject_size();
45276 :
45277 3505 : drsuapi_DsAddEntryCtr3_Type.tp_base = BaseObject_Type;
45278 3505 : drsuapi_DsAddEntryCtr3_Type.tp_basicsize = pytalloc_BaseObject_size();
45279 :
45280 3505 : drsuapi_DsAddEntryCtr_Type.tp_base = BaseObject_Type;
45281 3505 : drsuapi_DsAddEntryCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45282 :
45283 3505 : drsuapi_DsExecuteKCC1_Type.tp_base = BaseObject_Type;
45284 3505 : drsuapi_DsExecuteKCC1_Type.tp_basicsize = pytalloc_BaseObject_size();
45285 :
45286 3505 : drsuapi_DsExecuteKCCRequest_Type.tp_base = BaseObject_Type;
45287 3505 : drsuapi_DsExecuteKCCRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45288 :
45289 3505 : drsuapi_DsReplicaGetInfoRequest1_Type.tp_base = BaseObject_Type;
45290 3505 : drsuapi_DsReplicaGetInfoRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45291 :
45292 3505 : drsuapi_DsReplicaGetInfoRequest2_Type.tp_base = BaseObject_Type;
45293 3505 : drsuapi_DsReplicaGetInfoRequest2_Type.tp_basicsize = pytalloc_BaseObject_size();
45294 :
45295 3505 : drsuapi_DsReplicaGetInfoRequest_Type.tp_base = BaseObject_Type;
45296 3505 : drsuapi_DsReplicaGetInfoRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45297 :
45298 3505 : drsuapi_DsReplicaNeighbour_Type.tp_base = BaseObject_Type;
45299 3505 : drsuapi_DsReplicaNeighbour_Type.tp_basicsize = pytalloc_BaseObject_size();
45300 :
45301 3505 : drsuapi_DsReplicaNeighbourCtr_Type.tp_base = BaseObject_Type;
45302 3505 : drsuapi_DsReplicaNeighbourCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45303 :
45304 3505 : drsuapi_DsReplicaCursorCtr_Type.tp_base = BaseObject_Type;
45305 3505 : drsuapi_DsReplicaCursorCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45306 :
45307 3505 : drsuapi_DsReplicaObjMetaData_Type.tp_base = BaseObject_Type;
45308 3505 : drsuapi_DsReplicaObjMetaData_Type.tp_basicsize = pytalloc_BaseObject_size();
45309 :
45310 3505 : drsuapi_DsReplicaObjMetaDataCtr_Type.tp_base = BaseObject_Type;
45311 3505 : drsuapi_DsReplicaObjMetaDataCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45312 :
45313 3505 : drsuapi_DsReplicaKccDsaFailure_Type.tp_base = BaseObject_Type;
45314 3505 : drsuapi_DsReplicaKccDsaFailure_Type.tp_basicsize = pytalloc_BaseObject_size();
45315 :
45316 3505 : drsuapi_DsReplicaKccDsaFailuresCtr_Type.tp_base = BaseObject_Type;
45317 3505 : drsuapi_DsReplicaKccDsaFailuresCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45318 :
45319 3505 : drsuapi_DsReplicaOp_Type.tp_base = BaseObject_Type;
45320 3505 : drsuapi_DsReplicaOp_Type.tp_basicsize = pytalloc_BaseObject_size();
45321 :
45322 3505 : drsuapi_DsReplicaOpCtr_Type.tp_base = BaseObject_Type;
45323 3505 : drsuapi_DsReplicaOpCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45324 :
45325 3505 : drsuapi_DsReplicaAttrValMetaData_Type.tp_base = BaseObject_Type;
45326 3505 : drsuapi_DsReplicaAttrValMetaData_Type.tp_basicsize = pytalloc_BaseObject_size();
45327 :
45328 3505 : drsuapi_DsReplicaAttrValMetaDataCtr_Type.tp_base = BaseObject_Type;
45329 3505 : drsuapi_DsReplicaAttrValMetaDataCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45330 :
45331 3505 : drsuapi_DsReplicaCursor2Ctr_Type.tp_base = BaseObject_Type;
45332 3505 : drsuapi_DsReplicaCursor2Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
45333 :
45334 3505 : drsuapi_DsReplicaCursor3_Type.tp_base = BaseObject_Type;
45335 3505 : drsuapi_DsReplicaCursor3_Type.tp_basicsize = pytalloc_BaseObject_size();
45336 :
45337 3505 : drsuapi_DsReplicaCursor3Ctr_Type.tp_base = BaseObject_Type;
45338 3505 : drsuapi_DsReplicaCursor3Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
45339 :
45340 3505 : drsuapi_DsReplicaObjMetaData2_Type.tp_base = BaseObject_Type;
45341 3505 : drsuapi_DsReplicaObjMetaData2_Type.tp_basicsize = pytalloc_BaseObject_size();
45342 :
45343 3505 : drsuapi_DsReplicaObjMetaData2Ctr_Type.tp_base = BaseObject_Type;
45344 3505 : drsuapi_DsReplicaObjMetaData2Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
45345 :
45346 3505 : drsuapi_DsReplicaAttrValMetaData2_Type.tp_base = BaseObject_Type;
45347 3505 : drsuapi_DsReplicaAttrValMetaData2_Type.tp_basicsize = pytalloc_BaseObject_size();
45348 :
45349 3505 : drsuapi_DsReplicaAttrValMetaData2Ctr_Type.tp_base = BaseObject_Type;
45350 3505 : drsuapi_DsReplicaAttrValMetaData2Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
45351 :
45352 3505 : drsuapi_DsReplicaConnection04_Type.tp_base = BaseObject_Type;
45353 3505 : drsuapi_DsReplicaConnection04_Type.tp_basicsize = pytalloc_BaseObject_size();
45354 :
45355 3505 : drsuapi_DsReplicaConnection04Ctr_Type.tp_base = BaseObject_Type;
45356 3505 : drsuapi_DsReplicaConnection04Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
45357 :
45358 3505 : drsuapi_DsReplica06_Type.tp_base = BaseObject_Type;
45359 3505 : drsuapi_DsReplica06_Type.tp_basicsize = pytalloc_BaseObject_size();
45360 :
45361 3505 : drsuapi_DsReplica06Ctr_Type.tp_base = BaseObject_Type;
45362 3505 : drsuapi_DsReplica06Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
45363 :
45364 3505 : drsuapi_DsReplicaInfo_Type.tp_base = BaseObject_Type;
45365 3505 : drsuapi_DsReplicaInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
45366 :
45367 3505 : drsuapi_DsGetMemberships2Ctr1_Type.tp_base = BaseObject_Type;
45368 3505 : drsuapi_DsGetMemberships2Ctr1_Type.tp_basicsize = pytalloc_BaseObject_size();
45369 :
45370 3505 : drsuapi_DsGetMemberships2Ctr_Type.tp_base = BaseObject_Type;
45371 3505 : drsuapi_DsGetMemberships2Ctr_Type.tp_basicsize = pytalloc_BaseObject_size();
45372 :
45373 3505 : drsuapi_DsGetMemberships2Request1_Type.tp_base = BaseObject_Type;
45374 3505 : drsuapi_DsGetMemberships2Request1_Type.tp_basicsize = pytalloc_BaseObject_size();
45375 :
45376 3505 : drsuapi_DsGetMemberships2Request_Type.tp_base = BaseObject_Type;
45377 3505 : drsuapi_DsGetMemberships2Request_Type.tp_basicsize = pytalloc_BaseObject_size();
45378 :
45379 3505 : drsuapi_DsSiteCostInfo_Type.tp_base = BaseObject_Type;
45380 3505 : drsuapi_DsSiteCostInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
45381 :
45382 3505 : drsuapi_QuerySitesByCostCtr1_Type.tp_base = BaseObject_Type;
45383 3505 : drsuapi_QuerySitesByCostCtr1_Type.tp_basicsize = pytalloc_BaseObject_size();
45384 :
45385 3505 : drsuapi_QuerySitesByCostCtr_Type.tp_base = BaseObject_Type;
45386 3505 : drsuapi_QuerySitesByCostCtr_Type.tp_basicsize = pytalloc_BaseObject_size();
45387 :
45388 3505 : drsuapi_QuerySitesByCostRequest1_Type.tp_base = BaseObject_Type;
45389 3505 : drsuapi_QuerySitesByCostRequest1_Type.tp_basicsize = pytalloc_BaseObject_size();
45390 :
45391 3505 : drsuapi_QuerySitesByCostRequest_Type.tp_base = BaseObject_Type;
45392 3505 : drsuapi_QuerySitesByCostRequest_Type.tp_basicsize = pytalloc_BaseObject_size();
45393 :
45394 3505 : drsuapi_DsBind_Type.tp_base = BaseObject_Type;
45395 3505 : drsuapi_DsBind_Type.tp_basicsize = pytalloc_BaseObject_size();
45396 :
45397 3505 : drsuapi_DsUnbind_Type.tp_base = BaseObject_Type;
45398 3505 : drsuapi_DsUnbind_Type.tp_basicsize = pytalloc_BaseObject_size();
45399 :
45400 3505 : drsuapi_DsReplicaSync_Type.tp_base = BaseObject_Type;
45401 3505 : drsuapi_DsReplicaSync_Type.tp_basicsize = pytalloc_BaseObject_size();
45402 :
45403 3505 : drsuapi_DsGetNCChanges_Type.tp_base = BaseObject_Type;
45404 3505 : drsuapi_DsGetNCChanges_Type.tp_basicsize = pytalloc_BaseObject_size();
45405 :
45406 3505 : drsuapi_DsReplicaUpdateRefs_Type.tp_base = BaseObject_Type;
45407 3505 : drsuapi_DsReplicaUpdateRefs_Type.tp_basicsize = pytalloc_BaseObject_size();
45408 :
45409 3505 : drsuapi_DsReplicaAdd_Type.tp_base = BaseObject_Type;
45410 3505 : drsuapi_DsReplicaAdd_Type.tp_basicsize = pytalloc_BaseObject_size();
45411 :
45412 3505 : drsuapi_DsReplicaDel_Type.tp_base = BaseObject_Type;
45413 3505 : drsuapi_DsReplicaDel_Type.tp_basicsize = pytalloc_BaseObject_size();
45414 :
45415 3505 : drsuapi_DsReplicaMod_Type.tp_base = BaseObject_Type;
45416 3505 : drsuapi_DsReplicaMod_Type.tp_basicsize = pytalloc_BaseObject_size();
45417 :
45418 3505 : drsuapi_DsGetMemberships_Type.tp_base = BaseObject_Type;
45419 3505 : drsuapi_DsGetMemberships_Type.tp_basicsize = pytalloc_BaseObject_size();
45420 :
45421 3505 : drsuapi_DsGetNT4ChangeLog_Type.tp_base = BaseObject_Type;
45422 3505 : drsuapi_DsGetNT4ChangeLog_Type.tp_basicsize = pytalloc_BaseObject_size();
45423 :
45424 3505 : drsuapi_DsCrackNames_Type.tp_base = BaseObject_Type;
45425 3505 : drsuapi_DsCrackNames_Type.tp_basicsize = pytalloc_BaseObject_size();
45426 :
45427 3505 : drsuapi_DsWriteAccountSpn_Type.tp_base = BaseObject_Type;
45428 3505 : drsuapi_DsWriteAccountSpn_Type.tp_basicsize = pytalloc_BaseObject_size();
45429 :
45430 3505 : drsuapi_DsRemoveDSServer_Type.tp_base = BaseObject_Type;
45431 3505 : drsuapi_DsRemoveDSServer_Type.tp_basicsize = pytalloc_BaseObject_size();
45432 :
45433 3505 : drsuapi_DsGetDomainControllerInfo_Type.tp_base = BaseObject_Type;
45434 3505 : drsuapi_DsGetDomainControllerInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
45435 :
45436 3505 : drsuapi_DsAddEntry_Type.tp_base = BaseObject_Type;
45437 3505 : drsuapi_DsAddEntry_Type.tp_basicsize = pytalloc_BaseObject_size();
45438 :
45439 3505 : drsuapi_DsExecuteKCC_Type.tp_base = BaseObject_Type;
45440 3505 : drsuapi_DsExecuteKCC_Type.tp_basicsize = pytalloc_BaseObject_size();
45441 :
45442 3505 : drsuapi_DsReplicaGetInfo_Type.tp_base = BaseObject_Type;
45443 3505 : drsuapi_DsReplicaGetInfo_Type.tp_basicsize = pytalloc_BaseObject_size();
45444 :
45445 3505 : drsuapi_DsGetMemberships2_Type.tp_base = BaseObject_Type;
45446 3505 : drsuapi_DsGetMemberships2_Type.tp_basicsize = pytalloc_BaseObject_size();
45447 :
45448 3505 : drsuapi_QuerySitesByCost_Type.tp_base = BaseObject_Type;
45449 3505 : drsuapi_QuerySitesByCost_Type.tp_basicsize = pytalloc_BaseObject_size();
45450 :
45451 3505 : drsuapi_InterfaceType.tp_base = ClientConnection_Type;
45452 :
45453 3505 : drsuapi_SyntaxType.tp_base = ndr_syntax_id_Type;
45454 3505 : drsuapi_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
45455 :
45456 3505 : if (PyType_Ready(&drsuapi_DsBindInfo24_Type) < 0)
45457 0 : goto out;
45458 3505 : if (PyType_Ready(&drsuapi_DsBindInfo28_Type) < 0)
45459 0 : goto out;
45460 3505 : if (PyType_Ready(&drsuapi_DsBindInfo32_Type) < 0)
45461 0 : goto out;
45462 3505 : if (PyType_Ready(&drsuapi_DsBindInfo48_Type) < 0)
45463 0 : goto out;
45464 3505 : if (PyType_Ready(&drsuapi_DsBindInfo52_Type) < 0)
45465 0 : goto out;
45466 3505 : if (PyType_Ready(&drsuapi_DsBindInfoFallBack_Type) < 0)
45467 0 : goto out;
45468 3505 : if (PyType_Ready(&drsuapi_DsBindInfo_Type) < 0)
45469 0 : goto out;
45470 3505 : if (PyType_Ready(&drsuapi_DsBindInfoCtr_Type) < 0)
45471 0 : goto out;
45472 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier_Type) < 0)
45473 0 : goto out;
45474 3505 : if (PyType_Ready(&drsuapi_DsReplicaSyncRequest1_Type) < 0)
45475 0 : goto out;
45476 3505 : if (PyType_Ready(&drsuapi_DsReplicaSyncRequest_Type) < 0)
45477 0 : goto out;
45478 3505 : if (PyType_Ready(&drsuapi_DsReplicaHighWaterMark_Type) < 0)
45479 0 : goto out;
45480 3505 : if (PyType_Ready(&drsuapi_DsReplicaCursor_Type) < 0)
45481 0 : goto out;
45482 3505 : if (PyType_Ready(&drsuapi_DsReplicaCursorCtrEx_Type) < 0)
45483 0 : goto out;
45484 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesRequest5_Type) < 0)
45485 0 : goto out;
45486 3505 : if (PyType_Ready(&drsuapi_DsReplicaOID_Type) < 0)
45487 0 : goto out;
45488 3505 : if (PyType_Ready(&drsuapi_DsReplicaOIDMapping_Type) < 0)
45489 0 : goto out;
45490 3505 : if (PyType_Ready(&drsuapi_DsReplicaOIDMapping_Ctr_Type) < 0)
45491 0 : goto out;
45492 3505 : if (PyType_Ready(&drsuapi_DsPartialAttributeSet_Type) < 0)
45493 0 : goto out;
45494 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesRequest8_Type) < 0)
45495 0 : goto out;
45496 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesRequest10_Type) < 0)
45497 0 : goto out;
45498 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesRequest_Type) < 0)
45499 0 : goto out;
45500 3505 : if (PyType_Ready(&drsuapi_DsReplicaCursor2_Type) < 0)
45501 0 : goto out;
45502 3505 : if (PyType_Ready(&drsuapi_DsReplicaCursor2CtrEx_Type) < 0)
45503 0 : goto out;
45504 3505 : if (PyType_Ready(&drsuapi_DsAttributeValue_Type) < 0)
45505 0 : goto out;
45506 3505 : if (PyType_Ready(&drsuapi_DsAttributeValueCtr_Type) < 0)
45507 0 : goto out;
45508 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier3_Type) < 0)
45509 0 : goto out;
45510 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier3Binary_Type) < 0)
45511 0 : goto out;
45512 3505 : if (PyType_Ready(&drsuapi_DsReplicaAttribute_Type) < 0)
45513 0 : goto out;
45514 3505 : if (PyType_Ready(&drsuapi_DsReplicaAttributeCtr_Type) < 0)
45515 0 : goto out;
45516 3505 : if (PyType_Ready(&drsuapi_DsReplicaObject_Type) < 0)
45517 0 : goto out;
45518 3505 : if (PyType_Ready(&drsuapi_DsReplicaMetaData_Type) < 0)
45519 0 : goto out;
45520 3505 : if (PyType_Ready(&drsuapi_DsReplicaMetaDataCtr_Type) < 0)
45521 0 : goto out;
45522 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjectListItemEx_Type) < 0)
45523 0 : goto out;
45524 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesCtr1_Type) < 0)
45525 0 : goto out;
45526 3505 : if (PyType_Ready(&drsuapi_DsReplicaLinkedAttribute_Type) < 0)
45527 0 : goto out;
45528 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesCtr6_Type) < 0)
45529 0 : goto out;
45530 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesCtr1TS_Type) < 0)
45531 0 : goto out;
45532 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesCtr6TS_Type) < 0)
45533 0 : goto out;
45534 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesMSZIPCtr1_Type) < 0)
45535 0 : goto out;
45536 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesMSZIPCtr6_Type) < 0)
45537 0 : goto out;
45538 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesXPRESSCtr1_Type) < 0)
45539 0 : goto out;
45540 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesXPRESSCtr6_Type) < 0)
45541 0 : goto out;
45542 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesCompressedCtr_Type) < 0)
45543 0 : goto out;
45544 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesCtr2_Type) < 0)
45545 0 : goto out;
45546 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesCtr7_Type) < 0)
45547 0 : goto out;
45548 3505 : if (PyType_Ready(&drsuapi_DsGetNCChangesCtr_Type) < 0)
45549 0 : goto out;
45550 3505 : if (PyType_Ready(&drsuapi_DsReplicaUpdateRefsRequest1_Type) < 0)
45551 0 : goto out;
45552 3505 : if (PyType_Ready(&drsuapi_DsReplicaUpdateRefsRequest_Type) < 0)
45553 0 : goto out;
45554 3505 : if (PyType_Ready(&drsuapi_DsReplicaAddRequest1_Type) < 0)
45555 0 : goto out;
45556 3505 : if (PyType_Ready(&drsuapi_DsReplicaAddRequest2_Type) < 0)
45557 0 : goto out;
45558 3505 : if (PyType_Ready(&drsuapi_DsReplicaAddRequest_Type) < 0)
45559 0 : goto out;
45560 3505 : if (PyType_Ready(&drsuapi_DsReplicaDelRequest1_Type) < 0)
45561 0 : goto out;
45562 3505 : if (PyType_Ready(&drsuapi_DsReplicaDelRequest_Type) < 0)
45563 0 : goto out;
45564 3505 : if (PyType_Ready(&drsuapi_DsReplicaModRequest1_Type) < 0)
45565 0 : goto out;
45566 3505 : if (PyType_Ready(&drsuapi_DsReplicaModRequest_Type) < 0)
45567 0 : goto out;
45568 3505 : if (PyType_Ready(&drsuapi_DsGetMembershipsCtr1_Type) < 0)
45569 0 : goto out;
45570 3505 : if (PyType_Ready(&drsuapi_DsGetMembershipsCtr_Type) < 0)
45571 0 : goto out;
45572 3505 : if (PyType_Ready(&drsuapi_DsGetMembershipsRequest1_Type) < 0)
45573 0 : goto out;
45574 3505 : if (PyType_Ready(&drsuapi_DsGetMembershipsRequest_Type) < 0)
45575 0 : goto out;
45576 3505 : if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogRequest1_Type) < 0)
45577 0 : goto out;
45578 3505 : if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogRequest_Type) < 0)
45579 0 : goto out;
45580 3505 : if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogInfo1_Type) < 0)
45581 0 : goto out;
45582 3505 : if (PyType_Ready(&drsuapi_DsGetNT4ChangeLogInfo_Type) < 0)
45583 0 : goto out;
45584 3505 : if (PyType_Ready(&drsuapi_DsNameString_Type) < 0)
45585 0 : goto out;
45586 3505 : if (PyType_Ready(&drsuapi_DsNameRequest1_Type) < 0)
45587 0 : goto out;
45588 3505 : if (PyType_Ready(&drsuapi_DsNameRequest_Type) < 0)
45589 0 : goto out;
45590 3505 : if (PyType_Ready(&drsuapi_DsNameInfo1_Type) < 0)
45591 0 : goto out;
45592 3505 : if (PyType_Ready(&drsuapi_DsNameCtr1_Type) < 0)
45593 0 : goto out;
45594 3505 : if (PyType_Ready(&drsuapi_DsNameCtr_Type) < 0)
45595 0 : goto out;
45596 3505 : if (PyType_Ready(&drsuapi_DsWriteAccountSpnRequest1_Type) < 0)
45597 0 : goto out;
45598 3505 : if (PyType_Ready(&drsuapi_DsWriteAccountSpnRequest_Type) < 0)
45599 0 : goto out;
45600 3505 : if (PyType_Ready(&drsuapi_DsWriteAccountSpnResult1_Type) < 0)
45601 0 : goto out;
45602 3505 : if (PyType_Ready(&drsuapi_DsWriteAccountSpnResult_Type) < 0)
45603 0 : goto out;
45604 3505 : if (PyType_Ready(&drsuapi_DsRemoveDSServerRequest1_Type) < 0)
45605 0 : goto out;
45606 3505 : if (PyType_Ready(&drsuapi_DsRemoveDSServerRequest_Type) < 0)
45607 0 : goto out;
45608 3505 : if (PyType_Ready(&drsuapi_DsRemoveDSServerResult1_Type) < 0)
45609 0 : goto out;
45610 3505 : if (PyType_Ready(&drsuapi_DsRemoveDSServerResult_Type) < 0)
45611 0 : goto out;
45612 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfoRequest1_Type) < 0)
45613 0 : goto out;
45614 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfoRequest_Type) < 0)
45615 0 : goto out;
45616 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfo1_Type) < 0)
45617 0 : goto out;
45618 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfoCtr1_Type) < 0)
45619 0 : goto out;
45620 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfo2_Type) < 0)
45621 0 : goto out;
45622 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfoCtr2_Type) < 0)
45623 0 : goto out;
45624 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfo3_Type) < 0)
45625 0 : goto out;
45626 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfoCtr3_Type) < 0)
45627 0 : goto out;
45628 3505 : if (PyType_Ready(&drsuapi_DsGetDCConnection01_Type) < 0)
45629 0 : goto out;
45630 3505 : if (PyType_Ready(&drsuapi_DsGetDCConnectionCtr01_Type) < 0)
45631 0 : goto out;
45632 3505 : if (PyType_Ready(&drsuapi_DsGetDCInfoCtr_Type) < 0)
45633 0 : goto out;
45634 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjectListItem_Type) < 0)
45635 0 : goto out;
45636 3505 : if (PyType_Ready(&drsuapi_DsAddEntryRequest2_Type) < 0)
45637 0 : goto out;
45638 3505 : if (PyType_Ready(&drsuapi_SecBuffer_Type) < 0)
45639 0 : goto out;
45640 3505 : if (PyType_Ready(&drsuapi_SecBufferDesc_Type) < 0)
45641 0 : goto out;
45642 3505 : if (PyType_Ready(&drsuapi_DsAddEntryRequest3_Type) < 0)
45643 0 : goto out;
45644 3505 : if (PyType_Ready(&drsuapi_DsAddEntryRequest_Type) < 0)
45645 0 : goto out;
45646 3505 : if (PyType_Ready(&drsuapi_DsAddEntryErrorInfoX_Type) < 0)
45647 0 : goto out;
45648 3505 : if (PyType_Ready(&drsuapi_DsAddEntry_AttrErr_V1_Type) < 0)
45649 0 : goto out;
45650 3505 : if (PyType_Ready(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type) < 0)
45651 0 : goto out;
45652 3505 : if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type) < 0)
45653 0 : goto out;
45654 3505 : if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type) < 0)
45655 0 : goto out;
45656 3505 : if (PyType_Ready(&drsuapi_NameResOp_V1_Type) < 0)
45657 0 : goto out;
45658 3505 : if (PyType_Ready(&drsuapi_DsaAddressListItem_V1_Type) < 0)
45659 0 : goto out;
45660 3505 : if (PyType_Ready(&drsuapi_DsAddEntry_RefErrListItem_V1_Type) < 0)
45661 0 : goto out;
45662 3505 : if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type) < 0)
45663 0 : goto out;
45664 3505 : if (PyType_Ready(&drsuapi_DsAddEntryErrorInfo_Type) < 0)
45665 0 : goto out;
45666 3505 : if (PyType_Ready(&drsuapi_DsAddEntry_ErrData_V1_Type) < 0)
45667 0 : goto out;
45668 3505 : if (PyType_Ready(&drsuapi_DsAddEntry_ErrData_Type) < 0)
45669 0 : goto out;
45670 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjectIdentifier2_Type) < 0)
45671 0 : goto out;
45672 3505 : if (PyType_Ready(&drsuapi_DsAddEntryCtr2_Type) < 0)
45673 0 : goto out;
45674 3505 : if (PyType_Ready(&drsuapi_DsAddEntryCtr3_Type) < 0)
45675 0 : goto out;
45676 3505 : if (PyType_Ready(&drsuapi_DsAddEntryCtr_Type) < 0)
45677 0 : goto out;
45678 3505 : if (PyType_Ready(&drsuapi_DsExecuteKCC1_Type) < 0)
45679 0 : goto out;
45680 3505 : if (PyType_Ready(&drsuapi_DsExecuteKCCRequest_Type) < 0)
45681 0 : goto out;
45682 3505 : if (PyType_Ready(&drsuapi_DsReplicaGetInfoRequest1_Type) < 0)
45683 0 : goto out;
45684 3505 : if (PyType_Ready(&drsuapi_DsReplicaGetInfoRequest2_Type) < 0)
45685 0 : goto out;
45686 3505 : if (PyType_Ready(&drsuapi_DsReplicaGetInfoRequest_Type) < 0)
45687 0 : goto out;
45688 3505 : if (PyType_Ready(&drsuapi_DsReplicaNeighbour_Type) < 0)
45689 0 : goto out;
45690 3505 : if (PyType_Ready(&drsuapi_DsReplicaNeighbourCtr_Type) < 0)
45691 0 : goto out;
45692 3505 : if (PyType_Ready(&drsuapi_DsReplicaCursorCtr_Type) < 0)
45693 0 : goto out;
45694 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjMetaData_Type) < 0)
45695 0 : goto out;
45696 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjMetaDataCtr_Type) < 0)
45697 0 : goto out;
45698 3505 : if (PyType_Ready(&drsuapi_DsReplicaKccDsaFailure_Type) < 0)
45699 0 : goto out;
45700 3505 : if (PyType_Ready(&drsuapi_DsReplicaKccDsaFailuresCtr_Type) < 0)
45701 0 : goto out;
45702 3505 : if (PyType_Ready(&drsuapi_DsReplicaOp_Type) < 0)
45703 0 : goto out;
45704 3505 : if (PyType_Ready(&drsuapi_DsReplicaOpCtr_Type) < 0)
45705 0 : goto out;
45706 3505 : if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData_Type) < 0)
45707 0 : goto out;
45708 3505 : if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaDataCtr_Type) < 0)
45709 0 : goto out;
45710 3505 : if (PyType_Ready(&drsuapi_DsReplicaCursor2Ctr_Type) < 0)
45711 0 : goto out;
45712 3505 : if (PyType_Ready(&drsuapi_DsReplicaCursor3_Type) < 0)
45713 0 : goto out;
45714 3505 : if (PyType_Ready(&drsuapi_DsReplicaCursor3Ctr_Type) < 0)
45715 0 : goto out;
45716 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjMetaData2_Type) < 0)
45717 0 : goto out;
45718 3505 : if (PyType_Ready(&drsuapi_DsReplicaObjMetaData2Ctr_Type) < 0)
45719 0 : goto out;
45720 3505 : if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData2_Type) < 0)
45721 0 : goto out;
45722 3505 : if (PyType_Ready(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type) < 0)
45723 0 : goto out;
45724 3505 : if (PyType_Ready(&drsuapi_DsReplicaConnection04_Type) < 0)
45725 0 : goto out;
45726 3505 : if (PyType_Ready(&drsuapi_DsReplicaConnection04Ctr_Type) < 0)
45727 0 : goto out;
45728 3505 : if (PyType_Ready(&drsuapi_DsReplica06_Type) < 0)
45729 0 : goto out;
45730 3505 : if (PyType_Ready(&drsuapi_DsReplica06Ctr_Type) < 0)
45731 0 : goto out;
45732 3505 : if (PyType_Ready(&drsuapi_DsReplicaInfo_Type) < 0)
45733 0 : goto out;
45734 3505 : if (PyType_Ready(&drsuapi_DsGetMemberships2Ctr1_Type) < 0)
45735 0 : goto out;
45736 3505 : if (PyType_Ready(&drsuapi_DsGetMemberships2Ctr_Type) < 0)
45737 0 : goto out;
45738 3505 : if (PyType_Ready(&drsuapi_DsGetMemberships2Request1_Type) < 0)
45739 0 : goto out;
45740 3505 : if (PyType_Ready(&drsuapi_DsGetMemberships2Request_Type) < 0)
45741 0 : goto out;
45742 3505 : if (PyType_Ready(&drsuapi_DsSiteCostInfo_Type) < 0)
45743 0 : goto out;
45744 3505 : if (PyType_Ready(&drsuapi_QuerySitesByCostCtr1_Type) < 0)
45745 0 : goto out;
45746 3505 : if (PyType_Ready(&drsuapi_QuerySitesByCostCtr_Type) < 0)
45747 0 : goto out;
45748 3505 : if (PyType_Ready(&drsuapi_QuerySitesByCostRequest1_Type) < 0)
45749 0 : goto out;
45750 3505 : if (PyType_Ready(&drsuapi_QuerySitesByCostRequest_Type) < 0)
45751 0 : goto out;
45752 3505 : if (PyType_Ready(&drsuapi_DsBind_Type) < 0)
45753 0 : goto out;
45754 3505 : if (PyType_Ready(&drsuapi_DsUnbind_Type) < 0)
45755 0 : goto out;
45756 3505 : if (PyType_Ready(&drsuapi_DsReplicaSync_Type) < 0)
45757 0 : goto out;
45758 3505 : if (PyType_Ready(&drsuapi_DsGetNCChanges_Type) < 0)
45759 0 : goto out;
45760 3505 : if (PyType_Ready(&drsuapi_DsReplicaUpdateRefs_Type) < 0)
45761 0 : goto out;
45762 3505 : if (PyType_Ready(&drsuapi_DsReplicaAdd_Type) < 0)
45763 0 : goto out;
45764 3505 : if (PyType_Ready(&drsuapi_DsReplicaDel_Type) < 0)
45765 0 : goto out;
45766 3505 : if (PyType_Ready(&drsuapi_DsReplicaMod_Type) < 0)
45767 0 : goto out;
45768 3505 : if (PyType_Ready(&drsuapi_DsGetMemberships_Type) < 0)
45769 0 : goto out;
45770 3505 : if (PyType_Ready(&drsuapi_DsGetNT4ChangeLog_Type) < 0)
45771 0 : goto out;
45772 3505 : if (PyType_Ready(&drsuapi_DsCrackNames_Type) < 0)
45773 0 : goto out;
45774 3505 : if (PyType_Ready(&drsuapi_DsWriteAccountSpn_Type) < 0)
45775 0 : goto out;
45776 3505 : if (PyType_Ready(&drsuapi_DsRemoveDSServer_Type) < 0)
45777 0 : goto out;
45778 3505 : if (PyType_Ready(&drsuapi_DsGetDomainControllerInfo_Type) < 0)
45779 0 : goto out;
45780 3505 : if (PyType_Ready(&drsuapi_DsAddEntry_Type) < 0)
45781 0 : goto out;
45782 3505 : if (PyType_Ready(&drsuapi_DsExecuteKCC_Type) < 0)
45783 0 : goto out;
45784 3505 : if (PyType_Ready(&drsuapi_DsReplicaGetInfo_Type) < 0)
45785 0 : goto out;
45786 3505 : if (PyType_Ready(&drsuapi_DsGetMemberships2_Type) < 0)
45787 0 : goto out;
45788 3505 : if (PyType_Ready(&drsuapi_QuerySitesByCost_Type) < 0)
45789 0 : goto out;
45790 3505 : if (PyType_Ready(&drsuapi_InterfaceType) < 0)
45791 0 : goto out;
45792 3505 : if (PyType_Ready(&drsuapi_SyntaxType) < 0)
45793 0 : goto out;
45794 3505 : if (!PyInterface_AddNdrRpcMethods(&drsuapi_InterfaceType, py_ndr_drsuapi_methods))
45795 0 : return NULL;
45796 :
45797 : #ifdef PY_DSBINDINFO24_PATCH
45798 : PY_DSBINDINFO24_PATCH(&drsuapi_DsBindInfo24_Type);
45799 : #endif
45800 : #ifdef PY_DSBINDINFO28_PATCH
45801 : PY_DSBINDINFO28_PATCH(&drsuapi_DsBindInfo28_Type);
45802 : #endif
45803 : #ifdef PY_DSBINDINFO32_PATCH
45804 : PY_DSBINDINFO32_PATCH(&drsuapi_DsBindInfo32_Type);
45805 : #endif
45806 : #ifdef PY_DSBINDINFO48_PATCH
45807 : PY_DSBINDINFO48_PATCH(&drsuapi_DsBindInfo48_Type);
45808 : #endif
45809 : #ifdef PY_DSBINDINFO52_PATCH
45810 : PY_DSBINDINFO52_PATCH(&drsuapi_DsBindInfo52_Type);
45811 : #endif
45812 : #ifdef PY_DSBINDINFOFALLBACK_PATCH
45813 : PY_DSBINDINFOFALLBACK_PATCH(&drsuapi_DsBindInfoFallBack_Type);
45814 : #endif
45815 : #ifdef PY_DSBINDINFO_PATCH
45816 : PY_DSBINDINFO_PATCH(&drsuapi_DsBindInfo_Type);
45817 : #endif
45818 : #ifdef PY_DSBINDINFOCTR_PATCH
45819 : PY_DSBINDINFOCTR_PATCH(&drsuapi_DsBindInfoCtr_Type);
45820 : #endif
45821 : #ifdef PY_DSREPLICAOBJECTIDENTIFIER_PATCH
45822 : PY_DSREPLICAOBJECTIDENTIFIER_PATCH(&drsuapi_DsReplicaObjectIdentifier_Type);
45823 : #endif
45824 : #ifdef PY_DSREPLICASYNCREQUEST1_PATCH
45825 : PY_DSREPLICASYNCREQUEST1_PATCH(&drsuapi_DsReplicaSyncRequest1_Type);
45826 : #endif
45827 : #ifdef PY_DSREPLICASYNCREQUEST_PATCH
45828 : PY_DSREPLICASYNCREQUEST_PATCH(&drsuapi_DsReplicaSyncRequest_Type);
45829 : #endif
45830 : #ifdef PY_DSREPLICAHIGHWATERMARK_PATCH
45831 : PY_DSREPLICAHIGHWATERMARK_PATCH(&drsuapi_DsReplicaHighWaterMark_Type);
45832 : #endif
45833 : #ifdef PY_DSREPLICACURSOR_PATCH
45834 : PY_DSREPLICACURSOR_PATCH(&drsuapi_DsReplicaCursor_Type);
45835 : #endif
45836 : #ifdef PY_DSREPLICACURSORCTREX_PATCH
45837 : PY_DSREPLICACURSORCTREX_PATCH(&drsuapi_DsReplicaCursorCtrEx_Type);
45838 : #endif
45839 : #ifdef PY_DSGETNCCHANGESREQUEST5_PATCH
45840 : PY_DSGETNCCHANGESREQUEST5_PATCH(&drsuapi_DsGetNCChangesRequest5_Type);
45841 : #endif
45842 : #ifdef PY_DSREPLICAOID_PATCH
45843 : PY_DSREPLICAOID_PATCH(&drsuapi_DsReplicaOID_Type);
45844 : #endif
45845 : #ifdef PY_DSREPLICAOIDMAPPING_PATCH
45846 : PY_DSREPLICAOIDMAPPING_PATCH(&drsuapi_DsReplicaOIDMapping_Type);
45847 : #endif
45848 : #ifdef PY_DSREPLICAOIDMAPPING_CTR_PATCH
45849 : PY_DSREPLICAOIDMAPPING_CTR_PATCH(&drsuapi_DsReplicaOIDMapping_Ctr_Type);
45850 : #endif
45851 : #ifdef PY_DSPARTIALATTRIBUTESET_PATCH
45852 : PY_DSPARTIALATTRIBUTESET_PATCH(&drsuapi_DsPartialAttributeSet_Type);
45853 : #endif
45854 : #ifdef PY_DSGETNCCHANGESREQUEST8_PATCH
45855 : PY_DSGETNCCHANGESREQUEST8_PATCH(&drsuapi_DsGetNCChangesRequest8_Type);
45856 : #endif
45857 : #ifdef PY_DSGETNCCHANGESREQUEST10_PATCH
45858 : PY_DSGETNCCHANGESREQUEST10_PATCH(&drsuapi_DsGetNCChangesRequest10_Type);
45859 : #endif
45860 : #ifdef PY_DSGETNCCHANGESREQUEST_PATCH
45861 : PY_DSGETNCCHANGESREQUEST_PATCH(&drsuapi_DsGetNCChangesRequest_Type);
45862 : #endif
45863 : #ifdef PY_DSREPLICACURSOR2_PATCH
45864 : PY_DSREPLICACURSOR2_PATCH(&drsuapi_DsReplicaCursor2_Type);
45865 : #endif
45866 : #ifdef PY_DSREPLICACURSOR2CTREX_PATCH
45867 : PY_DSREPLICACURSOR2CTREX_PATCH(&drsuapi_DsReplicaCursor2CtrEx_Type);
45868 : #endif
45869 : #ifdef PY_DSATTRIBUTEVALUE_PATCH
45870 : PY_DSATTRIBUTEVALUE_PATCH(&drsuapi_DsAttributeValue_Type);
45871 : #endif
45872 : #ifdef PY_DSATTRIBUTEVALUECTR_PATCH
45873 : PY_DSATTRIBUTEVALUECTR_PATCH(&drsuapi_DsAttributeValueCtr_Type);
45874 : #endif
45875 : #ifdef PY_DSREPLICAOBJECTIDENTIFIER3_PATCH
45876 : PY_DSREPLICAOBJECTIDENTIFIER3_PATCH(&drsuapi_DsReplicaObjectIdentifier3_Type);
45877 : #endif
45878 : #ifdef PY_DSREPLICAOBJECTIDENTIFIER3BINARY_PATCH
45879 : PY_DSREPLICAOBJECTIDENTIFIER3BINARY_PATCH(&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
45880 : #endif
45881 : #ifdef PY_DSREPLICAATTRIBUTE_PATCH
45882 : PY_DSREPLICAATTRIBUTE_PATCH(&drsuapi_DsReplicaAttribute_Type);
45883 : #endif
45884 : #ifdef PY_DSREPLICAATTRIBUTECTR_PATCH
45885 : PY_DSREPLICAATTRIBUTECTR_PATCH(&drsuapi_DsReplicaAttributeCtr_Type);
45886 : #endif
45887 : #ifdef PY_DSREPLICAOBJECT_PATCH
45888 : PY_DSREPLICAOBJECT_PATCH(&drsuapi_DsReplicaObject_Type);
45889 : #endif
45890 : #ifdef PY_DSREPLICAMETADATA_PATCH
45891 : PY_DSREPLICAMETADATA_PATCH(&drsuapi_DsReplicaMetaData_Type);
45892 : #endif
45893 : #ifdef PY_DSREPLICAMETADATACTR_PATCH
45894 : PY_DSREPLICAMETADATACTR_PATCH(&drsuapi_DsReplicaMetaDataCtr_Type);
45895 : #endif
45896 : #ifdef PY_DSREPLICAOBJECTLISTITEMEX_PATCH
45897 : PY_DSREPLICAOBJECTLISTITEMEX_PATCH(&drsuapi_DsReplicaObjectListItemEx_Type);
45898 : #endif
45899 : #ifdef PY_DSGETNCCHANGESCTR1_PATCH
45900 : PY_DSGETNCCHANGESCTR1_PATCH(&drsuapi_DsGetNCChangesCtr1_Type);
45901 : #endif
45902 : #ifdef PY_DSREPLICALINKEDATTRIBUTE_PATCH
45903 : PY_DSREPLICALINKEDATTRIBUTE_PATCH(&drsuapi_DsReplicaLinkedAttribute_Type);
45904 : #endif
45905 : #ifdef PY_DSGETNCCHANGESCTR6_PATCH
45906 : PY_DSGETNCCHANGESCTR6_PATCH(&drsuapi_DsGetNCChangesCtr6_Type);
45907 : #endif
45908 : #ifdef PY_DSGETNCCHANGESCTR1TS_PATCH
45909 : PY_DSGETNCCHANGESCTR1TS_PATCH(&drsuapi_DsGetNCChangesCtr1TS_Type);
45910 : #endif
45911 : #ifdef PY_DSGETNCCHANGESCTR6TS_PATCH
45912 : PY_DSGETNCCHANGESCTR6TS_PATCH(&drsuapi_DsGetNCChangesCtr6TS_Type);
45913 : #endif
45914 : #ifdef PY_DSGETNCCHANGESMSZIPCTR1_PATCH
45915 : PY_DSGETNCCHANGESMSZIPCTR1_PATCH(&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
45916 : #endif
45917 : #ifdef PY_DSGETNCCHANGESMSZIPCTR6_PATCH
45918 : PY_DSGETNCCHANGESMSZIPCTR6_PATCH(&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
45919 : #endif
45920 : #ifdef PY_DSGETNCCHANGESXPRESSCTR1_PATCH
45921 : PY_DSGETNCCHANGESXPRESSCTR1_PATCH(&drsuapi_DsGetNCChangesXPRESSCtr1_Type);
45922 : #endif
45923 : #ifdef PY_DSGETNCCHANGESXPRESSCTR6_PATCH
45924 : PY_DSGETNCCHANGESXPRESSCTR6_PATCH(&drsuapi_DsGetNCChangesXPRESSCtr6_Type);
45925 : #endif
45926 : #ifdef PY_DSGETNCCHANGESCOMPRESSEDCTR_PATCH
45927 : PY_DSGETNCCHANGESCOMPRESSEDCTR_PATCH(&drsuapi_DsGetNCChangesCompressedCtr_Type);
45928 : #endif
45929 : #ifdef PY_DSGETNCCHANGESCTR2_PATCH
45930 : PY_DSGETNCCHANGESCTR2_PATCH(&drsuapi_DsGetNCChangesCtr2_Type);
45931 : #endif
45932 : #ifdef PY_DSGETNCCHANGESCTR7_PATCH
45933 : PY_DSGETNCCHANGESCTR7_PATCH(&drsuapi_DsGetNCChangesCtr7_Type);
45934 : #endif
45935 : #ifdef PY_DSGETNCCHANGESCTR_PATCH
45936 : PY_DSGETNCCHANGESCTR_PATCH(&drsuapi_DsGetNCChangesCtr_Type);
45937 : #endif
45938 : #ifdef PY_DSREPLICAUPDATEREFSREQUEST1_PATCH
45939 : PY_DSREPLICAUPDATEREFSREQUEST1_PATCH(&drsuapi_DsReplicaUpdateRefsRequest1_Type);
45940 : #endif
45941 : #ifdef PY_DSREPLICAUPDATEREFSREQUEST_PATCH
45942 : PY_DSREPLICAUPDATEREFSREQUEST_PATCH(&drsuapi_DsReplicaUpdateRefsRequest_Type);
45943 : #endif
45944 : #ifdef PY_DSREPLICAADDREQUEST1_PATCH
45945 : PY_DSREPLICAADDREQUEST1_PATCH(&drsuapi_DsReplicaAddRequest1_Type);
45946 : #endif
45947 : #ifdef PY_DSREPLICAADDREQUEST2_PATCH
45948 : PY_DSREPLICAADDREQUEST2_PATCH(&drsuapi_DsReplicaAddRequest2_Type);
45949 : #endif
45950 : #ifdef PY_DSREPLICAADDREQUEST_PATCH
45951 : PY_DSREPLICAADDREQUEST_PATCH(&drsuapi_DsReplicaAddRequest_Type);
45952 : #endif
45953 : #ifdef PY_DSREPLICADELREQUEST1_PATCH
45954 : PY_DSREPLICADELREQUEST1_PATCH(&drsuapi_DsReplicaDelRequest1_Type);
45955 : #endif
45956 : #ifdef PY_DSREPLICADELREQUEST_PATCH
45957 : PY_DSREPLICADELREQUEST_PATCH(&drsuapi_DsReplicaDelRequest_Type);
45958 : #endif
45959 : #ifdef PY_DSREPLICAMODREQUEST1_PATCH
45960 : PY_DSREPLICAMODREQUEST1_PATCH(&drsuapi_DsReplicaModRequest1_Type);
45961 : #endif
45962 : #ifdef PY_DSREPLICAMODREQUEST_PATCH
45963 : PY_DSREPLICAMODREQUEST_PATCH(&drsuapi_DsReplicaModRequest_Type);
45964 : #endif
45965 : #ifdef PY_DSGETMEMBERSHIPSCTR1_PATCH
45966 : PY_DSGETMEMBERSHIPSCTR1_PATCH(&drsuapi_DsGetMembershipsCtr1_Type);
45967 : #endif
45968 : #ifdef PY_DSGETMEMBERSHIPSCTR_PATCH
45969 : PY_DSGETMEMBERSHIPSCTR_PATCH(&drsuapi_DsGetMembershipsCtr_Type);
45970 : #endif
45971 : #ifdef PY_DSGETMEMBERSHIPSREQUEST1_PATCH
45972 : PY_DSGETMEMBERSHIPSREQUEST1_PATCH(&drsuapi_DsGetMembershipsRequest1_Type);
45973 : #endif
45974 : #ifdef PY_DSGETMEMBERSHIPSREQUEST_PATCH
45975 : PY_DSGETMEMBERSHIPSREQUEST_PATCH(&drsuapi_DsGetMembershipsRequest_Type);
45976 : #endif
45977 : #ifdef PY_DSGETNT4CHANGELOGREQUEST1_PATCH
45978 : PY_DSGETNT4CHANGELOGREQUEST1_PATCH(&drsuapi_DsGetNT4ChangeLogRequest1_Type);
45979 : #endif
45980 : #ifdef PY_DSGETNT4CHANGELOGREQUEST_PATCH
45981 : PY_DSGETNT4CHANGELOGREQUEST_PATCH(&drsuapi_DsGetNT4ChangeLogRequest_Type);
45982 : #endif
45983 : #ifdef PY_DSGETNT4CHANGELOGINFO1_PATCH
45984 : PY_DSGETNT4CHANGELOGINFO1_PATCH(&drsuapi_DsGetNT4ChangeLogInfo1_Type);
45985 : #endif
45986 : #ifdef PY_DSGETNT4CHANGELOGINFO_PATCH
45987 : PY_DSGETNT4CHANGELOGINFO_PATCH(&drsuapi_DsGetNT4ChangeLogInfo_Type);
45988 : #endif
45989 : #ifdef PY_DSNAMESTRING_PATCH
45990 : PY_DSNAMESTRING_PATCH(&drsuapi_DsNameString_Type);
45991 : #endif
45992 : #ifdef PY_DSNAMEREQUEST1_PATCH
45993 : PY_DSNAMEREQUEST1_PATCH(&drsuapi_DsNameRequest1_Type);
45994 : #endif
45995 : #ifdef PY_DSNAMEREQUEST_PATCH
45996 : PY_DSNAMEREQUEST_PATCH(&drsuapi_DsNameRequest_Type);
45997 : #endif
45998 : #ifdef PY_DSNAMEINFO1_PATCH
45999 : PY_DSNAMEINFO1_PATCH(&drsuapi_DsNameInfo1_Type);
46000 : #endif
46001 : #ifdef PY_DSNAMECTR1_PATCH
46002 : PY_DSNAMECTR1_PATCH(&drsuapi_DsNameCtr1_Type);
46003 : #endif
46004 : #ifdef PY_DSNAMECTR_PATCH
46005 : PY_DSNAMECTR_PATCH(&drsuapi_DsNameCtr_Type);
46006 : #endif
46007 : #ifdef PY_DSWRITEACCOUNTSPNREQUEST1_PATCH
46008 : PY_DSWRITEACCOUNTSPNREQUEST1_PATCH(&drsuapi_DsWriteAccountSpnRequest1_Type);
46009 : #endif
46010 : #ifdef PY_DSWRITEACCOUNTSPNREQUEST_PATCH
46011 : PY_DSWRITEACCOUNTSPNREQUEST_PATCH(&drsuapi_DsWriteAccountSpnRequest_Type);
46012 : #endif
46013 : #ifdef PY_DSWRITEACCOUNTSPNRESULT1_PATCH
46014 : PY_DSWRITEACCOUNTSPNRESULT1_PATCH(&drsuapi_DsWriteAccountSpnResult1_Type);
46015 : #endif
46016 : #ifdef PY_DSWRITEACCOUNTSPNRESULT_PATCH
46017 : PY_DSWRITEACCOUNTSPNRESULT_PATCH(&drsuapi_DsWriteAccountSpnResult_Type);
46018 : #endif
46019 : #ifdef PY_DSREMOVEDSSERVERREQUEST1_PATCH
46020 : PY_DSREMOVEDSSERVERREQUEST1_PATCH(&drsuapi_DsRemoveDSServerRequest1_Type);
46021 : #endif
46022 : #ifdef PY_DSREMOVEDSSERVERREQUEST_PATCH
46023 : PY_DSREMOVEDSSERVERREQUEST_PATCH(&drsuapi_DsRemoveDSServerRequest_Type);
46024 : #endif
46025 : #ifdef PY_DSREMOVEDSSERVERRESULT1_PATCH
46026 : PY_DSREMOVEDSSERVERRESULT1_PATCH(&drsuapi_DsRemoveDSServerResult1_Type);
46027 : #endif
46028 : #ifdef PY_DSREMOVEDSSERVERRESULT_PATCH
46029 : PY_DSREMOVEDSSERVERRESULT_PATCH(&drsuapi_DsRemoveDSServerResult_Type);
46030 : #endif
46031 : #ifdef PY_DSGETDCINFOREQUEST1_PATCH
46032 : PY_DSGETDCINFOREQUEST1_PATCH(&drsuapi_DsGetDCInfoRequest1_Type);
46033 : #endif
46034 : #ifdef PY_DSGETDCINFOREQUEST_PATCH
46035 : PY_DSGETDCINFOREQUEST_PATCH(&drsuapi_DsGetDCInfoRequest_Type);
46036 : #endif
46037 : #ifdef PY_DSGETDCINFO1_PATCH
46038 : PY_DSGETDCINFO1_PATCH(&drsuapi_DsGetDCInfo1_Type);
46039 : #endif
46040 : #ifdef PY_DSGETDCINFOCTR1_PATCH
46041 : PY_DSGETDCINFOCTR1_PATCH(&drsuapi_DsGetDCInfoCtr1_Type);
46042 : #endif
46043 : #ifdef PY_DSGETDCINFO2_PATCH
46044 : PY_DSGETDCINFO2_PATCH(&drsuapi_DsGetDCInfo2_Type);
46045 : #endif
46046 : #ifdef PY_DSGETDCINFOCTR2_PATCH
46047 : PY_DSGETDCINFOCTR2_PATCH(&drsuapi_DsGetDCInfoCtr2_Type);
46048 : #endif
46049 : #ifdef PY_DSGETDCINFO3_PATCH
46050 : PY_DSGETDCINFO3_PATCH(&drsuapi_DsGetDCInfo3_Type);
46051 : #endif
46052 : #ifdef PY_DSGETDCINFOCTR3_PATCH
46053 : PY_DSGETDCINFOCTR3_PATCH(&drsuapi_DsGetDCInfoCtr3_Type);
46054 : #endif
46055 : #ifdef PY_DSGETDCCONNECTION01_PATCH
46056 : PY_DSGETDCCONNECTION01_PATCH(&drsuapi_DsGetDCConnection01_Type);
46057 : #endif
46058 : #ifdef PY_DSGETDCCONNECTIONCTR01_PATCH
46059 : PY_DSGETDCCONNECTIONCTR01_PATCH(&drsuapi_DsGetDCConnectionCtr01_Type);
46060 : #endif
46061 : #ifdef PY_DSGETDCINFOCTR_PATCH
46062 : PY_DSGETDCINFOCTR_PATCH(&drsuapi_DsGetDCInfoCtr_Type);
46063 : #endif
46064 : #ifdef PY_DSREPLICAOBJECTLISTITEM_PATCH
46065 : PY_DSREPLICAOBJECTLISTITEM_PATCH(&drsuapi_DsReplicaObjectListItem_Type);
46066 : #endif
46067 : #ifdef PY_DSADDENTRYREQUEST2_PATCH
46068 : PY_DSADDENTRYREQUEST2_PATCH(&drsuapi_DsAddEntryRequest2_Type);
46069 : #endif
46070 : #ifdef PY_SECBUFFER_PATCH
46071 : PY_SECBUFFER_PATCH(&drsuapi_SecBuffer_Type);
46072 : #endif
46073 : #ifdef PY_SECBUFFERDESC_PATCH
46074 : PY_SECBUFFERDESC_PATCH(&drsuapi_SecBufferDesc_Type);
46075 : #endif
46076 : #ifdef PY_DSADDENTRYREQUEST3_PATCH
46077 : PY_DSADDENTRYREQUEST3_PATCH(&drsuapi_DsAddEntryRequest3_Type);
46078 : #endif
46079 : #ifdef PY_DSADDENTRYREQUEST_PATCH
46080 : PY_DSADDENTRYREQUEST_PATCH(&drsuapi_DsAddEntryRequest_Type);
46081 : #endif
46082 : #ifdef PY_DSADDENTRYERRORINFOX_PATCH
46083 : PY_DSADDENTRYERRORINFOX_PATCH(&drsuapi_DsAddEntryErrorInfoX_Type);
46084 : #endif
46085 : #ifdef PY_DSADDENTRY_ATTRERR_V1_PATCH
46086 : PY_DSADDENTRY_ATTRERR_V1_PATCH(&drsuapi_DsAddEntry_AttrErr_V1_Type);
46087 : #endif
46088 : #ifdef PY_DSADDENTRY_ATTRERRLISTITEM_V1_PATCH
46089 : PY_DSADDENTRY_ATTRERRLISTITEM_V1_PATCH(&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
46090 : #endif
46091 : #ifdef PY_DSADDENTRYERRORINFO_ATTR_V1_PATCH
46092 : PY_DSADDENTRYERRORINFO_ATTR_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
46093 : #endif
46094 : #ifdef PY_DSADDENTRYERRORINFO_NAME_V1_PATCH
46095 : PY_DSADDENTRYERRORINFO_NAME_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
46096 : #endif
46097 : #ifdef PY_NAMERESOP_V1_PATCH
46098 : PY_NAMERESOP_V1_PATCH(&drsuapi_NameResOp_V1_Type);
46099 : #endif
46100 : #ifdef PY_DSAADDRESSLISTITEM_V1_PATCH
46101 : PY_DSAADDRESSLISTITEM_V1_PATCH(&drsuapi_DsaAddressListItem_V1_Type);
46102 : #endif
46103 : #ifdef PY_DSADDENTRY_REFERRLISTITEM_V1_PATCH
46104 : PY_DSADDENTRY_REFERRLISTITEM_V1_PATCH(&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
46105 : #endif
46106 : #ifdef PY_DSADDENTRYERRORINFO_REFERR_V1_PATCH
46107 : PY_DSADDENTRYERRORINFO_REFERR_V1_PATCH(&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
46108 : #endif
46109 : #ifdef PY_DSADDENTRYERRORINFO_PATCH
46110 : PY_DSADDENTRYERRORINFO_PATCH(&drsuapi_DsAddEntryErrorInfo_Type);
46111 : #endif
46112 : #ifdef PY_DSADDENTRY_ERRDATA_V1_PATCH
46113 : PY_DSADDENTRY_ERRDATA_V1_PATCH(&drsuapi_DsAddEntry_ErrData_V1_Type);
46114 : #endif
46115 : #ifdef PY_DSADDENTRY_ERRDATA_PATCH
46116 : PY_DSADDENTRY_ERRDATA_PATCH(&drsuapi_DsAddEntry_ErrData_Type);
46117 : #endif
46118 : #ifdef PY_DSREPLICAOBJECTIDENTIFIER2_PATCH
46119 : PY_DSREPLICAOBJECTIDENTIFIER2_PATCH(&drsuapi_DsReplicaObjectIdentifier2_Type);
46120 : #endif
46121 : #ifdef PY_DSADDENTRYCTR2_PATCH
46122 : PY_DSADDENTRYCTR2_PATCH(&drsuapi_DsAddEntryCtr2_Type);
46123 : #endif
46124 : #ifdef PY_DSADDENTRYCTR3_PATCH
46125 : PY_DSADDENTRYCTR3_PATCH(&drsuapi_DsAddEntryCtr3_Type);
46126 : #endif
46127 : #ifdef PY_DSADDENTRYCTR_PATCH
46128 : PY_DSADDENTRYCTR_PATCH(&drsuapi_DsAddEntryCtr_Type);
46129 : #endif
46130 : #ifdef PY_DSEXECUTEKCC1_PATCH
46131 : PY_DSEXECUTEKCC1_PATCH(&drsuapi_DsExecuteKCC1_Type);
46132 : #endif
46133 : #ifdef PY_DSEXECUTEKCCREQUEST_PATCH
46134 : PY_DSEXECUTEKCCREQUEST_PATCH(&drsuapi_DsExecuteKCCRequest_Type);
46135 : #endif
46136 : #ifdef PY_DSREPLICAGETINFOREQUEST1_PATCH
46137 : PY_DSREPLICAGETINFOREQUEST1_PATCH(&drsuapi_DsReplicaGetInfoRequest1_Type);
46138 : #endif
46139 : #ifdef PY_DSREPLICAGETINFOREQUEST2_PATCH
46140 : PY_DSREPLICAGETINFOREQUEST2_PATCH(&drsuapi_DsReplicaGetInfoRequest2_Type);
46141 : #endif
46142 : #ifdef PY_DSREPLICAGETINFOREQUEST_PATCH
46143 : PY_DSREPLICAGETINFOREQUEST_PATCH(&drsuapi_DsReplicaGetInfoRequest_Type);
46144 : #endif
46145 : #ifdef PY_DSREPLICANEIGHBOUR_PATCH
46146 : PY_DSREPLICANEIGHBOUR_PATCH(&drsuapi_DsReplicaNeighbour_Type);
46147 : #endif
46148 : #ifdef PY_DSREPLICANEIGHBOURCTR_PATCH
46149 : PY_DSREPLICANEIGHBOURCTR_PATCH(&drsuapi_DsReplicaNeighbourCtr_Type);
46150 : #endif
46151 : #ifdef PY_DSREPLICACURSORCTR_PATCH
46152 : PY_DSREPLICACURSORCTR_PATCH(&drsuapi_DsReplicaCursorCtr_Type);
46153 : #endif
46154 : #ifdef PY_DSREPLICAOBJMETADATA_PATCH
46155 : PY_DSREPLICAOBJMETADATA_PATCH(&drsuapi_DsReplicaObjMetaData_Type);
46156 : #endif
46157 : #ifdef PY_DSREPLICAOBJMETADATACTR_PATCH
46158 : PY_DSREPLICAOBJMETADATACTR_PATCH(&drsuapi_DsReplicaObjMetaDataCtr_Type);
46159 : #endif
46160 : #ifdef PY_DSREPLICAKCCDSAFAILURE_PATCH
46161 : PY_DSREPLICAKCCDSAFAILURE_PATCH(&drsuapi_DsReplicaKccDsaFailure_Type);
46162 : #endif
46163 : #ifdef PY_DSREPLICAKCCDSAFAILURESCTR_PATCH
46164 : PY_DSREPLICAKCCDSAFAILURESCTR_PATCH(&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
46165 : #endif
46166 : #ifdef PY_DSREPLICAOP_PATCH
46167 : PY_DSREPLICAOP_PATCH(&drsuapi_DsReplicaOp_Type);
46168 : #endif
46169 : #ifdef PY_DSREPLICAOPCTR_PATCH
46170 : PY_DSREPLICAOPCTR_PATCH(&drsuapi_DsReplicaOpCtr_Type);
46171 : #endif
46172 : #ifdef PY_DSREPLICAATTRVALMETADATA_PATCH
46173 : PY_DSREPLICAATTRVALMETADATA_PATCH(&drsuapi_DsReplicaAttrValMetaData_Type);
46174 : #endif
46175 : #ifdef PY_DSREPLICAATTRVALMETADATACTR_PATCH
46176 : PY_DSREPLICAATTRVALMETADATACTR_PATCH(&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
46177 : #endif
46178 : #ifdef PY_DSREPLICACURSOR2CTR_PATCH
46179 : PY_DSREPLICACURSOR2CTR_PATCH(&drsuapi_DsReplicaCursor2Ctr_Type);
46180 : #endif
46181 : #ifdef PY_DSREPLICACURSOR3_PATCH
46182 : PY_DSREPLICACURSOR3_PATCH(&drsuapi_DsReplicaCursor3_Type);
46183 : #endif
46184 : #ifdef PY_DSREPLICACURSOR3CTR_PATCH
46185 : PY_DSREPLICACURSOR3CTR_PATCH(&drsuapi_DsReplicaCursor3Ctr_Type);
46186 : #endif
46187 : #ifdef PY_DSREPLICAOBJMETADATA2_PATCH
46188 : PY_DSREPLICAOBJMETADATA2_PATCH(&drsuapi_DsReplicaObjMetaData2_Type);
46189 : #endif
46190 : #ifdef PY_DSREPLICAOBJMETADATA2CTR_PATCH
46191 : PY_DSREPLICAOBJMETADATA2CTR_PATCH(&drsuapi_DsReplicaObjMetaData2Ctr_Type);
46192 : #endif
46193 : #ifdef PY_DSREPLICAATTRVALMETADATA2_PATCH
46194 : PY_DSREPLICAATTRVALMETADATA2_PATCH(&drsuapi_DsReplicaAttrValMetaData2_Type);
46195 : #endif
46196 : #ifdef PY_DSREPLICAATTRVALMETADATA2CTR_PATCH
46197 : PY_DSREPLICAATTRVALMETADATA2CTR_PATCH(&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
46198 : #endif
46199 : #ifdef PY_DSREPLICACONNECTION04_PATCH
46200 : PY_DSREPLICACONNECTION04_PATCH(&drsuapi_DsReplicaConnection04_Type);
46201 : #endif
46202 : #ifdef PY_DSREPLICACONNECTION04CTR_PATCH
46203 : PY_DSREPLICACONNECTION04CTR_PATCH(&drsuapi_DsReplicaConnection04Ctr_Type);
46204 : #endif
46205 : #ifdef PY_DSREPLICA06_PATCH
46206 : PY_DSREPLICA06_PATCH(&drsuapi_DsReplica06_Type);
46207 : #endif
46208 : #ifdef PY_DSREPLICA06CTR_PATCH
46209 : PY_DSREPLICA06CTR_PATCH(&drsuapi_DsReplica06Ctr_Type);
46210 : #endif
46211 : #ifdef PY_DSREPLICAINFO_PATCH
46212 : PY_DSREPLICAINFO_PATCH(&drsuapi_DsReplicaInfo_Type);
46213 : #endif
46214 : #ifdef PY_DSGETMEMBERSHIPS2CTR1_PATCH
46215 : PY_DSGETMEMBERSHIPS2CTR1_PATCH(&drsuapi_DsGetMemberships2Ctr1_Type);
46216 : #endif
46217 : #ifdef PY_DSGETMEMBERSHIPS2CTR_PATCH
46218 : PY_DSGETMEMBERSHIPS2CTR_PATCH(&drsuapi_DsGetMemberships2Ctr_Type);
46219 : #endif
46220 : #ifdef PY_DSGETMEMBERSHIPS2REQUEST1_PATCH
46221 : PY_DSGETMEMBERSHIPS2REQUEST1_PATCH(&drsuapi_DsGetMemberships2Request1_Type);
46222 : #endif
46223 : #ifdef PY_DSGETMEMBERSHIPS2REQUEST_PATCH
46224 : PY_DSGETMEMBERSHIPS2REQUEST_PATCH(&drsuapi_DsGetMemberships2Request_Type);
46225 : #endif
46226 : #ifdef PY_DSSITECOSTINFO_PATCH
46227 : PY_DSSITECOSTINFO_PATCH(&drsuapi_DsSiteCostInfo_Type);
46228 : #endif
46229 : #ifdef PY_QUERYSITESBYCOSTCTR1_PATCH
46230 : PY_QUERYSITESBYCOSTCTR1_PATCH(&drsuapi_QuerySitesByCostCtr1_Type);
46231 : #endif
46232 : #ifdef PY_QUERYSITESBYCOSTCTR_PATCH
46233 : PY_QUERYSITESBYCOSTCTR_PATCH(&drsuapi_QuerySitesByCostCtr_Type);
46234 : #endif
46235 : #ifdef PY_QUERYSITESBYCOSTREQUEST1_PATCH
46236 : PY_QUERYSITESBYCOSTREQUEST1_PATCH(&drsuapi_QuerySitesByCostRequest1_Type);
46237 : #endif
46238 : #ifdef PY_QUERYSITESBYCOSTREQUEST_PATCH
46239 : PY_QUERYSITESBYCOSTREQUEST_PATCH(&drsuapi_QuerySitesByCostRequest_Type);
46240 : #endif
46241 : #ifdef PY_DSBIND_PATCH
46242 : PY_DSBIND_PATCH(&drsuapi_DsBind_Type);
46243 : #endif
46244 : #ifdef PY_DSUNBIND_PATCH
46245 : PY_DSUNBIND_PATCH(&drsuapi_DsUnbind_Type);
46246 : #endif
46247 : #ifdef PY_DSREPLICASYNC_PATCH
46248 : PY_DSREPLICASYNC_PATCH(&drsuapi_DsReplicaSync_Type);
46249 : #endif
46250 : #ifdef PY_DSGETNCCHANGES_PATCH
46251 : PY_DSGETNCCHANGES_PATCH(&drsuapi_DsGetNCChanges_Type);
46252 : #endif
46253 : #ifdef PY_DSREPLICAUPDATEREFS_PATCH
46254 : PY_DSREPLICAUPDATEREFS_PATCH(&drsuapi_DsReplicaUpdateRefs_Type);
46255 : #endif
46256 : #ifdef PY_DSREPLICAADD_PATCH
46257 : PY_DSREPLICAADD_PATCH(&drsuapi_DsReplicaAdd_Type);
46258 : #endif
46259 : #ifdef PY_DSREPLICADEL_PATCH
46260 : PY_DSREPLICADEL_PATCH(&drsuapi_DsReplicaDel_Type);
46261 : #endif
46262 : #ifdef PY_DSREPLICAMOD_PATCH
46263 : PY_DSREPLICAMOD_PATCH(&drsuapi_DsReplicaMod_Type);
46264 : #endif
46265 : #ifdef PY_DSGETMEMBERSHIPS_PATCH
46266 : PY_DSGETMEMBERSHIPS_PATCH(&drsuapi_DsGetMemberships_Type);
46267 : #endif
46268 : #ifdef PY_DSGETNT4CHANGELOG_PATCH
46269 : PY_DSGETNT4CHANGELOG_PATCH(&drsuapi_DsGetNT4ChangeLog_Type);
46270 : #endif
46271 : #ifdef PY_DSCRACKNAMES_PATCH
46272 : PY_DSCRACKNAMES_PATCH(&drsuapi_DsCrackNames_Type);
46273 : #endif
46274 : #ifdef PY_DSWRITEACCOUNTSPN_PATCH
46275 : PY_DSWRITEACCOUNTSPN_PATCH(&drsuapi_DsWriteAccountSpn_Type);
46276 : #endif
46277 : #ifdef PY_DSREMOVEDSSERVER_PATCH
46278 : PY_DSREMOVEDSSERVER_PATCH(&drsuapi_DsRemoveDSServer_Type);
46279 : #endif
46280 : #ifdef PY_DSGETDOMAINCONTROLLERINFO_PATCH
46281 : PY_DSGETDOMAINCONTROLLERINFO_PATCH(&drsuapi_DsGetDomainControllerInfo_Type);
46282 : #endif
46283 : #ifdef PY_DSADDENTRY_PATCH
46284 : PY_DSADDENTRY_PATCH(&drsuapi_DsAddEntry_Type);
46285 : #endif
46286 : #ifdef PY_DSEXECUTEKCC_PATCH
46287 : PY_DSEXECUTEKCC_PATCH(&drsuapi_DsExecuteKCC_Type);
46288 : #endif
46289 : #ifdef PY_DSREPLICAGETINFO_PATCH
46290 : PY_DSREPLICAGETINFO_PATCH(&drsuapi_DsReplicaGetInfo_Type);
46291 : #endif
46292 : #ifdef PY_DSGETMEMBERSHIPS2_PATCH
46293 : PY_DSGETMEMBERSHIPS2_PATCH(&drsuapi_DsGetMemberships2_Type);
46294 : #endif
46295 : #ifdef PY_QUERYSITESBYCOST_PATCH
46296 : PY_QUERYSITESBYCOST_PATCH(&drsuapi_QuerySitesByCost_Type);
46297 : #endif
46298 : #ifdef PY_DRSUAPI_PATCH
46299 : PY_DRSUAPI_PATCH(&drsuapi_InterfaceType);
46300 : #endif
46301 : #ifdef PY_DRSUAPI_ABSTRACT_SYNTAX_PATCH
46302 : PY_DRSUAPI_ABSTRACT_SYNTAX_PATCH(&drsuapi_SyntaxType);
46303 : #endif
46304 : #ifdef PY_ABSTRACT_SYNTAX_PATCH
46305 : PY_ABSTRACT_SYNTAX_PATCH(&drsuapi_SyntaxType);
46306 : #endif
46307 :
46308 3505 : m = PyModule_Create(&moduledef);
46309 3505 : if (m == NULL)
46310 0 : goto out;
46311 :
46312 3505 : PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID", PyUnicode_FromString("e24d201a-4fd6-11d1-a3da-0000f875ae0d"));
46313 3505 : PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID_W2K", PyUnicode_FromString("6abec3d1-3054-41c8-a362-5a0c5b7d5d71"));
46314 3505 : PyModule_AddObject(m, "DRSUAPI_DS_BIND_GUID_W2K3", PyUnicode_FromString("6afab99c-6e26-464a-975f-f58f105218bc"));
46315 3505 : PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_FLAG_GROUP_ATTR", PyLong_FromUnsignedLongLong(0x1));
46316 3505 : PyModule_AddObject(m, "DRSUAPI_NTDSDSA_KRB5_SERVICE_GUID", PyUnicode_FromString("E3514235-4B06-11D1-AB04-00C04FC2DCD2"));
46317 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_ASYNC_OP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_ASYNC_OP));
46318 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_GETCHG_CHECK", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_GETCHG_CHECK));
46319 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_NOTIFICATION", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_UPDATE_NOTIFICATION));
46320 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_ADD_REF", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_ADD_REF));
46321 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_ALL", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_SYNC_ALL));
46322 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_DEL_REF", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_DEL_REF));
46323 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_WRIT_REP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_WRIT_REP));
46324 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_INIT_SYNC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_INIT_SYNC));
46325 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_PER_SYNC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_PER_SYNC));
46326 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_MAIL_REP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_MAIL_REP));
46327 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_ASYNC_REP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_ASYNC_REP));
46328 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_IGNORE_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_IGNORE_ERROR));
46329 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_TWOWAY_SYNC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_TWOWAY_SYNC));
46330 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_CRITICAL_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_CRITICAL_ONLY));
46331 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_GET_ANC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_GET_ANC));
46332 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_GET_NC_SIZE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_GET_NC_SIZE));
46333 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_LOCAL_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_LOCAL_ONLY));
46334 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_NONGC_RO_REP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_NONGC_RO_REP));
46335 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_BYNAME", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_SYNC_BYNAME));
46336 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_REF_OK", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_REF_OK));
46337 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_NOW", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_FULL_SYNC_NOW));
46338 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_NO_SOURCE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_NO_SOURCE));
46339 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_FULL_SYNC_IN_PROGRESS));
46340 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_FULL_SYNC_PACKET", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_FULL_SYNC_PACKET));
46341 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_REQUEUE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_SYNC_REQUEUE));
46342 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_URGENT", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_SYNC_URGENT));
46343 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_REF_GCSPN", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_REF_GCSPN));
46344 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_NO_DISCARD", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_NO_DISCARD));
46345 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_NEVER_SYNCED", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_NEVER_SYNCED));
46346 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING));
46347 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_INIT_SYNC_NOW", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_INIT_SYNC_NOW));
46348 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_PREEMPTED", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_PREEMPTED));
46349 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_FORCED", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_SYNC_FORCED));
46350 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_DISABLE_AUTO_SYNC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_DISABLE_AUTO_SYNC));
46351 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_DISABLE_PERIODIC_SYNC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_DISABLE_PERIODIC_SYNC));
46352 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_USE_COMPRESSION", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_USE_COMPRESSION));
46353 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_NEVER_NOTIFY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_NEVER_NOTIFY));
46354 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_SYNC_PAS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_SYNC_PAS));
46355 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_GET_ALL_GROUP_MEMBERSHIP));
46356 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_GET_TGT", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_GET_TGT));
46357 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_FLAGS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_UPDATE_FLAGS));
46358 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_ADDRESS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_UPDATE_ADDRESS));
46359 3505 : PyModule_AddObject(m, "DRSUAPI_DRS_UPDATE_SCHEDULE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DRS_UPDATE_SCHEDULE));
46360 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_BASE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_BASE));
46361 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION));
46362 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI));
46363 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2));
46364 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS));
46365 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1));
46366 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION));
46367 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY));
46368 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE));
46369 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2));
46370 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION));
46371 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2));
46372 3505 : 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));
46373 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND));
46374 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO));
46375 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION));
46376 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01));
46377 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP));
46378 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY));
46379 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3));
46380 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V5));
46381 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2));
46382 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6));
46383 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS));
46384 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8));
46385 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5));
46386 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6));
46387 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3));
46388 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7));
46389 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT));
46390 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS));
46391 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V10));
46392 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART2));
46393 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_RESERVED_PART3));
46394 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_ADAM", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_ADAM));
46395 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_LH_BETA2));
46396 3505 : PyModule_AddObject(m, "DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SUPPORTED_EXTENSION_RECYCLE_BIN));
46397 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_NONE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_NONE));
46398 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_REQ_ROLE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_FSMO_REQ_ROLE));
46399 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_RID_ALLOC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_FSMO_RID_ALLOC));
46400 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_RID_REQ_ROLE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_FSMO_RID_REQ_ROLE));
46401 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_REQ_PDC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_FSMO_REQ_PDC));
46402 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_FSMO_ABANDON_ROLE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_FSMO_ABANDON_ROLE));
46403 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_REPL_OBJ", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_REPL_OBJ));
46404 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_REPL_SECRET", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_REPL_SECRET));
46405 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_NONE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_NONE));
46406 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_SUCCESS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_SUCCESS));
46407 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UNKNOWN_OP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_UNKNOWN_OP));
46408 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_FSMO_NOT_OWNER));
46409 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UPDATE_ERR", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_UPDATE_ERR));
46410 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_EXCEPTION", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_EXCEPTION));
46411 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_UNKNOWN_CALLER", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_UNKNOWN_CALLER));
46412 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_RID_ALLOC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_RID_ALLOC));
46413 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_FSMO_OWNER_DELETED));
46414 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FMSO_PENDING_OP", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_FMSO_PENDING_OP));
46415 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_MISMATCH", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_MISMATCH));
46416 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_COULDNT_CONTACT", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_COULDNT_CONTACT));
46417 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_FSMO_REFUSING_ROLES));
46418 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_DIR_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_DIR_ERROR));
46419 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_FSMO_MISSING_SETTINGS));
46420 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_ACCESS_DENIED", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_ACCESS_DENIED));
46421 3505 : PyModule_AddObject(m, "DRSUAPI_EXOP_ERR_PARAM_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_EXOP_ERR_PARAM_ERROR));
46422 3505 : PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_top", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_OBJECTCLASS_top));
46423 3505 : PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_classSchema", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_OBJECTCLASS_classSchema));
46424 3505 : PyModule_AddObject(m, "DRSUAPI_OBJECTCLASS_attributeSchema", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_OBJECTCLASS_attributeSchema));
46425 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_objectClass", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_objectClass));
46426 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_cn", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_cn));
46427 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_ou", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_ou));
46428 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_description", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_description));
46429 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_member", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_member));
46430 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_distinguishedName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_distinguishedName));
46431 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_instanceType", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_instanceType));
46432 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_whenCreated", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_whenCreated));
46433 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_possSuperiors", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_possSuperiors));
46434 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_displayName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_displayName));
46435 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_hasMasterNCs", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_hasMasterNCs));
46436 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_nCName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_nCName));
46437 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_subClassOf", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_subClassOf));
46438 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_governsID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_governsID));
46439 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_mustContain", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_mustContain));
46440 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_mayContain", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_mayContain));
46441 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_rDNAttId", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_rDNAttId));
46442 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_attributeID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_attributeID));
46443 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_attributeSyntax", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_attributeSyntax));
46444 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_isSingleValued", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_isSingleValued));
46445 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_rangeLower", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_rangeLower));
46446 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_rangeUpper", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_rangeUpper));
46447 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_dMDLocation", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_dMDLocation));
46448 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_isDeleted", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_isDeleted));
46449 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_objectVersion", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_objectVersion));
46450 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_invocationId", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_invocationId));
46451 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_showInAdvancedViewOnly", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_showInAdvancedViewOnly));
46452 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_adminDisplayName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_adminDisplayName));
46453 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_adminDescription", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_adminDescription));
46454 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_oMSyntax", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_oMSyntax));
46455 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_ntSecurityDescriptor", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_ntSecurityDescriptor));
46456 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_searchFlags", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_searchFlags));
46457 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_auxiliaryClass", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_auxiliaryClass));
46458 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_lDAPDisplayName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_lDAPDisplayName));
46459 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_name", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_name));
46460 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_objectGUID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_objectGUID));
46461 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_replPropertyMetaData", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_replPropertyMetaData));
46462 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_userAccountControl", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_userAccountControl));
46463 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_badPwdCount", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_badPwdCount));
46464 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_codePage", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_codePage));
46465 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_countryCode", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_countryCode));
46466 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_currentValue", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_currentValue));
46467 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_homeDirectory", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_homeDirectory));
46468 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_homeDrive", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_homeDrive));
46469 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_lastLogoff", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_lastLogoff));
46470 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_lastLogon", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_lastLogon));
46471 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_dBCSPwd", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_dBCSPwd));
46472 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_scriptPath", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_scriptPath));
46473 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_logonHours", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_logonHours));
46474 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_userWorkstations", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_userWorkstations));
46475 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_unicodePwd", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_unicodePwd));
46476 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_ntPwdHistory", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_ntPwdHistory));
46477 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_pwdLastSet", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_pwdLastSet));
46478 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_primaryGroupID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_primaryGroupID));
46479 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_priorValue", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_priorValue));
46480 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_supplementalCredentials", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_supplementalCredentials));
46481 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_trustAuthIncoming", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_trustAuthIncoming));
46482 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_trustDirection", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_trustDirection));
46483 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_trustPartner", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_trustPartner));
46484 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_trustPosixOffset", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_trustPosixOffset));
46485 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_trustAuthOutgoing", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_trustAuthOutgoing));
46486 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_trustType", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_trustType));
46487 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_userParameters", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_userParameters));
46488 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_profilePath", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_profilePath));
46489 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_operatorCount", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_operatorCount));
46490 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_objectSid", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_objectSid));
46491 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_schemaIDGUID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_schemaIDGUID));
46492 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_adminCount", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_adminCount));
46493 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_comment", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_comment));
46494 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_accountExpires", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_accountExpires));
46495 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_lmPwdHistory", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_lmPwdHistory));
46496 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_logonCount", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_logonCount));
46497 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_systemPossSuperiors", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_systemPossSuperiors));
46498 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_systemMayContain", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_systemMayContain));
46499 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_systemMustContain", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_systemMustContain));
46500 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_systemAuxiliaryClass", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_systemAuxiliaryClass));
46501 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_sAMAccountName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_sAMAccountName));
46502 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_sAMAccountType", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_sAMAccountType));
46503 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_options", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_options));
46504 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_fSMORoleOwner", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_fSMORoleOwner));
46505 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_systemFlags", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_systemFlags));
46506 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_trustAttributes", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_trustAttributes));
46507 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_trustParent", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_trustParent));
46508 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_flatName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_flatName));
46509 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_serverReference", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_serverReference));
46510 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_serverReferenceBL", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_serverReferenceBL));
46511 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_nonSecurityMember", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_nonSecurityMember));
46512 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_initialAuthIncoming", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_initialAuthIncoming));
46513 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_initialAuthOutgoing", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_initialAuthOutgoing));
46514 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_wellKnownObjects", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_wellKnownObjects));
46515 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_dNSHostName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_dNSHostName));
46516 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_isMemberOfPartialAttributeSet", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_isMemberOfPartialAttributeSet));
46517 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_managedBy", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_managedBy));
46518 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_userPrincipalName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_userPrincipalName));
46519 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_groupType", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_groupType));
46520 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_servicePrincipalName", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_servicePrincipalName));
46521 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_lastKnownParent", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_lastKnownParent));
46522 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_objectCategory", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_objectCategory));
46523 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_gPLink", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_gPLink));
46524 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_transportAddressAttribute", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_transportAddressAttribute));
46525 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_schemaInfo", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_schemaInfo));
46526 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_Behavior_Version", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_Behavior_Version));
46527 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_TrustForestTrustInfo", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_TrustForestTrustInfo));
46528 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_KeyVersionNumber", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_KeyVersionNumber));
46529 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_NonMembers", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_NonMembers));
46530 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_MembersForAzRole", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_MembersForAzRole));
46531 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_HasDomainNCs", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_HasDomainNCs));
46532 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_hasMasterNCs", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_hasMasterNCs));
46533 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_NeverRevealGroup", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_NeverRevealGroup));
46534 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_RevealOnDemandGroup", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_RevealOnDemandGroup));
46535 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_SupportedEncryptionTypes", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_SupportedEncryptionTypes));
46536 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_msDS_HostServiceAccount", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_msDS_HostServiceAccount));
46537 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_isRecycled", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_isRecycled));
46538 3505 : PyModule_AddObject(m, "DRSUAPI_ATTID_INVALID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_ATTID_INVALID));
46539 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_OBJECT_FROM_MASTER));
46540 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_OBJECT_DYNAMIC));
46541 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_OBJECT_REMOTE_MODIFY));
46542 3505 : PyModule_AddObject(m, "DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE));
46543 3505 : PyModule_AddObject(m, "DRSUAPI_COMPRESSION_TYPE_MSZIP", PyLong_FromLong((uint16_t)DRSUAPI_COMPRESSION_TYPE_MSZIP));
46544 3505 : PyModule_AddObject(m, "DRSUAPI_COMPRESSION_TYPE_XPRESS", PyLong_FromLong((uint16_t)DRSUAPI_COMPRESSION_TYPE_XPRESS));
46545 3505 : PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_AND_DOMAIN_GROUPS));
46546 3505 : PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS));
46547 3505 : PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS));
46548 3505 : PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_LOCAL_GROUPS2));
46549 3505 : PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_MEMBERSHIP_TYPE_UNIVERSAL_GROUPS));
46550 3505 : PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_MEMBERSHIP_TYPE_GROUPMEMBERS));
46551 3505 : PyModule_AddObject(m, "DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_MEMBERSHIP_TYPE_DOMAIN_GROUPS2));
46552 3505 : PyModule_AddObject(m, "DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_NT4_CHANGELOG_GET_CHANGELOG));
46553 3505 : PyModule_AddObject(m, "DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_NT4_CHANGELOG_GET_SERIAL_NUMBERS));
46554 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_OK", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_STATUS_OK));
46555 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR));
46556 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NOT_FOUND", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_STATUS_NOT_FOUND));
46557 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE));
46558 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NO_MAPPING", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_STATUS_NO_MAPPING));
46559 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_STATUS_DOMAIN_ONLY));
46560 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_STATUS_NO_SYNTACTICAL_MAPPING));
46561 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_STATUS_TRUST_REFERRAL));
46562 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_NO_FLAGS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FLAG_NO_FLAGS));
46563 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FLAG_SYNTACTICAL_ONLY));
46564 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FLAG_EVAL_AT_DC));
46565 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_GCVERIFY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FLAG_GCVERIFY));
46566 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FLAG_TRUST_REFERRAL));
46567 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UNKNOWN", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_UNKNOWN));
46568 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_FQDN_1779", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_FQDN_1779));
46569 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_NT4_ACCOUNT));
46570 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_DISPLAY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_DISPLAY));
46571 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_GUID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_GUID));
46572 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_CANONICAL", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_CANONICAL));
46573 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_USER_PRINCIPAL));
46574 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_CANONICAL_EX));
46575 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_SERVICE_PRINCIPAL));
46576 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_SID_OR_SID_HISTORY));
46577 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_DNS_DOMAIN));
46578 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_UPN_AND_ALTSECID));
46579 3505 : 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));
46580 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_LIST_GLOBAL_CATALOG_SERVERS));
46581 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_UPN_FOR_LOGON));
46582 3505 : 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));
46583 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_STRING_SID_NAME));
46584 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_ALT_SECURITY_IDENTITIES_NAME));
46585 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_NCS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_LIST_NCS));
46586 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS));
46587 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_MAP_SCHEMA_GUID));
46588 3505 : 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));
46589 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_ROLES", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_LIST_ROLES));
46590 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_LIST_INFO_FOR_SERVER));
46591 3505 : 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));
46592 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_LIST_DOMAINS_IN_SITE));
46593 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_LIST_SERVERS_IN_SITE));
46594 3505 : PyModule_AddObject(m, "DRSUAPI_DS_NAME_FORMAT_LIST_SITES", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_NAME_FORMAT_LIST_SITES));
46595 3505 : PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_ADD", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_SPN_OPERATION_ADD));
46596 3505 : PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_REPLACE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_SPN_OPERATION_REPLACE));
46597 3505 : PyModule_AddObject(m, "DRSUAPI_DS_SPN_OPERATION_DELETE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_SPN_OPERATION_DELETE));
46598 3505 : PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_1", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DC_INFO_CTR_1));
46599 3505 : PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DC_INFO_CTR_2));
46600 3505 : PyModule_AddObject(m, "DRSUAPI_DC_INFO_CTR_3", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DC_INFO_CTR_3));
46601 3505 : PyModule_AddObject(m, "DRSUAPI_DC_CONNECTION_CTR_01", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DC_CONNECTION_CTR_01));
46602 3505 : PyModule_AddObject(m, "DRSUAPI_DIRERR_OK", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DIRERR_OK));
46603 3505 : PyModule_AddObject(m, "DRSUAPI_DIRERR_ATTRIBUTE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DIRERR_ATTRIBUTE));
46604 3505 : PyModule_AddObject(m, "DRSUAPI_DIRERR_NAME", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DIRERR_NAME));
46605 3505 : PyModule_AddObject(m, "DRSUAPI_DIRERR_REFERRAL", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DIRERR_REFERRAL));
46606 3505 : PyModule_AddObject(m, "DRSUAPI_DIRERR_SECURITY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DIRERR_SECURITY));
46607 3505 : PyModule_AddObject(m, "DRSUAPI_DIRERR_SERVICE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DIRERR_SERVICE));
46608 3505 : PyModule_AddObject(m, "DRSUAPI_DIRERR_UPDATE", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DIRERR_UPDATE));
46609 3505 : PyModule_AddObject(m, "DRSUAPI_DIRERR_SYSTEM", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DIRERR_SYSTEM));
46610 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_EMPTY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_EMPTY));
46611 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_DATA", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_DATA));
46612 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_TOKEN", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_TOKEN));
46613 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_PKG_PARAMS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_PKG_PARAMS));
46614 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_MISSING", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_MISSING));
46615 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_EXTRA", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_EXTRA));
46616 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_STREAM_TRAILER", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_STREAM_TRAILER));
46617 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_STREAM_HEADER", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_STREAM_HEADER));
46618 3505 : PyModule_AddObject(m, "DRSUAPI_SECBUFFER_READONLY", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_SECBUFFER_READONLY));
46619 3505 : PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_SUPERIOR", PyLong_FromLong((uint16_t)DRSUAPI_CH_REFTYPE_SUPERIOR));
46620 3505 : PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_SUBORDINATE", PyLong_FromLong((uint16_t)DRSUAPI_CH_REFTYPE_SUBORDINATE));
46621 3505 : PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_NSSR", PyLong_FromLong((uint16_t)DRSUAPI_CH_REFTYPE_NSSR));
46622 3505 : PyModule_AddObject(m, "DRSUAPI_CH_REFTYPE_CROSS", PyLong_FromLong((uint16_t)DRSUAPI_CH_REFTYPE_CROSS));
46623 3505 : PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_BASE_ONLY", PyLong_FromLong((uint16_t)DRSUAPI_SE_CHOICE_BASE_ONLY));
46624 3505 : PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_IMMED_CHLDRN", PyLong_FromLong((uint16_t)DRSUAPI_SE_CHOICE_IMMED_CHLDRN));
46625 3505 : PyModule_AddObject(m, "DRSUAPI_SE_CHOICE_WHOLE_SUBTREE", PyLong_FromLong((uint16_t)DRSUAPI_SE_CHOICE_WHOLE_SUBTREE));
46626 3505 : PyModule_AddObject(m, "DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_EXECUTE_KCC_ASYNCHRONOUS_OPERATION));
46627 3505 : PyModule_AddObject(m, "DRSUAPI_DS_EXECUTE_KCC_DAMPED", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_EXECUTE_KCC_DAMPED));
46628 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_GET_INFO", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_GET_INFO));
46629 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_GET_INFO2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_GET_INFO2));
46630 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_NEIGHBORS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_NEIGHBORS));
46631 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_CURSORS));
46632 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA));
46633 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_KCC_DSA_CONNECT_FAILURES));
46634 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_KCC_DSA_LINK_FAILURES));
46635 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_PENDING_OPS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_PENDING_OPS));
46636 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA));
46637 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_CURSORS2));
46638 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CURSORS3", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_CURSORS3));
46639 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_OBJ_METADATA2));
46640 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_ATTRIBUTE_VALUE_METADATA2));
46641 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_REPSTO", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_REPSTO));
46642 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_CLIENT_CONTEXTS));
46643 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_UPTODATE_VECTOR_V1));
46644 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS", PyLong_FromUnsignedLongLong((uint32_t)DRSUAPI_DS_REPLICA_INFO_SERVER_OUTGOING_CALLS));
46645 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_SYNC", PyLong_FromLong((uint16_t)DRSUAPI_DS_REPLICA_OP_TYPE_SYNC));
46646 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_ADD", PyLong_FromLong((uint16_t)DRSUAPI_DS_REPLICA_OP_TYPE_ADD));
46647 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_DELETE", PyLong_FromLong((uint16_t)DRSUAPI_DS_REPLICA_OP_TYPE_DELETE));
46648 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY", PyLong_FromLong((uint16_t)DRSUAPI_DS_REPLICA_OP_TYPE_MODIFY));
46649 3505 : PyModule_AddObject(m, "DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS", PyLong_FromLong((uint16_t)DRSUAPI_DS_REPLICA_OP_TYPE_UPDATE_REFS));
46650 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo24_Type);
46651 3505 : PyModule_AddObject(m, "DsBindInfo24", (PyObject *)(void *)&drsuapi_DsBindInfo24_Type);
46652 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo28_Type);
46653 3505 : PyModule_AddObject(m, "DsBindInfo28", (PyObject *)(void *)&drsuapi_DsBindInfo28_Type);
46654 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo32_Type);
46655 3505 : PyModule_AddObject(m, "DsBindInfo32", (PyObject *)(void *)&drsuapi_DsBindInfo32_Type);
46656 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo48_Type);
46657 3505 : PyModule_AddObject(m, "DsBindInfo48", (PyObject *)(void *)&drsuapi_DsBindInfo48_Type);
46658 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo52_Type);
46659 3505 : PyModule_AddObject(m, "DsBindInfo52", (PyObject *)(void *)&drsuapi_DsBindInfo52_Type);
46660 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfoFallBack_Type);
46661 3505 : PyModule_AddObject(m, "DsBindInfoFallBack", (PyObject *)(void *)&drsuapi_DsBindInfoFallBack_Type);
46662 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfo_Type);
46663 3505 : PyModule_AddObject(m, "DsBindInfo", (PyObject *)(void *)&drsuapi_DsBindInfo_Type);
46664 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBindInfoCtr_Type);
46665 3505 : PyModule_AddObject(m, "DsBindInfoCtr", (PyObject *)(void *)&drsuapi_DsBindInfoCtr_Type);
46666 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier_Type);
46667 3505 : PyModule_AddObject(m, "DsReplicaObjectIdentifier", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier_Type);
46668 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaSyncRequest1_Type);
46669 3505 : PyModule_AddObject(m, "DsReplicaSyncRequest1", (PyObject *)(void *)&drsuapi_DsReplicaSyncRequest1_Type);
46670 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaSyncRequest_Type);
46671 3505 : PyModule_AddObject(m, "DsReplicaSyncRequest", (PyObject *)(void *)&drsuapi_DsReplicaSyncRequest_Type);
46672 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaHighWaterMark_Type);
46673 3505 : PyModule_AddObject(m, "DsReplicaHighWaterMark", (PyObject *)(void *)&drsuapi_DsReplicaHighWaterMark_Type);
46674 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor_Type);
46675 3505 : PyModule_AddObject(m, "DsReplicaCursor", (PyObject *)(void *)&drsuapi_DsReplicaCursor_Type);
46676 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursorCtrEx_Type);
46677 3505 : PyModule_AddObject(m, "DsReplicaCursorCtrEx", (PyObject *)(void *)&drsuapi_DsReplicaCursorCtrEx_Type);
46678 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest5_Type);
46679 3505 : PyModule_AddObject(m, "DsGetNCChangesRequest5", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest5_Type);
46680 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOID_Type);
46681 3505 : PyModule_AddObject(m, "DsReplicaOID", (PyObject *)(void *)&drsuapi_DsReplicaOID_Type);
46682 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Type);
46683 3505 : PyModule_AddObject(m, "DsReplicaOIDMapping", (PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Type);
46684 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Ctr_Type);
46685 3505 : PyModule_AddObject(m, "DsReplicaOIDMapping_Ctr", (PyObject *)(void *)&drsuapi_DsReplicaOIDMapping_Ctr_Type);
46686 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsPartialAttributeSet_Type);
46687 3505 : PyModule_AddObject(m, "DsPartialAttributeSet", (PyObject *)(void *)&drsuapi_DsPartialAttributeSet_Type);
46688 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest8_Type);
46689 3505 : PyModule_AddObject(m, "DsGetNCChangesRequest8", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest8_Type);
46690 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest10_Type);
46691 3505 : PyModule_AddObject(m, "DsGetNCChangesRequest10", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest10_Type);
46692 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesRequest_Type);
46693 3505 : PyModule_AddObject(m, "DsGetNCChangesRequest", (PyObject *)(void *)&drsuapi_DsGetNCChangesRequest_Type);
46694 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2_Type);
46695 3505 : PyModule_AddObject(m, "DsReplicaCursor2", (PyObject *)(void *)&drsuapi_DsReplicaCursor2_Type);
46696 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2CtrEx_Type);
46697 3505 : PyModule_AddObject(m, "DsReplicaCursor2CtrEx", (PyObject *)(void *)&drsuapi_DsReplicaCursor2CtrEx_Type);
46698 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAttributeValue_Type);
46699 3505 : PyModule_AddObject(m, "DsAttributeValue", (PyObject *)(void *)&drsuapi_DsAttributeValue_Type);
46700 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAttributeValueCtr_Type);
46701 3505 : PyModule_AddObject(m, "DsAttributeValueCtr", (PyObject *)(void *)&drsuapi_DsAttributeValueCtr_Type);
46702 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3_Type);
46703 3505 : PyModule_AddObject(m, "DsReplicaObjectIdentifier3", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3_Type);
46704 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
46705 3505 : PyModule_AddObject(m, "DsReplicaObjectIdentifier3Binary", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier3Binary_Type);
46706 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttribute_Type);
46707 3505 : PyModule_AddObject(m, "DsReplicaAttribute", (PyObject *)(void *)&drsuapi_DsReplicaAttribute_Type);
46708 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttributeCtr_Type);
46709 3505 : PyModule_AddObject(m, "DsReplicaAttributeCtr", (PyObject *)(void *)&drsuapi_DsReplicaAttributeCtr_Type);
46710 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObject_Type);
46711 3505 : PyModule_AddObject(m, "DsReplicaObject", (PyObject *)(void *)&drsuapi_DsReplicaObject_Type);
46712 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaMetaData_Type);
46713 3505 : PyModule_AddObject(m, "DsReplicaMetaData", (PyObject *)(void *)&drsuapi_DsReplicaMetaData_Type);
46714 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaMetaDataCtr_Type);
46715 3505 : PyModule_AddObject(m, "DsReplicaMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaMetaDataCtr_Type);
46716 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectListItemEx_Type);
46717 3505 : PyModule_AddObject(m, "DsReplicaObjectListItemEx", (PyObject *)(void *)&drsuapi_DsReplicaObjectListItemEx_Type);
46718 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1_Type);
46719 3505 : PyModule_AddObject(m, "DsGetNCChangesCtr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1_Type);
46720 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaLinkedAttribute_Type);
46721 3505 : PyModule_AddObject(m, "DsReplicaLinkedAttribute", (PyObject *)(void *)&drsuapi_DsReplicaLinkedAttribute_Type);
46722 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6_Type);
46723 3505 : PyModule_AddObject(m, "DsGetNCChangesCtr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6_Type);
46724 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1TS_Type);
46725 3505 : PyModule_AddObject(m, "DsGetNCChangesCtr1TS", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr1TS_Type);
46726 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6TS_Type);
46727 3505 : PyModule_AddObject(m, "DsGetNCChangesCtr6TS", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr6TS_Type);
46728 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
46729 3505 : PyModule_AddObject(m, "DsGetNCChangesMSZIPCtr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr1_Type);
46730 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
46731 3505 : PyModule_AddObject(m, "DsGetNCChangesMSZIPCtr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesMSZIPCtr6_Type);
46732 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesXPRESSCtr1_Type);
46733 3505 : PyModule_AddObject(m, "DsGetNCChangesXPRESSCtr1", (PyObject *)(void *)&drsuapi_DsGetNCChangesXPRESSCtr1_Type);
46734 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesXPRESSCtr6_Type);
46735 3505 : PyModule_AddObject(m, "DsGetNCChangesXPRESSCtr6", (PyObject *)(void *)&drsuapi_DsGetNCChangesXPRESSCtr6_Type);
46736 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCompressedCtr_Type);
46737 3505 : PyModule_AddObject(m, "DsGetNCChangesCompressedCtr", (PyObject *)(void *)&drsuapi_DsGetNCChangesCompressedCtr_Type);
46738 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr2_Type);
46739 3505 : PyModule_AddObject(m, "DsGetNCChangesCtr2", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr2_Type);
46740 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr7_Type);
46741 3505 : PyModule_AddObject(m, "DsGetNCChangesCtr7", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr7_Type);
46742 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChangesCtr_Type);
46743 3505 : PyModule_AddObject(m, "DsGetNCChangesCtr", (PyObject *)(void *)&drsuapi_DsGetNCChangesCtr_Type);
46744 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest1_Type);
46745 3505 : PyModule_AddObject(m, "DsReplicaUpdateRefsRequest1", (PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest1_Type);
46746 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest_Type);
46747 3505 : PyModule_AddObject(m, "DsReplicaUpdateRefsRequest", (PyObject *)(void *)&drsuapi_DsReplicaUpdateRefsRequest_Type);
46748 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAddRequest1_Type);
46749 3505 : PyModule_AddObject(m, "DsReplicaAddRequest1", (PyObject *)(void *)&drsuapi_DsReplicaAddRequest1_Type);
46750 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAddRequest2_Type);
46751 3505 : PyModule_AddObject(m, "DsReplicaAddRequest2", (PyObject *)(void *)&drsuapi_DsReplicaAddRequest2_Type);
46752 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAddRequest_Type);
46753 3505 : PyModule_AddObject(m, "DsReplicaAddRequest", (PyObject *)(void *)&drsuapi_DsReplicaAddRequest_Type);
46754 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaDelRequest1_Type);
46755 3505 : PyModule_AddObject(m, "DsReplicaDelRequest1", (PyObject *)(void *)&drsuapi_DsReplicaDelRequest1_Type);
46756 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaDelRequest_Type);
46757 3505 : PyModule_AddObject(m, "DsReplicaDelRequest", (PyObject *)(void *)&drsuapi_DsReplicaDelRequest_Type);
46758 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaModRequest1_Type);
46759 3505 : PyModule_AddObject(m, "DsReplicaModRequest1", (PyObject *)(void *)&drsuapi_DsReplicaModRequest1_Type);
46760 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaModRequest_Type);
46761 3505 : PyModule_AddObject(m, "DsReplicaModRequest", (PyObject *)(void *)&drsuapi_DsReplicaModRequest_Type);
46762 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsCtr1_Type);
46763 3505 : PyModule_AddObject(m, "DsGetMembershipsCtr1", (PyObject *)(void *)&drsuapi_DsGetMembershipsCtr1_Type);
46764 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsCtr_Type);
46765 3505 : PyModule_AddObject(m, "DsGetMembershipsCtr", (PyObject *)(void *)&drsuapi_DsGetMembershipsCtr_Type);
46766 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsRequest1_Type);
46767 3505 : PyModule_AddObject(m, "DsGetMembershipsRequest1", (PyObject *)(void *)&drsuapi_DsGetMembershipsRequest1_Type);
46768 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMembershipsRequest_Type);
46769 3505 : PyModule_AddObject(m, "DsGetMembershipsRequest", (PyObject *)(void *)&drsuapi_DsGetMembershipsRequest_Type);
46770 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest1_Type);
46771 3505 : PyModule_AddObject(m, "DsGetNT4ChangeLogRequest1", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest1_Type);
46772 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest_Type);
46773 3505 : PyModule_AddObject(m, "DsGetNT4ChangeLogRequest", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogRequest_Type);
46774 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo1_Type);
46775 3505 : PyModule_AddObject(m, "DsGetNT4ChangeLogInfo1", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo1_Type);
46776 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo_Type);
46777 3505 : PyModule_AddObject(m, "DsGetNT4ChangeLogInfo", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLogInfo_Type);
46778 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsNameString_Type);
46779 3505 : PyModule_AddObject(m, "DsNameString", (PyObject *)(void *)&drsuapi_DsNameString_Type);
46780 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsNameRequest1_Type);
46781 3505 : PyModule_AddObject(m, "DsNameRequest1", (PyObject *)(void *)&drsuapi_DsNameRequest1_Type);
46782 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsNameRequest_Type);
46783 3505 : PyModule_AddObject(m, "DsNameRequest", (PyObject *)(void *)&drsuapi_DsNameRequest_Type);
46784 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsNameInfo1_Type);
46785 3505 : PyModule_AddObject(m, "DsNameInfo1", (PyObject *)(void *)&drsuapi_DsNameInfo1_Type);
46786 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsNameCtr1_Type);
46787 3505 : PyModule_AddObject(m, "DsNameCtr1", (PyObject *)(void *)&drsuapi_DsNameCtr1_Type);
46788 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsNameCtr_Type);
46789 3505 : PyModule_AddObject(m, "DsNameCtr", (PyObject *)(void *)&drsuapi_DsNameCtr_Type);
46790 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest1_Type);
46791 3505 : PyModule_AddObject(m, "DsWriteAccountSpnRequest1", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest1_Type);
46792 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest_Type);
46793 3505 : PyModule_AddObject(m, "DsWriteAccountSpnRequest", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnRequest_Type);
46794 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult1_Type);
46795 3505 : PyModule_AddObject(m, "DsWriteAccountSpnResult1", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult1_Type);
46796 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult_Type);
46797 3505 : PyModule_AddObject(m, "DsWriteAccountSpnResult", (PyObject *)(void *)&drsuapi_DsWriteAccountSpnResult_Type);
46798 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest1_Type);
46799 3505 : PyModule_AddObject(m, "DsRemoveDSServerRequest1", (PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest1_Type);
46800 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest_Type);
46801 3505 : PyModule_AddObject(m, "DsRemoveDSServerRequest", (PyObject *)(void *)&drsuapi_DsRemoveDSServerRequest_Type);
46802 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerResult1_Type);
46803 3505 : PyModule_AddObject(m, "DsRemoveDSServerResult1", (PyObject *)(void *)&drsuapi_DsRemoveDSServerResult1_Type);
46804 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServerResult_Type);
46805 3505 : PyModule_AddObject(m, "DsRemoveDSServerResult", (PyObject *)(void *)&drsuapi_DsRemoveDSServerResult_Type);
46806 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoRequest1_Type);
46807 3505 : PyModule_AddObject(m, "DsGetDCInfoRequest1", (PyObject *)(void *)&drsuapi_DsGetDCInfoRequest1_Type);
46808 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoRequest_Type);
46809 3505 : PyModule_AddObject(m, "DsGetDCInfoRequest", (PyObject *)(void *)&drsuapi_DsGetDCInfoRequest_Type);
46810 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo1_Type);
46811 3505 : PyModule_AddObject(m, "DsGetDCInfo1", (PyObject *)(void *)&drsuapi_DsGetDCInfo1_Type);
46812 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr1_Type);
46813 3505 : PyModule_AddObject(m, "DsGetDCInfoCtr1", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr1_Type);
46814 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo2_Type);
46815 3505 : PyModule_AddObject(m, "DsGetDCInfo2", (PyObject *)(void *)&drsuapi_DsGetDCInfo2_Type);
46816 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr2_Type);
46817 3505 : PyModule_AddObject(m, "DsGetDCInfoCtr2", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr2_Type);
46818 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfo3_Type);
46819 3505 : PyModule_AddObject(m, "DsGetDCInfo3", (PyObject *)(void *)&drsuapi_DsGetDCInfo3_Type);
46820 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr3_Type);
46821 3505 : PyModule_AddObject(m, "DsGetDCInfoCtr3", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr3_Type);
46822 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCConnection01_Type);
46823 3505 : PyModule_AddObject(m, "DsGetDCConnection01", (PyObject *)(void *)&drsuapi_DsGetDCConnection01_Type);
46824 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCConnectionCtr01_Type);
46825 3505 : PyModule_AddObject(m, "DsGetDCConnectionCtr01", (PyObject *)(void *)&drsuapi_DsGetDCConnectionCtr01_Type);
46826 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDCInfoCtr_Type);
46827 3505 : PyModule_AddObject(m, "DsGetDCInfoCtr", (PyObject *)(void *)&drsuapi_DsGetDCInfoCtr_Type);
46828 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectListItem_Type);
46829 3505 : PyModule_AddObject(m, "DsReplicaObjectListItem", (PyObject *)(void *)&drsuapi_DsReplicaObjectListItem_Type);
46830 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryRequest2_Type);
46831 3505 : PyModule_AddObject(m, "DsAddEntryRequest2", (PyObject *)(void *)&drsuapi_DsAddEntryRequest2_Type);
46832 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_SecBuffer_Type);
46833 3505 : PyModule_AddObject(m, "SecBuffer", (PyObject *)(void *)&drsuapi_SecBuffer_Type);
46834 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_SecBufferDesc_Type);
46835 3505 : PyModule_AddObject(m, "SecBufferDesc", (PyObject *)(void *)&drsuapi_SecBufferDesc_Type);
46836 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryRequest3_Type);
46837 3505 : PyModule_AddObject(m, "DsAddEntryRequest3", (PyObject *)(void *)&drsuapi_DsAddEntryRequest3_Type);
46838 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryRequest_Type);
46839 3505 : PyModule_AddObject(m, "DsAddEntryRequest", (PyObject *)(void *)&drsuapi_DsAddEntryRequest_Type);
46840 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfoX_Type);
46841 3505 : PyModule_AddObject(m, "DsAddEntryErrorInfoX", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfoX_Type);
46842 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_AttrErr_V1_Type);
46843 3505 : PyModule_AddObject(m, "DsAddEntry_AttrErr_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_AttrErr_V1_Type);
46844 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
46845 3505 : PyModule_AddObject(m, "DsAddEntry_AttrErrListItem_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_AttrErrListItem_V1_Type);
46846 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
46847 3505 : PyModule_AddObject(m, "DsAddEntryErrorInfo_Attr_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Attr_V1_Type);
46848 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
46849 3505 : PyModule_AddObject(m, "DsAddEntryErrorInfo_Name_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Name_V1_Type);
46850 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_NameResOp_V1_Type);
46851 3505 : PyModule_AddObject(m, "NameResOp_V1", (PyObject *)(void *)&drsuapi_NameResOp_V1_Type);
46852 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsaAddressListItem_V1_Type);
46853 3505 : PyModule_AddObject(m, "DsaAddressListItem_V1", (PyObject *)(void *)&drsuapi_DsaAddressListItem_V1_Type);
46854 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
46855 3505 : PyModule_AddObject(m, "DsAddEntry_RefErrListItem_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_RefErrListItem_V1_Type);
46856 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
46857 3505 : PyModule_AddObject(m, "DsAddEntryErrorInfo_Referr_V1", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Referr_V1_Type);
46858 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Type);
46859 3505 : PyModule_AddObject(m, "DsAddEntryErrorInfo", (PyObject *)(void *)&drsuapi_DsAddEntryErrorInfo_Type);
46860 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_V1_Type);
46861 3505 : PyModule_AddObject(m, "DsAddEntry_ErrData_V1", (PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_V1_Type);
46862 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_Type);
46863 3505 : PyModule_AddObject(m, "DsAddEntry_ErrData", (PyObject *)(void *)&drsuapi_DsAddEntry_ErrData_Type);
46864 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier2_Type);
46865 3505 : PyModule_AddObject(m, "DsReplicaObjectIdentifier2", (PyObject *)(void *)&drsuapi_DsReplicaObjectIdentifier2_Type);
46866 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryCtr2_Type);
46867 3505 : PyModule_AddObject(m, "DsAddEntryCtr2", (PyObject *)(void *)&drsuapi_DsAddEntryCtr2_Type);
46868 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryCtr3_Type);
46869 3505 : PyModule_AddObject(m, "DsAddEntryCtr3", (PyObject *)(void *)&drsuapi_DsAddEntryCtr3_Type);
46870 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntryCtr_Type);
46871 3505 : PyModule_AddObject(m, "DsAddEntryCtr", (PyObject *)(void *)&drsuapi_DsAddEntryCtr_Type);
46872 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsExecuteKCC1_Type);
46873 3505 : PyModule_AddObject(m, "DsExecuteKCC1", (PyObject *)(void *)&drsuapi_DsExecuteKCC1_Type);
46874 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsExecuteKCCRequest_Type);
46875 3505 : PyModule_AddObject(m, "DsExecuteKCCRequest", (PyObject *)(void *)&drsuapi_DsExecuteKCCRequest_Type);
46876 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest1_Type);
46877 3505 : PyModule_AddObject(m, "DsReplicaGetInfoRequest1", (PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest1_Type);
46878 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest2_Type);
46879 3505 : PyModule_AddObject(m, "DsReplicaGetInfoRequest2", (PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest2_Type);
46880 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest_Type);
46881 3505 : PyModule_AddObject(m, "DsReplicaGetInfoRequest", (PyObject *)(void *)&drsuapi_DsReplicaGetInfoRequest_Type);
46882 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaNeighbour_Type);
46883 3505 : PyModule_AddObject(m, "DsReplicaNeighbour", (PyObject *)(void *)&drsuapi_DsReplicaNeighbour_Type);
46884 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaNeighbourCtr_Type);
46885 3505 : PyModule_AddObject(m, "DsReplicaNeighbourCtr", (PyObject *)(void *)&drsuapi_DsReplicaNeighbourCtr_Type);
46886 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursorCtr_Type);
46887 3505 : PyModule_AddObject(m, "DsReplicaCursorCtr", (PyObject *)(void *)&drsuapi_DsReplicaCursorCtr_Type);
46888 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData_Type);
46889 3505 : PyModule_AddObject(m, "DsReplicaObjMetaData", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData_Type);
46890 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaDataCtr_Type);
46891 3505 : PyModule_AddObject(m, "DsReplicaObjMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaDataCtr_Type);
46892 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailure_Type);
46893 3505 : PyModule_AddObject(m, "DsReplicaKccDsaFailure", (PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailure_Type);
46894 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
46895 3505 : PyModule_AddObject(m, "DsReplicaKccDsaFailuresCtr", (PyObject *)(void *)&drsuapi_DsReplicaKccDsaFailuresCtr_Type);
46896 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOp_Type);
46897 3505 : PyModule_AddObject(m, "DsReplicaOp", (PyObject *)(void *)&drsuapi_DsReplicaOp_Type);
46898 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaOpCtr_Type);
46899 3505 : PyModule_AddObject(m, "DsReplicaOpCtr", (PyObject *)(void *)&drsuapi_DsReplicaOpCtr_Type);
46900 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData_Type);
46901 3505 : PyModule_AddObject(m, "DsReplicaAttrValMetaData", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData_Type);
46902 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
46903 3505 : PyModule_AddObject(m, "DsReplicaAttrValMetaDataCtr", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaDataCtr_Type);
46904 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor2Ctr_Type);
46905 3505 : PyModule_AddObject(m, "DsReplicaCursor2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaCursor2Ctr_Type);
46906 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor3_Type);
46907 3505 : PyModule_AddObject(m, "DsReplicaCursor3", (PyObject *)(void *)&drsuapi_DsReplicaCursor3_Type);
46908 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaCursor3Ctr_Type);
46909 3505 : PyModule_AddObject(m, "DsReplicaCursor3Ctr", (PyObject *)(void *)&drsuapi_DsReplicaCursor3Ctr_Type);
46910 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2_Type);
46911 3505 : PyModule_AddObject(m, "DsReplicaObjMetaData2", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2_Type);
46912 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2Ctr_Type);
46913 3505 : PyModule_AddObject(m, "DsReplicaObjMetaData2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaObjMetaData2Ctr_Type);
46914 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2_Type);
46915 3505 : PyModule_AddObject(m, "DsReplicaAttrValMetaData2", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2_Type);
46916 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
46917 3505 : PyModule_AddObject(m, "DsReplicaAttrValMetaData2Ctr", (PyObject *)(void *)&drsuapi_DsReplicaAttrValMetaData2Ctr_Type);
46918 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaConnection04_Type);
46919 3505 : PyModule_AddObject(m, "DsReplicaConnection04", (PyObject *)(void *)&drsuapi_DsReplicaConnection04_Type);
46920 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaConnection04Ctr_Type);
46921 3505 : PyModule_AddObject(m, "DsReplicaConnection04Ctr", (PyObject *)(void *)&drsuapi_DsReplicaConnection04Ctr_Type);
46922 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplica06_Type);
46923 3505 : PyModule_AddObject(m, "DsReplica06", (PyObject *)(void *)&drsuapi_DsReplica06_Type);
46924 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplica06Ctr_Type);
46925 3505 : PyModule_AddObject(m, "DsReplica06Ctr", (PyObject *)(void *)&drsuapi_DsReplica06Ctr_Type);
46926 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaInfo_Type);
46927 3505 : PyModule_AddObject(m, "DsReplicaInfo", (PyObject *)(void *)&drsuapi_DsReplicaInfo_Type);
46928 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr1_Type);
46929 3505 : PyModule_AddObject(m, "DsGetMemberships2Ctr1", (PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr1_Type);
46930 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr_Type);
46931 3505 : PyModule_AddObject(m, "DsGetMemberships2Ctr", (PyObject *)(void *)&drsuapi_DsGetMemberships2Ctr_Type);
46932 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Request1_Type);
46933 3505 : PyModule_AddObject(m, "DsGetMemberships2Request1", (PyObject *)(void *)&drsuapi_DsGetMemberships2Request1_Type);
46934 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2Request_Type);
46935 3505 : PyModule_AddObject(m, "DsGetMemberships2Request", (PyObject *)(void *)&drsuapi_DsGetMemberships2Request_Type);
46936 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsSiteCostInfo_Type);
46937 3505 : PyModule_AddObject(m, "DsSiteCostInfo", (PyObject *)(void *)&drsuapi_DsSiteCostInfo_Type);
46938 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostCtr1_Type);
46939 3505 : PyModule_AddObject(m, "QuerySitesByCostCtr1", (PyObject *)(void *)&drsuapi_QuerySitesByCostCtr1_Type);
46940 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostCtr_Type);
46941 3505 : PyModule_AddObject(m, "QuerySitesByCostCtr", (PyObject *)(void *)&drsuapi_QuerySitesByCostCtr_Type);
46942 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostRequest1_Type);
46943 3505 : PyModule_AddObject(m, "QuerySitesByCostRequest1", (PyObject *)(void *)&drsuapi_QuerySitesByCostRequest1_Type);
46944 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCostRequest_Type);
46945 3505 : PyModule_AddObject(m, "QuerySitesByCostRequest", (PyObject *)(void *)&drsuapi_QuerySitesByCostRequest_Type);
46946 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsBind_Type);
46947 3505 : PyModule_AddObject(m, "DsBind", (PyObject *)(void *)&drsuapi_DsBind_Type);
46948 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsUnbind_Type);
46949 3505 : PyModule_AddObject(m, "DsUnbind", (PyObject *)(void *)&drsuapi_DsUnbind_Type);
46950 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaSync_Type);
46951 3505 : PyModule_AddObject(m, "DsReplicaSync", (PyObject *)(void *)&drsuapi_DsReplicaSync_Type);
46952 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNCChanges_Type);
46953 3505 : PyModule_AddObject(m, "DsGetNCChanges", (PyObject *)(void *)&drsuapi_DsGetNCChanges_Type);
46954 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaUpdateRefs_Type);
46955 3505 : PyModule_AddObject(m, "DsReplicaUpdateRefs", (PyObject *)(void *)&drsuapi_DsReplicaUpdateRefs_Type);
46956 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaAdd_Type);
46957 3505 : PyModule_AddObject(m, "DsReplicaAdd", (PyObject *)(void *)&drsuapi_DsReplicaAdd_Type);
46958 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaDel_Type);
46959 3505 : PyModule_AddObject(m, "DsReplicaDel", (PyObject *)(void *)&drsuapi_DsReplicaDel_Type);
46960 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaMod_Type);
46961 3505 : PyModule_AddObject(m, "DsReplicaMod", (PyObject *)(void *)&drsuapi_DsReplicaMod_Type);
46962 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships_Type);
46963 3505 : PyModule_AddObject(m, "DsGetMemberships", (PyObject *)(void *)&drsuapi_DsGetMemberships_Type);
46964 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetNT4ChangeLog_Type);
46965 3505 : PyModule_AddObject(m, "DsGetNT4ChangeLog", (PyObject *)(void *)&drsuapi_DsGetNT4ChangeLog_Type);
46966 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsCrackNames_Type);
46967 3505 : PyModule_AddObject(m, "DsCrackNames", (PyObject *)(void *)&drsuapi_DsCrackNames_Type);
46968 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsWriteAccountSpn_Type);
46969 3505 : PyModule_AddObject(m, "DsWriteAccountSpn", (PyObject *)(void *)&drsuapi_DsWriteAccountSpn_Type);
46970 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsRemoveDSServer_Type);
46971 3505 : PyModule_AddObject(m, "DsRemoveDSServer", (PyObject *)(void *)&drsuapi_DsRemoveDSServer_Type);
46972 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetDomainControllerInfo_Type);
46973 3505 : PyModule_AddObject(m, "DsGetDomainControllerInfo", (PyObject *)(void *)&drsuapi_DsGetDomainControllerInfo_Type);
46974 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsAddEntry_Type);
46975 3505 : PyModule_AddObject(m, "DsAddEntry", (PyObject *)(void *)&drsuapi_DsAddEntry_Type);
46976 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsExecuteKCC_Type);
46977 3505 : PyModule_AddObject(m, "DsExecuteKCC", (PyObject *)(void *)&drsuapi_DsExecuteKCC_Type);
46978 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsReplicaGetInfo_Type);
46979 3505 : PyModule_AddObject(m, "DsReplicaGetInfo", (PyObject *)(void *)&drsuapi_DsReplicaGetInfo_Type);
46980 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_DsGetMemberships2_Type);
46981 3505 : PyModule_AddObject(m, "DsGetMemberships2", (PyObject *)(void *)&drsuapi_DsGetMemberships2_Type);
46982 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_QuerySitesByCost_Type);
46983 3505 : PyModule_AddObject(m, "QuerySitesByCost", (PyObject *)(void *)&drsuapi_QuerySitesByCost_Type);
46984 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_InterfaceType);
46985 3505 : PyModule_AddObject(m, "drsuapi", (PyObject *)(void *)&drsuapi_InterfaceType);
46986 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_SyntaxType);
46987 3505 : PyModule_AddObject(m, "drsuapi_abstract_syntax", (PyObject *)(void *)&drsuapi_SyntaxType);
46988 3505 : Py_INCREF((PyObject *)(void *)&drsuapi_SyntaxType);
46989 3505 : PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&drsuapi_SyntaxType);
46990 : #ifdef PY_MOD_DRSUAPI_PATCH
46991 : PY_MOD_DRSUAPI_PATCH(m);
46992 : #endif
46993 3505 : out:
46994 3505 : Py_XDECREF(dep_samba_dcerpc_security);
46995 3505 : Py_XDECREF(dep_samba_dcerpc_misc);
46996 3505 : Py_XDECREF(dep_samba_dcerpc_lsa);
46997 3505 : Py_XDECREF(dep_samba_dcerpc_samr);
46998 3505 : Py_XDECREF(dep_talloc);
46999 3505 : Py_XDECREF(dep_samba_dcerpc_base);
47000 3505 : return m;
47001 :
47002 : }
|