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_dnsserver.h"
12 : #include "bin/default/librpc/gen_ndr/ndr_dnsserver_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 45918 : static inline unsigned long long ndr_sizeof2uintmax(size_t var_size)
33 : {
34 45918 : switch (var_size) {
35 0 : case 8:
36 0 : return UINT64_MAX;
37 40542 : case 4:
38 40542 : return UINT32_MAX;
39 2200 : case 2:
40 2200 : return UINT16_MAX;
41 3176 : case 1:
42 3176 : 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/misc.h"
65 : #include "librpc/gen_ndr/dnsp.h"
66 : static PyTypeObject DNS_RPC_BUFFER_Type;
67 : static PyTypeObject DNS_RPC_UTF8_STRING_LIST_Type;
68 : static PyTypeObject DNS_RPC_NAME_AND_PARAM_Type;
69 : static PyTypeObject DNS_RPC_NAME_Type;
70 : static PyTypeObject DNS_RPC_NODE_Type;
71 : static PyTypeObject DNS_RPC_RECORD_SOA_Type;
72 : static PyTypeObject DNS_RPC_RECORD_NAME_PREFERENCE_Type;
73 : static PyTypeObject DNS_RPC_RECORD_STRING_Type;
74 : static PyTypeObject DNS_RPC_RECORD_SRV_Type;
75 : static PyTypeObject DNS_RPC_RECORD_DATA_Type;
76 : static PyTypeObject DNS_RPC_RECORD_Type;
77 : static PyTypeObject DNS_RPC_RECORD_BUF_Type;
78 : static PyTypeObject IP4_ARRAY_Type;
79 : static PyTypeObject DNS_ADDR_Type;
80 : static PyTypeObject DNS_ADDR_ARRAY_Type;
81 : static PyTypeObject DNS_RPC_IP_VALIDATE_Type;
82 : static PyTypeObject DNS_RPC_SERVER_INFO_W2K_Type;
83 : static PyTypeObject DNS_EXTENSION_Type;
84 : static PyTypeObject DNS_RPC_SERVER_INFO_DOTNET_Type;
85 : static PyTypeObject DNS_RPC_SERVER_INFO_LONGHORN_Type;
86 : static PyTypeObject DNS_RPC_DP_REPLICA_Type;
87 : static PyTypeObject DNS_RPC_DP_INFO_Type;
88 : static PyTypeObject DNS_RPC_DP_ENUM_Type;
89 : static PyTypeObject DNS_RPC_DP_LIST_Type;
90 : static PyTypeObject DNS_RPC_ENLIST_DP_Type;
91 : static PyTypeObject DNS_RPC_ZONE_CHANGE_DP_Type;
92 : static PyTypeObject DNS_RPC_ZONE_W2K_Type;
93 : static PyTypeObject DNS_RPC_ZONE_DOTNET_Type;
94 : static PyTypeObject DNS_RPC_ZONE_LIST_W2K_Type;
95 : static PyTypeObject DNS_RPC_ZONE_LIST_DOTNET_Type;
96 : static PyTypeObject DNS_RPC_ZONE_INFO_W2K_Type;
97 : static PyTypeObject DNS_RPC_ZONE_INFO_DOTNET_Type;
98 : static PyTypeObject DNS_RPC_ZONE_INFO_LONGHORN_Type;
99 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_W2K_Type;
100 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_DOTNET_Type;
101 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type;
102 : static PyTypeObject DNS_RPC_ZONE_DATABASE_W2K_Type;
103 : static PyTypeObject DNS_RPC_ZONE_DATABASE_DOTNET_Type;
104 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_W2K_Type;
105 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type;
106 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type;
107 : static PyTypeObject DNS_RPC_ZONE_EXPORT_INFO_Type;
108 : static PyTypeObject DNS_RPC_ENUM_ZONES_FILTER_Type;
109 : static PyTypeObject DNS_RPC_FORWARDERS_W2K_Type;
110 : static PyTypeObject DNS_RPC_FORWARDERS_DOTNET_Type;
111 : static PyTypeObject DNS_RPC_FORWARDERS_LONGHORN_Type;
112 : static PyTypeObject DNS_RPC_AUTOCONFIGURE_Type;
113 : static PyTypeObject DNSSRV_STAT_HEADER_Type;
114 : static PyTypeObject DNSSRV_STAT_Type;
115 : static PyTypeObject DNSSRV_RPC_UNION_Type;
116 : static PyTypeObject DNS_RPC_RECORDS_Type;
117 : static PyTypeObject DNS_RPC_RECORDS_ARRAY_Type;
118 : static PyTypeObject dnsserver_InterfaceType;
119 : static PyTypeObject DnssrvOperation_Type;
120 : static PyTypeObject DnssrvQuery_Type;
121 : static PyTypeObject DnssrvComplexOperation_Type;
122 : static PyTypeObject DnssrvEnumRecords_Type;
123 : static PyTypeObject DnssrvUpdateRecord_Type;
124 : static PyTypeObject DnssrvOperation2_Type;
125 : static PyTypeObject DnssrvQuery2_Type;
126 : static PyTypeObject DnssrvComplexOperation2_Type;
127 : static PyTypeObject DnssrvEnumRecords2_Type;
128 : static PyTypeObject DnssrvUpdateRecord2_Type;
129 :
130 : static PyTypeObject *BaseObject_Type;
131 : static PyTypeObject *ClientConnection_Type;
132 : static PyTypeObject *ndr_syntax_id_Type;
133 :
134 0 : static PyObject *py_DNS_RPC_BUFFER_get_dwLength(PyObject *obj, void *closure)
135 : {
136 0 : struct DNS_RPC_BUFFER *object = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(obj);
137 0 : PyObject *py_dwLength;
138 0 : py_dwLength = PyLong_FromUnsignedLongLong((uint32_t)object->dwLength);
139 0 : return py_dwLength;
140 : }
141 :
142 0 : static int py_DNS_RPC_BUFFER_set_dwLength(PyObject *py_obj, PyObject *value, void *closure)
143 : {
144 0 : struct DNS_RPC_BUFFER *object = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(py_obj);
145 0 : if (value == NULL) {
146 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLength");
147 0 : return -1;
148 : }
149 : {
150 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLength));
151 0 : if (PyLong_Check(value)) {
152 0 : unsigned long long test_var;
153 0 : test_var = PyLong_AsUnsignedLongLong(value);
154 0 : if (PyErr_Occurred() != NULL) {
155 0 : return -1;
156 : }
157 0 : if (test_var > uint_max) {
158 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
159 : PyLong_Type.tp_name, uint_max, test_var);
160 0 : return -1;
161 : }
162 0 : object->dwLength = test_var;
163 : } else {
164 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
165 : PyLong_Type.tp_name);
166 0 : return -1;
167 : }
168 : }
169 0 : return 0;
170 : }
171 :
172 0 : static PyObject *py_DNS_RPC_BUFFER_get_Buffer(PyObject *obj, void *closure)
173 : {
174 0 : struct DNS_RPC_BUFFER *object = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(obj);
175 0 : PyObject *py_Buffer;
176 0 : py_Buffer = PyList_New(object->dwLength);
177 0 : if (py_Buffer == NULL) {
178 0 : return NULL;
179 : }
180 : {
181 : int Buffer_cntr_0;
182 0 : for (Buffer_cntr_0 = 0; Buffer_cntr_0 < (object->dwLength); Buffer_cntr_0++) {
183 0 : PyObject *py_Buffer_0;
184 0 : py_Buffer_0 = PyLong_FromLong((uint16_t)object->Buffer[Buffer_cntr_0]);
185 0 : PyList_SetItem(py_Buffer, Buffer_cntr_0, py_Buffer_0);
186 : }
187 : }
188 0 : return py_Buffer;
189 : }
190 :
191 0 : static int py_DNS_RPC_BUFFER_set_Buffer(PyObject *py_obj, PyObject *value, void *closure)
192 : {
193 0 : struct DNS_RPC_BUFFER *object = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(py_obj);
194 0 : if (value == NULL) {
195 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Buffer");
196 0 : return -1;
197 : }
198 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
199 : {
200 0 : int Buffer_cntr_0;
201 0 : object->Buffer = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->Buffer, PyList_GET_SIZE(value));
202 0 : if (!object->Buffer) { return -1; }
203 0 : talloc_set_name_const(object->Buffer, "ARRAY: object->Buffer");
204 0 : for (Buffer_cntr_0 = 0; Buffer_cntr_0 < PyList_GET_SIZE(value); Buffer_cntr_0++) {
205 0 : if (PyList_GET_ITEM(value, Buffer_cntr_0) == NULL) {
206 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Buffer[Buffer_cntr_0]");
207 0 : return -1;
208 : }
209 : {
210 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Buffer[Buffer_cntr_0]));
211 0 : if (PyLong_Check(PyList_GET_ITEM(value, Buffer_cntr_0))) {
212 0 : unsigned long long test_var;
213 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, Buffer_cntr_0));
214 0 : if (PyErr_Occurred() != NULL) {
215 0 : return -1;
216 : }
217 0 : if (test_var > uint_max) {
218 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
219 : PyLong_Type.tp_name, uint_max, test_var);
220 0 : return -1;
221 : }
222 0 : object->Buffer[Buffer_cntr_0] = test_var;
223 : } else {
224 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
225 : PyLong_Type.tp_name);
226 0 : return -1;
227 : }
228 : }
229 : }
230 : }
231 0 : return 0;
232 : }
233 :
234 : static PyGetSetDef py_DNS_RPC_BUFFER_getsetters[] = {
235 : {
236 : .name = discard_const_p(char, "dwLength"),
237 : .get = py_DNS_RPC_BUFFER_get_dwLength,
238 : .set = py_DNS_RPC_BUFFER_set_dwLength,
239 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
240 : },
241 : {
242 : .name = discard_const_p(char, "Buffer"),
243 : .get = py_DNS_RPC_BUFFER_get_Buffer,
244 : .set = py_DNS_RPC_BUFFER_set_Buffer,
245 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
246 : },
247 : { .name = NULL }
248 : };
249 :
250 0 : static PyObject *py_DNS_RPC_BUFFER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
251 : {
252 0 : return pytalloc_new(struct DNS_RPC_BUFFER, type);
253 : }
254 :
255 :
256 : static PyTypeObject DNS_RPC_BUFFER_Type = {
257 : PyVarObject_HEAD_INIT(NULL, 0)
258 : .tp_name = "dnsserver.DNS_RPC_BUFFER",
259 : .tp_getset = py_DNS_RPC_BUFFER_getsetters,
260 : .tp_methods = NULL,
261 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
262 : .tp_new = py_DNS_RPC_BUFFER_new,
263 : };
264 :
265 :
266 0 : static PyObject *py_DNS_RPC_UTF8_STRING_LIST_get_dwCount(PyObject *obj, void *closure)
267 : {
268 0 : struct DNS_RPC_UTF8_STRING_LIST *object = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(obj);
269 0 : PyObject *py_dwCount;
270 0 : py_dwCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwCount);
271 0 : return py_dwCount;
272 : }
273 :
274 0 : static int py_DNS_RPC_UTF8_STRING_LIST_set_dwCount(PyObject *py_obj, PyObject *value, void *closure)
275 : {
276 0 : struct DNS_RPC_UTF8_STRING_LIST *object = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(py_obj);
277 0 : if (value == NULL) {
278 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwCount");
279 0 : return -1;
280 : }
281 : {
282 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwCount));
283 0 : if (PyLong_Check(value)) {
284 0 : unsigned long long test_var;
285 0 : test_var = PyLong_AsUnsignedLongLong(value);
286 0 : if (PyErr_Occurred() != NULL) {
287 0 : return -1;
288 : }
289 0 : if (test_var > uint_max) {
290 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
291 : PyLong_Type.tp_name, uint_max, test_var);
292 0 : return -1;
293 : }
294 0 : object->dwCount = test_var;
295 : } else {
296 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
297 : PyLong_Type.tp_name);
298 0 : return -1;
299 : }
300 : }
301 0 : return 0;
302 : }
303 :
304 0 : static PyObject *py_DNS_RPC_UTF8_STRING_LIST_get_pszStrings(PyObject *obj, void *closure)
305 : {
306 0 : struct DNS_RPC_UTF8_STRING_LIST *object = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(obj);
307 0 : PyObject *py_pszStrings;
308 0 : py_pszStrings = PyList_New(object->dwCount);
309 0 : if (py_pszStrings == NULL) {
310 0 : return NULL;
311 : }
312 : {
313 : int pszStrings_cntr_0;
314 0 : for (pszStrings_cntr_0 = 0; pszStrings_cntr_0 < (object->dwCount); pszStrings_cntr_0++) {
315 0 : PyObject *py_pszStrings_0;
316 0 : if (object->pszStrings[pszStrings_cntr_0] == NULL) {
317 0 : py_pszStrings_0 = Py_None;
318 0 : Py_INCREF(py_pszStrings_0);
319 : } else {
320 0 : if (object->pszStrings[pszStrings_cntr_0] == NULL) {
321 0 : py_pszStrings_0 = Py_None;
322 0 : Py_INCREF(py_pszStrings_0);
323 : } else {
324 0 : py_pszStrings_0 = PyUnicode_Decode(object->pszStrings[pszStrings_cntr_0], strlen(object->pszStrings[pszStrings_cntr_0]), "utf-8", "ignore");
325 : }
326 : }
327 0 : PyList_SetItem(py_pszStrings, pszStrings_cntr_0, py_pszStrings_0);
328 : }
329 : }
330 0 : return py_pszStrings;
331 : }
332 :
333 0 : static int py_DNS_RPC_UTF8_STRING_LIST_set_pszStrings(PyObject *py_obj, PyObject *value, void *closure)
334 : {
335 0 : struct DNS_RPC_UTF8_STRING_LIST *object = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(py_obj);
336 0 : if (value == NULL) {
337 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszStrings");
338 0 : return -1;
339 : }
340 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
341 : {
342 0 : int pszStrings_cntr_0;
343 0 : object->pszStrings = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pszStrings, PyList_GET_SIZE(value));
344 0 : if (!object->pszStrings) { return -1; }
345 0 : talloc_set_name_const(object->pszStrings, "ARRAY: object->pszStrings");
346 0 : for (pszStrings_cntr_0 = 0; pszStrings_cntr_0 < PyList_GET_SIZE(value); pszStrings_cntr_0++) {
347 0 : if (PyList_GET_ITEM(value, pszStrings_cntr_0) == NULL) {
348 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszStrings[pszStrings_cntr_0]");
349 0 : return -1;
350 : }
351 0 : if (PyList_GET_ITEM(value, pszStrings_cntr_0) == Py_None) {
352 0 : object->pszStrings[pszStrings_cntr_0] = NULL;
353 : } else {
354 0 : object->pszStrings[pszStrings_cntr_0] = NULL;
355 : {
356 0 : const char *test_str;
357 0 : const char *talloc_str;
358 0 : PyObject *unicode = NULL;
359 0 : if (PyUnicode_Check(PyList_GET_ITEM(value, pszStrings_cntr_0))) {
360 0 : unicode = PyUnicode_AsEncodedString(PyList_GET_ITEM(value, pszStrings_cntr_0), "utf-8", "ignore");
361 0 : if (unicode == NULL) {
362 0 : PyErr_NoMemory();
363 0 : return -1;
364 : }
365 0 : test_str = PyBytes_AS_STRING(unicode);
366 0 : } else if (PyBytes_Check(PyList_GET_ITEM(value, pszStrings_cntr_0))) {
367 0 : test_str = PyBytes_AS_STRING(PyList_GET_ITEM(value, pszStrings_cntr_0));
368 : } else {
369 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(PyList_GET_ITEM(value, pszStrings_cntr_0))->tp_name);
370 0 : return -1;
371 : }
372 0 : talloc_str = talloc_strdup(object->pszStrings, test_str);
373 0 : if (unicode != NULL) {
374 0 : Py_DECREF(unicode);
375 : }
376 0 : if (talloc_str == NULL) {
377 0 : PyErr_NoMemory();
378 0 : return -1;
379 : }
380 0 : object->pszStrings[pszStrings_cntr_0] = talloc_str;
381 : }
382 : }
383 : }
384 : }
385 0 : return 0;
386 : }
387 :
388 : static PyGetSetDef py_DNS_RPC_UTF8_STRING_LIST_getsetters[] = {
389 : {
390 : .name = discard_const_p(char, "dwCount"),
391 : .get = py_DNS_RPC_UTF8_STRING_LIST_get_dwCount,
392 : .set = py_DNS_RPC_UTF8_STRING_LIST_set_dwCount,
393 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
394 : },
395 : {
396 : .name = discard_const_p(char, "pszStrings"),
397 : .get = py_DNS_RPC_UTF8_STRING_LIST_get_pszStrings,
398 : .set = py_DNS_RPC_UTF8_STRING_LIST_set_pszStrings,
399 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
400 : },
401 : { .name = NULL }
402 : };
403 :
404 0 : static PyObject *py_DNS_RPC_UTF8_STRING_LIST_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
405 : {
406 0 : return pytalloc_new(struct DNS_RPC_UTF8_STRING_LIST, type);
407 : }
408 :
409 :
410 : static PyTypeObject DNS_RPC_UTF8_STRING_LIST_Type = {
411 : PyVarObject_HEAD_INIT(NULL, 0)
412 : .tp_name = "dnsserver.DNS_RPC_UTF8_STRING_LIST",
413 : .tp_getset = py_DNS_RPC_UTF8_STRING_LIST_getsetters,
414 : .tp_methods = NULL,
415 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
416 : .tp_new = py_DNS_RPC_UTF8_STRING_LIST_new,
417 : };
418 :
419 :
420 0 : static PyObject *py_DNS_RPC_NAME_AND_PARAM_get_dwParam(PyObject *obj, void *closure)
421 : {
422 0 : struct DNS_RPC_NAME_AND_PARAM *object = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(obj);
423 0 : PyObject *py_dwParam;
424 0 : py_dwParam = PyLong_FromUnsignedLongLong((uint32_t)object->dwParam);
425 0 : return py_dwParam;
426 : }
427 :
428 799 : static int py_DNS_RPC_NAME_AND_PARAM_set_dwParam(PyObject *py_obj, PyObject *value, void *closure)
429 : {
430 799 : struct DNS_RPC_NAME_AND_PARAM *object = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(py_obj);
431 799 : if (value == NULL) {
432 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwParam");
433 0 : return -1;
434 : }
435 : {
436 799 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwParam));
437 799 : if (PyLong_Check(value)) {
438 0 : unsigned long long test_var;
439 799 : test_var = PyLong_AsUnsignedLongLong(value);
440 799 : if (PyErr_Occurred() != NULL) {
441 0 : return -1;
442 : }
443 799 : if (test_var > uint_max) {
444 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
445 : PyLong_Type.tp_name, uint_max, test_var);
446 0 : return -1;
447 : }
448 799 : object->dwParam = test_var;
449 : } else {
450 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
451 : PyLong_Type.tp_name);
452 0 : return -1;
453 : }
454 : }
455 799 : return 0;
456 : }
457 :
458 0 : static PyObject *py_DNS_RPC_NAME_AND_PARAM_get_pszNodeName(PyObject *obj, void *closure)
459 : {
460 0 : struct DNS_RPC_NAME_AND_PARAM *object = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(obj);
461 0 : PyObject *py_pszNodeName;
462 0 : if (object->pszNodeName == NULL) {
463 0 : Py_RETURN_NONE;
464 : }
465 0 : if (object->pszNodeName == NULL) {
466 0 : py_pszNodeName = Py_None;
467 0 : Py_INCREF(py_pszNodeName);
468 : } else {
469 0 : if (object->pszNodeName == NULL) {
470 0 : py_pszNodeName = Py_None;
471 0 : Py_INCREF(py_pszNodeName);
472 : } else {
473 0 : py_pszNodeName = PyUnicode_Decode(object->pszNodeName, strlen(object->pszNodeName), "utf-8", "ignore");
474 : }
475 : }
476 0 : return py_pszNodeName;
477 : }
478 :
479 799 : static int py_DNS_RPC_NAME_AND_PARAM_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
480 : {
481 799 : struct DNS_RPC_NAME_AND_PARAM *object = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(py_obj);
482 799 : if (value == NULL) {
483 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszNodeName");
484 0 : return -1;
485 : }
486 799 : if (value == Py_None) {
487 0 : object->pszNodeName = NULL;
488 : } else {
489 799 : object->pszNodeName = NULL;
490 : {
491 0 : const char *test_str;
492 0 : const char *talloc_str;
493 799 : PyObject *unicode = NULL;
494 799 : if (PyUnicode_Check(value)) {
495 799 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
496 799 : if (unicode == NULL) {
497 0 : PyErr_NoMemory();
498 0 : return -1;
499 : }
500 799 : test_str = PyBytes_AS_STRING(unicode);
501 0 : } else if (PyBytes_Check(value)) {
502 0 : test_str = PyBytes_AS_STRING(value);
503 : } else {
504 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
505 0 : return -1;
506 : }
507 799 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
508 799 : if (unicode != NULL) {
509 799 : Py_DECREF(unicode);
510 : }
511 799 : if (talloc_str == NULL) {
512 0 : PyErr_NoMemory();
513 0 : return -1;
514 : }
515 799 : object->pszNodeName = talloc_str;
516 : }
517 : }
518 799 : return 0;
519 : }
520 :
521 : static PyGetSetDef py_DNS_RPC_NAME_AND_PARAM_getsetters[] = {
522 : {
523 : .name = discard_const_p(char, "dwParam"),
524 : .get = py_DNS_RPC_NAME_AND_PARAM_get_dwParam,
525 : .set = py_DNS_RPC_NAME_AND_PARAM_set_dwParam,
526 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
527 : },
528 : {
529 : .name = discard_const_p(char, "pszNodeName"),
530 : .get = py_DNS_RPC_NAME_AND_PARAM_get_pszNodeName,
531 : .set = py_DNS_RPC_NAME_AND_PARAM_set_pszNodeName,
532 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
533 : },
534 : { .name = NULL }
535 : };
536 :
537 799 : static PyObject *py_DNS_RPC_NAME_AND_PARAM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
538 : {
539 799 : return pytalloc_new(struct DNS_RPC_NAME_AND_PARAM, type);
540 : }
541 :
542 :
543 : static PyTypeObject DNS_RPC_NAME_AND_PARAM_Type = {
544 : PyVarObject_HEAD_INIT(NULL, 0)
545 : .tp_name = "dnsserver.DNS_RPC_NAME_AND_PARAM",
546 : .tp_getset = py_DNS_RPC_NAME_AND_PARAM_getsetters,
547 : .tp_methods = NULL,
548 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
549 : .tp_new = py_DNS_RPC_NAME_AND_PARAM_new,
550 : };
551 :
552 :
553 0 : static PyObject *py_DNS_RPC_NAME_get_len(PyObject *obj, void *closure)
554 : {
555 0 : struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(obj);
556 0 : PyObject *py_len;
557 0 : py_len = PyLong_FromLong((uint16_t)object->len);
558 0 : return py_len;
559 : }
560 :
561 2805 : static int py_DNS_RPC_NAME_set_len(PyObject *py_obj, PyObject *value, void *closure)
562 : {
563 2805 : struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
564 2805 : if (value == NULL) {
565 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->len");
566 0 : return -1;
567 : }
568 : {
569 2805 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->len));
570 2805 : if (PyLong_Check(value)) {
571 0 : unsigned long long test_var;
572 2805 : test_var = PyLong_AsUnsignedLongLong(value);
573 2805 : if (PyErr_Occurred() != NULL) {
574 0 : return -1;
575 : }
576 2805 : if (test_var > uint_max) {
577 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
578 : PyLong_Type.tp_name, uint_max, test_var);
579 0 : return -1;
580 : }
581 2805 : object->len = test_var;
582 : } else {
583 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
584 : PyLong_Type.tp_name);
585 0 : return -1;
586 : }
587 : }
588 2805 : return 0;
589 : }
590 :
591 516 : static PyObject *py_DNS_RPC_NAME_get_str(PyObject *obj, void *closure)
592 : {
593 516 : struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(obj);
594 0 : PyObject *py_str;
595 516 : if (object->str == NULL) {
596 0 : py_str = Py_None;
597 0 : Py_INCREF(py_str);
598 : } else {
599 516 : py_str = PyUnicode_Decode(object->str, strlen(object->str), "utf-8", "ignore");
600 : }
601 516 : return py_str;
602 : }
603 :
604 2805 : static int py_DNS_RPC_NAME_set_str(PyObject *py_obj, PyObject *value, void *closure)
605 : {
606 2805 : struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
607 2805 : if (value == NULL) {
608 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->str");
609 0 : return -1;
610 : }
611 : {
612 0 : const char *test_str;
613 0 : const char *talloc_str;
614 2805 : PyObject *unicode = NULL;
615 2805 : if (PyUnicode_Check(value)) {
616 2805 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
617 2805 : if (unicode == NULL) {
618 0 : PyErr_NoMemory();
619 0 : return -1;
620 : }
621 2805 : test_str = PyBytes_AS_STRING(unicode);
622 0 : } else if (PyBytes_Check(value)) {
623 0 : test_str = PyBytes_AS_STRING(value);
624 : } else {
625 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
626 0 : return -1;
627 : }
628 2805 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
629 2805 : if (unicode != NULL) {
630 2805 : Py_DECREF(unicode);
631 : }
632 2805 : if (talloc_str == NULL) {
633 0 : PyErr_NoMemory();
634 0 : return -1;
635 : }
636 2805 : object->str = talloc_str;
637 : }
638 2805 : return 0;
639 : }
640 :
641 : static PyGetSetDef py_DNS_RPC_NAME_getsetters[] = {
642 : {
643 : .name = discard_const_p(char, "len"),
644 : .get = py_DNS_RPC_NAME_get_len,
645 : .set = py_DNS_RPC_NAME_set_len,
646 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
647 : },
648 : {
649 : .name = discard_const_p(char, "str"),
650 : .get = py_DNS_RPC_NAME_get_str,
651 : .set = py_DNS_RPC_NAME_set_str,
652 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
653 : },
654 : { .name = NULL }
655 : };
656 :
657 1790 : static PyObject *py_DNS_RPC_NAME_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
658 : {
659 1790 : return pytalloc_new(struct DNS_RPC_NAME, type);
660 : }
661 :
662 0 : static PyObject *py_DNS_RPC_NAME_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
663 : {
664 0 : struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
665 0 : PyObject *ret = NULL;
666 0 : DATA_BLOB blob;
667 0 : enum ndr_err_code err;
668 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
669 0 : if (tmp_ctx == NULL) {
670 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
671 0 : return NULL;
672 : }
673 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_NAME);
674 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
675 0 : TALLOC_FREE(tmp_ctx);
676 0 : PyErr_SetNdrError(err);
677 0 : return NULL;
678 : }
679 :
680 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
681 0 : TALLOC_FREE(tmp_ctx);
682 0 : return ret;
683 : }
684 :
685 0 : static PyObject *py_DNS_RPC_NAME_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
686 : {
687 0 : struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
688 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
689 0 : Py_ssize_t blob_length = 0;
690 0 : enum ndr_err_code err;
691 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
692 0 : PyObject *allow_remaining_obj = NULL;
693 0 : bool allow_remaining = false;
694 :
695 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
696 : discard_const_p(char *, kwnames),
697 : &blob.data, &blob_length,
698 : &allow_remaining_obj)) {
699 0 : return NULL;
700 : }
701 0 : blob.length = blob_length;
702 :
703 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
704 0 : allow_remaining = true;
705 : }
706 :
707 0 : if (allow_remaining) {
708 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_NAME);
709 : } else {
710 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_NAME);
711 : }
712 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
713 0 : PyErr_SetNdrError(err);
714 0 : return NULL;
715 : }
716 :
717 0 : Py_RETURN_NONE;
718 : }
719 :
720 0 : static PyObject *py_DNS_RPC_NAME_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
721 : {
722 0 : struct DNS_RPC_NAME *object = (struct DNS_RPC_NAME *)pytalloc_get_ptr(py_obj);
723 0 : PyObject *ret;
724 0 : char *retstr;
725 :
726 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_NAME, "DNS_RPC_NAME", object);
727 0 : ret = PyUnicode_FromString(retstr);
728 0 : talloc_free(retstr);
729 :
730 0 : return ret;
731 : }
732 :
733 : static PyMethodDef py_DNS_RPC_NAME_methods[] = {
734 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_NAME_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
735 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_NAME_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
736 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_NAME_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
737 : { NULL, NULL, 0, NULL }
738 : };
739 :
740 :
741 : static PyTypeObject DNS_RPC_NAME_Type = {
742 : PyVarObject_HEAD_INIT(NULL, 0)
743 : .tp_name = "dnsserver.DNS_RPC_NAME",
744 : .tp_getset = py_DNS_RPC_NAME_getsetters,
745 : .tp_methods = py_DNS_RPC_NAME_methods,
746 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
747 : .tp_new = py_DNS_RPC_NAME_new,
748 : };
749 :
750 :
751 0 : static PyObject *py_DNS_RPC_NODE_get_wLength(PyObject *obj, void *closure)
752 : {
753 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
754 0 : PyObject *py_wLength;
755 0 : py_wLength = PyLong_FromLong((uint16_t)object->wLength);
756 0 : return py_wLength;
757 : }
758 :
759 0 : static int py_DNS_RPC_NODE_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
760 : {
761 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
762 0 : if (value == NULL) {
763 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wLength");
764 0 : return -1;
765 : }
766 : {
767 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wLength));
768 0 : if (PyLong_Check(value)) {
769 0 : unsigned long long test_var;
770 0 : test_var = PyLong_AsUnsignedLongLong(value);
771 0 : if (PyErr_Occurred() != NULL) {
772 0 : return -1;
773 : }
774 0 : if (test_var > uint_max) {
775 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
776 : PyLong_Type.tp_name, uint_max, test_var);
777 0 : return -1;
778 : }
779 0 : object->wLength = test_var;
780 : } else {
781 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
782 : PyLong_Type.tp_name);
783 0 : return -1;
784 : }
785 : }
786 0 : return 0;
787 : }
788 :
789 0 : static PyObject *py_DNS_RPC_NODE_get_wRecordCount(PyObject *obj, void *closure)
790 : {
791 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
792 0 : PyObject *py_wRecordCount;
793 0 : py_wRecordCount = PyLong_FromLong((uint16_t)object->wRecordCount);
794 0 : return py_wRecordCount;
795 : }
796 :
797 0 : static int py_DNS_RPC_NODE_set_wRecordCount(PyObject *py_obj, PyObject *value, void *closure)
798 : {
799 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
800 0 : if (value == NULL) {
801 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wRecordCount");
802 0 : return -1;
803 : }
804 : {
805 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wRecordCount));
806 0 : if (PyLong_Check(value)) {
807 0 : unsigned long long test_var;
808 0 : test_var = PyLong_AsUnsignedLongLong(value);
809 0 : if (PyErr_Occurred() != NULL) {
810 0 : return -1;
811 : }
812 0 : if (test_var > uint_max) {
813 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
814 : PyLong_Type.tp_name, uint_max, test_var);
815 0 : return -1;
816 : }
817 0 : object->wRecordCount = test_var;
818 : } else {
819 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
820 : PyLong_Type.tp_name);
821 0 : return -1;
822 : }
823 : }
824 0 : return 0;
825 : }
826 :
827 0 : static PyObject *py_DNS_RPC_NODE_get_dwFlags(PyObject *obj, void *closure)
828 : {
829 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
830 0 : PyObject *py_dwFlags;
831 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwFlags);
832 0 : return py_dwFlags;
833 : }
834 :
835 0 : static int py_DNS_RPC_NODE_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
836 : {
837 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
838 0 : if (value == NULL) {
839 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFlags");
840 0 : return -1;
841 : }
842 : {
843 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
844 0 : if (PyLong_Check(value)) {
845 0 : unsigned long long test_var;
846 0 : test_var = PyLong_AsUnsignedLongLong(value);
847 0 : if (PyErr_Occurred() != NULL) {
848 0 : return -1;
849 : }
850 0 : if (test_var > uint_max) {
851 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
852 : PyLong_Type.tp_name, uint_max, test_var);
853 0 : return -1;
854 : }
855 0 : object->dwFlags = test_var;
856 : } else {
857 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
858 : PyLong_Type.tp_name);
859 0 : return -1;
860 : }
861 : }
862 0 : return 0;
863 : }
864 :
865 0 : static PyObject *py_DNS_RPC_NODE_get_dwChildCount(PyObject *obj, void *closure)
866 : {
867 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
868 0 : PyObject *py_dwChildCount;
869 0 : py_dwChildCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwChildCount);
870 0 : return py_dwChildCount;
871 : }
872 :
873 0 : static int py_DNS_RPC_NODE_set_dwChildCount(PyObject *py_obj, PyObject *value, void *closure)
874 : {
875 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
876 0 : if (value == NULL) {
877 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwChildCount");
878 0 : return -1;
879 : }
880 : {
881 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwChildCount));
882 0 : if (PyLong_Check(value)) {
883 0 : unsigned long long test_var;
884 0 : test_var = PyLong_AsUnsignedLongLong(value);
885 0 : if (PyErr_Occurred() != NULL) {
886 0 : return -1;
887 : }
888 0 : if (test_var > uint_max) {
889 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
890 : PyLong_Type.tp_name, uint_max, test_var);
891 0 : return -1;
892 : }
893 0 : object->dwChildCount = test_var;
894 : } else {
895 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
896 : PyLong_Type.tp_name);
897 0 : return -1;
898 : }
899 : }
900 0 : return 0;
901 : }
902 :
903 0 : static PyObject *py_DNS_RPC_NODE_get_dnsNodeName(PyObject *obj, void *closure)
904 : {
905 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(obj);
906 0 : PyObject *py_dnsNodeName;
907 0 : py_dnsNodeName = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->dnsNodeName);
908 0 : return py_dnsNodeName;
909 : }
910 :
911 0 : static int py_DNS_RPC_NODE_set_dnsNodeName(PyObject *py_obj, PyObject *value, void *closure)
912 : {
913 0 : struct DNS_RPC_NODE *object = (struct DNS_RPC_NODE *)pytalloc_get_ptr(py_obj);
914 0 : if (value == NULL) {
915 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dnsNodeName");
916 0 : return -1;
917 : }
918 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
919 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
920 0 : PyErr_NoMemory();
921 0 : return -1;
922 : }
923 0 : object->dnsNodeName = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
924 0 : return 0;
925 : }
926 :
927 : static PyGetSetDef py_DNS_RPC_NODE_getsetters[] = {
928 : {
929 : .name = discard_const_p(char, "wLength"),
930 : .get = py_DNS_RPC_NODE_get_wLength,
931 : .set = py_DNS_RPC_NODE_set_wLength,
932 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
933 : },
934 : {
935 : .name = discard_const_p(char, "wRecordCount"),
936 : .get = py_DNS_RPC_NODE_get_wRecordCount,
937 : .set = py_DNS_RPC_NODE_set_wRecordCount,
938 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
939 : },
940 : {
941 : .name = discard_const_p(char, "dwFlags"),
942 : .get = py_DNS_RPC_NODE_get_dwFlags,
943 : .set = py_DNS_RPC_NODE_set_dwFlags,
944 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
945 : },
946 : {
947 : .name = discard_const_p(char, "dwChildCount"),
948 : .get = py_DNS_RPC_NODE_get_dwChildCount,
949 : .set = py_DNS_RPC_NODE_set_dwChildCount,
950 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
951 : },
952 : {
953 : .name = discard_const_p(char, "dnsNodeName"),
954 : .get = py_DNS_RPC_NODE_get_dnsNodeName,
955 : .set = py_DNS_RPC_NODE_set_dnsNodeName,
956 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
957 : },
958 : { .name = NULL }
959 : };
960 :
961 0 : static PyObject *py_DNS_RPC_NODE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
962 : {
963 0 : return pytalloc_new(struct DNS_RPC_NODE, type);
964 : }
965 :
966 :
967 : static PyTypeObject DNS_RPC_NODE_Type = {
968 : PyVarObject_HEAD_INIT(NULL, 0)
969 : .tp_name = "dnsserver.DNS_RPC_NODE",
970 : .tp_getset = py_DNS_RPC_NODE_getsetters,
971 : .tp_methods = NULL,
972 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
973 : .tp_new = py_DNS_RPC_NODE_new,
974 : };
975 :
976 :
977 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwSerialNo(PyObject *obj, void *closure)
978 : {
979 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
980 0 : PyObject *py_dwSerialNo;
981 0 : py_dwSerialNo = PyLong_FromUnsignedLongLong((uint32_t)object->dwSerialNo);
982 0 : return py_dwSerialNo;
983 : }
984 :
985 0 : static int py_DNS_RPC_RECORD_SOA_set_dwSerialNo(PyObject *py_obj, PyObject *value, void *closure)
986 : {
987 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
988 0 : if (value == NULL) {
989 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwSerialNo");
990 0 : return -1;
991 : }
992 : {
993 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwSerialNo));
994 0 : if (PyLong_Check(value)) {
995 0 : unsigned long long test_var;
996 0 : test_var = PyLong_AsUnsignedLongLong(value);
997 0 : if (PyErr_Occurred() != NULL) {
998 0 : return -1;
999 : }
1000 0 : if (test_var > uint_max) {
1001 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1002 : PyLong_Type.tp_name, uint_max, test_var);
1003 0 : return -1;
1004 : }
1005 0 : object->dwSerialNo = test_var;
1006 : } else {
1007 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1008 : PyLong_Type.tp_name);
1009 0 : return -1;
1010 : }
1011 : }
1012 0 : return 0;
1013 : }
1014 :
1015 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwRefresh(PyObject *obj, void *closure)
1016 : {
1017 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
1018 0 : PyObject *py_dwRefresh;
1019 0 : py_dwRefresh = PyLong_FromUnsignedLongLong((uint32_t)object->dwRefresh);
1020 0 : return py_dwRefresh;
1021 : }
1022 :
1023 0 : static int py_DNS_RPC_RECORD_SOA_set_dwRefresh(PyObject *py_obj, PyObject *value, void *closure)
1024 : {
1025 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
1026 0 : if (value == NULL) {
1027 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRefresh");
1028 0 : return -1;
1029 : }
1030 : {
1031 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRefresh));
1032 0 : if (PyLong_Check(value)) {
1033 0 : unsigned long long test_var;
1034 0 : test_var = PyLong_AsUnsignedLongLong(value);
1035 0 : if (PyErr_Occurred() != NULL) {
1036 0 : return -1;
1037 : }
1038 0 : if (test_var > uint_max) {
1039 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1040 : PyLong_Type.tp_name, uint_max, test_var);
1041 0 : return -1;
1042 : }
1043 0 : object->dwRefresh = test_var;
1044 : } else {
1045 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1046 : PyLong_Type.tp_name);
1047 0 : return -1;
1048 : }
1049 : }
1050 0 : return 0;
1051 : }
1052 :
1053 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwRetry(PyObject *obj, void *closure)
1054 : {
1055 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
1056 0 : PyObject *py_dwRetry;
1057 0 : py_dwRetry = PyLong_FromUnsignedLongLong((uint32_t)object->dwRetry);
1058 0 : return py_dwRetry;
1059 : }
1060 :
1061 0 : static int py_DNS_RPC_RECORD_SOA_set_dwRetry(PyObject *py_obj, PyObject *value, void *closure)
1062 : {
1063 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
1064 0 : if (value == NULL) {
1065 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRetry");
1066 0 : return -1;
1067 : }
1068 : {
1069 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRetry));
1070 0 : if (PyLong_Check(value)) {
1071 0 : unsigned long long test_var;
1072 0 : test_var = PyLong_AsUnsignedLongLong(value);
1073 0 : if (PyErr_Occurred() != NULL) {
1074 0 : return -1;
1075 : }
1076 0 : if (test_var > uint_max) {
1077 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1078 : PyLong_Type.tp_name, uint_max, test_var);
1079 0 : return -1;
1080 : }
1081 0 : object->dwRetry = test_var;
1082 : } else {
1083 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1084 : PyLong_Type.tp_name);
1085 0 : return -1;
1086 : }
1087 : }
1088 0 : return 0;
1089 : }
1090 :
1091 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwExpire(PyObject *obj, void *closure)
1092 : {
1093 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
1094 0 : PyObject *py_dwExpire;
1095 0 : py_dwExpire = PyLong_FromUnsignedLongLong((uint32_t)object->dwExpire);
1096 0 : return py_dwExpire;
1097 : }
1098 :
1099 0 : static int py_DNS_RPC_RECORD_SOA_set_dwExpire(PyObject *py_obj, PyObject *value, void *closure)
1100 : {
1101 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
1102 0 : if (value == NULL) {
1103 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwExpire");
1104 0 : return -1;
1105 : }
1106 : {
1107 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwExpire));
1108 0 : if (PyLong_Check(value)) {
1109 0 : unsigned long long test_var;
1110 0 : test_var = PyLong_AsUnsignedLongLong(value);
1111 0 : if (PyErr_Occurred() != NULL) {
1112 0 : return -1;
1113 : }
1114 0 : if (test_var > uint_max) {
1115 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1116 : PyLong_Type.tp_name, uint_max, test_var);
1117 0 : return -1;
1118 : }
1119 0 : object->dwExpire = test_var;
1120 : } else {
1121 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1122 : PyLong_Type.tp_name);
1123 0 : return -1;
1124 : }
1125 : }
1126 0 : return 0;
1127 : }
1128 :
1129 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_dwMinimumTtl(PyObject *obj, void *closure)
1130 : {
1131 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
1132 0 : PyObject *py_dwMinimumTtl;
1133 0 : py_dwMinimumTtl = PyLong_FromUnsignedLongLong((uint32_t)object->dwMinimumTtl);
1134 0 : return py_dwMinimumTtl;
1135 : }
1136 :
1137 0 : static int py_DNS_RPC_RECORD_SOA_set_dwMinimumTtl(PyObject *py_obj, PyObject *value, void *closure)
1138 : {
1139 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
1140 0 : if (value == NULL) {
1141 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwMinimumTtl");
1142 0 : return -1;
1143 : }
1144 : {
1145 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwMinimumTtl));
1146 0 : if (PyLong_Check(value)) {
1147 0 : unsigned long long test_var;
1148 0 : test_var = PyLong_AsUnsignedLongLong(value);
1149 0 : if (PyErr_Occurred() != NULL) {
1150 0 : return -1;
1151 : }
1152 0 : if (test_var > uint_max) {
1153 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1154 : PyLong_Type.tp_name, uint_max, test_var);
1155 0 : return -1;
1156 : }
1157 0 : object->dwMinimumTtl = test_var;
1158 : } else {
1159 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1160 : PyLong_Type.tp_name);
1161 0 : return -1;
1162 : }
1163 : }
1164 0 : return 0;
1165 : }
1166 :
1167 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_NamePrimaryServer(PyObject *obj, void *closure)
1168 : {
1169 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
1170 0 : PyObject *py_NamePrimaryServer;
1171 0 : py_NamePrimaryServer = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->NamePrimaryServer);
1172 0 : return py_NamePrimaryServer;
1173 : }
1174 :
1175 0 : static int py_DNS_RPC_RECORD_SOA_set_NamePrimaryServer(PyObject *py_obj, PyObject *value, void *closure)
1176 : {
1177 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
1178 0 : if (value == NULL) {
1179 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->NamePrimaryServer");
1180 0 : return -1;
1181 : }
1182 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
1183 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1184 0 : PyErr_NoMemory();
1185 0 : return -1;
1186 : }
1187 0 : object->NamePrimaryServer = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
1188 0 : return 0;
1189 : }
1190 :
1191 0 : static PyObject *py_DNS_RPC_RECORD_SOA_get_ZoneAdministratorEmail(PyObject *obj, void *closure)
1192 : {
1193 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(obj);
1194 0 : PyObject *py_ZoneAdministratorEmail;
1195 0 : py_ZoneAdministratorEmail = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->ZoneAdministratorEmail);
1196 0 : return py_ZoneAdministratorEmail;
1197 : }
1198 :
1199 0 : static int py_DNS_RPC_RECORD_SOA_set_ZoneAdministratorEmail(PyObject *py_obj, PyObject *value, void *closure)
1200 : {
1201 0 : struct DNS_RPC_RECORD_SOA *object = (struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(py_obj);
1202 0 : if (value == NULL) {
1203 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ZoneAdministratorEmail");
1204 0 : return -1;
1205 : }
1206 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
1207 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1208 0 : PyErr_NoMemory();
1209 0 : return -1;
1210 : }
1211 0 : object->ZoneAdministratorEmail = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
1212 0 : return 0;
1213 : }
1214 :
1215 : static PyGetSetDef py_DNS_RPC_RECORD_SOA_getsetters[] = {
1216 : {
1217 : .name = discard_const_p(char, "dwSerialNo"),
1218 : .get = py_DNS_RPC_RECORD_SOA_get_dwSerialNo,
1219 : .set = py_DNS_RPC_RECORD_SOA_set_dwSerialNo,
1220 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1221 : },
1222 : {
1223 : .name = discard_const_p(char, "dwRefresh"),
1224 : .get = py_DNS_RPC_RECORD_SOA_get_dwRefresh,
1225 : .set = py_DNS_RPC_RECORD_SOA_set_dwRefresh,
1226 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1227 : },
1228 : {
1229 : .name = discard_const_p(char, "dwRetry"),
1230 : .get = py_DNS_RPC_RECORD_SOA_get_dwRetry,
1231 : .set = py_DNS_RPC_RECORD_SOA_set_dwRetry,
1232 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1233 : },
1234 : {
1235 : .name = discard_const_p(char, "dwExpire"),
1236 : .get = py_DNS_RPC_RECORD_SOA_get_dwExpire,
1237 : .set = py_DNS_RPC_RECORD_SOA_set_dwExpire,
1238 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1239 : },
1240 : {
1241 : .name = discard_const_p(char, "dwMinimumTtl"),
1242 : .get = py_DNS_RPC_RECORD_SOA_get_dwMinimumTtl,
1243 : .set = py_DNS_RPC_RECORD_SOA_set_dwMinimumTtl,
1244 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
1245 : },
1246 : {
1247 : .name = discard_const_p(char, "NamePrimaryServer"),
1248 : .get = py_DNS_RPC_RECORD_SOA_get_NamePrimaryServer,
1249 : .set = py_DNS_RPC_RECORD_SOA_set_NamePrimaryServer,
1250 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1251 : },
1252 : {
1253 : .name = discard_const_p(char, "ZoneAdministratorEmail"),
1254 : .get = py_DNS_RPC_RECORD_SOA_get_ZoneAdministratorEmail,
1255 : .set = py_DNS_RPC_RECORD_SOA_set_ZoneAdministratorEmail,
1256 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1257 : },
1258 : { .name = NULL }
1259 : };
1260 :
1261 0 : static PyObject *py_DNS_RPC_RECORD_SOA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1262 : {
1263 0 : return pytalloc_new(struct DNS_RPC_RECORD_SOA, type);
1264 : }
1265 :
1266 :
1267 : static PyTypeObject DNS_RPC_RECORD_SOA_Type = {
1268 : PyVarObject_HEAD_INIT(NULL, 0)
1269 : .tp_name = "dnsserver.DNS_RPC_RECORD_SOA",
1270 : .tp_getset = py_DNS_RPC_RECORD_SOA_getsetters,
1271 : .tp_methods = NULL,
1272 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1273 : .tp_new = py_DNS_RPC_RECORD_SOA_new,
1274 : };
1275 :
1276 :
1277 43 : static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_get_wPreference(PyObject *obj, void *closure)
1278 : {
1279 43 : struct DNS_RPC_RECORD_NAME_PREFERENCE *object = (struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(obj);
1280 0 : PyObject *py_wPreference;
1281 43 : py_wPreference = PyLong_FromLong((uint16_t)object->wPreference);
1282 43 : return py_wPreference;
1283 : }
1284 :
1285 436 : static int py_DNS_RPC_RECORD_NAME_PREFERENCE_set_wPreference(PyObject *py_obj, PyObject *value, void *closure)
1286 : {
1287 436 : struct DNS_RPC_RECORD_NAME_PREFERENCE *object = (struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(py_obj);
1288 436 : if (value == NULL) {
1289 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wPreference");
1290 0 : return -1;
1291 : }
1292 : {
1293 436 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wPreference));
1294 436 : if (PyLong_Check(value)) {
1295 0 : unsigned long long test_var;
1296 436 : test_var = PyLong_AsUnsignedLongLong(value);
1297 436 : if (PyErr_Occurred() != NULL) {
1298 3 : return -1;
1299 : }
1300 433 : if (test_var > uint_max) {
1301 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1302 : PyLong_Type.tp_name, uint_max, test_var);
1303 0 : return -1;
1304 : }
1305 433 : object->wPreference = test_var;
1306 : } else {
1307 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1308 : PyLong_Type.tp_name);
1309 0 : return -1;
1310 : }
1311 : }
1312 433 : return 0;
1313 : }
1314 :
1315 909 : static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_get_nameExchange(PyObject *obj, void *closure)
1316 : {
1317 909 : struct DNS_RPC_RECORD_NAME_PREFERENCE *object = (struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(obj);
1318 0 : PyObject *py_nameExchange;
1319 909 : py_nameExchange = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->nameExchange);
1320 909 : return py_nameExchange;
1321 : }
1322 :
1323 0 : static int py_DNS_RPC_RECORD_NAME_PREFERENCE_set_nameExchange(PyObject *py_obj, PyObject *value, void *closure)
1324 : {
1325 0 : struct DNS_RPC_RECORD_NAME_PREFERENCE *object = (struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(py_obj);
1326 0 : if (value == NULL) {
1327 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nameExchange");
1328 0 : return -1;
1329 : }
1330 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
1331 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1332 0 : PyErr_NoMemory();
1333 0 : return -1;
1334 : }
1335 0 : object->nameExchange = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
1336 0 : return 0;
1337 : }
1338 :
1339 : static PyGetSetDef py_DNS_RPC_RECORD_NAME_PREFERENCE_getsetters[] = {
1340 : {
1341 : .name = discard_const_p(char, "wPreference"),
1342 : .get = py_DNS_RPC_RECORD_NAME_PREFERENCE_get_wPreference,
1343 : .set = py_DNS_RPC_RECORD_NAME_PREFERENCE_set_wPreference,
1344 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
1345 : },
1346 : {
1347 : .name = discard_const_p(char, "nameExchange"),
1348 : .get = py_DNS_RPC_RECORD_NAME_PREFERENCE_get_nameExchange,
1349 : .set = py_DNS_RPC_RECORD_NAME_PREFERENCE_set_nameExchange,
1350 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1351 : },
1352 : { .name = NULL }
1353 : };
1354 :
1355 436 : static PyObject *py_DNS_RPC_RECORD_NAME_PREFERENCE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1356 : {
1357 436 : return pytalloc_new(struct DNS_RPC_RECORD_NAME_PREFERENCE, type);
1358 : }
1359 :
1360 :
1361 : static PyTypeObject DNS_RPC_RECORD_NAME_PREFERENCE_Type = {
1362 : PyVarObject_HEAD_INIT(NULL, 0)
1363 : .tp_name = "dnsserver.DNS_RPC_RECORD_NAME_PREFERENCE",
1364 : .tp_getset = py_DNS_RPC_RECORD_NAME_PREFERENCE_getsetters,
1365 : .tp_methods = NULL,
1366 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1367 : .tp_new = py_DNS_RPC_RECORD_NAME_PREFERENCE_new,
1368 : };
1369 :
1370 :
1371 68 : static PyObject *py_DNS_RPC_RECORD_STRING_get_count(PyObject *obj, void *closure)
1372 : {
1373 68 : struct DNS_RPC_RECORD_STRING *object = (struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(obj);
1374 0 : PyObject *py_count;
1375 68 : py_count = PyLong_FromLong((uint16_t)object->count);
1376 68 : return py_count;
1377 : }
1378 :
1379 371 : static int py_DNS_RPC_RECORD_STRING_set_count(PyObject *py_obj, PyObject *value, void *closure)
1380 : {
1381 371 : struct DNS_RPC_RECORD_STRING *object = (struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(py_obj);
1382 371 : if (value == NULL) {
1383 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
1384 0 : return -1;
1385 : }
1386 : {
1387 371 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
1388 371 : if (PyLong_Check(value)) {
1389 0 : unsigned long long test_var;
1390 371 : test_var = PyLong_AsUnsignedLongLong(value);
1391 371 : if (PyErr_Occurred() != NULL) {
1392 0 : return -1;
1393 : }
1394 371 : if (test_var > uint_max) {
1395 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1396 : PyLong_Type.tp_name, uint_max, test_var);
1397 0 : return -1;
1398 : }
1399 371 : object->count = test_var;
1400 : } else {
1401 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1402 : PyLong_Type.tp_name);
1403 0 : return -1;
1404 : }
1405 : }
1406 371 : return 0;
1407 : }
1408 :
1409 89 : static PyObject *py_DNS_RPC_RECORD_STRING_get_str(PyObject *obj, void *closure)
1410 : {
1411 89 : struct DNS_RPC_RECORD_STRING *object = (struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(obj);
1412 0 : PyObject *py_str;
1413 89 : py_str = PyList_New(object->count);
1414 89 : if (py_str == NULL) {
1415 0 : return NULL;
1416 : }
1417 : {
1418 : int str_cntr_0;
1419 288 : for (str_cntr_0 = 0; str_cntr_0 < (object->count); str_cntr_0++) {
1420 0 : PyObject *py_str_0;
1421 199 : py_str_0 = pytalloc_reference_ex(&DNS_RPC_NAME_Type, object->str, &object->str[str_cntr_0]);
1422 199 : PyList_SetItem(py_str, str_cntr_0, py_str_0);
1423 : }
1424 : }
1425 89 : return py_str;
1426 : }
1427 :
1428 371 : static int py_DNS_RPC_RECORD_STRING_set_str(PyObject *py_obj, PyObject *value, void *closure)
1429 : {
1430 371 : struct DNS_RPC_RECORD_STRING *object = (struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(py_obj);
1431 371 : if (value == NULL) {
1432 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->str");
1433 0 : return -1;
1434 : }
1435 371 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
1436 : {
1437 0 : int str_cntr_0;
1438 371 : object->str = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->str, PyList_GET_SIZE(value));
1439 371 : if (!object->str) { return -1; }
1440 371 : talloc_set_name_const(object->str, "ARRAY: object->str");
1441 765 : for (str_cntr_0 = 0; str_cntr_0 < PyList_GET_SIZE(value); str_cntr_0++) {
1442 394 : if (PyList_GET_ITEM(value, str_cntr_0) == NULL) {
1443 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->str[str_cntr_0]");
1444 0 : return -1;
1445 : }
1446 394 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, PyList_GET_ITEM(value, str_cntr_0), return -1;);
1447 394 : if (talloc_reference(object->str, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, str_cntr_0))) == NULL) {
1448 0 : PyErr_NoMemory();
1449 0 : return -1;
1450 : }
1451 394 : object->str[str_cntr_0] = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(PyList_GET_ITEM(value, str_cntr_0));
1452 : }
1453 : }
1454 371 : return 0;
1455 : }
1456 :
1457 : static PyGetSetDef py_DNS_RPC_RECORD_STRING_getsetters[] = {
1458 : {
1459 : .name = discard_const_p(char, "count"),
1460 : .get = py_DNS_RPC_RECORD_STRING_get_count,
1461 : .set = py_DNS_RPC_RECORD_STRING_set_count,
1462 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
1463 : },
1464 : {
1465 : .name = discard_const_p(char, "str"),
1466 : .get = py_DNS_RPC_RECORD_STRING_get_str,
1467 : .set = py_DNS_RPC_RECORD_STRING_set_str,
1468 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1469 : },
1470 : { .name = NULL }
1471 : };
1472 :
1473 371 : static PyObject *py_DNS_RPC_RECORD_STRING_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1474 : {
1475 371 : return pytalloc_new(struct DNS_RPC_RECORD_STRING, type);
1476 : }
1477 :
1478 :
1479 : static PyTypeObject DNS_RPC_RECORD_STRING_Type = {
1480 : PyVarObject_HEAD_INIT(NULL, 0)
1481 : .tp_name = "dnsserver.DNS_RPC_RECORD_STRING",
1482 : .tp_getset = py_DNS_RPC_RECORD_STRING_getsetters,
1483 : .tp_methods = NULL,
1484 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1485 : .tp_new = py_DNS_RPC_RECORD_STRING_new,
1486 : };
1487 :
1488 :
1489 85 : static PyObject *py_DNS_RPC_RECORD_SRV_get_wPriority(PyObject *obj, void *closure)
1490 : {
1491 85 : struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(obj);
1492 0 : PyObject *py_wPriority;
1493 85 : py_wPriority = PyLong_FromLong((uint16_t)object->wPriority);
1494 85 : return py_wPriority;
1495 : }
1496 :
1497 591 : static int py_DNS_RPC_RECORD_SRV_set_wPriority(PyObject *py_obj, PyObject *value, void *closure)
1498 : {
1499 591 : struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(py_obj);
1500 591 : if (value == NULL) {
1501 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wPriority");
1502 0 : return -1;
1503 : }
1504 : {
1505 591 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wPriority));
1506 591 : if (PyLong_Check(value)) {
1507 0 : unsigned long long test_var;
1508 591 : test_var = PyLong_AsUnsignedLongLong(value);
1509 591 : if (PyErr_Occurred() != NULL) {
1510 0 : return -1;
1511 : }
1512 591 : if (test_var > uint_max) {
1513 3 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1514 : PyLong_Type.tp_name, uint_max, test_var);
1515 3 : return -1;
1516 : }
1517 588 : object->wPriority = test_var;
1518 : } else {
1519 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1520 : PyLong_Type.tp_name);
1521 0 : return -1;
1522 : }
1523 : }
1524 588 : return 0;
1525 : }
1526 :
1527 83 : static PyObject *py_DNS_RPC_RECORD_SRV_get_wWeight(PyObject *obj, void *closure)
1528 : {
1529 83 : struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(obj);
1530 0 : PyObject *py_wWeight;
1531 83 : py_wWeight = PyLong_FromLong((uint16_t)object->wWeight);
1532 83 : return py_wWeight;
1533 : }
1534 :
1535 588 : static int py_DNS_RPC_RECORD_SRV_set_wWeight(PyObject *py_obj, PyObject *value, void *closure)
1536 : {
1537 588 : struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(py_obj);
1538 588 : if (value == NULL) {
1539 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wWeight");
1540 0 : return -1;
1541 : }
1542 : {
1543 588 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wWeight));
1544 588 : if (PyLong_Check(value)) {
1545 0 : unsigned long long test_var;
1546 588 : test_var = PyLong_AsUnsignedLongLong(value);
1547 588 : if (PyErr_Occurred() != NULL) {
1548 0 : return -1;
1549 : }
1550 588 : if (test_var > uint_max) {
1551 3 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1552 : PyLong_Type.tp_name, uint_max, test_var);
1553 3 : return -1;
1554 : }
1555 585 : object->wWeight = test_var;
1556 : } else {
1557 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1558 : PyLong_Type.tp_name);
1559 0 : return -1;
1560 : }
1561 : }
1562 585 : return 0;
1563 : }
1564 :
1565 83 : static PyObject *py_DNS_RPC_RECORD_SRV_get_wPort(PyObject *obj, void *closure)
1566 : {
1567 83 : struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(obj);
1568 0 : PyObject *py_wPort;
1569 83 : py_wPort = PyLong_FromLong((uint16_t)object->wPort);
1570 83 : return py_wPort;
1571 : }
1572 :
1573 585 : static int py_DNS_RPC_RECORD_SRV_set_wPort(PyObject *py_obj, PyObject *value, void *closure)
1574 : {
1575 585 : struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(py_obj);
1576 585 : if (value == NULL) {
1577 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wPort");
1578 0 : return -1;
1579 : }
1580 : {
1581 585 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wPort));
1582 585 : if (PyLong_Check(value)) {
1583 0 : unsigned long long test_var;
1584 585 : test_var = PyLong_AsUnsignedLongLong(value);
1585 585 : if (PyErr_Occurred() != NULL) {
1586 0 : return -1;
1587 : }
1588 585 : if (test_var > uint_max) {
1589 3 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1590 : PyLong_Type.tp_name, uint_max, test_var);
1591 3 : return -1;
1592 : }
1593 582 : object->wPort = test_var;
1594 : } else {
1595 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1596 : PyLong_Type.tp_name);
1597 0 : return -1;
1598 : }
1599 : }
1600 582 : return 0;
1601 : }
1602 :
1603 1247 : static PyObject *py_DNS_RPC_RECORD_SRV_get_nameTarget(PyObject *obj, void *closure)
1604 : {
1605 1247 : struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(obj);
1606 0 : PyObject *py_nameTarget;
1607 1247 : py_nameTarget = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->nameTarget);
1608 1247 : return py_nameTarget;
1609 : }
1610 :
1611 0 : static int py_DNS_RPC_RECORD_SRV_set_nameTarget(PyObject *py_obj, PyObject *value, void *closure)
1612 : {
1613 0 : struct DNS_RPC_RECORD_SRV *object = (struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(py_obj);
1614 0 : if (value == NULL) {
1615 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->nameTarget");
1616 0 : return -1;
1617 : }
1618 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
1619 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
1620 0 : PyErr_NoMemory();
1621 0 : return -1;
1622 : }
1623 0 : object->nameTarget = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
1624 0 : return 0;
1625 : }
1626 :
1627 : static PyGetSetDef py_DNS_RPC_RECORD_SRV_getsetters[] = {
1628 : {
1629 : .name = discard_const_p(char, "wPriority"),
1630 : .get = py_DNS_RPC_RECORD_SRV_get_wPriority,
1631 : .set = py_DNS_RPC_RECORD_SRV_set_wPriority,
1632 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
1633 : },
1634 : {
1635 : .name = discard_const_p(char, "wWeight"),
1636 : .get = py_DNS_RPC_RECORD_SRV_get_wWeight,
1637 : .set = py_DNS_RPC_RECORD_SRV_set_wWeight,
1638 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
1639 : },
1640 : {
1641 : .name = discard_const_p(char, "wPort"),
1642 : .get = py_DNS_RPC_RECORD_SRV_get_wPort,
1643 : .set = py_DNS_RPC_RECORD_SRV_set_wPort,
1644 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
1645 : },
1646 : {
1647 : .name = discard_const_p(char, "nameTarget"),
1648 : .get = py_DNS_RPC_RECORD_SRV_get_nameTarget,
1649 : .set = py_DNS_RPC_RECORD_SRV_set_nameTarget,
1650 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
1651 : },
1652 : { .name = NULL }
1653 : };
1654 :
1655 591 : static PyObject *py_DNS_RPC_RECORD_SRV_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
1656 : {
1657 591 : return pytalloc_new(struct DNS_RPC_RECORD_SRV, type);
1658 : }
1659 :
1660 :
1661 : static PyTypeObject DNS_RPC_RECORD_SRV_Type = {
1662 : PyVarObject_HEAD_INIT(NULL, 0)
1663 : .tp_name = "dnsserver.DNS_RPC_RECORD_SRV",
1664 : .tp_getset = py_DNS_RPC_RECORD_SRV_getsetters,
1665 : .tp_methods = NULL,
1666 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
1667 : .tp_new = py_DNS_RPC_RECORD_SRV_new,
1668 : };
1669 :
1670 766 : static PyObject *py_import_DNS_RPC_RECORD_DATA(TALLOC_CTX *mem_ctx, int level, union DNS_RPC_RECORD_DATA *in)
1671 : {
1672 0 : PyObject *ret;
1673 :
1674 766 : switch (level) {
1675 0 : case DNS_TYPE_TOMBSTONE:
1676 0 : ret = PyLong_FromUnsignedLongLong(in->EntombedTime);
1677 0 : return ret;
1678 :
1679 29 : case DNS_TYPE_A:
1680 29 : ret = PyString_FromStringOrNULL(in->ipv4);
1681 29 : return ret;
1682 :
1683 39 : case DNS_TYPE_NS:
1684 39 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1685 39 : return ret;
1686 :
1687 0 : case DNS_TYPE_MD:
1688 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1689 0 : return ret;
1690 :
1691 0 : case DNS_TYPE_MF:
1692 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1693 0 : return ret;
1694 :
1695 45 : case DNS_TYPE_CNAME:
1696 45 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1697 45 : return ret;
1698 :
1699 0 : case DNS_TYPE_SOA:
1700 0 : ret = pytalloc_reference_ex(&DNS_RPC_RECORD_SOA_Type, mem_ctx, &in->soa);
1701 0 : return ret;
1702 :
1703 0 : case DNS_TYPE_MB:
1704 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1705 0 : return ret;
1706 :
1707 0 : case DNS_TYPE_MG:
1708 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1709 0 : return ret;
1710 :
1711 0 : case DNS_TYPE_MR:
1712 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1713 0 : return ret;
1714 :
1715 39 : case DNS_TYPE_PTR:
1716 39 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->ptr);
1717 39 : return ret;
1718 :
1719 0 : case DNS_TYPE_HINFO:
1720 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->hinfo);
1721 0 : return ret;
1722 :
1723 86 : case DNS_TYPE_MX:
1724 86 : ret = pytalloc_reference_ex(&DNS_RPC_RECORD_NAME_PREFERENCE_Type, mem_ctx, &in->mx);
1725 86 : return ret;
1726 :
1727 157 : case DNS_TYPE_TXT:
1728 157 : ret = pytalloc_reference_ex(&DNS_RPC_RECORD_STRING_Type, mem_ctx, &in->txt);
1729 157 : return ret;
1730 :
1731 37 : case DNS_TYPE_AAAA:
1732 37 : ret = PyString_FromStringOrNULL(in->ipv6);
1733 37 : return ret;
1734 :
1735 334 : case DNS_TYPE_SRV:
1736 334 : ret = pytalloc_reference_ex(&DNS_RPC_RECORD_SRV_Type, mem_ctx, &in->srv);
1737 334 : return ret;
1738 :
1739 0 : case DNS_TYPE_DNAME:
1740 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_Type, mem_ctx, &in->name);
1741 0 : return ret;
1742 :
1743 : }
1744 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
1745 0 : return NULL;
1746 : }
1747 :
1748 4215 : static union DNS_RPC_RECORD_DATA *py_export_DNS_RPC_RECORD_DATA(TALLOC_CTX *mem_ctx, int level, PyObject *in)
1749 : {
1750 4215 : union DNS_RPC_RECORD_DATA *ret = talloc_zero(mem_ctx, union DNS_RPC_RECORD_DATA);
1751 4215 : switch (level) {
1752 0 : case DNS_TYPE_TOMBSTONE:
1753 0 : if (in == NULL) {
1754 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->EntombedTime");
1755 0 : talloc_free(ret); return NULL;
1756 : }
1757 : {
1758 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->EntombedTime));
1759 0 : if (PyLong_Check(in)) {
1760 0 : unsigned long long test_var;
1761 0 : test_var = PyLong_AsUnsignedLongLong(in);
1762 0 : if (PyErr_Occurred() != NULL) {
1763 0 : talloc_free(ret); return NULL;
1764 : }
1765 0 : if (test_var > uint_max) {
1766 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
1767 : PyLong_Type.tp_name, uint_max, test_var);
1768 0 : talloc_free(ret); return NULL;
1769 : }
1770 0 : ret->EntombedTime = test_var;
1771 : } else {
1772 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
1773 : PyLong_Type.tp_name);
1774 0 : talloc_free(ret); return NULL;
1775 : }
1776 : }
1777 0 : break;
1778 :
1779 673 : case DNS_TYPE_A:
1780 673 : if (in == NULL) {
1781 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ipv4");
1782 0 : talloc_free(ret); return NULL;
1783 : }
1784 : {
1785 0 : const char *test_str;
1786 0 : const char *talloc_str;
1787 673 : PyObject *unicode = NULL;
1788 673 : if (PyUnicode_Check(in)) {
1789 673 : unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
1790 673 : if (unicode == NULL) {
1791 0 : PyErr_NoMemory();
1792 0 : talloc_free(ret); return NULL;
1793 : }
1794 673 : test_str = PyBytes_AS_STRING(unicode);
1795 0 : } else if (PyBytes_Check(in)) {
1796 0 : test_str = PyBytes_AS_STRING(in);
1797 : } else {
1798 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
1799 0 : talloc_free(ret); return NULL;
1800 : }
1801 673 : talloc_str = talloc_strdup(mem_ctx, test_str);
1802 673 : if (unicode != NULL) {
1803 673 : Py_DECREF(unicode);
1804 : }
1805 673 : if (talloc_str == NULL) {
1806 0 : PyErr_NoMemory();
1807 0 : talloc_free(ret); return NULL;
1808 : }
1809 673 : ret->ipv4 = talloc_str;
1810 : }
1811 673 : break;
1812 :
1813 480 : case DNS_TYPE_NS:
1814 480 : if (in == NULL) {
1815 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
1816 0 : talloc_free(ret); return NULL;
1817 : }
1818 480 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1819 480 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1820 0 : PyErr_NoMemory();
1821 0 : talloc_free(ret); return NULL;
1822 : }
1823 480 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1824 480 : break;
1825 :
1826 0 : case DNS_TYPE_MD:
1827 0 : if (in == NULL) {
1828 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
1829 0 : talloc_free(ret); return NULL;
1830 : }
1831 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1832 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1833 0 : PyErr_NoMemory();
1834 0 : talloc_free(ret); return NULL;
1835 : }
1836 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1837 0 : break;
1838 :
1839 0 : case DNS_TYPE_MF:
1840 0 : if (in == NULL) {
1841 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
1842 0 : talloc_free(ret); return NULL;
1843 : }
1844 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1845 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1846 0 : PyErr_NoMemory();
1847 0 : talloc_free(ret); return NULL;
1848 : }
1849 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1850 0 : break;
1851 :
1852 442 : case DNS_TYPE_CNAME:
1853 442 : if (in == NULL) {
1854 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
1855 0 : talloc_free(ret); return NULL;
1856 : }
1857 442 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1858 442 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1859 0 : PyErr_NoMemory();
1860 0 : talloc_free(ret); return NULL;
1861 : }
1862 442 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1863 442 : break;
1864 :
1865 0 : case DNS_TYPE_SOA:
1866 0 : if (in == NULL) {
1867 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->soa");
1868 0 : talloc_free(ret); return NULL;
1869 : }
1870 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_SOA_Type, in, talloc_free(ret); return NULL;);
1871 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1872 0 : PyErr_NoMemory();
1873 0 : talloc_free(ret); return NULL;
1874 : }
1875 0 : ret->soa = *(struct DNS_RPC_RECORD_SOA *)pytalloc_get_ptr(in);
1876 0 : break;
1877 :
1878 0 : case DNS_TYPE_MB:
1879 0 : if (in == NULL) {
1880 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
1881 0 : talloc_free(ret); return NULL;
1882 : }
1883 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1884 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1885 0 : PyErr_NoMemory();
1886 0 : talloc_free(ret); return NULL;
1887 : }
1888 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1889 0 : break;
1890 :
1891 0 : case DNS_TYPE_MG:
1892 0 : if (in == NULL) {
1893 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
1894 0 : talloc_free(ret); return NULL;
1895 : }
1896 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1897 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1898 0 : PyErr_NoMemory();
1899 0 : talloc_free(ret); return NULL;
1900 : }
1901 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1902 0 : break;
1903 :
1904 0 : case DNS_TYPE_MR:
1905 0 : if (in == NULL) {
1906 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
1907 0 : talloc_free(ret); return NULL;
1908 : }
1909 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1910 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1911 0 : PyErr_NoMemory();
1912 0 : talloc_free(ret); return NULL;
1913 : }
1914 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1915 0 : break;
1916 :
1917 474 : case DNS_TYPE_PTR:
1918 474 : if (in == NULL) {
1919 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ptr");
1920 0 : talloc_free(ret); return NULL;
1921 : }
1922 474 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1923 474 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1924 0 : PyErr_NoMemory();
1925 0 : talloc_free(ret); return NULL;
1926 : }
1927 474 : ret->ptr = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1928 474 : break;
1929 :
1930 0 : case DNS_TYPE_HINFO:
1931 0 : if (in == NULL) {
1932 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->hinfo");
1933 0 : talloc_free(ret); return NULL;
1934 : }
1935 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
1936 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1937 0 : PyErr_NoMemory();
1938 0 : talloc_free(ret); return NULL;
1939 : }
1940 0 : ret->hinfo = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
1941 0 : break;
1942 :
1943 433 : case DNS_TYPE_MX:
1944 433 : if (in == NULL) {
1945 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->mx");
1946 0 : talloc_free(ret); return NULL;
1947 : }
1948 433 : PY_CHECK_TYPE(&DNS_RPC_RECORD_NAME_PREFERENCE_Type, in, talloc_free(ret); return NULL;);
1949 433 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1950 0 : PyErr_NoMemory();
1951 0 : talloc_free(ret); return NULL;
1952 : }
1953 433 : ret->mx = *(struct DNS_RPC_RECORD_NAME_PREFERENCE *)pytalloc_get_ptr(in);
1954 433 : break;
1955 :
1956 371 : case DNS_TYPE_TXT:
1957 371 : if (in == NULL) {
1958 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->txt");
1959 0 : talloc_free(ret); return NULL;
1960 : }
1961 371 : PY_CHECK_TYPE(&DNS_RPC_RECORD_STRING_Type, in, talloc_free(ret); return NULL;);
1962 371 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
1963 0 : PyErr_NoMemory();
1964 0 : talloc_free(ret); return NULL;
1965 : }
1966 371 : ret->txt = *(struct DNS_RPC_RECORD_STRING *)pytalloc_get_ptr(in);
1967 371 : break;
1968 :
1969 760 : case DNS_TYPE_AAAA:
1970 760 : if (in == NULL) {
1971 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ipv6");
1972 0 : talloc_free(ret); return NULL;
1973 : }
1974 : {
1975 0 : const char *test_str;
1976 0 : const char *talloc_str;
1977 760 : PyObject *unicode = NULL;
1978 760 : if (PyUnicode_Check(in)) {
1979 760 : unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
1980 760 : if (unicode == NULL) {
1981 0 : PyErr_NoMemory();
1982 0 : talloc_free(ret); return NULL;
1983 : }
1984 760 : test_str = PyBytes_AS_STRING(unicode);
1985 0 : } else if (PyBytes_Check(in)) {
1986 0 : test_str = PyBytes_AS_STRING(in);
1987 : } else {
1988 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
1989 0 : talloc_free(ret); return NULL;
1990 : }
1991 760 : talloc_str = talloc_strdup(mem_ctx, test_str);
1992 760 : if (unicode != NULL) {
1993 760 : Py_DECREF(unicode);
1994 : }
1995 760 : if (talloc_str == NULL) {
1996 0 : PyErr_NoMemory();
1997 0 : talloc_free(ret); return NULL;
1998 : }
1999 760 : ret->ipv6 = talloc_str;
2000 : }
2001 760 : break;
2002 :
2003 582 : case DNS_TYPE_SRV:
2004 582 : if (in == NULL) {
2005 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->srv");
2006 0 : talloc_free(ret); return NULL;
2007 : }
2008 582 : PY_CHECK_TYPE(&DNS_RPC_RECORD_SRV_Type, in, talloc_free(ret); return NULL;);
2009 582 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
2010 0 : PyErr_NoMemory();
2011 0 : talloc_free(ret); return NULL;
2012 : }
2013 582 : ret->srv = *(struct DNS_RPC_RECORD_SRV *)pytalloc_get_ptr(in);
2014 582 : break;
2015 :
2016 0 : case DNS_TYPE_DNAME:
2017 0 : if (in == NULL) {
2018 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->name");
2019 0 : talloc_free(ret); return NULL;
2020 : }
2021 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, in, talloc_free(ret); return NULL;);
2022 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
2023 0 : PyErr_NoMemory();
2024 0 : talloc_free(ret); return NULL;
2025 : }
2026 0 : ret->name = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(in);
2027 0 : break;
2028 :
2029 0 : default:
2030 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
2031 0 : talloc_free(ret);
2032 0 : ret = NULL;
2033 : }
2034 :
2035 4215 : return ret;
2036 : }
2037 :
2038 766 : static PyObject *py_DNS_RPC_RECORD_DATA_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2039 : {
2040 766 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
2041 766 : PyObject *mem_ctx_obj = NULL;
2042 766 : TALLOC_CTX *mem_ctx = NULL;
2043 766 : int level = 0;
2044 766 : PyObject *in_obj = NULL;
2045 766 : union DNS_RPC_RECORD_DATA *in = NULL;
2046 :
2047 766 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
2048 : discard_const_p(char *, kwnames),
2049 : &mem_ctx_obj,
2050 : &level,
2051 : &in_obj)) {
2052 0 : return NULL;
2053 : }
2054 766 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
2055 766 : if (mem_ctx == NULL) {
2056 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
2057 0 : return NULL;
2058 : }
2059 766 : in = (union DNS_RPC_RECORD_DATA *)pytalloc_get_ptr(in_obj);
2060 766 : if (in == NULL) {
2061 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union DNS_RPC_RECORD_DATA!");
2062 0 : return NULL;
2063 : }
2064 :
2065 766 : return py_import_DNS_RPC_RECORD_DATA(mem_ctx, level, in);
2066 : }
2067 :
2068 4215 : static PyObject *py_DNS_RPC_RECORD_DATA_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2069 : {
2070 4215 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
2071 4215 : PyObject *mem_ctx_obj = NULL;
2072 4215 : TALLOC_CTX *mem_ctx = NULL;
2073 4215 : int level = 0;
2074 4215 : PyObject *in = NULL;
2075 4215 : union DNS_RPC_RECORD_DATA *out = NULL;
2076 :
2077 4215 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
2078 : discard_const_p(char *, kwnames),
2079 : &mem_ctx_obj,
2080 : &level,
2081 : &in)) {
2082 0 : return NULL;
2083 : }
2084 4215 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
2085 4215 : if (mem_ctx == NULL) {
2086 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
2087 0 : return NULL;
2088 : }
2089 :
2090 4215 : out = py_export_DNS_RPC_RECORD_DATA(mem_ctx, level, in);
2091 4215 : if (out == NULL) {
2092 0 : return NULL;
2093 : }
2094 :
2095 4215 : return pytalloc_GenericObject_reference(out);
2096 : }
2097 :
2098 : static PyMethodDef py_DNS_RPC_RECORD_DATA_methods[] = {
2099 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_RECORD_DATA_import),
2100 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
2101 : "T.__import__(mem_ctx, level, in) => ret." },
2102 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_RECORD_DATA_export),
2103 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
2104 : "T.__export__(mem_ctx, level, in) => ret." },
2105 : { NULL, NULL, 0, NULL }
2106 : };
2107 :
2108 0 : static PyObject *py_DNS_RPC_RECORD_DATA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2109 : {
2110 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
2111 0 : return NULL;
2112 : }
2113 :
2114 :
2115 : static PyTypeObject DNS_RPC_RECORD_DATA_Type = {
2116 : PyVarObject_HEAD_INIT(NULL, 0)
2117 : .tp_name = "dnsserver.DNS_RPC_RECORD_DATA",
2118 : .tp_getset = NULL,
2119 : .tp_methods = py_DNS_RPC_RECORD_DATA_methods,
2120 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2121 : .tp_new = py_DNS_RPC_RECORD_DATA_new,
2122 : };
2123 :
2124 :
2125 0 : static PyObject *py_DNS_RPC_RECORD_get_wDataLength(PyObject *obj, void *closure)
2126 : {
2127 0 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
2128 0 : PyObject *py_wDataLength;
2129 0 : py_wDataLength = PyLong_FromLong((uint16_t)object->wDataLength);
2130 0 : return py_wDataLength;
2131 : }
2132 :
2133 0 : static int py_DNS_RPC_RECORD_set_wDataLength(PyObject *py_obj, PyObject *value, void *closure)
2134 : {
2135 0 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2136 0 : if (value == NULL) {
2137 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wDataLength");
2138 0 : return -1;
2139 : }
2140 : {
2141 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wDataLength));
2142 0 : if (PyLong_Check(value)) {
2143 0 : unsigned long long test_var;
2144 0 : test_var = PyLong_AsUnsignedLongLong(value);
2145 0 : if (PyErr_Occurred() != NULL) {
2146 0 : return -1;
2147 : }
2148 0 : if (test_var > uint_max) {
2149 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2150 : PyLong_Type.tp_name, uint_max, test_var);
2151 0 : return -1;
2152 : }
2153 0 : object->wDataLength = test_var;
2154 : } else {
2155 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2156 : PyLong_Type.tp_name);
2157 0 : return -1;
2158 : }
2159 : }
2160 0 : return 0;
2161 : }
2162 :
2163 822 : static PyObject *py_DNS_RPC_RECORD_get_wType(PyObject *obj, void *closure)
2164 : {
2165 822 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
2166 0 : PyObject *py_wType;
2167 822 : py_wType = PyLong_FromLong((uint16_t)object->wType);
2168 822 : return py_wType;
2169 : }
2170 :
2171 4227 : static int py_DNS_RPC_RECORD_set_wType(PyObject *py_obj, PyObject *value, void *closure)
2172 : {
2173 4227 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2174 4227 : if (value == NULL) {
2175 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wType");
2176 0 : return -1;
2177 : }
2178 : {
2179 4227 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wType));
2180 4227 : if (PyLong_Check(value)) {
2181 0 : unsigned long long test_var;
2182 4227 : test_var = PyLong_AsUnsignedLongLong(value);
2183 4227 : if (PyErr_Occurred() != NULL) {
2184 0 : return -1;
2185 : }
2186 4227 : if (test_var > uint_max) {
2187 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2188 : PyLong_Type.tp_name, uint_max, test_var);
2189 0 : return -1;
2190 : }
2191 4227 : object->wType = test_var;
2192 : } else {
2193 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2194 : PyLong_Type.tp_name);
2195 0 : return -1;
2196 : }
2197 : }
2198 4227 : return 0;
2199 : }
2200 :
2201 218 : static PyObject *py_DNS_RPC_RECORD_get_dwFlags(PyObject *obj, void *closure)
2202 : {
2203 218 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
2204 0 : PyObject *py_dwFlags;
2205 218 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwFlags);
2206 218 : return py_dwFlags;
2207 : }
2208 :
2209 4325 : static int py_DNS_RPC_RECORD_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
2210 : {
2211 4325 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2212 4325 : if (value == NULL) {
2213 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFlags");
2214 0 : return -1;
2215 : }
2216 : {
2217 4325 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
2218 4325 : if (PyLong_Check(value)) {
2219 0 : unsigned long long test_var;
2220 4325 : test_var = PyLong_AsUnsignedLongLong(value);
2221 4325 : if (PyErr_Occurred() != NULL) {
2222 0 : return -1;
2223 : }
2224 4325 : if (test_var > uint_max) {
2225 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2226 : PyLong_Type.tp_name, uint_max, test_var);
2227 0 : return -1;
2228 : }
2229 4325 : object->dwFlags = test_var;
2230 : } else {
2231 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2232 : PyLong_Type.tp_name);
2233 0 : return -1;
2234 : }
2235 : }
2236 4325 : return 0;
2237 : }
2238 :
2239 218 : static PyObject *py_DNS_RPC_RECORD_get_dwSerial(PyObject *obj, void *closure)
2240 : {
2241 218 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
2242 0 : PyObject *py_dwSerial;
2243 218 : py_dwSerial = PyLong_FromUnsignedLongLong((uint32_t)object->dwSerial);
2244 218 : return py_dwSerial;
2245 : }
2246 :
2247 4325 : static int py_DNS_RPC_RECORD_set_dwSerial(PyObject *py_obj, PyObject *value, void *closure)
2248 : {
2249 4325 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2250 4325 : if (value == NULL) {
2251 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwSerial");
2252 0 : return -1;
2253 : }
2254 : {
2255 4325 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwSerial));
2256 4325 : if (PyLong_Check(value)) {
2257 0 : unsigned long long test_var;
2258 4325 : test_var = PyLong_AsUnsignedLongLong(value);
2259 4325 : if (PyErr_Occurred() != NULL) {
2260 0 : return -1;
2261 : }
2262 4325 : if (test_var > uint_max) {
2263 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2264 : PyLong_Type.tp_name, uint_max, test_var);
2265 0 : return -1;
2266 : }
2267 4325 : object->dwSerial = test_var;
2268 : } else {
2269 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2270 : PyLong_Type.tp_name);
2271 0 : return -1;
2272 : }
2273 : }
2274 4325 : return 0;
2275 : }
2276 :
2277 218 : static PyObject *py_DNS_RPC_RECORD_get_dwTtlSeconds(PyObject *obj, void *closure)
2278 : {
2279 218 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
2280 0 : PyObject *py_dwTtlSeconds;
2281 218 : py_dwTtlSeconds = PyLong_FromUnsignedLongLong((uint32_t)object->dwTtlSeconds);
2282 218 : return py_dwTtlSeconds;
2283 : }
2284 :
2285 4329 : static int py_DNS_RPC_RECORD_set_dwTtlSeconds(PyObject *py_obj, PyObject *value, void *closure)
2286 : {
2287 4329 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2288 4329 : if (value == NULL) {
2289 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwTtlSeconds");
2290 0 : return -1;
2291 : }
2292 : {
2293 4329 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwTtlSeconds));
2294 4329 : if (PyLong_Check(value)) {
2295 0 : unsigned long long test_var;
2296 4329 : test_var = PyLong_AsUnsignedLongLong(value);
2297 4329 : if (PyErr_Occurred() != NULL) {
2298 0 : return -1;
2299 : }
2300 4329 : if (test_var > uint_max) {
2301 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2302 : PyLong_Type.tp_name, uint_max, test_var);
2303 0 : return -1;
2304 : }
2305 4329 : object->dwTtlSeconds = test_var;
2306 : } else {
2307 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2308 : PyLong_Type.tp_name);
2309 0 : return -1;
2310 : }
2311 : }
2312 4329 : return 0;
2313 : }
2314 :
2315 94 : static PyObject *py_DNS_RPC_RECORD_get_dwTimeStamp(PyObject *obj, void *closure)
2316 : {
2317 94 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
2318 0 : PyObject *py_dwTimeStamp;
2319 94 : py_dwTimeStamp = PyLong_FromUnsignedLongLong((uint32_t)object->dwTimeStamp);
2320 94 : return py_dwTimeStamp;
2321 : }
2322 :
2323 104 : static int py_DNS_RPC_RECORD_set_dwTimeStamp(PyObject *py_obj, PyObject *value, void *closure)
2324 : {
2325 104 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2326 104 : if (value == NULL) {
2327 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwTimeStamp");
2328 0 : return -1;
2329 : }
2330 : {
2331 104 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwTimeStamp));
2332 104 : if (PyLong_Check(value)) {
2333 0 : unsigned long long test_var;
2334 104 : test_var = PyLong_AsUnsignedLongLong(value);
2335 104 : if (PyErr_Occurred() != NULL) {
2336 0 : return -1;
2337 : }
2338 104 : if (test_var > uint_max) {
2339 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2340 : PyLong_Type.tp_name, uint_max, test_var);
2341 0 : return -1;
2342 : }
2343 104 : object->dwTimeStamp = test_var;
2344 : } else {
2345 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2346 : PyLong_Type.tp_name);
2347 0 : return -1;
2348 : }
2349 : }
2350 104 : return 0;
2351 : }
2352 :
2353 0 : static PyObject *py_DNS_RPC_RECORD_get_dwReserved(PyObject *obj, void *closure)
2354 : {
2355 0 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
2356 0 : PyObject *py_dwReserved;
2357 0 : py_dwReserved = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved);
2358 0 : return py_dwReserved;
2359 : }
2360 :
2361 8 : static int py_DNS_RPC_RECORD_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
2362 : {
2363 8 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2364 8 : if (value == NULL) {
2365 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved");
2366 0 : return -1;
2367 : }
2368 : {
2369 8 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved));
2370 8 : if (PyLong_Check(value)) {
2371 0 : unsigned long long test_var;
2372 8 : test_var = PyLong_AsUnsignedLongLong(value);
2373 8 : if (PyErr_Occurred() != NULL) {
2374 0 : return -1;
2375 : }
2376 8 : if (test_var > uint_max) {
2377 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2378 : PyLong_Type.tp_name, uint_max, test_var);
2379 0 : return -1;
2380 : }
2381 8 : object->dwReserved = test_var;
2382 : } else {
2383 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2384 : PyLong_Type.tp_name);
2385 0 : return -1;
2386 : }
2387 : }
2388 8 : return 0;
2389 : }
2390 :
2391 766 : static PyObject *py_DNS_RPC_RECORD_get_data(PyObject *obj, void *closure)
2392 : {
2393 766 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(obj);
2394 0 : PyObject *py_data;
2395 766 : py_data = pyrpc_import_union(&DNS_RPC_RECORD_DATA_Type, pytalloc_get_mem_ctx(obj), object->wType, &object->data, "union DNS_RPC_RECORD_DATA");
2396 766 : if (py_data == NULL) {
2397 0 : return NULL;
2398 : }
2399 766 : return py_data;
2400 : }
2401 :
2402 4215 : static int py_DNS_RPC_RECORD_set_data(PyObject *py_obj, PyObject *value, void *closure)
2403 : {
2404 4215 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2405 4215 : if (value == NULL) {
2406 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->data");
2407 0 : return -1;
2408 : }
2409 : {
2410 0 : union DNS_RPC_RECORD_DATA *data_switch_1;
2411 4215 : data_switch_1 = (union DNS_RPC_RECORD_DATA *)pyrpc_export_union(&DNS_RPC_RECORD_DATA_Type, pytalloc_get_mem_ctx(py_obj), object->wType, value, "union DNS_RPC_RECORD_DATA");
2412 4215 : if (data_switch_1 == NULL) {
2413 0 : return -1;
2414 : }
2415 4215 : object->data = *data_switch_1;
2416 : }
2417 4215 : return 0;
2418 : }
2419 :
2420 : static PyGetSetDef py_DNS_RPC_RECORD_getsetters[] = {
2421 : {
2422 : .name = discard_const_p(char, "wDataLength"),
2423 : .get = py_DNS_RPC_RECORD_get_wDataLength,
2424 : .set = py_DNS_RPC_RECORD_set_wDataLength,
2425 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
2426 : },
2427 : {
2428 : .name = discard_const_p(char, "wType"),
2429 : .get = py_DNS_RPC_RECORD_get_wType,
2430 : .set = py_DNS_RPC_RECORD_set_wType,
2431 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_record_type")
2432 : },
2433 : {
2434 : .name = discard_const_p(char, "dwFlags"),
2435 : .get = py_DNS_RPC_RECORD_get_dwFlags,
2436 : .set = py_DNS_RPC_RECORD_set_dwFlags,
2437 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2438 : },
2439 : {
2440 : .name = discard_const_p(char, "dwSerial"),
2441 : .get = py_DNS_RPC_RECORD_get_dwSerial,
2442 : .set = py_DNS_RPC_RECORD_set_dwSerial,
2443 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2444 : },
2445 : {
2446 : .name = discard_const_p(char, "dwTtlSeconds"),
2447 : .get = py_DNS_RPC_RECORD_get_dwTtlSeconds,
2448 : .set = py_DNS_RPC_RECORD_set_dwTtlSeconds,
2449 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2450 : },
2451 : {
2452 : .name = discard_const_p(char, "dwTimeStamp"),
2453 : .get = py_DNS_RPC_RECORD_get_dwTimeStamp,
2454 : .set = py_DNS_RPC_RECORD_set_dwTimeStamp,
2455 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2456 : },
2457 : {
2458 : .name = discard_const_p(char, "dwReserved"),
2459 : .get = py_DNS_RPC_RECORD_get_dwReserved,
2460 : .set = py_DNS_RPC_RECORD_set_dwReserved,
2461 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2462 : },
2463 : {
2464 : .name = discard_const_p(char, "data"),
2465 : .get = py_DNS_RPC_RECORD_get_data,
2466 : .set = py_DNS_RPC_RECORD_set_data,
2467 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_DATA")
2468 : },
2469 : { .name = NULL }
2470 : };
2471 :
2472 4227 : static PyObject *py_DNS_RPC_RECORD_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2473 : {
2474 4227 : return pytalloc_new(struct DNS_RPC_RECORD, type);
2475 : }
2476 :
2477 0 : static PyObject *py_DNS_RPC_RECORD_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
2478 : {
2479 0 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2480 0 : PyObject *ret = NULL;
2481 0 : DATA_BLOB blob;
2482 0 : enum ndr_err_code err;
2483 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
2484 0 : if (tmp_ctx == NULL) {
2485 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
2486 0 : return NULL;
2487 : }
2488 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORD);
2489 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
2490 0 : TALLOC_FREE(tmp_ctx);
2491 0 : PyErr_SetNdrError(err);
2492 0 : return NULL;
2493 : }
2494 :
2495 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
2496 0 : TALLOC_FREE(tmp_ctx);
2497 0 : return ret;
2498 : }
2499 :
2500 0 : static PyObject *py_DNS_RPC_RECORD_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
2501 : {
2502 0 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2503 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
2504 0 : Py_ssize_t blob_length = 0;
2505 0 : enum ndr_err_code err;
2506 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
2507 0 : PyObject *allow_remaining_obj = NULL;
2508 0 : bool allow_remaining = false;
2509 :
2510 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
2511 : discard_const_p(char *, kwnames),
2512 : &blob.data, &blob_length,
2513 : &allow_remaining_obj)) {
2514 0 : return NULL;
2515 : }
2516 0 : blob.length = blob_length;
2517 :
2518 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
2519 0 : allow_remaining = true;
2520 : }
2521 :
2522 0 : if (allow_remaining) {
2523 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORD);
2524 : } else {
2525 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORD);
2526 : }
2527 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
2528 0 : PyErr_SetNdrError(err);
2529 0 : return NULL;
2530 : }
2531 :
2532 0 : Py_RETURN_NONE;
2533 : }
2534 :
2535 0 : static PyObject *py_DNS_RPC_RECORD_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
2536 : {
2537 0 : struct DNS_RPC_RECORD *object = (struct DNS_RPC_RECORD *)pytalloc_get_ptr(py_obj);
2538 0 : PyObject *ret;
2539 0 : char *retstr;
2540 :
2541 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_RECORD, "DNS_RPC_RECORD", object);
2542 0 : ret = PyUnicode_FromString(retstr);
2543 0 : talloc_free(retstr);
2544 :
2545 0 : return ret;
2546 : }
2547 :
2548 : static PyMethodDef py_DNS_RPC_RECORD_methods[] = {
2549 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORD_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
2550 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_RECORD_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
2551 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORD_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
2552 : { NULL, NULL, 0, NULL }
2553 : };
2554 :
2555 :
2556 : static PyTypeObject DNS_RPC_RECORD_Type = {
2557 : PyVarObject_HEAD_INIT(NULL, 0)
2558 : .tp_name = "dnsserver.DNS_RPC_RECORD",
2559 : .tp_getset = py_DNS_RPC_RECORD_getsetters,
2560 : .tp_methods = py_DNS_RPC_RECORD_methods,
2561 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2562 : .tp_new = py_DNS_RPC_RECORD_new,
2563 : };
2564 :
2565 :
2566 0 : static PyObject *py_DNS_RPC_RECORD_BUF_get_wContextLength(PyObject *obj, void *closure)
2567 : {
2568 0 : struct DNS_RPC_RECORD_BUF *object = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(obj);
2569 0 : PyObject *py_wContextLength;
2570 0 : py_wContextLength = PyLong_FromUnsignedLongLong((uint32_t)object->wContextLength);
2571 0 : return py_wContextLength;
2572 : }
2573 :
2574 0 : static int py_DNS_RPC_RECORD_BUF_set_wContextLength(PyObject *py_obj, PyObject *value, void *closure)
2575 : {
2576 0 : struct DNS_RPC_RECORD_BUF *object = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_obj);
2577 0 : if (value == NULL) {
2578 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wContextLength");
2579 0 : return -1;
2580 : }
2581 : {
2582 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wContextLength));
2583 0 : if (PyLong_Check(value)) {
2584 0 : unsigned long long test_var;
2585 0 : test_var = PyLong_AsUnsignedLongLong(value);
2586 0 : if (PyErr_Occurred() != NULL) {
2587 0 : return -1;
2588 : }
2589 0 : if (test_var > uint_max) {
2590 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2591 : PyLong_Type.tp_name, uint_max, test_var);
2592 0 : return -1;
2593 : }
2594 0 : object->wContextLength = test_var;
2595 : } else {
2596 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2597 : PyLong_Type.tp_name);
2598 0 : return -1;
2599 : }
2600 : }
2601 0 : return 0;
2602 : }
2603 :
2604 0 : static PyObject *py_DNS_RPC_RECORD_BUF_get_rec(PyObject *obj, void *closure)
2605 : {
2606 0 : struct DNS_RPC_RECORD_BUF *object = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(obj);
2607 0 : PyObject *py_rec;
2608 0 : py_rec = pytalloc_reference_ex(&DNS_RPC_RECORD_Type, pytalloc_get_mem_ctx(obj), &object->rec);
2609 0 : return py_rec;
2610 : }
2611 :
2612 4197 : static int py_DNS_RPC_RECORD_BUF_set_rec(PyObject *py_obj, PyObject *value, void *closure)
2613 : {
2614 4197 : struct DNS_RPC_RECORD_BUF *object = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_obj);
2615 4197 : if (value == NULL) {
2616 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rec");
2617 0 : return -1;
2618 : }
2619 4197 : PY_CHECK_TYPE(&DNS_RPC_RECORD_Type, value, return -1;);
2620 4197 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
2621 0 : PyErr_NoMemory();
2622 0 : return -1;
2623 : }
2624 4197 : object->rec = *(struct DNS_RPC_RECORD *)pytalloc_get_ptr(value);
2625 4197 : return 0;
2626 : }
2627 :
2628 : static PyGetSetDef py_DNS_RPC_RECORD_BUF_getsetters[] = {
2629 : {
2630 : .name = discard_const_p(char, "wContextLength"),
2631 : .get = py_DNS_RPC_RECORD_BUF_get_wContextLength,
2632 : .set = py_DNS_RPC_RECORD_BUF_set_wContextLength,
2633 : .doc = discard_const_p(char, "PIDL-generated element of base type uint3264")
2634 : },
2635 : {
2636 : .name = discard_const_p(char, "rec"),
2637 : .get = py_DNS_RPC_RECORD_BUF_get_rec,
2638 : .set = py_DNS_RPC_RECORD_BUF_set_rec,
2639 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD")
2640 : },
2641 : { .name = NULL }
2642 : };
2643 :
2644 4197 : static PyObject *py_DNS_RPC_RECORD_BUF_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2645 : {
2646 4197 : return pytalloc_new(struct DNS_RPC_RECORD_BUF, type);
2647 : }
2648 :
2649 :
2650 : static PyTypeObject DNS_RPC_RECORD_BUF_Type = {
2651 : PyVarObject_HEAD_INIT(NULL, 0)
2652 : .tp_name = "dnsserver.DNS_RPC_RECORD_BUF",
2653 : .tp_getset = py_DNS_RPC_RECORD_BUF_getsetters,
2654 : .tp_methods = NULL,
2655 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2656 : .tp_new = py_DNS_RPC_RECORD_BUF_new,
2657 : };
2658 :
2659 :
2660 4 : static PyObject *py_IP4_ARRAY_get_AddrCount(PyObject *obj, void *closure)
2661 : {
2662 4 : struct IP4_ARRAY *object = (struct IP4_ARRAY *)pytalloc_get_ptr(obj);
2663 0 : PyObject *py_AddrCount;
2664 4 : py_AddrCount = PyLong_FromUnsignedLongLong((uint32_t)object->AddrCount);
2665 4 : return py_AddrCount;
2666 : }
2667 :
2668 0 : static int py_IP4_ARRAY_set_AddrCount(PyObject *py_obj, PyObject *value, void *closure)
2669 : {
2670 0 : struct IP4_ARRAY *object = (struct IP4_ARRAY *)pytalloc_get_ptr(py_obj);
2671 0 : if (value == NULL) {
2672 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AddrCount");
2673 0 : return -1;
2674 : }
2675 : {
2676 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->AddrCount));
2677 0 : if (PyLong_Check(value)) {
2678 0 : unsigned long long test_var;
2679 0 : test_var = PyLong_AsUnsignedLongLong(value);
2680 0 : if (PyErr_Occurred() != NULL) {
2681 0 : return -1;
2682 : }
2683 0 : if (test_var > uint_max) {
2684 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2685 : PyLong_Type.tp_name, uint_max, test_var);
2686 0 : return -1;
2687 : }
2688 0 : object->AddrCount = test_var;
2689 : } else {
2690 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2691 : PyLong_Type.tp_name);
2692 0 : return -1;
2693 : }
2694 : }
2695 0 : return 0;
2696 : }
2697 :
2698 4 : static PyObject *py_IP4_ARRAY_get_AddrArray(PyObject *obj, void *closure)
2699 : {
2700 4 : struct IP4_ARRAY *object = (struct IP4_ARRAY *)pytalloc_get_ptr(obj);
2701 0 : PyObject *py_AddrArray;
2702 4 : py_AddrArray = PyList_New(object->AddrCount);
2703 4 : if (py_AddrArray == NULL) {
2704 0 : return NULL;
2705 : }
2706 : {
2707 : int AddrArray_cntr_0;
2708 8 : for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < (object->AddrCount); AddrArray_cntr_0++) {
2709 0 : PyObject *py_AddrArray_0;
2710 4 : py_AddrArray_0 = PyLong_FromUnsignedLongLong((uint32_t)object->AddrArray[AddrArray_cntr_0]);
2711 4 : PyList_SetItem(py_AddrArray, AddrArray_cntr_0, py_AddrArray_0);
2712 : }
2713 : }
2714 4 : return py_AddrArray;
2715 : }
2716 :
2717 0 : static int py_IP4_ARRAY_set_AddrArray(PyObject *py_obj, PyObject *value, void *closure)
2718 : {
2719 0 : struct IP4_ARRAY *object = (struct IP4_ARRAY *)pytalloc_get_ptr(py_obj);
2720 0 : if (value == NULL) {
2721 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AddrArray");
2722 0 : return -1;
2723 : }
2724 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2725 : {
2726 0 : int AddrArray_cntr_0;
2727 0 : object->AddrArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->AddrArray, PyList_GET_SIZE(value));
2728 0 : if (!object->AddrArray) { return -1; }
2729 0 : talloc_set_name_const(object->AddrArray, "ARRAY: object->AddrArray");
2730 0 : for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < PyList_GET_SIZE(value); AddrArray_cntr_0++) {
2731 0 : if (PyList_GET_ITEM(value, AddrArray_cntr_0) == NULL) {
2732 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AddrArray[AddrArray_cntr_0]");
2733 0 : return -1;
2734 : }
2735 : {
2736 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->AddrArray[AddrArray_cntr_0]));
2737 0 : if (PyLong_Check(PyList_GET_ITEM(value, AddrArray_cntr_0))) {
2738 0 : unsigned long long test_var;
2739 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, AddrArray_cntr_0));
2740 0 : if (PyErr_Occurred() != NULL) {
2741 0 : return -1;
2742 : }
2743 0 : if (test_var > uint_max) {
2744 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2745 : PyLong_Type.tp_name, uint_max, test_var);
2746 0 : return -1;
2747 : }
2748 0 : object->AddrArray[AddrArray_cntr_0] = test_var;
2749 : } else {
2750 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2751 : PyLong_Type.tp_name);
2752 0 : return -1;
2753 : }
2754 : }
2755 : }
2756 : }
2757 0 : return 0;
2758 : }
2759 :
2760 : static PyGetSetDef py_IP4_ARRAY_getsetters[] = {
2761 : {
2762 : .name = discard_const_p(char, "AddrCount"),
2763 : .get = py_IP4_ARRAY_get_AddrCount,
2764 : .set = py_IP4_ARRAY_set_AddrCount,
2765 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2766 : },
2767 : {
2768 : .name = discard_const_p(char, "AddrArray"),
2769 : .get = py_IP4_ARRAY_get_AddrArray,
2770 : .set = py_IP4_ARRAY_set_AddrArray,
2771 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2772 : },
2773 : { .name = NULL }
2774 : };
2775 :
2776 0 : static PyObject *py_IP4_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2777 : {
2778 0 : return pytalloc_new(struct IP4_ARRAY, type);
2779 : }
2780 :
2781 :
2782 : static PyTypeObject IP4_ARRAY_Type = {
2783 : PyVarObject_HEAD_INIT(NULL, 0)
2784 : .tp_name = "dnsserver.IP4_ARRAY",
2785 : .tp_getset = py_IP4_ARRAY_getsetters,
2786 : .tp_methods = NULL,
2787 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2788 : .tp_new = py_IP4_ARRAY_new,
2789 : };
2790 :
2791 :
2792 10 : static PyObject *py_DNS_ADDR_get_MaxSa(PyObject *obj, void *closure)
2793 : {
2794 10 : struct DNS_ADDR *object = (struct DNS_ADDR *)pytalloc_get_ptr(obj);
2795 0 : PyObject *py_MaxSa;
2796 10 : py_MaxSa = PyList_New(32);
2797 10 : if (py_MaxSa == NULL) {
2798 0 : return NULL;
2799 : }
2800 : {
2801 : int MaxSa_cntr_0;
2802 330 : for (MaxSa_cntr_0 = 0; MaxSa_cntr_0 < (32); MaxSa_cntr_0++) {
2803 0 : PyObject *py_MaxSa_0;
2804 320 : py_MaxSa_0 = PyLong_FromLong((uint16_t)object->MaxSa[MaxSa_cntr_0]);
2805 320 : PyList_SetItem(py_MaxSa, MaxSa_cntr_0, py_MaxSa_0);
2806 : }
2807 : }
2808 10 : return py_MaxSa;
2809 : }
2810 :
2811 0 : static int py_DNS_ADDR_set_MaxSa(PyObject *py_obj, PyObject *value, void *closure)
2812 : {
2813 0 : struct DNS_ADDR *object = (struct DNS_ADDR *)pytalloc_get_ptr(py_obj);
2814 0 : if (value == NULL) {
2815 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->MaxSa");
2816 0 : return -1;
2817 : }
2818 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2819 : {
2820 0 : int MaxSa_cntr_0;
2821 0 : if (ARRAY_SIZE(object->MaxSa) != PyList_GET_SIZE(value)) {
2822 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->MaxSa), PyList_GET_SIZE(value));
2823 0 : return -1;
2824 : }
2825 0 : for (MaxSa_cntr_0 = 0; MaxSa_cntr_0 < PyList_GET_SIZE(value); MaxSa_cntr_0++) {
2826 0 : if (PyList_GET_ITEM(value, MaxSa_cntr_0) == NULL) {
2827 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->MaxSa[MaxSa_cntr_0]");
2828 0 : return -1;
2829 : }
2830 : {
2831 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MaxSa[MaxSa_cntr_0]));
2832 0 : if (PyLong_Check(PyList_GET_ITEM(value, MaxSa_cntr_0))) {
2833 0 : unsigned long long test_var;
2834 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, MaxSa_cntr_0));
2835 0 : if (PyErr_Occurred() != NULL) {
2836 0 : return -1;
2837 : }
2838 0 : if (test_var > uint_max) {
2839 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2840 : PyLong_Type.tp_name, uint_max, test_var);
2841 0 : return -1;
2842 : }
2843 0 : object->MaxSa[MaxSa_cntr_0] = test_var;
2844 : } else {
2845 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2846 : PyLong_Type.tp_name);
2847 0 : return -1;
2848 : }
2849 : }
2850 : }
2851 : }
2852 0 : return 0;
2853 : }
2854 :
2855 0 : static PyObject *py_DNS_ADDR_get_DnsAddrUserDword(PyObject *obj, void *closure)
2856 : {
2857 0 : struct DNS_ADDR *object = (struct DNS_ADDR *)pytalloc_get_ptr(obj);
2858 0 : PyObject *py_DnsAddrUserDword;
2859 0 : py_DnsAddrUserDword = PyList_New(8);
2860 0 : if (py_DnsAddrUserDword == NULL) {
2861 0 : return NULL;
2862 : }
2863 : {
2864 : int DnsAddrUserDword_cntr_0;
2865 0 : for (DnsAddrUserDword_cntr_0 = 0; DnsAddrUserDword_cntr_0 < (8); DnsAddrUserDword_cntr_0++) {
2866 0 : PyObject *py_DnsAddrUserDword_0;
2867 0 : py_DnsAddrUserDword_0 = PyLong_FromUnsignedLongLong((uint32_t)object->DnsAddrUserDword[DnsAddrUserDword_cntr_0]);
2868 0 : PyList_SetItem(py_DnsAddrUserDword, DnsAddrUserDword_cntr_0, py_DnsAddrUserDword_0);
2869 : }
2870 : }
2871 0 : return py_DnsAddrUserDword;
2872 : }
2873 :
2874 0 : static int py_DNS_ADDR_set_DnsAddrUserDword(PyObject *py_obj, PyObject *value, void *closure)
2875 : {
2876 0 : struct DNS_ADDR *object = (struct DNS_ADDR *)pytalloc_get_ptr(py_obj);
2877 0 : if (value == NULL) {
2878 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->DnsAddrUserDword");
2879 0 : return -1;
2880 : }
2881 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
2882 : {
2883 0 : int DnsAddrUserDword_cntr_0;
2884 0 : if (ARRAY_SIZE(object->DnsAddrUserDword) != PyList_GET_SIZE(value)) {
2885 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->DnsAddrUserDword), PyList_GET_SIZE(value));
2886 0 : return -1;
2887 : }
2888 0 : for (DnsAddrUserDword_cntr_0 = 0; DnsAddrUserDword_cntr_0 < PyList_GET_SIZE(value); DnsAddrUserDword_cntr_0++) {
2889 0 : if (PyList_GET_ITEM(value, DnsAddrUserDword_cntr_0) == NULL) {
2890 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->DnsAddrUserDword[DnsAddrUserDword_cntr_0]");
2891 0 : return -1;
2892 : }
2893 : {
2894 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->DnsAddrUserDword[DnsAddrUserDword_cntr_0]));
2895 0 : if (PyLong_Check(PyList_GET_ITEM(value, DnsAddrUserDword_cntr_0))) {
2896 0 : unsigned long long test_var;
2897 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, DnsAddrUserDword_cntr_0));
2898 0 : if (PyErr_Occurred() != NULL) {
2899 0 : return -1;
2900 : }
2901 0 : if (test_var > uint_max) {
2902 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2903 : PyLong_Type.tp_name, uint_max, test_var);
2904 0 : return -1;
2905 : }
2906 0 : object->DnsAddrUserDword[DnsAddrUserDword_cntr_0] = test_var;
2907 : } else {
2908 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2909 : PyLong_Type.tp_name);
2910 0 : return -1;
2911 : }
2912 : }
2913 : }
2914 : }
2915 0 : return 0;
2916 : }
2917 :
2918 : static PyGetSetDef py_DNS_ADDR_getsetters[] = {
2919 : {
2920 : .name = discard_const_p(char, "MaxSa"),
2921 : .get = py_DNS_ADDR_get_MaxSa,
2922 : .set = py_DNS_ADDR_set_MaxSa,
2923 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
2924 : },
2925 : {
2926 : .name = discard_const_p(char, "DnsAddrUserDword"),
2927 : .get = py_DNS_ADDR_get_DnsAddrUserDword,
2928 : .set = py_DNS_ADDR_set_DnsAddrUserDword,
2929 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
2930 : },
2931 : { .name = NULL }
2932 : };
2933 :
2934 0 : static PyObject *py_DNS_ADDR_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
2935 : {
2936 0 : return pytalloc_new(struct DNS_ADDR, type);
2937 : }
2938 :
2939 :
2940 : static PyTypeObject DNS_ADDR_Type = {
2941 : PyVarObject_HEAD_INIT(NULL, 0)
2942 : .tp_name = "dnsserver.DNS_ADDR",
2943 : .tp_getset = py_DNS_ADDR_getsetters,
2944 : .tp_methods = NULL,
2945 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
2946 : .tp_new = py_DNS_ADDR_new,
2947 : };
2948 :
2949 :
2950 0 : static PyObject *py_DNS_ADDR_ARRAY_get_MaxCount(PyObject *obj, void *closure)
2951 : {
2952 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
2953 0 : PyObject *py_MaxCount;
2954 0 : py_MaxCount = PyLong_FromUnsignedLongLong((uint32_t)object->MaxCount);
2955 0 : return py_MaxCount;
2956 : }
2957 :
2958 0 : static int py_DNS_ADDR_ARRAY_set_MaxCount(PyObject *py_obj, PyObject *value, void *closure)
2959 : {
2960 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
2961 0 : if (value == NULL) {
2962 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->MaxCount");
2963 0 : return -1;
2964 : }
2965 : {
2966 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MaxCount));
2967 0 : if (PyLong_Check(value)) {
2968 0 : unsigned long long test_var;
2969 0 : test_var = PyLong_AsUnsignedLongLong(value);
2970 0 : if (PyErr_Occurred() != NULL) {
2971 0 : return -1;
2972 : }
2973 0 : if (test_var > uint_max) {
2974 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
2975 : PyLong_Type.tp_name, uint_max, test_var);
2976 0 : return -1;
2977 : }
2978 0 : object->MaxCount = test_var;
2979 : } else {
2980 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
2981 : PyLong_Type.tp_name);
2982 0 : return -1;
2983 : }
2984 : }
2985 0 : return 0;
2986 : }
2987 :
2988 2 : static PyObject *py_DNS_ADDR_ARRAY_get_AddrCount(PyObject *obj, void *closure)
2989 : {
2990 2 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
2991 0 : PyObject *py_AddrCount;
2992 2 : py_AddrCount = PyLong_FromUnsignedLongLong((uint32_t)object->AddrCount);
2993 2 : return py_AddrCount;
2994 : }
2995 :
2996 0 : static int py_DNS_ADDR_ARRAY_set_AddrCount(PyObject *py_obj, PyObject *value, void *closure)
2997 : {
2998 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
2999 0 : if (value == NULL) {
3000 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AddrCount");
3001 0 : return -1;
3002 : }
3003 : {
3004 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->AddrCount));
3005 0 : if (PyLong_Check(value)) {
3006 0 : unsigned long long test_var;
3007 0 : test_var = PyLong_AsUnsignedLongLong(value);
3008 0 : if (PyErr_Occurred() != NULL) {
3009 0 : return -1;
3010 : }
3011 0 : if (test_var > uint_max) {
3012 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3013 : PyLong_Type.tp_name, uint_max, test_var);
3014 0 : return -1;
3015 : }
3016 0 : object->AddrCount = test_var;
3017 : } else {
3018 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3019 : PyLong_Type.tp_name);
3020 0 : return -1;
3021 : }
3022 : }
3023 0 : return 0;
3024 : }
3025 :
3026 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Tag(PyObject *obj, void *closure)
3027 : {
3028 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
3029 0 : PyObject *py_Tag;
3030 0 : py_Tag = PyLong_FromUnsignedLongLong((uint32_t)object->Tag);
3031 0 : return py_Tag;
3032 : }
3033 :
3034 0 : static int py_DNS_ADDR_ARRAY_set_Tag(PyObject *py_obj, PyObject *value, void *closure)
3035 : {
3036 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
3037 0 : if (value == NULL) {
3038 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Tag");
3039 0 : return -1;
3040 : }
3041 : {
3042 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Tag));
3043 0 : if (PyLong_Check(value)) {
3044 0 : unsigned long long test_var;
3045 0 : test_var = PyLong_AsUnsignedLongLong(value);
3046 0 : if (PyErr_Occurred() != NULL) {
3047 0 : return -1;
3048 : }
3049 0 : if (test_var > uint_max) {
3050 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3051 : PyLong_Type.tp_name, uint_max, test_var);
3052 0 : return -1;
3053 : }
3054 0 : object->Tag = test_var;
3055 : } else {
3056 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3057 : PyLong_Type.tp_name);
3058 0 : return -1;
3059 : }
3060 : }
3061 0 : return 0;
3062 : }
3063 :
3064 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Family(PyObject *obj, void *closure)
3065 : {
3066 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
3067 0 : PyObject *py_Family;
3068 0 : py_Family = PyLong_FromLong((uint16_t)object->Family);
3069 0 : return py_Family;
3070 : }
3071 :
3072 0 : static int py_DNS_ADDR_ARRAY_set_Family(PyObject *py_obj, PyObject *value, void *closure)
3073 : {
3074 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
3075 0 : if (value == NULL) {
3076 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Family");
3077 0 : return -1;
3078 : }
3079 : {
3080 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Family));
3081 0 : if (PyLong_Check(value)) {
3082 0 : unsigned long long test_var;
3083 0 : test_var = PyLong_AsUnsignedLongLong(value);
3084 0 : if (PyErr_Occurred() != NULL) {
3085 0 : return -1;
3086 : }
3087 0 : if (test_var > uint_max) {
3088 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3089 : PyLong_Type.tp_name, uint_max, test_var);
3090 0 : return -1;
3091 : }
3092 0 : object->Family = test_var;
3093 : } else {
3094 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3095 : PyLong_Type.tp_name);
3096 0 : return -1;
3097 : }
3098 : }
3099 0 : return 0;
3100 : }
3101 :
3102 0 : static PyObject *py_DNS_ADDR_ARRAY_get_WordReserved(PyObject *obj, void *closure)
3103 : {
3104 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
3105 0 : PyObject *py_WordReserved;
3106 0 : py_WordReserved = PyLong_FromLong((uint16_t)object->WordReserved);
3107 0 : return py_WordReserved;
3108 : }
3109 :
3110 0 : static int py_DNS_ADDR_ARRAY_set_WordReserved(PyObject *py_obj, PyObject *value, void *closure)
3111 : {
3112 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
3113 0 : if (value == NULL) {
3114 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->WordReserved");
3115 0 : return -1;
3116 : }
3117 : {
3118 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->WordReserved));
3119 0 : if (PyLong_Check(value)) {
3120 0 : unsigned long long test_var;
3121 0 : test_var = PyLong_AsUnsignedLongLong(value);
3122 0 : if (PyErr_Occurred() != NULL) {
3123 0 : return -1;
3124 : }
3125 0 : if (test_var > uint_max) {
3126 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3127 : PyLong_Type.tp_name, uint_max, test_var);
3128 0 : return -1;
3129 : }
3130 0 : object->WordReserved = test_var;
3131 : } else {
3132 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3133 : PyLong_Type.tp_name);
3134 0 : return -1;
3135 : }
3136 : }
3137 0 : return 0;
3138 : }
3139 :
3140 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Flags(PyObject *obj, void *closure)
3141 : {
3142 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
3143 0 : PyObject *py_Flags;
3144 0 : py_Flags = PyLong_FromUnsignedLongLong((uint32_t)object->Flags);
3145 0 : return py_Flags;
3146 : }
3147 :
3148 0 : static int py_DNS_ADDR_ARRAY_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
3149 : {
3150 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
3151 0 : if (value == NULL) {
3152 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Flags");
3153 0 : return -1;
3154 : }
3155 : {
3156 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Flags));
3157 0 : if (PyLong_Check(value)) {
3158 0 : unsigned long long test_var;
3159 0 : test_var = PyLong_AsUnsignedLongLong(value);
3160 0 : if (PyErr_Occurred() != NULL) {
3161 0 : return -1;
3162 : }
3163 0 : if (test_var > uint_max) {
3164 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3165 : PyLong_Type.tp_name, uint_max, test_var);
3166 0 : return -1;
3167 : }
3168 0 : object->Flags = test_var;
3169 : } else {
3170 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3171 : PyLong_Type.tp_name);
3172 0 : return -1;
3173 : }
3174 : }
3175 0 : return 0;
3176 : }
3177 :
3178 0 : static PyObject *py_DNS_ADDR_ARRAY_get_MatchFlag(PyObject *obj, void *closure)
3179 : {
3180 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
3181 0 : PyObject *py_MatchFlag;
3182 0 : py_MatchFlag = PyLong_FromUnsignedLongLong((uint32_t)object->MatchFlag);
3183 0 : return py_MatchFlag;
3184 : }
3185 :
3186 0 : static int py_DNS_ADDR_ARRAY_set_MatchFlag(PyObject *py_obj, PyObject *value, void *closure)
3187 : {
3188 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
3189 0 : if (value == NULL) {
3190 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->MatchFlag");
3191 0 : return -1;
3192 : }
3193 : {
3194 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->MatchFlag));
3195 0 : if (PyLong_Check(value)) {
3196 0 : unsigned long long test_var;
3197 0 : test_var = PyLong_AsUnsignedLongLong(value);
3198 0 : if (PyErr_Occurred() != NULL) {
3199 0 : return -1;
3200 : }
3201 0 : if (test_var > uint_max) {
3202 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3203 : PyLong_Type.tp_name, uint_max, test_var);
3204 0 : return -1;
3205 : }
3206 0 : object->MatchFlag = test_var;
3207 : } else {
3208 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3209 : PyLong_Type.tp_name);
3210 0 : return -1;
3211 : }
3212 : }
3213 0 : return 0;
3214 : }
3215 :
3216 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Reserved1(PyObject *obj, void *closure)
3217 : {
3218 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
3219 0 : PyObject *py_Reserved1;
3220 0 : py_Reserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->Reserved1);
3221 0 : return py_Reserved1;
3222 : }
3223 :
3224 0 : static int py_DNS_ADDR_ARRAY_set_Reserved1(PyObject *py_obj, PyObject *value, void *closure)
3225 : {
3226 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
3227 0 : if (value == NULL) {
3228 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Reserved1");
3229 0 : return -1;
3230 : }
3231 : {
3232 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Reserved1));
3233 0 : if (PyLong_Check(value)) {
3234 0 : unsigned long long test_var;
3235 0 : test_var = PyLong_AsUnsignedLongLong(value);
3236 0 : if (PyErr_Occurred() != NULL) {
3237 0 : return -1;
3238 : }
3239 0 : if (test_var > uint_max) {
3240 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3241 : PyLong_Type.tp_name, uint_max, test_var);
3242 0 : return -1;
3243 : }
3244 0 : object->Reserved1 = test_var;
3245 : } else {
3246 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3247 : PyLong_Type.tp_name);
3248 0 : return -1;
3249 : }
3250 : }
3251 0 : return 0;
3252 : }
3253 :
3254 0 : static PyObject *py_DNS_ADDR_ARRAY_get_Reserved2(PyObject *obj, void *closure)
3255 : {
3256 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
3257 0 : PyObject *py_Reserved2;
3258 0 : py_Reserved2 = PyLong_FromUnsignedLongLong((uint32_t)object->Reserved2);
3259 0 : return py_Reserved2;
3260 : }
3261 :
3262 0 : static int py_DNS_ADDR_ARRAY_set_Reserved2(PyObject *py_obj, PyObject *value, void *closure)
3263 : {
3264 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
3265 0 : if (value == NULL) {
3266 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Reserved2");
3267 0 : return -1;
3268 : }
3269 : {
3270 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Reserved2));
3271 0 : if (PyLong_Check(value)) {
3272 0 : unsigned long long test_var;
3273 0 : test_var = PyLong_AsUnsignedLongLong(value);
3274 0 : if (PyErr_Occurred() != NULL) {
3275 0 : return -1;
3276 : }
3277 0 : if (test_var > uint_max) {
3278 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3279 : PyLong_Type.tp_name, uint_max, test_var);
3280 0 : return -1;
3281 : }
3282 0 : object->Reserved2 = test_var;
3283 : } else {
3284 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3285 : PyLong_Type.tp_name);
3286 0 : return -1;
3287 : }
3288 : }
3289 0 : return 0;
3290 : }
3291 :
3292 10 : static PyObject *py_DNS_ADDR_ARRAY_get_AddrArray(PyObject *obj, void *closure)
3293 : {
3294 10 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(obj);
3295 0 : PyObject *py_AddrArray;
3296 10 : py_AddrArray = PyList_New(object->AddrCount);
3297 10 : if (py_AddrArray == NULL) {
3298 0 : return NULL;
3299 : }
3300 : {
3301 : int AddrArray_cntr_0;
3302 30 : for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < (object->AddrCount); AddrArray_cntr_0++) {
3303 0 : PyObject *py_AddrArray_0;
3304 20 : py_AddrArray_0 = pytalloc_reference_ex(&DNS_ADDR_Type, object->AddrArray, &object->AddrArray[AddrArray_cntr_0]);
3305 20 : PyList_SetItem(py_AddrArray, AddrArray_cntr_0, py_AddrArray_0);
3306 : }
3307 : }
3308 10 : return py_AddrArray;
3309 : }
3310 :
3311 0 : static int py_DNS_ADDR_ARRAY_set_AddrArray(PyObject *py_obj, PyObject *value, void *closure)
3312 : {
3313 0 : struct DNS_ADDR_ARRAY *object = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(py_obj);
3314 0 : if (value == NULL) {
3315 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AddrArray");
3316 0 : return -1;
3317 : }
3318 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
3319 : {
3320 0 : int AddrArray_cntr_0;
3321 0 : object->AddrArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->AddrArray, PyList_GET_SIZE(value));
3322 0 : if (!object->AddrArray) { return -1; }
3323 0 : talloc_set_name_const(object->AddrArray, "ARRAY: object->AddrArray");
3324 0 : for (AddrArray_cntr_0 = 0; AddrArray_cntr_0 < PyList_GET_SIZE(value); AddrArray_cntr_0++) {
3325 0 : if (PyList_GET_ITEM(value, AddrArray_cntr_0) == NULL) {
3326 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->AddrArray[AddrArray_cntr_0]");
3327 0 : return -1;
3328 : }
3329 0 : PY_CHECK_TYPE(&DNS_ADDR_Type, PyList_GET_ITEM(value, AddrArray_cntr_0), return -1;);
3330 0 : if (talloc_reference(object->AddrArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, AddrArray_cntr_0))) == NULL) {
3331 0 : PyErr_NoMemory();
3332 0 : return -1;
3333 : }
3334 0 : object->AddrArray[AddrArray_cntr_0] = *(struct DNS_ADDR *)pytalloc_get_ptr(PyList_GET_ITEM(value, AddrArray_cntr_0));
3335 : }
3336 : }
3337 0 : return 0;
3338 : }
3339 :
3340 : static PyGetSetDef py_DNS_ADDR_ARRAY_getsetters[] = {
3341 : {
3342 : .name = discard_const_p(char, "MaxCount"),
3343 : .get = py_DNS_ADDR_ARRAY_get_MaxCount,
3344 : .set = py_DNS_ADDR_ARRAY_set_MaxCount,
3345 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3346 : },
3347 : {
3348 : .name = discard_const_p(char, "AddrCount"),
3349 : .get = py_DNS_ADDR_ARRAY_get_AddrCount,
3350 : .set = py_DNS_ADDR_ARRAY_set_AddrCount,
3351 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3352 : },
3353 : {
3354 : .name = discard_const_p(char, "Tag"),
3355 : .get = py_DNS_ADDR_ARRAY_get_Tag,
3356 : .set = py_DNS_ADDR_ARRAY_set_Tag,
3357 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3358 : },
3359 : {
3360 : .name = discard_const_p(char, "Family"),
3361 : .get = py_DNS_ADDR_ARRAY_get_Family,
3362 : .set = py_DNS_ADDR_ARRAY_set_Family,
3363 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
3364 : },
3365 : {
3366 : .name = discard_const_p(char, "WordReserved"),
3367 : .get = py_DNS_ADDR_ARRAY_get_WordReserved,
3368 : .set = py_DNS_ADDR_ARRAY_set_WordReserved,
3369 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
3370 : },
3371 : {
3372 : .name = discard_const_p(char, "Flags"),
3373 : .get = py_DNS_ADDR_ARRAY_get_Flags,
3374 : .set = py_DNS_ADDR_ARRAY_set_Flags,
3375 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3376 : },
3377 : {
3378 : .name = discard_const_p(char, "MatchFlag"),
3379 : .get = py_DNS_ADDR_ARRAY_get_MatchFlag,
3380 : .set = py_DNS_ADDR_ARRAY_set_MatchFlag,
3381 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3382 : },
3383 : {
3384 : .name = discard_const_p(char, "Reserved1"),
3385 : .get = py_DNS_ADDR_ARRAY_get_Reserved1,
3386 : .set = py_DNS_ADDR_ARRAY_set_Reserved1,
3387 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3388 : },
3389 : {
3390 : .name = discard_const_p(char, "Reserved2"),
3391 : .get = py_DNS_ADDR_ARRAY_get_Reserved2,
3392 : .set = py_DNS_ADDR_ARRAY_set_Reserved2,
3393 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3394 : },
3395 : {
3396 : .name = discard_const_p(char, "AddrArray"),
3397 : .get = py_DNS_ADDR_ARRAY_get_AddrArray,
3398 : .set = py_DNS_ADDR_ARRAY_set_AddrArray,
3399 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR")
3400 : },
3401 : { .name = NULL }
3402 : };
3403 :
3404 0 : static PyObject *py_DNS_ADDR_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3405 : {
3406 0 : return pytalloc_new(struct DNS_ADDR_ARRAY, type);
3407 : }
3408 :
3409 :
3410 : static PyTypeObject DNS_ADDR_ARRAY_Type = {
3411 : PyVarObject_HEAD_INIT(NULL, 0)
3412 : .tp_name = "dnsserver.DNS_ADDR_ARRAY",
3413 : .tp_getset = py_DNS_ADDR_ARRAY_getsetters,
3414 : .tp_methods = NULL,
3415 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3416 : .tp_new = py_DNS_ADDR_ARRAY_new,
3417 : };
3418 :
3419 :
3420 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwRpcStructureVersion(PyObject *obj, void *closure)
3421 : {
3422 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
3423 0 : PyObject *py_dwRpcStructureVersion;
3424 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
3425 0 : return py_dwRpcStructureVersion;
3426 : }
3427 :
3428 0 : static int py_DNS_RPC_IP_VALIDATE_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
3429 : {
3430 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
3431 0 : if (value == NULL) {
3432 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
3433 0 : return -1;
3434 : }
3435 : {
3436 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
3437 0 : if (PyLong_Check(value)) {
3438 0 : unsigned long long test_var;
3439 0 : test_var = PyLong_AsUnsignedLongLong(value);
3440 0 : if (PyErr_Occurred() != NULL) {
3441 0 : return -1;
3442 : }
3443 0 : if (test_var > uint_max) {
3444 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3445 : PyLong_Type.tp_name, uint_max, test_var);
3446 0 : return -1;
3447 : }
3448 0 : object->dwRpcStructureVersion = test_var;
3449 : } else {
3450 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3451 : PyLong_Type.tp_name);
3452 0 : return -1;
3453 : }
3454 : }
3455 0 : return 0;
3456 : }
3457 :
3458 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwReserved0(PyObject *obj, void *closure)
3459 : {
3460 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
3461 0 : PyObject *py_dwReserved0;
3462 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
3463 0 : return py_dwReserved0;
3464 : }
3465 :
3466 0 : static int py_DNS_RPC_IP_VALIDATE_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
3467 : {
3468 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
3469 0 : if (value == NULL) {
3470 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
3471 0 : return -1;
3472 : }
3473 : {
3474 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
3475 0 : if (PyLong_Check(value)) {
3476 0 : unsigned long long test_var;
3477 0 : test_var = PyLong_AsUnsignedLongLong(value);
3478 0 : if (PyErr_Occurred() != NULL) {
3479 0 : return -1;
3480 : }
3481 0 : if (test_var > uint_max) {
3482 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3483 : PyLong_Type.tp_name, uint_max, test_var);
3484 0 : return -1;
3485 : }
3486 0 : object->dwReserved0 = test_var;
3487 : } else {
3488 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3489 : PyLong_Type.tp_name);
3490 0 : return -1;
3491 : }
3492 : }
3493 0 : return 0;
3494 : }
3495 :
3496 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwContext(PyObject *obj, void *closure)
3497 : {
3498 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
3499 0 : PyObject *py_dwContext;
3500 0 : py_dwContext = PyLong_FromUnsignedLongLong((uint32_t)object->dwContext);
3501 0 : return py_dwContext;
3502 : }
3503 :
3504 0 : static int py_DNS_RPC_IP_VALIDATE_set_dwContext(PyObject *py_obj, PyObject *value, void *closure)
3505 : {
3506 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
3507 0 : if (value == NULL) {
3508 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwContext");
3509 0 : return -1;
3510 : }
3511 : {
3512 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwContext));
3513 0 : if (PyLong_Check(value)) {
3514 0 : unsigned long long test_var;
3515 0 : test_var = PyLong_AsUnsignedLongLong(value);
3516 0 : if (PyErr_Occurred() != NULL) {
3517 0 : return -1;
3518 : }
3519 0 : if (test_var > uint_max) {
3520 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3521 : PyLong_Type.tp_name, uint_max, test_var);
3522 0 : return -1;
3523 : }
3524 0 : object->dwContext = test_var;
3525 : } else {
3526 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3527 : PyLong_Type.tp_name);
3528 0 : return -1;
3529 : }
3530 : }
3531 0 : return 0;
3532 : }
3533 :
3534 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_dwReserved1(PyObject *obj, void *closure)
3535 : {
3536 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
3537 0 : PyObject *py_dwReserved1;
3538 0 : py_dwReserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved1);
3539 0 : return py_dwReserved1;
3540 : }
3541 :
3542 0 : static int py_DNS_RPC_IP_VALIDATE_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
3543 : {
3544 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
3545 0 : if (value == NULL) {
3546 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved1");
3547 0 : return -1;
3548 : }
3549 : {
3550 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved1));
3551 0 : if (PyLong_Check(value)) {
3552 0 : unsigned long long test_var;
3553 0 : test_var = PyLong_AsUnsignedLongLong(value);
3554 0 : if (PyErr_Occurred() != NULL) {
3555 0 : return -1;
3556 : }
3557 0 : if (test_var > uint_max) {
3558 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3559 : PyLong_Type.tp_name, uint_max, test_var);
3560 0 : return -1;
3561 : }
3562 0 : object->dwReserved1 = test_var;
3563 : } else {
3564 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3565 : PyLong_Type.tp_name);
3566 0 : return -1;
3567 : }
3568 : }
3569 0 : return 0;
3570 : }
3571 :
3572 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_pszContextName(PyObject *obj, void *closure)
3573 : {
3574 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
3575 0 : PyObject *py_pszContextName;
3576 0 : if (object->pszContextName == NULL) {
3577 0 : Py_RETURN_NONE;
3578 : }
3579 0 : if (object->pszContextName == NULL) {
3580 0 : py_pszContextName = Py_None;
3581 0 : Py_INCREF(py_pszContextName);
3582 : } else {
3583 0 : if (object->pszContextName == NULL) {
3584 0 : py_pszContextName = Py_None;
3585 0 : Py_INCREF(py_pszContextName);
3586 : } else {
3587 0 : py_pszContextName = PyUnicode_Decode(object->pszContextName, strlen(object->pszContextName), "utf-8", "ignore");
3588 : }
3589 : }
3590 0 : return py_pszContextName;
3591 : }
3592 :
3593 0 : static int py_DNS_RPC_IP_VALIDATE_set_pszContextName(PyObject *py_obj, PyObject *value, void *closure)
3594 : {
3595 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
3596 0 : if (value == NULL) {
3597 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszContextName");
3598 0 : return -1;
3599 : }
3600 0 : if (value == Py_None) {
3601 0 : object->pszContextName = NULL;
3602 : } else {
3603 0 : object->pszContextName = NULL;
3604 : {
3605 0 : const char *test_str;
3606 0 : const char *talloc_str;
3607 0 : PyObject *unicode = NULL;
3608 0 : if (PyUnicode_Check(value)) {
3609 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
3610 0 : if (unicode == NULL) {
3611 0 : PyErr_NoMemory();
3612 0 : return -1;
3613 : }
3614 0 : test_str = PyBytes_AS_STRING(unicode);
3615 0 : } else if (PyBytes_Check(value)) {
3616 0 : test_str = PyBytes_AS_STRING(value);
3617 : } else {
3618 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3619 0 : return -1;
3620 : }
3621 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
3622 0 : if (unicode != NULL) {
3623 0 : Py_DECREF(unicode);
3624 : }
3625 0 : if (talloc_str == NULL) {
3626 0 : PyErr_NoMemory();
3627 0 : return -1;
3628 : }
3629 0 : object->pszContextName = talloc_str;
3630 : }
3631 : }
3632 0 : return 0;
3633 : }
3634 :
3635 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_get_aipValidateAddrs(PyObject *obj, void *closure)
3636 : {
3637 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(obj);
3638 0 : PyObject *py_aipValidateAddrs;
3639 0 : if (object->aipValidateAddrs == NULL) {
3640 0 : Py_RETURN_NONE;
3641 : }
3642 0 : if (object->aipValidateAddrs == NULL) {
3643 0 : py_aipValidateAddrs = Py_None;
3644 0 : Py_INCREF(py_aipValidateAddrs);
3645 : } else {
3646 0 : py_aipValidateAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipValidateAddrs, object->aipValidateAddrs);
3647 : }
3648 0 : return py_aipValidateAddrs;
3649 : }
3650 :
3651 0 : static int py_DNS_RPC_IP_VALIDATE_set_aipValidateAddrs(PyObject *py_obj, PyObject *value, void *closure)
3652 : {
3653 0 : struct DNS_RPC_IP_VALIDATE *object = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(py_obj);
3654 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipValidateAddrs));
3655 0 : if (value == NULL) {
3656 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipValidateAddrs");
3657 0 : return -1;
3658 : }
3659 0 : if (value == Py_None) {
3660 0 : object->aipValidateAddrs = NULL;
3661 : } else {
3662 0 : object->aipValidateAddrs = NULL;
3663 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
3664 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
3665 0 : PyErr_NoMemory();
3666 0 : return -1;
3667 : }
3668 0 : object->aipValidateAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
3669 : }
3670 0 : return 0;
3671 : }
3672 :
3673 : static PyGetSetDef py_DNS_RPC_IP_VALIDATE_getsetters[] = {
3674 : {
3675 : .name = discard_const_p(char, "dwRpcStructureVersion"),
3676 : .get = py_DNS_RPC_IP_VALIDATE_get_dwRpcStructureVersion,
3677 : .set = py_DNS_RPC_IP_VALIDATE_set_dwRpcStructureVersion,
3678 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3679 : },
3680 : {
3681 : .name = discard_const_p(char, "dwReserved0"),
3682 : .get = py_DNS_RPC_IP_VALIDATE_get_dwReserved0,
3683 : .set = py_DNS_RPC_IP_VALIDATE_set_dwReserved0,
3684 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3685 : },
3686 : {
3687 : .name = discard_const_p(char, "dwContext"),
3688 : .get = py_DNS_RPC_IP_VALIDATE_get_dwContext,
3689 : .set = py_DNS_RPC_IP_VALIDATE_set_dwContext,
3690 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3691 : },
3692 : {
3693 : .name = discard_const_p(char, "dwReserved1"),
3694 : .get = py_DNS_RPC_IP_VALIDATE_get_dwReserved1,
3695 : .set = py_DNS_RPC_IP_VALIDATE_set_dwReserved1,
3696 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
3697 : },
3698 : {
3699 : .name = discard_const_p(char, "pszContextName"),
3700 : .get = py_DNS_RPC_IP_VALIDATE_get_pszContextName,
3701 : .set = py_DNS_RPC_IP_VALIDATE_set_pszContextName,
3702 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
3703 : },
3704 : {
3705 : .name = discard_const_p(char, "aipValidateAddrs"),
3706 : .get = py_DNS_RPC_IP_VALIDATE_get_aipValidateAddrs,
3707 : .set = py_DNS_RPC_IP_VALIDATE_set_aipValidateAddrs,
3708 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
3709 : },
3710 : { .name = NULL }
3711 : };
3712 :
3713 0 : static PyObject *py_DNS_RPC_IP_VALIDATE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
3714 : {
3715 0 : return pytalloc_new(struct DNS_RPC_IP_VALIDATE, type);
3716 : }
3717 :
3718 :
3719 : static PyTypeObject DNS_RPC_IP_VALIDATE_Type = {
3720 : PyVarObject_HEAD_INIT(NULL, 0)
3721 : .tp_name = "dnsserver.DNS_RPC_IP_VALIDATE",
3722 : .tp_getset = py_DNS_RPC_IP_VALIDATE_getsetters,
3723 : .tp_methods = NULL,
3724 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
3725 : .tp_new = py_DNS_RPC_IP_VALIDATE_new,
3726 : };
3727 :
3728 :
3729 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwVersion(PyObject *obj, void *closure)
3730 : {
3731 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
3732 0 : PyObject *py_dwVersion;
3733 1 : py_dwVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwVersion);
3734 1 : return py_dwVersion;
3735 : }
3736 :
3737 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
3738 : {
3739 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
3740 0 : if (value == NULL) {
3741 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwVersion");
3742 0 : return -1;
3743 : }
3744 : {
3745 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwVersion));
3746 0 : if (PyLong_Check(value)) {
3747 0 : unsigned long long test_var;
3748 0 : test_var = PyLong_AsUnsignedLongLong(value);
3749 0 : if (PyErr_Occurred() != NULL) {
3750 0 : return -1;
3751 : }
3752 0 : if (test_var > uint_max) {
3753 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3754 : PyLong_Type.tp_name, uint_max, test_var);
3755 0 : return -1;
3756 : }
3757 0 : object->dwVersion = test_var;
3758 : } else {
3759 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3760 : PyLong_Type.tp_name);
3761 0 : return -1;
3762 : }
3763 : }
3764 0 : return 0;
3765 : }
3766 :
3767 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fBootMethod(PyObject *obj, void *closure)
3768 : {
3769 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
3770 0 : PyObject *py_fBootMethod;
3771 1 : py_fBootMethod = PyLong_FromLong((uint16_t)object->fBootMethod);
3772 1 : return py_fBootMethod;
3773 : }
3774 :
3775 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
3776 : {
3777 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
3778 0 : if (value == NULL) {
3779 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fBootMethod");
3780 0 : return -1;
3781 : }
3782 : {
3783 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBootMethod));
3784 0 : if (PyLong_Check(value)) {
3785 0 : unsigned long long test_var;
3786 0 : test_var = PyLong_AsUnsignedLongLong(value);
3787 0 : if (PyErr_Occurred() != NULL) {
3788 0 : return -1;
3789 : }
3790 0 : if (test_var > uint_max) {
3791 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3792 : PyLong_Type.tp_name, uint_max, test_var);
3793 0 : return -1;
3794 : }
3795 0 : object->fBootMethod = test_var;
3796 : } else {
3797 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3798 : PyLong_Type.tp_name);
3799 0 : return -1;
3800 : }
3801 : }
3802 0 : return 0;
3803 : }
3804 :
3805 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAdminConfigured(PyObject *obj, void *closure)
3806 : {
3807 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
3808 0 : PyObject *py_fAdminConfigured;
3809 1 : py_fAdminConfigured = PyLong_FromLong((uint16_t)object->fAdminConfigured);
3810 1 : return py_fAdminConfigured;
3811 : }
3812 :
3813 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
3814 : {
3815 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
3816 0 : if (value == NULL) {
3817 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAdminConfigured");
3818 0 : return -1;
3819 : }
3820 : {
3821 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAdminConfigured));
3822 0 : if (PyLong_Check(value)) {
3823 0 : unsigned long long test_var;
3824 0 : test_var = PyLong_AsUnsignedLongLong(value);
3825 0 : if (PyErr_Occurred() != NULL) {
3826 0 : return -1;
3827 : }
3828 0 : if (test_var > uint_max) {
3829 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3830 : PyLong_Type.tp_name, uint_max, test_var);
3831 0 : return -1;
3832 : }
3833 0 : object->fAdminConfigured = test_var;
3834 : } else {
3835 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3836 : PyLong_Type.tp_name);
3837 0 : return -1;
3838 : }
3839 : }
3840 0 : return 0;
3841 : }
3842 :
3843 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
3844 : {
3845 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
3846 0 : PyObject *py_fAllowUpdate;
3847 1 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
3848 1 : return py_fAllowUpdate;
3849 : }
3850 :
3851 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
3852 : {
3853 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
3854 0 : if (value == NULL) {
3855 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
3856 0 : return -1;
3857 : }
3858 : {
3859 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
3860 0 : if (PyLong_Check(value)) {
3861 0 : unsigned long long test_var;
3862 0 : test_var = PyLong_AsUnsignedLongLong(value);
3863 0 : if (PyErr_Occurred() != NULL) {
3864 0 : return -1;
3865 : }
3866 0 : if (test_var > uint_max) {
3867 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3868 : PyLong_Type.tp_name, uint_max, test_var);
3869 0 : return -1;
3870 : }
3871 0 : object->fAllowUpdate = test_var;
3872 : } else {
3873 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3874 : PyLong_Type.tp_name);
3875 0 : return -1;
3876 : }
3877 : }
3878 0 : return 0;
3879 : }
3880 :
3881 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fDsAvailable(PyObject *obj, void *closure)
3882 : {
3883 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
3884 0 : PyObject *py_fDsAvailable;
3885 1 : py_fDsAvailable = PyLong_FromLong((uint16_t)object->fDsAvailable);
3886 1 : return py_fDsAvailable;
3887 : }
3888 :
3889 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
3890 : {
3891 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
3892 0 : if (value == NULL) {
3893 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDsAvailable");
3894 0 : return -1;
3895 : }
3896 : {
3897 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsAvailable));
3898 0 : if (PyLong_Check(value)) {
3899 0 : unsigned long long test_var;
3900 0 : test_var = PyLong_AsUnsignedLongLong(value);
3901 0 : if (PyErr_Occurred() != NULL) {
3902 0 : return -1;
3903 : }
3904 0 : if (test_var > uint_max) {
3905 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
3906 : PyLong_Type.tp_name, uint_max, test_var);
3907 0 : return -1;
3908 : }
3909 0 : object->fDsAvailable = test_var;
3910 : } else {
3911 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
3912 : PyLong_Type.tp_name);
3913 0 : return -1;
3914 : }
3915 : }
3916 0 : return 0;
3917 : }
3918 :
3919 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pszServerName(PyObject *obj, void *closure)
3920 : {
3921 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
3922 0 : PyObject *py_pszServerName;
3923 1 : if (object->pszServerName == NULL) {
3924 0 : Py_RETURN_NONE;
3925 : }
3926 1 : if (object->pszServerName == NULL) {
3927 0 : py_pszServerName = Py_None;
3928 0 : Py_INCREF(py_pszServerName);
3929 : } else {
3930 1 : if (object->pszServerName == NULL) {
3931 0 : py_pszServerName = Py_None;
3932 0 : Py_INCREF(py_pszServerName);
3933 : } else {
3934 1 : py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
3935 : }
3936 : }
3937 1 : return py_pszServerName;
3938 : }
3939 :
3940 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
3941 : {
3942 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
3943 0 : if (value == NULL) {
3944 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszServerName");
3945 0 : return -1;
3946 : }
3947 0 : if (value == Py_None) {
3948 0 : object->pszServerName = NULL;
3949 : } else {
3950 0 : object->pszServerName = NULL;
3951 : {
3952 0 : const char *test_str;
3953 0 : const char *talloc_str;
3954 0 : PyObject *unicode = NULL;
3955 0 : if (PyUnicode_Check(value)) {
3956 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
3957 0 : if (unicode == NULL) {
3958 0 : PyErr_NoMemory();
3959 0 : return -1;
3960 : }
3961 0 : test_str = PyBytes_AS_STRING(unicode);
3962 0 : } else if (PyBytes_Check(value)) {
3963 0 : test_str = PyBytes_AS_STRING(value);
3964 : } else {
3965 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
3966 0 : return -1;
3967 : }
3968 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
3969 0 : if (unicode != NULL) {
3970 0 : Py_DECREF(unicode);
3971 : }
3972 0 : if (talloc_str == NULL) {
3973 0 : PyErr_NoMemory();
3974 0 : return -1;
3975 : }
3976 0 : object->pszServerName = talloc_str;
3977 : }
3978 : }
3979 0 : return 0;
3980 : }
3981 :
3982 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pszDsContainer(PyObject *obj, void *closure)
3983 : {
3984 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
3985 0 : PyObject *py_pszDsContainer;
3986 1 : if (object->pszDsContainer == NULL) {
3987 0 : Py_RETURN_NONE;
3988 : }
3989 1 : if (object->pszDsContainer == NULL) {
3990 0 : py_pszDsContainer = Py_None;
3991 0 : Py_INCREF(py_pszDsContainer);
3992 : } else {
3993 1 : if (object->pszDsContainer == NULL) {
3994 0 : py_pszDsContainer = Py_None;
3995 0 : Py_INCREF(py_pszDsContainer);
3996 : } else {
3997 1 : py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
3998 : }
3999 : }
4000 1 : return py_pszDsContainer;
4001 : }
4002 :
4003 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
4004 : {
4005 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4006 0 : if (value == NULL) {
4007 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDsContainer");
4008 0 : return -1;
4009 : }
4010 0 : if (value == Py_None) {
4011 0 : object->pszDsContainer = NULL;
4012 : } else {
4013 0 : object->pszDsContainer = NULL;
4014 : {
4015 0 : const char *test_str;
4016 0 : const char *talloc_str;
4017 0 : PyObject *unicode = NULL;
4018 0 : if (PyUnicode_Check(value)) {
4019 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
4020 0 : if (unicode == NULL) {
4021 0 : PyErr_NoMemory();
4022 0 : return -1;
4023 : }
4024 0 : test_str = PyBytes_AS_STRING(unicode);
4025 0 : } else if (PyBytes_Check(value)) {
4026 0 : test_str = PyBytes_AS_STRING(value);
4027 : } else {
4028 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
4029 0 : return -1;
4030 : }
4031 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
4032 0 : if (unicode != NULL) {
4033 0 : Py_DECREF(unicode);
4034 : }
4035 0 : if (talloc_str == NULL) {
4036 0 : PyErr_NoMemory();
4037 0 : return -1;
4038 : }
4039 0 : object->pszDsContainer = talloc_str;
4040 : }
4041 : }
4042 0 : return 0;
4043 : }
4044 :
4045 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipServerAddrs(PyObject *obj, void *closure)
4046 : {
4047 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4048 0 : PyObject *py_aipServerAddrs;
4049 1 : if (object->aipServerAddrs == NULL) {
4050 0 : Py_RETURN_NONE;
4051 : }
4052 1 : if (object->aipServerAddrs == NULL) {
4053 0 : py_aipServerAddrs = Py_None;
4054 0 : Py_INCREF(py_aipServerAddrs);
4055 : } else {
4056 1 : py_aipServerAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
4057 : }
4058 1 : return py_aipServerAddrs;
4059 : }
4060 :
4061 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
4062 : {
4063 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4064 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipServerAddrs));
4065 0 : if (value == NULL) {
4066 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipServerAddrs");
4067 0 : return -1;
4068 : }
4069 0 : if (value == Py_None) {
4070 0 : object->aipServerAddrs = NULL;
4071 : } else {
4072 0 : object->aipServerAddrs = NULL;
4073 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
4074 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4075 0 : PyErr_NoMemory();
4076 0 : return -1;
4077 : }
4078 0 : object->aipServerAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
4079 : }
4080 0 : return 0;
4081 : }
4082 :
4083 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipListenAddrs(PyObject *obj, void *closure)
4084 : {
4085 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4086 0 : PyObject *py_aipListenAddrs;
4087 1 : if (object->aipListenAddrs == NULL) {
4088 0 : Py_RETURN_NONE;
4089 : }
4090 1 : if (object->aipListenAddrs == NULL) {
4091 0 : py_aipListenAddrs = Py_None;
4092 0 : Py_INCREF(py_aipListenAddrs);
4093 : } else {
4094 1 : py_aipListenAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
4095 : }
4096 1 : return py_aipListenAddrs;
4097 : }
4098 :
4099 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
4100 : {
4101 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4102 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipListenAddrs));
4103 0 : if (value == NULL) {
4104 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipListenAddrs");
4105 0 : return -1;
4106 : }
4107 0 : if (value == Py_None) {
4108 0 : object->aipListenAddrs = NULL;
4109 : } else {
4110 0 : object->aipListenAddrs = NULL;
4111 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
4112 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4113 0 : PyErr_NoMemory();
4114 0 : return -1;
4115 : }
4116 0 : object->aipListenAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
4117 : }
4118 0 : return 0;
4119 : }
4120 :
4121 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_aipForwarders(PyObject *obj, void *closure)
4122 : {
4123 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4124 0 : PyObject *py_aipForwarders;
4125 1 : if (object->aipForwarders == NULL) {
4126 1 : Py_RETURN_NONE;
4127 : }
4128 0 : if (object->aipForwarders == NULL) {
4129 0 : py_aipForwarders = Py_None;
4130 0 : Py_INCREF(py_aipForwarders);
4131 : } else {
4132 0 : py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
4133 : }
4134 0 : return py_aipForwarders;
4135 : }
4136 :
4137 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
4138 : {
4139 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4140 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
4141 0 : if (value == NULL) {
4142 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipForwarders");
4143 0 : return -1;
4144 : }
4145 0 : if (value == Py_None) {
4146 0 : object->aipForwarders = NULL;
4147 : } else {
4148 0 : object->aipForwarders = NULL;
4149 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
4150 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
4151 0 : PyErr_NoMemory();
4152 0 : return -1;
4153 : }
4154 0 : object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
4155 : }
4156 0 : return 0;
4157 : }
4158 :
4159 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension1(PyObject *obj, void *closure)
4160 : {
4161 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4162 0 : PyObject *py_pExtension1;
4163 0 : if (object->pExtension1 == NULL) {
4164 0 : Py_RETURN_NONE;
4165 : }
4166 0 : if (object->pExtension1 == NULL) {
4167 0 : py_pExtension1 = Py_None;
4168 0 : Py_INCREF(py_pExtension1);
4169 : } else {
4170 0 : py_pExtension1 = PyLong_FromUnsignedLongLong((uint32_t)*object->pExtension1);
4171 : }
4172 0 : return py_pExtension1;
4173 : }
4174 :
4175 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension1(PyObject *py_obj, PyObject *value, void *closure)
4176 : {
4177 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4178 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension1));
4179 0 : if (value == NULL) {
4180 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtension1");
4181 0 : return -1;
4182 : }
4183 0 : if (value == Py_None) {
4184 0 : object->pExtension1 = NULL;
4185 : } else {
4186 0 : object->pExtension1 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension1);
4187 0 : if (object->pExtension1 == NULL) {
4188 0 : PyErr_NoMemory();
4189 0 : return -1;
4190 : }
4191 : {
4192 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension1));
4193 0 : if (PyLong_Check(value)) {
4194 0 : unsigned long long test_var;
4195 0 : test_var = PyLong_AsUnsignedLongLong(value);
4196 0 : if (PyErr_Occurred() != NULL) {
4197 0 : return -1;
4198 : }
4199 0 : if (test_var > uint_max) {
4200 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4201 : PyLong_Type.tp_name, uint_max, test_var);
4202 0 : return -1;
4203 : }
4204 0 : *object->pExtension1 = test_var;
4205 : } else {
4206 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4207 : PyLong_Type.tp_name);
4208 0 : return -1;
4209 : }
4210 : }
4211 : }
4212 0 : return 0;
4213 : }
4214 :
4215 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension2(PyObject *obj, void *closure)
4216 : {
4217 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4218 0 : PyObject *py_pExtension2;
4219 0 : if (object->pExtension2 == NULL) {
4220 0 : Py_RETURN_NONE;
4221 : }
4222 0 : if (object->pExtension2 == NULL) {
4223 0 : py_pExtension2 = Py_None;
4224 0 : Py_INCREF(py_pExtension2);
4225 : } else {
4226 0 : py_pExtension2 = PyLong_FromUnsignedLongLong((uint32_t)*object->pExtension2);
4227 : }
4228 0 : return py_pExtension2;
4229 : }
4230 :
4231 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension2(PyObject *py_obj, PyObject *value, void *closure)
4232 : {
4233 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4234 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension2));
4235 0 : if (value == NULL) {
4236 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtension2");
4237 0 : return -1;
4238 : }
4239 0 : if (value == Py_None) {
4240 0 : object->pExtension2 = NULL;
4241 : } else {
4242 0 : object->pExtension2 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension2);
4243 0 : if (object->pExtension2 == NULL) {
4244 0 : PyErr_NoMemory();
4245 0 : return -1;
4246 : }
4247 : {
4248 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension2));
4249 0 : if (PyLong_Check(value)) {
4250 0 : unsigned long long test_var;
4251 0 : test_var = PyLong_AsUnsignedLongLong(value);
4252 0 : if (PyErr_Occurred() != NULL) {
4253 0 : return -1;
4254 : }
4255 0 : if (test_var > uint_max) {
4256 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4257 : PyLong_Type.tp_name, uint_max, test_var);
4258 0 : return -1;
4259 : }
4260 0 : *object->pExtension2 = test_var;
4261 : } else {
4262 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4263 : PyLong_Type.tp_name);
4264 0 : return -1;
4265 : }
4266 : }
4267 : }
4268 0 : return 0;
4269 : }
4270 :
4271 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension3(PyObject *obj, void *closure)
4272 : {
4273 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4274 0 : PyObject *py_pExtension3;
4275 0 : if (object->pExtension3 == NULL) {
4276 0 : Py_RETURN_NONE;
4277 : }
4278 0 : if (object->pExtension3 == NULL) {
4279 0 : py_pExtension3 = Py_None;
4280 0 : Py_INCREF(py_pExtension3);
4281 : } else {
4282 0 : py_pExtension3 = PyLong_FromUnsignedLongLong((uint32_t)*object->pExtension3);
4283 : }
4284 0 : return py_pExtension3;
4285 : }
4286 :
4287 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension3(PyObject *py_obj, PyObject *value, void *closure)
4288 : {
4289 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4290 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension3));
4291 0 : if (value == NULL) {
4292 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtension3");
4293 0 : return -1;
4294 : }
4295 0 : if (value == Py_None) {
4296 0 : object->pExtension3 = NULL;
4297 : } else {
4298 0 : object->pExtension3 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension3);
4299 0 : if (object->pExtension3 == NULL) {
4300 0 : PyErr_NoMemory();
4301 0 : return -1;
4302 : }
4303 : {
4304 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension3));
4305 0 : if (PyLong_Check(value)) {
4306 0 : unsigned long long test_var;
4307 0 : test_var = PyLong_AsUnsignedLongLong(value);
4308 0 : if (PyErr_Occurred() != NULL) {
4309 0 : return -1;
4310 : }
4311 0 : if (test_var > uint_max) {
4312 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4313 : PyLong_Type.tp_name, uint_max, test_var);
4314 0 : return -1;
4315 : }
4316 0 : *object->pExtension3 = test_var;
4317 : } else {
4318 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4319 : PyLong_Type.tp_name);
4320 0 : return -1;
4321 : }
4322 : }
4323 : }
4324 0 : return 0;
4325 : }
4326 :
4327 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension4(PyObject *obj, void *closure)
4328 : {
4329 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4330 0 : PyObject *py_pExtension4;
4331 0 : if (object->pExtension4 == NULL) {
4332 0 : Py_RETURN_NONE;
4333 : }
4334 0 : if (object->pExtension4 == NULL) {
4335 0 : py_pExtension4 = Py_None;
4336 0 : Py_INCREF(py_pExtension4);
4337 : } else {
4338 0 : py_pExtension4 = PyLong_FromUnsignedLongLong((uint32_t)*object->pExtension4);
4339 : }
4340 0 : return py_pExtension4;
4341 : }
4342 :
4343 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension4(PyObject *py_obj, PyObject *value, void *closure)
4344 : {
4345 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4346 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension4));
4347 0 : if (value == NULL) {
4348 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtension4");
4349 0 : return -1;
4350 : }
4351 0 : if (value == Py_None) {
4352 0 : object->pExtension4 = NULL;
4353 : } else {
4354 0 : object->pExtension4 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension4);
4355 0 : if (object->pExtension4 == NULL) {
4356 0 : PyErr_NoMemory();
4357 0 : return -1;
4358 : }
4359 : {
4360 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension4));
4361 0 : if (PyLong_Check(value)) {
4362 0 : unsigned long long test_var;
4363 0 : test_var = PyLong_AsUnsignedLongLong(value);
4364 0 : if (PyErr_Occurred() != NULL) {
4365 0 : return -1;
4366 : }
4367 0 : if (test_var > uint_max) {
4368 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4369 : PyLong_Type.tp_name, uint_max, test_var);
4370 0 : return -1;
4371 : }
4372 0 : *object->pExtension4 = test_var;
4373 : } else {
4374 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4375 : PyLong_Type.tp_name);
4376 0 : return -1;
4377 : }
4378 : }
4379 : }
4380 0 : return 0;
4381 : }
4382 :
4383 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_pExtension5(PyObject *obj, void *closure)
4384 : {
4385 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4386 0 : PyObject *py_pExtension5;
4387 0 : if (object->pExtension5 == NULL) {
4388 0 : Py_RETURN_NONE;
4389 : }
4390 0 : if (object->pExtension5 == NULL) {
4391 0 : py_pExtension5 = Py_None;
4392 0 : Py_INCREF(py_pExtension5);
4393 : } else {
4394 0 : py_pExtension5 = PyLong_FromUnsignedLongLong((uint32_t)*object->pExtension5);
4395 : }
4396 0 : return py_pExtension5;
4397 : }
4398 :
4399 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_pExtension5(PyObject *py_obj, PyObject *value, void *closure)
4400 : {
4401 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4402 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->pExtension5));
4403 0 : if (value == NULL) {
4404 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtension5");
4405 0 : return -1;
4406 : }
4407 0 : if (value == Py_None) {
4408 0 : object->pExtension5 = NULL;
4409 : } else {
4410 0 : object->pExtension5 = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->pExtension5);
4411 0 : if (object->pExtension5 == NULL) {
4412 0 : PyErr_NoMemory();
4413 0 : return -1;
4414 : }
4415 : {
4416 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->pExtension5));
4417 0 : if (PyLong_Check(value)) {
4418 0 : unsigned long long test_var;
4419 0 : test_var = PyLong_AsUnsignedLongLong(value);
4420 0 : if (PyErr_Occurred() != NULL) {
4421 0 : return -1;
4422 : }
4423 0 : if (test_var > uint_max) {
4424 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4425 : PyLong_Type.tp_name, uint_max, test_var);
4426 0 : return -1;
4427 : }
4428 0 : *object->pExtension5 = test_var;
4429 : } else {
4430 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4431 : PyLong_Type.tp_name);
4432 0 : return -1;
4433 : }
4434 : }
4435 : }
4436 0 : return 0;
4437 : }
4438 :
4439 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwLogLevel(PyObject *obj, void *closure)
4440 : {
4441 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4442 0 : PyObject *py_dwLogLevel;
4443 1 : py_dwLogLevel = PyLong_FromUnsignedLongLong((uint32_t)object->dwLogLevel);
4444 1 : return py_dwLogLevel;
4445 : }
4446 :
4447 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
4448 : {
4449 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4450 0 : if (value == NULL) {
4451 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLogLevel");
4452 0 : return -1;
4453 : }
4454 : {
4455 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogLevel));
4456 0 : if (PyLong_Check(value)) {
4457 0 : unsigned long long test_var;
4458 0 : test_var = PyLong_AsUnsignedLongLong(value);
4459 0 : if (PyErr_Occurred() != NULL) {
4460 0 : return -1;
4461 : }
4462 0 : if (test_var > uint_max) {
4463 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4464 : PyLong_Type.tp_name, uint_max, test_var);
4465 0 : return -1;
4466 : }
4467 0 : object->dwLogLevel = test_var;
4468 : } else {
4469 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4470 : PyLong_Type.tp_name);
4471 0 : return -1;
4472 : }
4473 : }
4474 0 : return 0;
4475 : }
4476 :
4477 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDebugLevel(PyObject *obj, void *closure)
4478 : {
4479 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4480 0 : PyObject *py_dwDebugLevel;
4481 1 : py_dwDebugLevel = PyLong_FromUnsignedLongLong((uint32_t)object->dwDebugLevel);
4482 1 : return py_dwDebugLevel;
4483 : }
4484 :
4485 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
4486 : {
4487 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4488 0 : if (value == NULL) {
4489 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDebugLevel");
4490 0 : return -1;
4491 : }
4492 : {
4493 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDebugLevel));
4494 0 : if (PyLong_Check(value)) {
4495 0 : unsigned long long test_var;
4496 0 : test_var = PyLong_AsUnsignedLongLong(value);
4497 0 : if (PyErr_Occurred() != NULL) {
4498 0 : return -1;
4499 : }
4500 0 : if (test_var > uint_max) {
4501 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4502 : PyLong_Type.tp_name, uint_max, test_var);
4503 0 : return -1;
4504 : }
4505 0 : object->dwDebugLevel = test_var;
4506 : } else {
4507 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4508 : PyLong_Type.tp_name);
4509 0 : return -1;
4510 : }
4511 : }
4512 0 : return 0;
4513 : }
4514 :
4515 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwForwardTimeout(PyObject *obj, void *closure)
4516 : {
4517 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4518 0 : PyObject *py_dwForwardTimeout;
4519 1 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwForwardTimeout);
4520 1 : return py_dwForwardTimeout;
4521 : }
4522 :
4523 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
4524 : {
4525 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4526 0 : if (value == NULL) {
4527 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwForwardTimeout");
4528 0 : return -1;
4529 : }
4530 : {
4531 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
4532 0 : if (PyLong_Check(value)) {
4533 0 : unsigned long long test_var;
4534 0 : test_var = PyLong_AsUnsignedLongLong(value);
4535 0 : if (PyErr_Occurred() != NULL) {
4536 0 : return -1;
4537 : }
4538 0 : if (test_var > uint_max) {
4539 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4540 : PyLong_Type.tp_name, uint_max, test_var);
4541 0 : return -1;
4542 : }
4543 0 : object->dwForwardTimeout = test_var;
4544 : } else {
4545 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4546 : PyLong_Type.tp_name);
4547 0 : return -1;
4548 : }
4549 : }
4550 0 : return 0;
4551 : }
4552 :
4553 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRpcProtocol(PyObject *obj, void *closure)
4554 : {
4555 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4556 0 : PyObject *py_dwRpcProtocol;
4557 1 : py_dwRpcProtocol = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcProtocol);
4558 1 : return py_dwRpcProtocol;
4559 : }
4560 :
4561 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
4562 : {
4563 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4564 0 : if (value == NULL) {
4565 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcProtocol");
4566 0 : return -1;
4567 : }
4568 : {
4569 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcProtocol));
4570 0 : if (PyLong_Check(value)) {
4571 0 : unsigned long long test_var;
4572 0 : test_var = PyLong_AsUnsignedLongLong(value);
4573 0 : if (PyErr_Occurred() != NULL) {
4574 0 : return -1;
4575 : }
4576 0 : if (test_var > uint_max) {
4577 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4578 : PyLong_Type.tp_name, uint_max, test_var);
4579 0 : return -1;
4580 : }
4581 0 : object->dwRpcProtocol = test_var;
4582 : } else {
4583 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4584 : PyLong_Type.tp_name);
4585 0 : return -1;
4586 : }
4587 : }
4588 0 : return 0;
4589 : }
4590 :
4591 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwNameCheckFlag(PyObject *obj, void *closure)
4592 : {
4593 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4594 0 : PyObject *py_dwNameCheckFlag;
4595 1 : py_dwNameCheckFlag = PyLong_FromUnsignedLongLong((uint32_t)object->dwNameCheckFlag);
4596 1 : return py_dwNameCheckFlag;
4597 : }
4598 :
4599 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
4600 : {
4601 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4602 0 : if (value == NULL) {
4603 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwNameCheckFlag");
4604 0 : return -1;
4605 : }
4606 : {
4607 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNameCheckFlag));
4608 0 : if (PyLong_Check(value)) {
4609 0 : unsigned long long test_var;
4610 0 : test_var = PyLong_AsUnsignedLongLong(value);
4611 0 : if (PyErr_Occurred() != NULL) {
4612 0 : return -1;
4613 : }
4614 0 : if (test_var > uint_max) {
4615 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4616 : PyLong_Type.tp_name, uint_max, test_var);
4617 0 : return -1;
4618 : }
4619 0 : object->dwNameCheckFlag = test_var;
4620 : } else {
4621 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4622 : PyLong_Type.tp_name);
4623 0 : return -1;
4624 : }
4625 : }
4626 0 : return 0;
4627 : }
4628 :
4629 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_cAddressAnswerLimit(PyObject *obj, void *closure)
4630 : {
4631 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4632 0 : PyObject *py_cAddressAnswerLimit;
4633 1 : py_cAddressAnswerLimit = PyLong_FromUnsignedLongLong((uint32_t)object->cAddressAnswerLimit);
4634 1 : return py_cAddressAnswerLimit;
4635 : }
4636 :
4637 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
4638 : {
4639 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4640 0 : if (value == NULL) {
4641 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cAddressAnswerLimit");
4642 0 : return -1;
4643 : }
4644 : {
4645 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cAddressAnswerLimit));
4646 0 : if (PyLong_Check(value)) {
4647 0 : unsigned long long test_var;
4648 0 : test_var = PyLong_AsUnsignedLongLong(value);
4649 0 : if (PyErr_Occurred() != NULL) {
4650 0 : return -1;
4651 : }
4652 0 : if (test_var > uint_max) {
4653 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4654 : PyLong_Type.tp_name, uint_max, test_var);
4655 0 : return -1;
4656 : }
4657 0 : object->cAddressAnswerLimit = test_var;
4658 : } else {
4659 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4660 : PyLong_Type.tp_name);
4661 0 : return -1;
4662 : }
4663 : }
4664 0 : return 0;
4665 : }
4666 :
4667 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionRetry(PyObject *obj, void *closure)
4668 : {
4669 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4670 0 : PyObject *py_dwRecursionRetry;
4671 1 : py_dwRecursionRetry = PyLong_FromUnsignedLongLong((uint32_t)object->dwRecursionRetry);
4672 1 : return py_dwRecursionRetry;
4673 : }
4674 :
4675 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
4676 : {
4677 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4678 0 : if (value == NULL) {
4679 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRecursionRetry");
4680 0 : return -1;
4681 : }
4682 : {
4683 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionRetry));
4684 0 : if (PyLong_Check(value)) {
4685 0 : unsigned long long test_var;
4686 0 : test_var = PyLong_AsUnsignedLongLong(value);
4687 0 : if (PyErr_Occurred() != NULL) {
4688 0 : return -1;
4689 : }
4690 0 : if (test_var > uint_max) {
4691 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4692 : PyLong_Type.tp_name, uint_max, test_var);
4693 0 : return -1;
4694 : }
4695 0 : object->dwRecursionRetry = test_var;
4696 : } else {
4697 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4698 : PyLong_Type.tp_name);
4699 0 : return -1;
4700 : }
4701 : }
4702 0 : return 0;
4703 : }
4704 :
4705 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionTimeout(PyObject *obj, void *closure)
4706 : {
4707 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4708 0 : PyObject *py_dwRecursionTimeout;
4709 1 : py_dwRecursionTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwRecursionTimeout);
4710 1 : return py_dwRecursionTimeout;
4711 : }
4712 :
4713 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
4714 : {
4715 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4716 0 : if (value == NULL) {
4717 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRecursionTimeout");
4718 0 : return -1;
4719 : }
4720 : {
4721 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionTimeout));
4722 0 : if (PyLong_Check(value)) {
4723 0 : unsigned long long test_var;
4724 0 : test_var = PyLong_AsUnsignedLongLong(value);
4725 0 : if (PyErr_Occurred() != NULL) {
4726 0 : return -1;
4727 : }
4728 0 : if (test_var > uint_max) {
4729 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4730 : PyLong_Type.tp_name, uint_max, test_var);
4731 0 : return -1;
4732 : }
4733 0 : object->dwRecursionTimeout = test_var;
4734 : } else {
4735 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4736 : PyLong_Type.tp_name);
4737 0 : return -1;
4738 : }
4739 : }
4740 0 : return 0;
4741 : }
4742 :
4743 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwMaxCacheTtl(PyObject *obj, void *closure)
4744 : {
4745 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4746 0 : PyObject *py_dwMaxCacheTtl;
4747 1 : py_dwMaxCacheTtl = PyLong_FromUnsignedLongLong((uint32_t)object->dwMaxCacheTtl);
4748 1 : return py_dwMaxCacheTtl;
4749 : }
4750 :
4751 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
4752 : {
4753 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4754 0 : if (value == NULL) {
4755 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwMaxCacheTtl");
4756 0 : return -1;
4757 : }
4758 : {
4759 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwMaxCacheTtl));
4760 0 : if (PyLong_Check(value)) {
4761 0 : unsigned long long test_var;
4762 0 : test_var = PyLong_AsUnsignedLongLong(value);
4763 0 : if (PyErr_Occurred() != NULL) {
4764 0 : return -1;
4765 : }
4766 0 : if (test_var > uint_max) {
4767 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4768 : PyLong_Type.tp_name, uint_max, test_var);
4769 0 : return -1;
4770 : }
4771 0 : object->dwMaxCacheTtl = test_var;
4772 : } else {
4773 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4774 : PyLong_Type.tp_name);
4775 0 : return -1;
4776 : }
4777 : }
4778 0 : return 0;
4779 : }
4780 :
4781 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDsPollingInterval(PyObject *obj, void *closure)
4782 : {
4783 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4784 0 : PyObject *py_dwDsPollingInterval;
4785 1 : py_dwDsPollingInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsPollingInterval);
4786 1 : return py_dwDsPollingInterval;
4787 : }
4788 :
4789 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
4790 : {
4791 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4792 0 : if (value == NULL) {
4793 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsPollingInterval");
4794 0 : return -1;
4795 : }
4796 : {
4797 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsPollingInterval));
4798 0 : if (PyLong_Check(value)) {
4799 0 : unsigned long long test_var;
4800 0 : test_var = PyLong_AsUnsignedLongLong(value);
4801 0 : if (PyErr_Occurred() != NULL) {
4802 0 : return -1;
4803 : }
4804 0 : if (test_var > uint_max) {
4805 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4806 : PyLong_Type.tp_name, uint_max, test_var);
4807 0 : return -1;
4808 : }
4809 0 : object->dwDsPollingInterval = test_var;
4810 : } else {
4811 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4812 : PyLong_Type.tp_name);
4813 0 : return -1;
4814 : }
4815 : }
4816 0 : return 0;
4817 : }
4818 :
4819 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwScavengingInterval(PyObject *obj, void *closure)
4820 : {
4821 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4822 0 : PyObject *py_dwScavengingInterval;
4823 1 : py_dwScavengingInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwScavengingInterval);
4824 1 : return py_dwScavengingInterval;
4825 : }
4826 :
4827 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
4828 : {
4829 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4830 0 : if (value == NULL) {
4831 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwScavengingInterval");
4832 0 : return -1;
4833 : }
4834 : {
4835 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwScavengingInterval));
4836 0 : if (PyLong_Check(value)) {
4837 0 : unsigned long long test_var;
4838 0 : test_var = PyLong_AsUnsignedLongLong(value);
4839 0 : if (PyErr_Occurred() != NULL) {
4840 0 : return -1;
4841 : }
4842 0 : if (test_var > uint_max) {
4843 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4844 : PyLong_Type.tp_name, uint_max, test_var);
4845 0 : return -1;
4846 : }
4847 0 : object->dwScavengingInterval = test_var;
4848 : } else {
4849 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4850 : PyLong_Type.tp_name);
4851 0 : return -1;
4852 : }
4853 : }
4854 0 : return 0;
4855 : }
4856 :
4857 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
4858 : {
4859 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4860 0 : PyObject *py_dwDefaultRefreshInterval;
4861 1 : py_dwDefaultRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDefaultRefreshInterval);
4862 1 : return py_dwDefaultRefreshInterval;
4863 : }
4864 :
4865 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
4866 : {
4867 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4868 0 : if (value == NULL) {
4869 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDefaultRefreshInterval");
4870 0 : return -1;
4871 : }
4872 : {
4873 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultRefreshInterval));
4874 0 : if (PyLong_Check(value)) {
4875 0 : unsigned long long test_var;
4876 0 : test_var = PyLong_AsUnsignedLongLong(value);
4877 0 : if (PyErr_Occurred() != NULL) {
4878 0 : return -1;
4879 : }
4880 0 : if (test_var > uint_max) {
4881 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4882 : PyLong_Type.tp_name, uint_max, test_var);
4883 0 : return -1;
4884 : }
4885 0 : object->dwDefaultRefreshInterval = test_var;
4886 : } else {
4887 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4888 : PyLong_Type.tp_name);
4889 0 : return -1;
4890 : }
4891 : }
4892 0 : return 0;
4893 : }
4894 :
4895 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
4896 : {
4897 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4898 0 : PyObject *py_dwDefaultNoRefreshInterval;
4899 1 : py_dwDefaultNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDefaultNoRefreshInterval);
4900 1 : return py_dwDefaultNoRefreshInterval;
4901 : }
4902 :
4903 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
4904 : {
4905 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4906 0 : if (value == NULL) {
4907 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDefaultNoRefreshInterval");
4908 0 : return -1;
4909 : }
4910 : {
4911 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultNoRefreshInterval));
4912 0 : if (PyLong_Check(value)) {
4913 0 : unsigned long long test_var;
4914 0 : test_var = PyLong_AsUnsignedLongLong(value);
4915 0 : if (PyErr_Occurred() != NULL) {
4916 0 : return -1;
4917 : }
4918 0 : if (test_var > uint_max) {
4919 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4920 : PyLong_Type.tp_name, uint_max, test_var);
4921 0 : return -1;
4922 : }
4923 0 : object->dwDefaultNoRefreshInterval = test_var;
4924 : } else {
4925 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4926 : PyLong_Type.tp_name);
4927 0 : return -1;
4928 : }
4929 : }
4930 0 : return 0;
4931 : }
4932 :
4933 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_dwReserveArray(PyObject *obj, void *closure)
4934 : {
4935 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4936 0 : PyObject *py_dwReserveArray;
4937 0 : py_dwReserveArray = PyList_New(10);
4938 0 : if (py_dwReserveArray == NULL) {
4939 0 : return NULL;
4940 : }
4941 : {
4942 : int dwReserveArray_cntr_0;
4943 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < (10); dwReserveArray_cntr_0++) {
4944 0 : PyObject *py_dwReserveArray_0;
4945 0 : py_dwReserveArray_0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserveArray[dwReserveArray_cntr_0]);
4946 0 : PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
4947 : }
4948 : }
4949 0 : return py_dwReserveArray;
4950 : }
4951 :
4952 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
4953 : {
4954 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
4955 0 : if (value == NULL) {
4956 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserveArray");
4957 0 : return -1;
4958 : }
4959 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
4960 : {
4961 0 : int dwReserveArray_cntr_0;
4962 0 : if (ARRAY_SIZE(object->dwReserveArray) != PyList_GET_SIZE(value)) {
4963 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->dwReserveArray), PyList_GET_SIZE(value));
4964 0 : return -1;
4965 : }
4966 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
4967 0 : if (PyList_GET_ITEM(value, dwReserveArray_cntr_0) == NULL) {
4968 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserveArray[dwReserveArray_cntr_0]");
4969 0 : return -1;
4970 : }
4971 : {
4972 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserveArray[dwReserveArray_cntr_0]));
4973 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserveArray_cntr_0))) {
4974 0 : unsigned long long test_var;
4975 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
4976 0 : if (PyErr_Occurred() != NULL) {
4977 0 : return -1;
4978 : }
4979 0 : if (test_var > uint_max) {
4980 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
4981 : PyLong_Type.tp_name, uint_max, test_var);
4982 0 : return -1;
4983 : }
4984 0 : object->dwReserveArray[dwReserveArray_cntr_0] = test_var;
4985 : } else {
4986 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
4987 : PyLong_Type.tp_name);
4988 0 : return -1;
4989 : }
4990 : }
4991 : }
4992 : }
4993 0 : return 0;
4994 : }
4995 :
4996 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAutoReverseZones(PyObject *obj, void *closure)
4997 : {
4998 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
4999 0 : PyObject *py_fAutoReverseZones;
5000 1 : py_fAutoReverseZones = PyLong_FromLong((uint16_t)object->fAutoReverseZones);
5001 1 : return py_fAutoReverseZones;
5002 : }
5003 :
5004 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
5005 : {
5006 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5007 0 : if (value == NULL) {
5008 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoReverseZones");
5009 0 : return -1;
5010 : }
5011 : {
5012 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoReverseZones));
5013 0 : if (PyLong_Check(value)) {
5014 0 : unsigned long long test_var;
5015 0 : test_var = PyLong_AsUnsignedLongLong(value);
5016 0 : if (PyErr_Occurred() != NULL) {
5017 0 : return -1;
5018 : }
5019 0 : if (test_var > uint_max) {
5020 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5021 : PyLong_Type.tp_name, uint_max, test_var);
5022 0 : return -1;
5023 : }
5024 0 : object->fAutoReverseZones = test_var;
5025 : } else {
5026 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5027 : PyLong_Type.tp_name);
5028 0 : return -1;
5029 : }
5030 : }
5031 0 : return 0;
5032 : }
5033 :
5034 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fAutoCacheUpdate(PyObject *obj, void *closure)
5035 : {
5036 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5037 0 : PyObject *py_fAutoCacheUpdate;
5038 1 : py_fAutoCacheUpdate = PyLong_FromLong((uint16_t)object->fAutoCacheUpdate);
5039 1 : return py_fAutoCacheUpdate;
5040 : }
5041 :
5042 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
5043 : {
5044 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5045 0 : if (value == NULL) {
5046 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoCacheUpdate");
5047 0 : return -1;
5048 : }
5049 : {
5050 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCacheUpdate));
5051 0 : if (PyLong_Check(value)) {
5052 0 : unsigned long long test_var;
5053 0 : test_var = PyLong_AsUnsignedLongLong(value);
5054 0 : if (PyErr_Occurred() != NULL) {
5055 0 : return -1;
5056 : }
5057 0 : if (test_var > uint_max) {
5058 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5059 : PyLong_Type.tp_name, uint_max, test_var);
5060 0 : return -1;
5061 : }
5062 0 : object->fAutoCacheUpdate = test_var;
5063 : } else {
5064 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5065 : PyLong_Type.tp_name);
5066 0 : return -1;
5067 : }
5068 : }
5069 0 : return 0;
5070 : }
5071 :
5072 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
5073 : {
5074 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5075 0 : PyObject *py_fRecurseAfterForwarding;
5076 1 : py_fRecurseAfterForwarding = PyLong_FromLong((uint16_t)object->fRecurseAfterForwarding);
5077 1 : return py_fRecurseAfterForwarding;
5078 : }
5079 :
5080 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
5081 : {
5082 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5083 0 : if (value == NULL) {
5084 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRecurseAfterForwarding");
5085 0 : return -1;
5086 : }
5087 : {
5088 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
5089 0 : if (PyLong_Check(value)) {
5090 0 : unsigned long long test_var;
5091 0 : test_var = PyLong_AsUnsignedLongLong(value);
5092 0 : if (PyErr_Occurred() != NULL) {
5093 0 : return -1;
5094 : }
5095 0 : if (test_var > uint_max) {
5096 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5097 : PyLong_Type.tp_name, uint_max, test_var);
5098 0 : return -1;
5099 : }
5100 0 : object->fRecurseAfterForwarding = test_var;
5101 : } else {
5102 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5103 : PyLong_Type.tp_name);
5104 0 : return -1;
5105 : }
5106 : }
5107 0 : return 0;
5108 : }
5109 :
5110 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fForwardDelegations(PyObject *obj, void *closure)
5111 : {
5112 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5113 0 : PyObject *py_fForwardDelegations;
5114 1 : py_fForwardDelegations = PyLong_FromLong((uint16_t)object->fForwardDelegations);
5115 1 : return py_fForwardDelegations;
5116 : }
5117 :
5118 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
5119 : {
5120 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5121 0 : if (value == NULL) {
5122 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fForwardDelegations");
5123 0 : return -1;
5124 : }
5125 : {
5126 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwardDelegations));
5127 0 : if (PyLong_Check(value)) {
5128 0 : unsigned long long test_var;
5129 0 : test_var = PyLong_AsUnsignedLongLong(value);
5130 0 : if (PyErr_Occurred() != NULL) {
5131 0 : return -1;
5132 : }
5133 0 : if (test_var > uint_max) {
5134 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5135 : PyLong_Type.tp_name, uint_max, test_var);
5136 0 : return -1;
5137 : }
5138 0 : object->fForwardDelegations = test_var;
5139 : } else {
5140 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5141 : PyLong_Type.tp_name);
5142 0 : return -1;
5143 : }
5144 : }
5145 0 : return 0;
5146 : }
5147 :
5148 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fNoRecursion(PyObject *obj, void *closure)
5149 : {
5150 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5151 0 : PyObject *py_fNoRecursion;
5152 1 : py_fNoRecursion = PyLong_FromLong((uint16_t)object->fNoRecursion);
5153 1 : return py_fNoRecursion;
5154 : }
5155 :
5156 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
5157 : {
5158 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5159 0 : if (value == NULL) {
5160 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNoRecursion");
5161 0 : return -1;
5162 : }
5163 : {
5164 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNoRecursion));
5165 0 : if (PyLong_Check(value)) {
5166 0 : unsigned long long test_var;
5167 0 : test_var = PyLong_AsUnsignedLongLong(value);
5168 0 : if (PyErr_Occurred() != NULL) {
5169 0 : return -1;
5170 : }
5171 0 : if (test_var > uint_max) {
5172 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5173 : PyLong_Type.tp_name, uint_max, test_var);
5174 0 : return -1;
5175 : }
5176 0 : object->fNoRecursion = test_var;
5177 : } else {
5178 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5179 : PyLong_Type.tp_name);
5180 0 : return -1;
5181 : }
5182 : }
5183 0 : return 0;
5184 : }
5185 :
5186 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fSecureResponses(PyObject *obj, void *closure)
5187 : {
5188 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5189 0 : PyObject *py_fSecureResponses;
5190 1 : py_fSecureResponses = PyLong_FromLong((uint16_t)object->fSecureResponses);
5191 1 : return py_fSecureResponses;
5192 : }
5193 :
5194 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
5195 : {
5196 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5197 0 : if (value == NULL) {
5198 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureResponses");
5199 0 : return -1;
5200 : }
5201 : {
5202 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureResponses));
5203 0 : if (PyLong_Check(value)) {
5204 0 : unsigned long long test_var;
5205 0 : test_var = PyLong_AsUnsignedLongLong(value);
5206 0 : if (PyErr_Occurred() != NULL) {
5207 0 : return -1;
5208 : }
5209 0 : if (test_var > uint_max) {
5210 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5211 : PyLong_Type.tp_name, uint_max, test_var);
5212 0 : return -1;
5213 : }
5214 0 : object->fSecureResponses = test_var;
5215 : } else {
5216 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5217 : PyLong_Type.tp_name);
5218 0 : return -1;
5219 : }
5220 : }
5221 0 : return 0;
5222 : }
5223 :
5224 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fRoundRobin(PyObject *obj, void *closure)
5225 : {
5226 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5227 0 : PyObject *py_fRoundRobin;
5228 1 : py_fRoundRobin = PyLong_FromLong((uint16_t)object->fRoundRobin);
5229 1 : return py_fRoundRobin;
5230 : }
5231 :
5232 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
5233 : {
5234 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5235 0 : if (value == NULL) {
5236 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRoundRobin");
5237 0 : return -1;
5238 : }
5239 : {
5240 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRoundRobin));
5241 0 : if (PyLong_Check(value)) {
5242 0 : unsigned long long test_var;
5243 0 : test_var = PyLong_AsUnsignedLongLong(value);
5244 0 : if (PyErr_Occurred() != NULL) {
5245 0 : return -1;
5246 : }
5247 0 : if (test_var > uint_max) {
5248 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5249 : PyLong_Type.tp_name, uint_max, test_var);
5250 0 : return -1;
5251 : }
5252 0 : object->fRoundRobin = test_var;
5253 : } else {
5254 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5255 : PyLong_Type.tp_name);
5256 0 : return -1;
5257 : }
5258 : }
5259 0 : return 0;
5260 : }
5261 :
5262 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fLocalNetPriority(PyObject *obj, void *closure)
5263 : {
5264 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5265 0 : PyObject *py_fLocalNetPriority;
5266 1 : py_fLocalNetPriority = PyLong_FromLong((uint16_t)object->fLocalNetPriority);
5267 1 : return py_fLocalNetPriority;
5268 : }
5269 :
5270 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
5271 : {
5272 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5273 0 : if (value == NULL) {
5274 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLocalNetPriority");
5275 0 : return -1;
5276 : }
5277 : {
5278 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLocalNetPriority));
5279 0 : if (PyLong_Check(value)) {
5280 0 : unsigned long long test_var;
5281 0 : test_var = PyLong_AsUnsignedLongLong(value);
5282 0 : if (PyErr_Occurred() != NULL) {
5283 0 : return -1;
5284 : }
5285 0 : if (test_var > uint_max) {
5286 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5287 : PyLong_Type.tp_name, uint_max, test_var);
5288 0 : return -1;
5289 : }
5290 0 : object->fLocalNetPriority = test_var;
5291 : } else {
5292 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5293 : PyLong_Type.tp_name);
5294 0 : return -1;
5295 : }
5296 : }
5297 0 : return 0;
5298 : }
5299 :
5300 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fBindSecondaries(PyObject *obj, void *closure)
5301 : {
5302 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5303 0 : PyObject *py_fBindSecondaries;
5304 1 : py_fBindSecondaries = PyLong_FromLong((uint16_t)object->fBindSecondaries);
5305 1 : return py_fBindSecondaries;
5306 : }
5307 :
5308 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
5309 : {
5310 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5311 0 : if (value == NULL) {
5312 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fBindSecondaries");
5313 0 : return -1;
5314 : }
5315 : {
5316 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBindSecondaries));
5317 0 : if (PyLong_Check(value)) {
5318 0 : unsigned long long test_var;
5319 0 : test_var = PyLong_AsUnsignedLongLong(value);
5320 0 : if (PyErr_Occurred() != NULL) {
5321 0 : return -1;
5322 : }
5323 0 : if (test_var > uint_max) {
5324 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5325 : PyLong_Type.tp_name, uint_max, test_var);
5326 0 : return -1;
5327 : }
5328 0 : object->fBindSecondaries = test_var;
5329 : } else {
5330 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5331 : PyLong_Type.tp_name);
5332 0 : return -1;
5333 : }
5334 : }
5335 0 : return 0;
5336 : }
5337 :
5338 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fWriteAuthorityNs(PyObject *obj, void *closure)
5339 : {
5340 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5341 0 : PyObject *py_fWriteAuthorityNs;
5342 1 : py_fWriteAuthorityNs = PyLong_FromLong((uint16_t)object->fWriteAuthorityNs);
5343 1 : return py_fWriteAuthorityNs;
5344 : }
5345 :
5346 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
5347 : {
5348 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5349 0 : if (value == NULL) {
5350 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fWriteAuthorityNs");
5351 0 : return -1;
5352 : }
5353 : {
5354 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fWriteAuthorityNs));
5355 0 : if (PyLong_Check(value)) {
5356 0 : unsigned long long test_var;
5357 0 : test_var = PyLong_AsUnsignedLongLong(value);
5358 0 : if (PyErr_Occurred() != NULL) {
5359 0 : return -1;
5360 : }
5361 0 : if (test_var > uint_max) {
5362 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5363 : PyLong_Type.tp_name, uint_max, test_var);
5364 0 : return -1;
5365 : }
5366 0 : object->fWriteAuthorityNs = test_var;
5367 : } else {
5368 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5369 : PyLong_Type.tp_name);
5370 0 : return -1;
5371 : }
5372 : }
5373 0 : return 0;
5374 : }
5375 :
5376 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fStrictFileParsing(PyObject *obj, void *closure)
5377 : {
5378 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5379 0 : PyObject *py_fStrictFileParsing;
5380 1 : py_fStrictFileParsing = PyLong_FromLong((uint16_t)object->fStrictFileParsing);
5381 1 : return py_fStrictFileParsing;
5382 : }
5383 :
5384 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
5385 : {
5386 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5387 0 : if (value == NULL) {
5388 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fStrictFileParsing");
5389 0 : return -1;
5390 : }
5391 : {
5392 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fStrictFileParsing));
5393 0 : if (PyLong_Check(value)) {
5394 0 : unsigned long long test_var;
5395 0 : test_var = PyLong_AsUnsignedLongLong(value);
5396 0 : if (PyErr_Occurred() != NULL) {
5397 0 : return -1;
5398 : }
5399 0 : if (test_var > uint_max) {
5400 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5401 : PyLong_Type.tp_name, uint_max, test_var);
5402 0 : return -1;
5403 : }
5404 0 : object->fStrictFileParsing = test_var;
5405 : } else {
5406 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5407 : PyLong_Type.tp_name);
5408 0 : return -1;
5409 : }
5410 : }
5411 0 : return 0;
5412 : }
5413 :
5414 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fLooseWildcarding(PyObject *obj, void *closure)
5415 : {
5416 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5417 0 : PyObject *py_fLooseWildcarding;
5418 1 : py_fLooseWildcarding = PyLong_FromLong((uint16_t)object->fLooseWildcarding);
5419 1 : return py_fLooseWildcarding;
5420 : }
5421 :
5422 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
5423 : {
5424 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5425 0 : if (value == NULL) {
5426 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLooseWildcarding");
5427 0 : return -1;
5428 : }
5429 : {
5430 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLooseWildcarding));
5431 0 : if (PyLong_Check(value)) {
5432 0 : unsigned long long test_var;
5433 0 : test_var = PyLong_AsUnsignedLongLong(value);
5434 0 : if (PyErr_Occurred() != NULL) {
5435 0 : return -1;
5436 : }
5437 0 : if (test_var > uint_max) {
5438 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5439 : PyLong_Type.tp_name, uint_max, test_var);
5440 0 : return -1;
5441 : }
5442 0 : object->fLooseWildcarding = test_var;
5443 : } else {
5444 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5445 : PyLong_Type.tp_name);
5446 0 : return -1;
5447 : }
5448 : }
5449 0 : return 0;
5450 : }
5451 :
5452 1 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fDefaultAgingState(PyObject *obj, void *closure)
5453 : {
5454 1 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5455 0 : PyObject *py_fDefaultAgingState;
5456 1 : py_fDefaultAgingState = PyLong_FromLong((uint16_t)object->fDefaultAgingState);
5457 1 : return py_fDefaultAgingState;
5458 : }
5459 :
5460 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
5461 : {
5462 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5463 0 : if (value == NULL) {
5464 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDefaultAgingState");
5465 0 : return -1;
5466 : }
5467 : {
5468 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDefaultAgingState));
5469 0 : if (PyLong_Check(value)) {
5470 0 : unsigned long long test_var;
5471 0 : test_var = PyLong_AsUnsignedLongLong(value);
5472 0 : if (PyErr_Occurred() != NULL) {
5473 0 : return -1;
5474 : }
5475 0 : if (test_var > uint_max) {
5476 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5477 : PyLong_Type.tp_name, uint_max, test_var);
5478 0 : return -1;
5479 : }
5480 0 : object->fDefaultAgingState = test_var;
5481 : } else {
5482 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5483 : PyLong_Type.tp_name);
5484 0 : return -1;
5485 : }
5486 : }
5487 0 : return 0;
5488 : }
5489 :
5490 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_get_fReserveArray(PyObject *obj, void *closure)
5491 : {
5492 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(obj);
5493 0 : PyObject *py_fReserveArray;
5494 0 : py_fReserveArray = PyList_New(15);
5495 0 : if (py_fReserveArray == NULL) {
5496 0 : return NULL;
5497 : }
5498 : {
5499 : int fReserveArray_cntr_0;
5500 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < (15); fReserveArray_cntr_0++) {
5501 0 : PyObject *py_fReserveArray_0;
5502 0 : py_fReserveArray_0 = PyLong_FromLong((uint16_t)object->fReserveArray[fReserveArray_cntr_0]);
5503 0 : PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
5504 : }
5505 : }
5506 0 : return py_fReserveArray;
5507 : }
5508 :
5509 0 : static int py_DNS_RPC_SERVER_INFO_W2K_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
5510 : {
5511 0 : struct DNS_RPC_SERVER_INFO_W2K *object = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(py_obj);
5512 0 : if (value == NULL) {
5513 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReserveArray");
5514 0 : return -1;
5515 : }
5516 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
5517 : {
5518 0 : int fReserveArray_cntr_0;
5519 0 : if (ARRAY_SIZE(object->fReserveArray) != PyList_GET_SIZE(value)) {
5520 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->fReserveArray), PyList_GET_SIZE(value));
5521 0 : return -1;
5522 : }
5523 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
5524 0 : if (PyList_GET_ITEM(value, fReserveArray_cntr_0) == NULL) {
5525 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReserveArray[fReserveArray_cntr_0]");
5526 0 : return -1;
5527 : }
5528 : {
5529 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReserveArray[fReserveArray_cntr_0]));
5530 0 : if (PyLong_Check(PyList_GET_ITEM(value, fReserveArray_cntr_0))) {
5531 0 : unsigned long long test_var;
5532 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
5533 0 : if (PyErr_Occurred() != NULL) {
5534 0 : return -1;
5535 : }
5536 0 : if (test_var > uint_max) {
5537 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5538 : PyLong_Type.tp_name, uint_max, test_var);
5539 0 : return -1;
5540 : }
5541 0 : object->fReserveArray[fReserveArray_cntr_0] = test_var;
5542 : } else {
5543 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5544 : PyLong_Type.tp_name);
5545 0 : return -1;
5546 : }
5547 : }
5548 : }
5549 : }
5550 0 : return 0;
5551 : }
5552 :
5553 : static PyGetSetDef py_DNS_RPC_SERVER_INFO_W2K_getsetters[] = {
5554 : {
5555 : .name = discard_const_p(char, "dwVersion"),
5556 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwVersion,
5557 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwVersion,
5558 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5559 : },
5560 : {
5561 : .name = discard_const_p(char, "fBootMethod"),
5562 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fBootMethod,
5563 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fBootMethod,
5564 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_BOOT_METHOD")
5565 : },
5566 : {
5567 : .name = discard_const_p(char, "fAdminConfigured"),
5568 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fAdminConfigured,
5569 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fAdminConfigured,
5570 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5571 : },
5572 : {
5573 : .name = discard_const_p(char, "fAllowUpdate"),
5574 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fAllowUpdate,
5575 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fAllowUpdate,
5576 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5577 : },
5578 : {
5579 : .name = discard_const_p(char, "fDsAvailable"),
5580 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fDsAvailable,
5581 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fDsAvailable,
5582 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5583 : },
5584 : {
5585 : .name = discard_const_p(char, "pszServerName"),
5586 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pszServerName,
5587 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pszServerName,
5588 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5589 : },
5590 : {
5591 : .name = discard_const_p(char, "pszDsContainer"),
5592 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pszDsContainer,
5593 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pszDsContainer,
5594 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
5595 : },
5596 : {
5597 : .name = discard_const_p(char, "aipServerAddrs"),
5598 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_aipServerAddrs,
5599 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_aipServerAddrs,
5600 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
5601 : },
5602 : {
5603 : .name = discard_const_p(char, "aipListenAddrs"),
5604 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_aipListenAddrs,
5605 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_aipListenAddrs,
5606 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
5607 : },
5608 : {
5609 : .name = discard_const_p(char, "aipForwarders"),
5610 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_aipForwarders,
5611 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_aipForwarders,
5612 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
5613 : },
5614 : {
5615 : .name = discard_const_p(char, "pExtension1"),
5616 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension1,
5617 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension1,
5618 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5619 : },
5620 : {
5621 : .name = discard_const_p(char, "pExtension2"),
5622 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension2,
5623 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension2,
5624 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5625 : },
5626 : {
5627 : .name = discard_const_p(char, "pExtension3"),
5628 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension3,
5629 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension3,
5630 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5631 : },
5632 : {
5633 : .name = discard_const_p(char, "pExtension4"),
5634 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension4,
5635 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension4,
5636 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5637 : },
5638 : {
5639 : .name = discard_const_p(char, "pExtension5"),
5640 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_pExtension5,
5641 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_pExtension5,
5642 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5643 : },
5644 : {
5645 : .name = discard_const_p(char, "dwLogLevel"),
5646 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwLogLevel,
5647 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwLogLevel,
5648 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5649 : },
5650 : {
5651 : .name = discard_const_p(char, "dwDebugLevel"),
5652 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwDebugLevel,
5653 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwDebugLevel,
5654 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5655 : },
5656 : {
5657 : .name = discard_const_p(char, "dwForwardTimeout"),
5658 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwForwardTimeout,
5659 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwForwardTimeout,
5660 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5661 : },
5662 : {
5663 : .name = discard_const_p(char, "dwRpcProtocol"),
5664 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwRpcProtocol,
5665 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwRpcProtocol,
5666 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5667 : },
5668 : {
5669 : .name = discard_const_p(char, "dwNameCheckFlag"),
5670 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwNameCheckFlag,
5671 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwNameCheckFlag,
5672 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_NAME_CHECK_FLAG")
5673 : },
5674 : {
5675 : .name = discard_const_p(char, "cAddressAnswerLimit"),
5676 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_cAddressAnswerLimit,
5677 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_cAddressAnswerLimit,
5678 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5679 : },
5680 : {
5681 : .name = discard_const_p(char, "dwRecursionRetry"),
5682 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionRetry,
5683 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionRetry,
5684 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5685 : },
5686 : {
5687 : .name = discard_const_p(char, "dwRecursionTimeout"),
5688 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwRecursionTimeout,
5689 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwRecursionTimeout,
5690 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5691 : },
5692 : {
5693 : .name = discard_const_p(char, "dwMaxCacheTtl"),
5694 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwMaxCacheTtl,
5695 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwMaxCacheTtl,
5696 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5697 : },
5698 : {
5699 : .name = discard_const_p(char, "dwDsPollingInterval"),
5700 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwDsPollingInterval,
5701 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwDsPollingInterval,
5702 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5703 : },
5704 : {
5705 : .name = discard_const_p(char, "dwScavengingInterval"),
5706 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwScavengingInterval,
5707 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwScavengingInterval,
5708 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5709 : },
5710 : {
5711 : .name = discard_const_p(char, "dwDefaultRefreshInterval"),
5712 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultRefreshInterval,
5713 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultRefreshInterval,
5714 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5715 : },
5716 : {
5717 : .name = discard_const_p(char, "dwDefaultNoRefreshInterval"),
5718 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwDefaultNoRefreshInterval,
5719 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwDefaultNoRefreshInterval,
5720 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5721 : },
5722 : {
5723 : .name = discard_const_p(char, "dwReserveArray"),
5724 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_dwReserveArray,
5725 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_dwReserveArray,
5726 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
5727 : },
5728 : {
5729 : .name = discard_const_p(char, "fAutoReverseZones"),
5730 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fAutoReverseZones,
5731 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fAutoReverseZones,
5732 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5733 : },
5734 : {
5735 : .name = discard_const_p(char, "fAutoCacheUpdate"),
5736 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fAutoCacheUpdate,
5737 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fAutoCacheUpdate,
5738 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5739 : },
5740 : {
5741 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
5742 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fRecurseAfterForwarding,
5743 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fRecurseAfterForwarding,
5744 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5745 : },
5746 : {
5747 : .name = discard_const_p(char, "fForwardDelegations"),
5748 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fForwardDelegations,
5749 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fForwardDelegations,
5750 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5751 : },
5752 : {
5753 : .name = discard_const_p(char, "fNoRecursion"),
5754 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fNoRecursion,
5755 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fNoRecursion,
5756 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5757 : },
5758 : {
5759 : .name = discard_const_p(char, "fSecureResponses"),
5760 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fSecureResponses,
5761 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fSecureResponses,
5762 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5763 : },
5764 : {
5765 : .name = discard_const_p(char, "fRoundRobin"),
5766 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fRoundRobin,
5767 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fRoundRobin,
5768 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5769 : },
5770 : {
5771 : .name = discard_const_p(char, "fLocalNetPriority"),
5772 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fLocalNetPriority,
5773 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fLocalNetPriority,
5774 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5775 : },
5776 : {
5777 : .name = discard_const_p(char, "fBindSecondaries"),
5778 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fBindSecondaries,
5779 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fBindSecondaries,
5780 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5781 : },
5782 : {
5783 : .name = discard_const_p(char, "fWriteAuthorityNs"),
5784 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fWriteAuthorityNs,
5785 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fWriteAuthorityNs,
5786 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5787 : },
5788 : {
5789 : .name = discard_const_p(char, "fStrictFileParsing"),
5790 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fStrictFileParsing,
5791 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fStrictFileParsing,
5792 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5793 : },
5794 : {
5795 : .name = discard_const_p(char, "fLooseWildcarding"),
5796 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fLooseWildcarding,
5797 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fLooseWildcarding,
5798 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5799 : },
5800 : {
5801 : .name = discard_const_p(char, "fDefaultAgingState"),
5802 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fDefaultAgingState,
5803 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fDefaultAgingState,
5804 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5805 : },
5806 : {
5807 : .name = discard_const_p(char, "fReserveArray"),
5808 : .get = py_DNS_RPC_SERVER_INFO_W2K_get_fReserveArray,
5809 : .set = py_DNS_RPC_SERVER_INFO_W2K_set_fReserveArray,
5810 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5811 : },
5812 : { .name = NULL }
5813 : };
5814 :
5815 0 : static PyObject *py_DNS_RPC_SERVER_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5816 : {
5817 0 : return pytalloc_new(struct DNS_RPC_SERVER_INFO_W2K, type);
5818 : }
5819 :
5820 :
5821 : static PyTypeObject DNS_RPC_SERVER_INFO_W2K_Type = {
5822 : PyVarObject_HEAD_INIT(NULL, 0)
5823 : .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_W2K",
5824 : .tp_getset = py_DNS_RPC_SERVER_INFO_W2K_getsetters,
5825 : .tp_methods = NULL,
5826 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5827 : .tp_new = py_DNS_RPC_SERVER_INFO_W2K_new,
5828 : };
5829 :
5830 :
5831 0 : static PyObject *py_DNS_EXTENSION_get_extension(PyObject *obj, void *closure)
5832 : {
5833 0 : struct DNS_EXTENSION *object = (struct DNS_EXTENSION *)pytalloc_get_ptr(obj);
5834 0 : PyObject *py_extension;
5835 0 : if (object->extension == NULL) {
5836 0 : Py_RETURN_NONE;
5837 : }
5838 0 : if (object->extension == NULL) {
5839 0 : py_extension = Py_None;
5840 0 : Py_INCREF(py_extension);
5841 : } else {
5842 0 : if (object->extension == NULL) {
5843 0 : py_extension = Py_None;
5844 0 : Py_INCREF(py_extension);
5845 : } else {
5846 0 : py_extension = PyUnicode_Decode(object->extension, strlen(object->extension), "utf-8", "ignore");
5847 : }
5848 : }
5849 0 : return py_extension;
5850 : }
5851 :
5852 0 : static int py_DNS_EXTENSION_set_extension(PyObject *py_obj, PyObject *value, void *closure)
5853 : {
5854 0 : struct DNS_EXTENSION *object = (struct DNS_EXTENSION *)pytalloc_get_ptr(py_obj);
5855 0 : if (value == NULL) {
5856 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->extension");
5857 0 : return -1;
5858 : }
5859 0 : if (value == Py_None) {
5860 0 : object->extension = NULL;
5861 : } else {
5862 0 : object->extension = NULL;
5863 : {
5864 0 : const char *test_str;
5865 0 : const char *talloc_str;
5866 0 : PyObject *unicode = NULL;
5867 0 : if (PyUnicode_Check(value)) {
5868 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
5869 0 : if (unicode == NULL) {
5870 0 : PyErr_NoMemory();
5871 0 : return -1;
5872 : }
5873 0 : test_str = PyBytes_AS_STRING(unicode);
5874 0 : } else if (PyBytes_Check(value)) {
5875 0 : test_str = PyBytes_AS_STRING(value);
5876 : } else {
5877 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
5878 0 : return -1;
5879 : }
5880 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
5881 0 : if (unicode != NULL) {
5882 0 : Py_DECREF(unicode);
5883 : }
5884 0 : if (talloc_str == NULL) {
5885 0 : PyErr_NoMemory();
5886 0 : return -1;
5887 : }
5888 0 : object->extension = talloc_str;
5889 : }
5890 : }
5891 0 : return 0;
5892 : }
5893 :
5894 : static PyGetSetDef py_DNS_EXTENSION_getsetters[] = {
5895 : {
5896 : .name = discard_const_p(char, "extension"),
5897 : .get = py_DNS_EXTENSION_get_extension,
5898 : .set = py_DNS_EXTENSION_set_extension,
5899 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
5900 : },
5901 : { .name = NULL }
5902 : };
5903 :
5904 0 : static PyObject *py_DNS_EXTENSION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
5905 : {
5906 0 : return pytalloc_new(struct DNS_EXTENSION, type);
5907 : }
5908 :
5909 :
5910 : static PyTypeObject DNS_EXTENSION_Type = {
5911 : PyVarObject_HEAD_INIT(NULL, 0)
5912 : .tp_name = "dnsserver.DNS_EXTENSION",
5913 : .tp_getset = py_DNS_EXTENSION_getsetters,
5914 : .tp_methods = NULL,
5915 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
5916 : .tp_new = py_DNS_EXTENSION_new,
5917 : };
5918 :
5919 :
5920 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
5921 : {
5922 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
5923 0 : PyObject *py_dwRpcStructureVersion;
5924 1 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
5925 1 : return py_dwRpcStructureVersion;
5926 : }
5927 :
5928 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
5929 : {
5930 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
5931 0 : if (value == NULL) {
5932 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
5933 0 : return -1;
5934 : }
5935 : {
5936 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
5937 0 : if (PyLong_Check(value)) {
5938 0 : unsigned long long test_var;
5939 0 : test_var = PyLong_AsUnsignedLongLong(value);
5940 0 : if (PyErr_Occurred() != NULL) {
5941 0 : return -1;
5942 : }
5943 0 : if (test_var > uint_max) {
5944 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5945 : PyLong_Type.tp_name, uint_max, test_var);
5946 0 : return -1;
5947 : }
5948 0 : object->dwRpcStructureVersion = test_var;
5949 : } else {
5950 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5951 : PyLong_Type.tp_name);
5952 0 : return -1;
5953 : }
5954 : }
5955 0 : return 0;
5956 : }
5957 :
5958 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
5959 : {
5960 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
5961 0 : PyObject *py_dwReserved0;
5962 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
5963 0 : return py_dwReserved0;
5964 : }
5965 :
5966 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
5967 : {
5968 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
5969 0 : if (value == NULL) {
5970 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
5971 0 : return -1;
5972 : }
5973 : {
5974 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
5975 0 : if (PyLong_Check(value)) {
5976 0 : unsigned long long test_var;
5977 0 : test_var = PyLong_AsUnsignedLongLong(value);
5978 0 : if (PyErr_Occurred() != NULL) {
5979 0 : return -1;
5980 : }
5981 0 : if (test_var > uint_max) {
5982 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
5983 : PyLong_Type.tp_name, uint_max, test_var);
5984 0 : return -1;
5985 : }
5986 0 : object->dwReserved0 = test_var;
5987 : } else {
5988 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
5989 : PyLong_Type.tp_name);
5990 0 : return -1;
5991 : }
5992 : }
5993 0 : return 0;
5994 : }
5995 :
5996 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwVersion(PyObject *obj, void *closure)
5997 : {
5998 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
5999 0 : PyObject *py_dwVersion;
6000 1 : py_dwVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwVersion);
6001 1 : return py_dwVersion;
6002 : }
6003 :
6004 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
6005 : {
6006 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6007 0 : if (value == NULL) {
6008 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwVersion");
6009 0 : return -1;
6010 : }
6011 : {
6012 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwVersion));
6013 0 : if (PyLong_Check(value)) {
6014 0 : unsigned long long test_var;
6015 0 : test_var = PyLong_AsUnsignedLongLong(value);
6016 0 : if (PyErr_Occurred() != NULL) {
6017 0 : return -1;
6018 : }
6019 0 : if (test_var > uint_max) {
6020 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6021 : PyLong_Type.tp_name, uint_max, test_var);
6022 0 : return -1;
6023 : }
6024 0 : object->dwVersion = test_var;
6025 : } else {
6026 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6027 : PyLong_Type.tp_name);
6028 0 : return -1;
6029 : }
6030 : }
6031 0 : return 0;
6032 : }
6033 :
6034 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fBootMethod(PyObject *obj, void *closure)
6035 : {
6036 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6037 0 : PyObject *py_fBootMethod;
6038 1 : py_fBootMethod = PyLong_FromLong((uint16_t)object->fBootMethod);
6039 1 : return py_fBootMethod;
6040 : }
6041 :
6042 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
6043 : {
6044 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6045 0 : if (value == NULL) {
6046 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fBootMethod");
6047 0 : return -1;
6048 : }
6049 : {
6050 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBootMethod));
6051 0 : if (PyLong_Check(value)) {
6052 0 : unsigned long long test_var;
6053 0 : test_var = PyLong_AsUnsignedLongLong(value);
6054 0 : if (PyErr_Occurred() != NULL) {
6055 0 : return -1;
6056 : }
6057 0 : if (test_var > uint_max) {
6058 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6059 : PyLong_Type.tp_name, uint_max, test_var);
6060 0 : return -1;
6061 : }
6062 0 : object->fBootMethod = test_var;
6063 : } else {
6064 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6065 : PyLong_Type.tp_name);
6066 0 : return -1;
6067 : }
6068 : }
6069 0 : return 0;
6070 : }
6071 :
6072 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAdminConfigured(PyObject *obj, void *closure)
6073 : {
6074 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6075 0 : PyObject *py_fAdminConfigured;
6076 1 : py_fAdminConfigured = PyLong_FromLong((uint16_t)object->fAdminConfigured);
6077 1 : return py_fAdminConfigured;
6078 : }
6079 :
6080 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
6081 : {
6082 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6083 0 : if (value == NULL) {
6084 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAdminConfigured");
6085 0 : return -1;
6086 : }
6087 : {
6088 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAdminConfigured));
6089 0 : if (PyLong_Check(value)) {
6090 0 : unsigned long long test_var;
6091 0 : test_var = PyLong_AsUnsignedLongLong(value);
6092 0 : if (PyErr_Occurred() != NULL) {
6093 0 : return -1;
6094 : }
6095 0 : if (test_var > uint_max) {
6096 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6097 : PyLong_Type.tp_name, uint_max, test_var);
6098 0 : return -1;
6099 : }
6100 0 : object->fAdminConfigured = test_var;
6101 : } else {
6102 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6103 : PyLong_Type.tp_name);
6104 0 : return -1;
6105 : }
6106 : }
6107 0 : return 0;
6108 : }
6109 :
6110 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
6111 : {
6112 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6113 0 : PyObject *py_fAllowUpdate;
6114 1 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
6115 1 : return py_fAllowUpdate;
6116 : }
6117 :
6118 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
6119 : {
6120 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6121 0 : if (value == NULL) {
6122 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
6123 0 : return -1;
6124 : }
6125 : {
6126 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
6127 0 : if (PyLong_Check(value)) {
6128 0 : unsigned long long test_var;
6129 0 : test_var = PyLong_AsUnsignedLongLong(value);
6130 0 : if (PyErr_Occurred() != NULL) {
6131 0 : return -1;
6132 : }
6133 0 : if (test_var > uint_max) {
6134 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6135 : PyLong_Type.tp_name, uint_max, test_var);
6136 0 : return -1;
6137 : }
6138 0 : object->fAllowUpdate = test_var;
6139 : } else {
6140 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6141 : PyLong_Type.tp_name);
6142 0 : return -1;
6143 : }
6144 : }
6145 0 : return 0;
6146 : }
6147 :
6148 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fDsAvailable(PyObject *obj, void *closure)
6149 : {
6150 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6151 0 : PyObject *py_fDsAvailable;
6152 1 : py_fDsAvailable = PyLong_FromLong((uint16_t)object->fDsAvailable);
6153 1 : return py_fDsAvailable;
6154 : }
6155 :
6156 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
6157 : {
6158 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6159 0 : if (value == NULL) {
6160 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDsAvailable");
6161 0 : return -1;
6162 : }
6163 : {
6164 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsAvailable));
6165 0 : if (PyLong_Check(value)) {
6166 0 : unsigned long long test_var;
6167 0 : test_var = PyLong_AsUnsignedLongLong(value);
6168 0 : if (PyErr_Occurred() != NULL) {
6169 0 : return -1;
6170 : }
6171 0 : if (test_var > uint_max) {
6172 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6173 : PyLong_Type.tp_name, uint_max, test_var);
6174 0 : return -1;
6175 : }
6176 0 : object->fDsAvailable = test_var;
6177 : } else {
6178 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6179 : PyLong_Type.tp_name);
6180 0 : return -1;
6181 : }
6182 : }
6183 0 : return 0;
6184 : }
6185 :
6186 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszServerName(PyObject *obj, void *closure)
6187 : {
6188 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6189 0 : PyObject *py_pszServerName;
6190 1 : if (object->pszServerName == NULL) {
6191 0 : Py_RETURN_NONE;
6192 : }
6193 1 : if (object->pszServerName == NULL) {
6194 0 : py_pszServerName = Py_None;
6195 0 : Py_INCREF(py_pszServerName);
6196 : } else {
6197 1 : if (object->pszServerName == NULL) {
6198 0 : py_pszServerName = Py_None;
6199 0 : Py_INCREF(py_pszServerName);
6200 : } else {
6201 1 : py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
6202 : }
6203 : }
6204 1 : return py_pszServerName;
6205 : }
6206 :
6207 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
6208 : {
6209 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6210 0 : if (value == NULL) {
6211 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszServerName");
6212 0 : return -1;
6213 : }
6214 0 : if (value == Py_None) {
6215 0 : object->pszServerName = NULL;
6216 : } else {
6217 0 : object->pszServerName = NULL;
6218 : {
6219 0 : const char *test_str;
6220 0 : const char *talloc_str;
6221 0 : PyObject *unicode = NULL;
6222 0 : if (PyUnicode_Check(value)) {
6223 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6224 0 : if (unicode == NULL) {
6225 0 : PyErr_NoMemory();
6226 0 : return -1;
6227 : }
6228 0 : test_str = PyBytes_AS_STRING(unicode);
6229 0 : } else if (PyBytes_Check(value)) {
6230 0 : test_str = PyBytes_AS_STRING(value);
6231 : } else {
6232 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6233 0 : return -1;
6234 : }
6235 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6236 0 : if (unicode != NULL) {
6237 0 : Py_DECREF(unicode);
6238 : }
6239 0 : if (talloc_str == NULL) {
6240 0 : PyErr_NoMemory();
6241 0 : return -1;
6242 : }
6243 0 : object->pszServerName = talloc_str;
6244 : }
6245 : }
6246 0 : return 0;
6247 : }
6248 :
6249 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDsContainer(PyObject *obj, void *closure)
6250 : {
6251 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6252 0 : PyObject *py_pszDsContainer;
6253 1 : if (object->pszDsContainer == NULL) {
6254 0 : Py_RETURN_NONE;
6255 : }
6256 1 : if (object->pszDsContainer == NULL) {
6257 0 : py_pszDsContainer = Py_None;
6258 0 : Py_INCREF(py_pszDsContainer);
6259 : } else {
6260 1 : if (object->pszDsContainer == NULL) {
6261 0 : py_pszDsContainer = Py_None;
6262 0 : Py_INCREF(py_pszDsContainer);
6263 : } else {
6264 1 : py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
6265 : }
6266 : }
6267 1 : return py_pszDsContainer;
6268 : }
6269 :
6270 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
6271 : {
6272 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6273 0 : if (value == NULL) {
6274 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDsContainer");
6275 0 : return -1;
6276 : }
6277 0 : if (value == Py_None) {
6278 0 : object->pszDsContainer = NULL;
6279 : } else {
6280 0 : object->pszDsContainer = NULL;
6281 : {
6282 0 : const char *test_str;
6283 0 : const char *talloc_str;
6284 0 : PyObject *unicode = NULL;
6285 0 : if (PyUnicode_Check(value)) {
6286 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6287 0 : if (unicode == NULL) {
6288 0 : PyErr_NoMemory();
6289 0 : return -1;
6290 : }
6291 0 : test_str = PyBytes_AS_STRING(unicode);
6292 0 : } else if (PyBytes_Check(value)) {
6293 0 : test_str = PyBytes_AS_STRING(value);
6294 : } else {
6295 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6296 0 : return -1;
6297 : }
6298 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6299 0 : if (unicode != NULL) {
6300 0 : Py_DECREF(unicode);
6301 : }
6302 0 : if (talloc_str == NULL) {
6303 0 : PyErr_NoMemory();
6304 0 : return -1;
6305 : }
6306 0 : object->pszDsContainer = talloc_str;
6307 : }
6308 : }
6309 0 : return 0;
6310 : }
6311 :
6312 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipServerAddrs(PyObject *obj, void *closure)
6313 : {
6314 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6315 0 : PyObject *py_aipServerAddrs;
6316 1 : if (object->aipServerAddrs == NULL) {
6317 0 : Py_RETURN_NONE;
6318 : }
6319 1 : if (object->aipServerAddrs == NULL) {
6320 0 : py_aipServerAddrs = Py_None;
6321 0 : Py_INCREF(py_aipServerAddrs);
6322 : } else {
6323 1 : py_aipServerAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
6324 : }
6325 1 : return py_aipServerAddrs;
6326 : }
6327 :
6328 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
6329 : {
6330 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6331 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipServerAddrs));
6332 0 : if (value == NULL) {
6333 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipServerAddrs");
6334 0 : return -1;
6335 : }
6336 0 : if (value == Py_None) {
6337 0 : object->aipServerAddrs = NULL;
6338 : } else {
6339 0 : object->aipServerAddrs = NULL;
6340 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
6341 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6342 0 : PyErr_NoMemory();
6343 0 : return -1;
6344 : }
6345 0 : object->aipServerAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
6346 : }
6347 0 : return 0;
6348 : }
6349 :
6350 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipListenAddrs(PyObject *obj, void *closure)
6351 : {
6352 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6353 0 : PyObject *py_aipListenAddrs;
6354 1 : if (object->aipListenAddrs == NULL) {
6355 0 : Py_RETURN_NONE;
6356 : }
6357 1 : if (object->aipListenAddrs == NULL) {
6358 0 : py_aipListenAddrs = Py_None;
6359 0 : Py_INCREF(py_aipListenAddrs);
6360 : } else {
6361 1 : py_aipListenAddrs = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
6362 : }
6363 1 : return py_aipListenAddrs;
6364 : }
6365 :
6366 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
6367 : {
6368 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6369 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipListenAddrs));
6370 0 : if (value == NULL) {
6371 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipListenAddrs");
6372 0 : return -1;
6373 : }
6374 0 : if (value == Py_None) {
6375 0 : object->aipListenAddrs = NULL;
6376 : } else {
6377 0 : object->aipListenAddrs = NULL;
6378 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
6379 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6380 0 : PyErr_NoMemory();
6381 0 : return -1;
6382 : }
6383 0 : object->aipListenAddrs = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
6384 : }
6385 0 : return 0;
6386 : }
6387 :
6388 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipForwarders(PyObject *obj, void *closure)
6389 : {
6390 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6391 0 : PyObject *py_aipForwarders;
6392 1 : if (object->aipForwarders == NULL) {
6393 1 : Py_RETURN_NONE;
6394 : }
6395 0 : if (object->aipForwarders == NULL) {
6396 0 : py_aipForwarders = Py_None;
6397 0 : Py_INCREF(py_aipForwarders);
6398 : } else {
6399 0 : py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
6400 : }
6401 0 : return py_aipForwarders;
6402 : }
6403 :
6404 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
6405 : {
6406 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6407 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
6408 0 : if (value == NULL) {
6409 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipForwarders");
6410 0 : return -1;
6411 : }
6412 0 : if (value == Py_None) {
6413 0 : object->aipForwarders = NULL;
6414 : } else {
6415 0 : object->aipForwarders = NULL;
6416 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
6417 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6418 0 : PyErr_NoMemory();
6419 0 : return -1;
6420 : }
6421 0 : object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
6422 : }
6423 0 : return 0;
6424 : }
6425 :
6426 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_aipLogFilter(PyObject *obj, void *closure)
6427 : {
6428 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6429 0 : PyObject *py_aipLogFilter;
6430 1 : if (object->aipLogFilter == NULL) {
6431 1 : Py_RETURN_NONE;
6432 : }
6433 0 : if (object->aipLogFilter == NULL) {
6434 0 : py_aipLogFilter = Py_None;
6435 0 : Py_INCREF(py_aipLogFilter);
6436 : } else {
6437 0 : py_aipLogFilter = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipLogFilter, object->aipLogFilter);
6438 : }
6439 0 : return py_aipLogFilter;
6440 : }
6441 :
6442 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_aipLogFilter(PyObject *py_obj, PyObject *value, void *closure)
6443 : {
6444 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6445 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipLogFilter));
6446 0 : if (value == NULL) {
6447 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipLogFilter");
6448 0 : return -1;
6449 : }
6450 0 : if (value == Py_None) {
6451 0 : object->aipLogFilter = NULL;
6452 : } else {
6453 0 : object->aipLogFilter = NULL;
6454 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
6455 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
6456 0 : PyErr_NoMemory();
6457 0 : return -1;
6458 : }
6459 0 : object->aipLogFilter = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
6460 : }
6461 0 : return 0;
6462 : }
6463 :
6464 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pwszLogFilePath(PyObject *obj, void *closure)
6465 : {
6466 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6467 0 : PyObject *py_pwszLogFilePath;
6468 1 : if (object->pwszLogFilePath == NULL) {
6469 1 : Py_RETURN_NONE;
6470 : }
6471 0 : if (object->pwszLogFilePath == NULL) {
6472 0 : py_pwszLogFilePath = Py_None;
6473 0 : Py_INCREF(py_pwszLogFilePath);
6474 : } else {
6475 0 : if (object->pwszLogFilePath == NULL) {
6476 0 : py_pwszLogFilePath = Py_None;
6477 0 : Py_INCREF(py_pwszLogFilePath);
6478 : } else {
6479 0 : py_pwszLogFilePath = PyUnicode_Decode(object->pwszLogFilePath, strlen(object->pwszLogFilePath), "utf-8", "ignore");
6480 : }
6481 : }
6482 0 : return py_pwszLogFilePath;
6483 : }
6484 :
6485 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pwszLogFilePath(PyObject *py_obj, PyObject *value, void *closure)
6486 : {
6487 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6488 0 : if (value == NULL) {
6489 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwszLogFilePath");
6490 0 : return -1;
6491 : }
6492 0 : if (value == Py_None) {
6493 0 : object->pwszLogFilePath = NULL;
6494 : } else {
6495 0 : object->pwszLogFilePath = NULL;
6496 : {
6497 0 : const char *test_str;
6498 0 : const char *talloc_str;
6499 0 : PyObject *unicode = NULL;
6500 0 : if (PyUnicode_Check(value)) {
6501 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6502 0 : if (unicode == NULL) {
6503 0 : PyErr_NoMemory();
6504 0 : return -1;
6505 : }
6506 0 : test_str = PyBytes_AS_STRING(unicode);
6507 0 : } else if (PyBytes_Check(value)) {
6508 0 : test_str = PyBytes_AS_STRING(value);
6509 : } else {
6510 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6511 0 : return -1;
6512 : }
6513 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6514 0 : if (unicode != NULL) {
6515 0 : Py_DECREF(unicode);
6516 : }
6517 0 : if (talloc_str == NULL) {
6518 0 : PyErr_NoMemory();
6519 0 : return -1;
6520 : }
6521 0 : object->pwszLogFilePath = talloc_str;
6522 : }
6523 : }
6524 0 : return 0;
6525 : }
6526 :
6527 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainName(PyObject *obj, void *closure)
6528 : {
6529 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6530 0 : PyObject *py_pszDomainName;
6531 1 : if (object->pszDomainName == NULL) {
6532 0 : Py_RETURN_NONE;
6533 : }
6534 1 : if (object->pszDomainName == NULL) {
6535 0 : py_pszDomainName = Py_None;
6536 0 : Py_INCREF(py_pszDomainName);
6537 : } else {
6538 1 : if (object->pszDomainName == NULL) {
6539 0 : py_pszDomainName = Py_None;
6540 0 : Py_INCREF(py_pszDomainName);
6541 : } else {
6542 1 : py_pszDomainName = PyUnicode_Decode(object->pszDomainName, strlen(object->pszDomainName), "utf-8", "ignore");
6543 : }
6544 : }
6545 1 : return py_pszDomainName;
6546 : }
6547 :
6548 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainName(PyObject *py_obj, PyObject *value, void *closure)
6549 : {
6550 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6551 0 : if (value == NULL) {
6552 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDomainName");
6553 0 : return -1;
6554 : }
6555 0 : if (value == Py_None) {
6556 0 : object->pszDomainName = NULL;
6557 : } else {
6558 0 : object->pszDomainName = NULL;
6559 : {
6560 0 : const char *test_str;
6561 0 : const char *talloc_str;
6562 0 : PyObject *unicode = NULL;
6563 0 : if (PyUnicode_Check(value)) {
6564 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6565 0 : if (unicode == NULL) {
6566 0 : PyErr_NoMemory();
6567 0 : return -1;
6568 : }
6569 0 : test_str = PyBytes_AS_STRING(unicode);
6570 0 : } else if (PyBytes_Check(value)) {
6571 0 : test_str = PyBytes_AS_STRING(value);
6572 : } else {
6573 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6574 0 : return -1;
6575 : }
6576 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6577 0 : if (unicode != NULL) {
6578 0 : Py_DECREF(unicode);
6579 : }
6580 0 : if (talloc_str == NULL) {
6581 0 : PyErr_NoMemory();
6582 0 : return -1;
6583 : }
6584 0 : object->pszDomainName = talloc_str;
6585 : }
6586 : }
6587 0 : return 0;
6588 : }
6589 :
6590 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestName(PyObject *obj, void *closure)
6591 : {
6592 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6593 0 : PyObject *py_pszForestName;
6594 1 : if (object->pszForestName == NULL) {
6595 0 : Py_RETURN_NONE;
6596 : }
6597 1 : if (object->pszForestName == NULL) {
6598 0 : py_pszForestName = Py_None;
6599 0 : Py_INCREF(py_pszForestName);
6600 : } else {
6601 1 : if (object->pszForestName == NULL) {
6602 0 : py_pszForestName = Py_None;
6603 0 : Py_INCREF(py_pszForestName);
6604 : } else {
6605 1 : py_pszForestName = PyUnicode_Decode(object->pszForestName, strlen(object->pszForestName), "utf-8", "ignore");
6606 : }
6607 : }
6608 1 : return py_pszForestName;
6609 : }
6610 :
6611 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestName(PyObject *py_obj, PyObject *value, void *closure)
6612 : {
6613 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6614 0 : if (value == NULL) {
6615 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszForestName");
6616 0 : return -1;
6617 : }
6618 0 : if (value == Py_None) {
6619 0 : object->pszForestName = NULL;
6620 : } else {
6621 0 : object->pszForestName = NULL;
6622 : {
6623 0 : const char *test_str;
6624 0 : const char *talloc_str;
6625 0 : PyObject *unicode = NULL;
6626 0 : if (PyUnicode_Check(value)) {
6627 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6628 0 : if (unicode == NULL) {
6629 0 : PyErr_NoMemory();
6630 0 : return -1;
6631 : }
6632 0 : test_str = PyBytes_AS_STRING(unicode);
6633 0 : } else if (PyBytes_Check(value)) {
6634 0 : test_str = PyBytes_AS_STRING(value);
6635 : } else {
6636 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6637 0 : return -1;
6638 : }
6639 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6640 0 : if (unicode != NULL) {
6641 0 : Py_DECREF(unicode);
6642 : }
6643 0 : if (talloc_str == NULL) {
6644 0 : PyErr_NoMemory();
6645 0 : return -1;
6646 : }
6647 0 : object->pszForestName = talloc_str;
6648 : }
6649 : }
6650 0 : return 0;
6651 : }
6652 :
6653 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainDirectoryPartition(PyObject *obj, void *closure)
6654 : {
6655 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6656 0 : PyObject *py_pszDomainDirectoryPartition;
6657 1 : if (object->pszDomainDirectoryPartition == NULL) {
6658 0 : Py_RETURN_NONE;
6659 : }
6660 1 : if (object->pszDomainDirectoryPartition == NULL) {
6661 0 : py_pszDomainDirectoryPartition = Py_None;
6662 0 : Py_INCREF(py_pszDomainDirectoryPartition);
6663 : } else {
6664 1 : if (object->pszDomainDirectoryPartition == NULL) {
6665 0 : py_pszDomainDirectoryPartition = Py_None;
6666 0 : Py_INCREF(py_pszDomainDirectoryPartition);
6667 : } else {
6668 1 : py_pszDomainDirectoryPartition = PyUnicode_Decode(object->pszDomainDirectoryPartition, strlen(object->pszDomainDirectoryPartition), "utf-8", "ignore");
6669 : }
6670 : }
6671 1 : return py_pszDomainDirectoryPartition;
6672 : }
6673 :
6674 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
6675 : {
6676 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6677 0 : if (value == NULL) {
6678 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDomainDirectoryPartition");
6679 0 : return -1;
6680 : }
6681 0 : if (value == Py_None) {
6682 0 : object->pszDomainDirectoryPartition = NULL;
6683 : } else {
6684 0 : object->pszDomainDirectoryPartition = NULL;
6685 : {
6686 0 : const char *test_str;
6687 0 : const char *talloc_str;
6688 0 : PyObject *unicode = NULL;
6689 0 : if (PyUnicode_Check(value)) {
6690 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6691 0 : if (unicode == NULL) {
6692 0 : PyErr_NoMemory();
6693 0 : return -1;
6694 : }
6695 0 : test_str = PyBytes_AS_STRING(unicode);
6696 0 : } else if (PyBytes_Check(value)) {
6697 0 : test_str = PyBytes_AS_STRING(value);
6698 : } else {
6699 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6700 0 : return -1;
6701 : }
6702 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6703 0 : if (unicode != NULL) {
6704 0 : Py_DECREF(unicode);
6705 : }
6706 0 : if (talloc_str == NULL) {
6707 0 : PyErr_NoMemory();
6708 0 : return -1;
6709 : }
6710 0 : object->pszDomainDirectoryPartition = talloc_str;
6711 : }
6712 : }
6713 0 : return 0;
6714 : }
6715 :
6716 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestDirectoryPartition(PyObject *obj, void *closure)
6717 : {
6718 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6719 0 : PyObject *py_pszForestDirectoryPartition;
6720 1 : if (object->pszForestDirectoryPartition == NULL) {
6721 0 : Py_RETURN_NONE;
6722 : }
6723 1 : if (object->pszForestDirectoryPartition == NULL) {
6724 0 : py_pszForestDirectoryPartition = Py_None;
6725 0 : Py_INCREF(py_pszForestDirectoryPartition);
6726 : } else {
6727 1 : if (object->pszForestDirectoryPartition == NULL) {
6728 0 : py_pszForestDirectoryPartition = Py_None;
6729 0 : Py_INCREF(py_pszForestDirectoryPartition);
6730 : } else {
6731 1 : py_pszForestDirectoryPartition = PyUnicode_Decode(object->pszForestDirectoryPartition, strlen(object->pszForestDirectoryPartition), "utf-8", "ignore");
6732 : }
6733 : }
6734 1 : return py_pszForestDirectoryPartition;
6735 : }
6736 :
6737 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
6738 : {
6739 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6740 0 : if (value == NULL) {
6741 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszForestDirectoryPartition");
6742 0 : return -1;
6743 : }
6744 0 : if (value == Py_None) {
6745 0 : object->pszForestDirectoryPartition = NULL;
6746 : } else {
6747 0 : object->pszForestDirectoryPartition = NULL;
6748 : {
6749 0 : const char *test_str;
6750 0 : const char *talloc_str;
6751 0 : PyObject *unicode = NULL;
6752 0 : if (PyUnicode_Check(value)) {
6753 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
6754 0 : if (unicode == NULL) {
6755 0 : PyErr_NoMemory();
6756 0 : return -1;
6757 : }
6758 0 : test_str = PyBytes_AS_STRING(unicode);
6759 0 : } else if (PyBytes_Check(value)) {
6760 0 : test_str = PyBytes_AS_STRING(value);
6761 : } else {
6762 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
6763 0 : return -1;
6764 : }
6765 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
6766 0 : if (unicode != NULL) {
6767 0 : Py_DECREF(unicode);
6768 : }
6769 0 : if (talloc_str == NULL) {
6770 0 : PyErr_NoMemory();
6771 0 : return -1;
6772 : }
6773 0 : object->pszForestDirectoryPartition = talloc_str;
6774 : }
6775 : }
6776 0 : return 0;
6777 : }
6778 :
6779 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_pExtensions(PyObject *obj, void *closure)
6780 : {
6781 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6782 0 : PyObject *py_pExtensions;
6783 0 : py_pExtensions = PyList_New(6);
6784 0 : if (py_pExtensions == NULL) {
6785 0 : return NULL;
6786 : }
6787 : {
6788 : int pExtensions_cntr_0;
6789 0 : for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < (6); pExtensions_cntr_0++) {
6790 0 : PyObject *py_pExtensions_0;
6791 0 : py_pExtensions_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, pytalloc_get_mem_ctx(obj), &object->pExtensions[pExtensions_cntr_0]);
6792 0 : PyList_SetItem(py_pExtensions, pExtensions_cntr_0, py_pExtensions_0);
6793 : }
6794 : }
6795 0 : return py_pExtensions;
6796 : }
6797 :
6798 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_pExtensions(PyObject *py_obj, PyObject *value, void *closure)
6799 : {
6800 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6801 0 : if (value == NULL) {
6802 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtensions");
6803 0 : return -1;
6804 : }
6805 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
6806 : {
6807 0 : int pExtensions_cntr_0;
6808 0 : if (ARRAY_SIZE(object->pExtensions) != PyList_GET_SIZE(value)) {
6809 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->pExtensions), PyList_GET_SIZE(value));
6810 0 : return -1;
6811 : }
6812 0 : for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < PyList_GET_SIZE(value); pExtensions_cntr_0++) {
6813 0 : if (PyList_GET_ITEM(value, pExtensions_cntr_0) == NULL) {
6814 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtensions[pExtensions_cntr_0]");
6815 0 : return -1;
6816 : }
6817 0 : PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pExtensions_cntr_0), return -1;);
6818 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pExtensions_cntr_0))) == NULL) {
6819 0 : PyErr_NoMemory();
6820 0 : return -1;
6821 : }
6822 0 : object->pExtensions[pExtensions_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pExtensions_cntr_0));
6823 : }
6824 : }
6825 0 : return 0;
6826 : }
6827 :
6828 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogLevel(PyObject *obj, void *closure)
6829 : {
6830 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6831 0 : PyObject *py_dwLogLevel;
6832 1 : py_dwLogLevel = PyLong_FromUnsignedLongLong((uint32_t)object->dwLogLevel);
6833 1 : return py_dwLogLevel;
6834 : }
6835 :
6836 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
6837 : {
6838 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6839 0 : if (value == NULL) {
6840 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLogLevel");
6841 0 : return -1;
6842 : }
6843 : {
6844 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogLevel));
6845 0 : if (PyLong_Check(value)) {
6846 0 : unsigned long long test_var;
6847 0 : test_var = PyLong_AsUnsignedLongLong(value);
6848 0 : if (PyErr_Occurred() != NULL) {
6849 0 : return -1;
6850 : }
6851 0 : if (test_var > uint_max) {
6852 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6853 : PyLong_Type.tp_name, uint_max, test_var);
6854 0 : return -1;
6855 : }
6856 0 : object->dwLogLevel = test_var;
6857 : } else {
6858 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6859 : PyLong_Type.tp_name);
6860 0 : return -1;
6861 : }
6862 : }
6863 0 : return 0;
6864 : }
6865 :
6866 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDebugLevel(PyObject *obj, void *closure)
6867 : {
6868 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6869 0 : PyObject *py_dwDebugLevel;
6870 1 : py_dwDebugLevel = PyLong_FromUnsignedLongLong((uint32_t)object->dwDebugLevel);
6871 1 : return py_dwDebugLevel;
6872 : }
6873 :
6874 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
6875 : {
6876 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6877 0 : if (value == NULL) {
6878 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDebugLevel");
6879 0 : return -1;
6880 : }
6881 : {
6882 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDebugLevel));
6883 0 : if (PyLong_Check(value)) {
6884 0 : unsigned long long test_var;
6885 0 : test_var = PyLong_AsUnsignedLongLong(value);
6886 0 : if (PyErr_Occurred() != NULL) {
6887 0 : return -1;
6888 : }
6889 0 : if (test_var > uint_max) {
6890 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6891 : PyLong_Type.tp_name, uint_max, test_var);
6892 0 : return -1;
6893 : }
6894 0 : object->dwDebugLevel = test_var;
6895 : } else {
6896 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6897 : PyLong_Type.tp_name);
6898 0 : return -1;
6899 : }
6900 : }
6901 0 : return 0;
6902 : }
6903 :
6904 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwForwardTimeout(PyObject *obj, void *closure)
6905 : {
6906 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6907 0 : PyObject *py_dwForwardTimeout;
6908 1 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwForwardTimeout);
6909 1 : return py_dwForwardTimeout;
6910 : }
6911 :
6912 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
6913 : {
6914 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6915 0 : if (value == NULL) {
6916 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwForwardTimeout");
6917 0 : return -1;
6918 : }
6919 : {
6920 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
6921 0 : if (PyLong_Check(value)) {
6922 0 : unsigned long long test_var;
6923 0 : test_var = PyLong_AsUnsignedLongLong(value);
6924 0 : if (PyErr_Occurred() != NULL) {
6925 0 : return -1;
6926 : }
6927 0 : if (test_var > uint_max) {
6928 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6929 : PyLong_Type.tp_name, uint_max, test_var);
6930 0 : return -1;
6931 : }
6932 0 : object->dwForwardTimeout = test_var;
6933 : } else {
6934 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6935 : PyLong_Type.tp_name);
6936 0 : return -1;
6937 : }
6938 : }
6939 0 : return 0;
6940 : }
6941 :
6942 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcProtocol(PyObject *obj, void *closure)
6943 : {
6944 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6945 0 : PyObject *py_dwRpcProtocol;
6946 1 : py_dwRpcProtocol = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcProtocol);
6947 1 : return py_dwRpcProtocol;
6948 : }
6949 :
6950 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
6951 : {
6952 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6953 0 : if (value == NULL) {
6954 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcProtocol");
6955 0 : return -1;
6956 : }
6957 : {
6958 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcProtocol));
6959 0 : if (PyLong_Check(value)) {
6960 0 : unsigned long long test_var;
6961 0 : test_var = PyLong_AsUnsignedLongLong(value);
6962 0 : if (PyErr_Occurred() != NULL) {
6963 0 : return -1;
6964 : }
6965 0 : if (test_var > uint_max) {
6966 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
6967 : PyLong_Type.tp_name, uint_max, test_var);
6968 0 : return -1;
6969 : }
6970 0 : object->dwRpcProtocol = test_var;
6971 : } else {
6972 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
6973 : PyLong_Type.tp_name);
6974 0 : return -1;
6975 : }
6976 : }
6977 0 : return 0;
6978 : }
6979 :
6980 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwNameCheckFlag(PyObject *obj, void *closure)
6981 : {
6982 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
6983 0 : PyObject *py_dwNameCheckFlag;
6984 1 : py_dwNameCheckFlag = PyLong_FromUnsignedLongLong((uint32_t)object->dwNameCheckFlag);
6985 1 : return py_dwNameCheckFlag;
6986 : }
6987 :
6988 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
6989 : {
6990 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
6991 0 : if (value == NULL) {
6992 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwNameCheckFlag");
6993 0 : return -1;
6994 : }
6995 : {
6996 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNameCheckFlag));
6997 0 : if (PyLong_Check(value)) {
6998 0 : unsigned long long test_var;
6999 0 : test_var = PyLong_AsUnsignedLongLong(value);
7000 0 : if (PyErr_Occurred() != NULL) {
7001 0 : return -1;
7002 : }
7003 0 : if (test_var > uint_max) {
7004 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7005 : PyLong_Type.tp_name, uint_max, test_var);
7006 0 : return -1;
7007 : }
7008 0 : object->dwNameCheckFlag = test_var;
7009 : } else {
7010 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7011 : PyLong_Type.tp_name);
7012 0 : return -1;
7013 : }
7014 : }
7015 0 : return 0;
7016 : }
7017 :
7018 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_cAddressAnswerLimit(PyObject *obj, void *closure)
7019 : {
7020 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7021 0 : PyObject *py_cAddressAnswerLimit;
7022 1 : py_cAddressAnswerLimit = PyLong_FromUnsignedLongLong((uint32_t)object->cAddressAnswerLimit);
7023 1 : return py_cAddressAnswerLimit;
7024 : }
7025 :
7026 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
7027 : {
7028 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7029 0 : if (value == NULL) {
7030 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cAddressAnswerLimit");
7031 0 : return -1;
7032 : }
7033 : {
7034 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cAddressAnswerLimit));
7035 0 : if (PyLong_Check(value)) {
7036 0 : unsigned long long test_var;
7037 0 : test_var = PyLong_AsUnsignedLongLong(value);
7038 0 : if (PyErr_Occurred() != NULL) {
7039 0 : return -1;
7040 : }
7041 0 : if (test_var > uint_max) {
7042 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7043 : PyLong_Type.tp_name, uint_max, test_var);
7044 0 : return -1;
7045 : }
7046 0 : object->cAddressAnswerLimit = test_var;
7047 : } else {
7048 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7049 : PyLong_Type.tp_name);
7050 0 : return -1;
7051 : }
7052 : }
7053 0 : return 0;
7054 : }
7055 :
7056 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionRetry(PyObject *obj, void *closure)
7057 : {
7058 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7059 0 : PyObject *py_dwRecursionRetry;
7060 1 : py_dwRecursionRetry = PyLong_FromUnsignedLongLong((uint32_t)object->dwRecursionRetry);
7061 1 : return py_dwRecursionRetry;
7062 : }
7063 :
7064 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
7065 : {
7066 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7067 0 : if (value == NULL) {
7068 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRecursionRetry");
7069 0 : return -1;
7070 : }
7071 : {
7072 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionRetry));
7073 0 : if (PyLong_Check(value)) {
7074 0 : unsigned long long test_var;
7075 0 : test_var = PyLong_AsUnsignedLongLong(value);
7076 0 : if (PyErr_Occurred() != NULL) {
7077 0 : return -1;
7078 : }
7079 0 : if (test_var > uint_max) {
7080 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7081 : PyLong_Type.tp_name, uint_max, test_var);
7082 0 : return -1;
7083 : }
7084 0 : object->dwRecursionRetry = test_var;
7085 : } else {
7086 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7087 : PyLong_Type.tp_name);
7088 0 : return -1;
7089 : }
7090 : }
7091 0 : return 0;
7092 : }
7093 :
7094 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionTimeout(PyObject *obj, void *closure)
7095 : {
7096 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7097 0 : PyObject *py_dwRecursionTimeout;
7098 1 : py_dwRecursionTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwRecursionTimeout);
7099 1 : return py_dwRecursionTimeout;
7100 : }
7101 :
7102 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
7103 : {
7104 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7105 0 : if (value == NULL) {
7106 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRecursionTimeout");
7107 0 : return -1;
7108 : }
7109 : {
7110 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionTimeout));
7111 0 : if (PyLong_Check(value)) {
7112 0 : unsigned long long test_var;
7113 0 : test_var = PyLong_AsUnsignedLongLong(value);
7114 0 : if (PyErr_Occurred() != NULL) {
7115 0 : return -1;
7116 : }
7117 0 : if (test_var > uint_max) {
7118 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7119 : PyLong_Type.tp_name, uint_max, test_var);
7120 0 : return -1;
7121 : }
7122 0 : object->dwRecursionTimeout = test_var;
7123 : } else {
7124 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7125 : PyLong_Type.tp_name);
7126 0 : return -1;
7127 : }
7128 : }
7129 0 : return 0;
7130 : }
7131 :
7132 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwMaxCacheTtl(PyObject *obj, void *closure)
7133 : {
7134 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7135 0 : PyObject *py_dwMaxCacheTtl;
7136 1 : py_dwMaxCacheTtl = PyLong_FromUnsignedLongLong((uint32_t)object->dwMaxCacheTtl);
7137 1 : return py_dwMaxCacheTtl;
7138 : }
7139 :
7140 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
7141 : {
7142 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7143 0 : if (value == NULL) {
7144 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwMaxCacheTtl");
7145 0 : return -1;
7146 : }
7147 : {
7148 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwMaxCacheTtl));
7149 0 : if (PyLong_Check(value)) {
7150 0 : unsigned long long test_var;
7151 0 : test_var = PyLong_AsUnsignedLongLong(value);
7152 0 : if (PyErr_Occurred() != NULL) {
7153 0 : return -1;
7154 : }
7155 0 : if (test_var > uint_max) {
7156 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7157 : PyLong_Type.tp_name, uint_max, test_var);
7158 0 : return -1;
7159 : }
7160 0 : object->dwMaxCacheTtl = test_var;
7161 : } else {
7162 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7163 : PyLong_Type.tp_name);
7164 0 : return -1;
7165 : }
7166 : }
7167 0 : return 0;
7168 : }
7169 :
7170 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsPollingInterval(PyObject *obj, void *closure)
7171 : {
7172 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7173 0 : PyObject *py_dwDsPollingInterval;
7174 1 : py_dwDsPollingInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsPollingInterval);
7175 1 : return py_dwDsPollingInterval;
7176 : }
7177 :
7178 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
7179 : {
7180 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7181 0 : if (value == NULL) {
7182 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsPollingInterval");
7183 0 : return -1;
7184 : }
7185 : {
7186 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsPollingInterval));
7187 0 : if (PyLong_Check(value)) {
7188 0 : unsigned long long test_var;
7189 0 : test_var = PyLong_AsUnsignedLongLong(value);
7190 0 : if (PyErr_Occurred() != NULL) {
7191 0 : return -1;
7192 : }
7193 0 : if (test_var > uint_max) {
7194 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7195 : PyLong_Type.tp_name, uint_max, test_var);
7196 0 : return -1;
7197 : }
7198 0 : object->dwDsPollingInterval = test_var;
7199 : } else {
7200 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7201 : PyLong_Type.tp_name);
7202 0 : return -1;
7203 : }
7204 : }
7205 0 : return 0;
7206 : }
7207 :
7208 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLocalNetPriorityNetMask(PyObject *obj, void *closure)
7209 : {
7210 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7211 0 : PyObject *py_dwLocalNetPriorityNetMask;
7212 1 : py_dwLocalNetPriorityNetMask = PyLong_FromUnsignedLongLong((uint32_t)object->dwLocalNetPriorityNetMask);
7213 1 : return py_dwLocalNetPriorityNetMask;
7214 : }
7215 :
7216 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLocalNetPriorityNetMask(PyObject *py_obj, PyObject *value, void *closure)
7217 : {
7218 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7219 0 : if (value == NULL) {
7220 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLocalNetPriorityNetMask");
7221 0 : return -1;
7222 : }
7223 : {
7224 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLocalNetPriorityNetMask));
7225 0 : if (PyLong_Check(value)) {
7226 0 : unsigned long long test_var;
7227 0 : test_var = PyLong_AsUnsignedLongLong(value);
7228 0 : if (PyErr_Occurred() != NULL) {
7229 0 : return -1;
7230 : }
7231 0 : if (test_var > uint_max) {
7232 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7233 : PyLong_Type.tp_name, uint_max, test_var);
7234 0 : return -1;
7235 : }
7236 0 : object->dwLocalNetPriorityNetMask = test_var;
7237 : } else {
7238 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7239 : PyLong_Type.tp_name);
7240 0 : return -1;
7241 : }
7242 : }
7243 0 : return 0;
7244 : }
7245 :
7246 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwScavengingInterval(PyObject *obj, void *closure)
7247 : {
7248 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7249 0 : PyObject *py_dwScavengingInterval;
7250 1 : py_dwScavengingInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwScavengingInterval);
7251 1 : return py_dwScavengingInterval;
7252 : }
7253 :
7254 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
7255 : {
7256 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7257 0 : if (value == NULL) {
7258 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwScavengingInterval");
7259 0 : return -1;
7260 : }
7261 : {
7262 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwScavengingInterval));
7263 0 : if (PyLong_Check(value)) {
7264 0 : unsigned long long test_var;
7265 0 : test_var = PyLong_AsUnsignedLongLong(value);
7266 0 : if (PyErr_Occurred() != NULL) {
7267 0 : return -1;
7268 : }
7269 0 : if (test_var > uint_max) {
7270 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7271 : PyLong_Type.tp_name, uint_max, test_var);
7272 0 : return -1;
7273 : }
7274 0 : object->dwScavengingInterval = test_var;
7275 : } else {
7276 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7277 : PyLong_Type.tp_name);
7278 0 : return -1;
7279 : }
7280 : }
7281 0 : return 0;
7282 : }
7283 :
7284 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
7285 : {
7286 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7287 0 : PyObject *py_dwDefaultRefreshInterval;
7288 1 : py_dwDefaultRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDefaultRefreshInterval);
7289 1 : return py_dwDefaultRefreshInterval;
7290 : }
7291 :
7292 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
7293 : {
7294 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7295 0 : if (value == NULL) {
7296 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDefaultRefreshInterval");
7297 0 : return -1;
7298 : }
7299 : {
7300 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultRefreshInterval));
7301 0 : if (PyLong_Check(value)) {
7302 0 : unsigned long long test_var;
7303 0 : test_var = PyLong_AsUnsignedLongLong(value);
7304 0 : if (PyErr_Occurred() != NULL) {
7305 0 : return -1;
7306 : }
7307 0 : if (test_var > uint_max) {
7308 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7309 : PyLong_Type.tp_name, uint_max, test_var);
7310 0 : return -1;
7311 : }
7312 0 : object->dwDefaultRefreshInterval = test_var;
7313 : } else {
7314 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7315 : PyLong_Type.tp_name);
7316 0 : return -1;
7317 : }
7318 : }
7319 0 : return 0;
7320 : }
7321 :
7322 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
7323 : {
7324 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7325 0 : PyObject *py_dwDefaultNoRefreshInterval;
7326 1 : py_dwDefaultNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDefaultNoRefreshInterval);
7327 1 : return py_dwDefaultNoRefreshInterval;
7328 : }
7329 :
7330 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
7331 : {
7332 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7333 0 : if (value == NULL) {
7334 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDefaultNoRefreshInterval");
7335 0 : return -1;
7336 : }
7337 : {
7338 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultNoRefreshInterval));
7339 0 : if (PyLong_Check(value)) {
7340 0 : unsigned long long test_var;
7341 0 : test_var = PyLong_AsUnsignedLongLong(value);
7342 0 : if (PyErr_Occurred() != NULL) {
7343 0 : return -1;
7344 : }
7345 0 : if (test_var > uint_max) {
7346 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7347 : PyLong_Type.tp_name, uint_max, test_var);
7348 0 : return -1;
7349 : }
7350 0 : object->dwDefaultNoRefreshInterval = test_var;
7351 : } else {
7352 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7353 : PyLong_Type.tp_name);
7354 0 : return -1;
7355 : }
7356 : }
7357 0 : return 0;
7358 : }
7359 :
7360 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLastScavengeTime(PyObject *obj, void *closure)
7361 : {
7362 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7363 0 : PyObject *py_dwLastScavengeTime;
7364 1 : py_dwLastScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)object->dwLastScavengeTime);
7365 1 : return py_dwLastScavengeTime;
7366 : }
7367 :
7368 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLastScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
7369 : {
7370 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7371 0 : if (value == NULL) {
7372 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLastScavengeTime");
7373 0 : return -1;
7374 : }
7375 : {
7376 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastScavengeTime));
7377 0 : if (PyLong_Check(value)) {
7378 0 : unsigned long long test_var;
7379 0 : test_var = PyLong_AsUnsignedLongLong(value);
7380 0 : if (PyErr_Occurred() != NULL) {
7381 0 : return -1;
7382 : }
7383 0 : if (test_var > uint_max) {
7384 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7385 : PyLong_Type.tp_name, uint_max, test_var);
7386 0 : return -1;
7387 : }
7388 0 : object->dwLastScavengeTime = test_var;
7389 : } else {
7390 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7391 : PyLong_Type.tp_name);
7392 0 : return -1;
7393 : }
7394 : }
7395 0 : return 0;
7396 : }
7397 :
7398 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwEventLogLevel(PyObject *obj, void *closure)
7399 : {
7400 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7401 0 : PyObject *py_dwEventLogLevel;
7402 1 : py_dwEventLogLevel = PyLong_FromUnsignedLongLong((uint32_t)object->dwEventLogLevel);
7403 1 : return py_dwEventLogLevel;
7404 : }
7405 :
7406 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwEventLogLevel(PyObject *py_obj, PyObject *value, void *closure)
7407 : {
7408 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7409 0 : if (value == NULL) {
7410 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwEventLogLevel");
7411 0 : return -1;
7412 : }
7413 : {
7414 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwEventLogLevel));
7415 0 : if (PyLong_Check(value)) {
7416 0 : unsigned long long test_var;
7417 0 : test_var = PyLong_AsUnsignedLongLong(value);
7418 0 : if (PyErr_Occurred() != NULL) {
7419 0 : return -1;
7420 : }
7421 0 : if (test_var > uint_max) {
7422 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7423 : PyLong_Type.tp_name, uint_max, test_var);
7424 0 : return -1;
7425 : }
7426 0 : object->dwEventLogLevel = test_var;
7427 : } else {
7428 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7429 : PyLong_Type.tp_name);
7430 0 : return -1;
7431 : }
7432 : }
7433 0 : return 0;
7434 : }
7435 :
7436 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogFileMaxSize(PyObject *obj, void *closure)
7437 : {
7438 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7439 0 : PyObject *py_dwLogFileMaxSize;
7440 1 : py_dwLogFileMaxSize = PyLong_FromUnsignedLongLong((uint32_t)object->dwLogFileMaxSize);
7441 1 : return py_dwLogFileMaxSize;
7442 : }
7443 :
7444 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogFileMaxSize(PyObject *py_obj, PyObject *value, void *closure)
7445 : {
7446 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7447 0 : if (value == NULL) {
7448 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLogFileMaxSize");
7449 0 : return -1;
7450 : }
7451 : {
7452 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogFileMaxSize));
7453 0 : if (PyLong_Check(value)) {
7454 0 : unsigned long long test_var;
7455 0 : test_var = PyLong_AsUnsignedLongLong(value);
7456 0 : if (PyErr_Occurred() != NULL) {
7457 0 : return -1;
7458 : }
7459 0 : if (test_var > uint_max) {
7460 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7461 : PyLong_Type.tp_name, uint_max, test_var);
7462 0 : return -1;
7463 : }
7464 0 : object->dwLogFileMaxSize = test_var;
7465 : } else {
7466 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7467 : PyLong_Type.tp_name);
7468 0 : return -1;
7469 : }
7470 : }
7471 0 : return 0;
7472 : }
7473 :
7474 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsForestVersion(PyObject *obj, void *closure)
7475 : {
7476 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7477 0 : PyObject *py_dwDsForestVersion;
7478 1 : py_dwDsForestVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsForestVersion);
7479 1 : return py_dwDsForestVersion;
7480 : }
7481 :
7482 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsForestVersion(PyObject *py_obj, PyObject *value, void *closure)
7483 : {
7484 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7485 0 : if (value == NULL) {
7486 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsForestVersion");
7487 0 : return -1;
7488 : }
7489 : {
7490 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsForestVersion));
7491 0 : if (PyLong_Check(value)) {
7492 0 : unsigned long long test_var;
7493 0 : test_var = PyLong_AsUnsignedLongLong(value);
7494 0 : if (PyErr_Occurred() != NULL) {
7495 0 : return -1;
7496 : }
7497 0 : if (test_var > uint_max) {
7498 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7499 : PyLong_Type.tp_name, uint_max, test_var);
7500 0 : return -1;
7501 : }
7502 0 : object->dwDsForestVersion = test_var;
7503 : } else {
7504 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7505 : PyLong_Type.tp_name);
7506 0 : return -1;
7507 : }
7508 : }
7509 0 : return 0;
7510 : }
7511 :
7512 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDomainVersion(PyObject *obj, void *closure)
7513 : {
7514 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7515 0 : PyObject *py_dwDsDomainVersion;
7516 1 : py_dwDsDomainVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsDomainVersion);
7517 1 : return py_dwDsDomainVersion;
7518 : }
7519 :
7520 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDomainVersion(PyObject *py_obj, PyObject *value, void *closure)
7521 : {
7522 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7523 0 : if (value == NULL) {
7524 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsDomainVersion");
7525 0 : return -1;
7526 : }
7527 : {
7528 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsDomainVersion));
7529 0 : if (PyLong_Check(value)) {
7530 0 : unsigned long long test_var;
7531 0 : test_var = PyLong_AsUnsignedLongLong(value);
7532 0 : if (PyErr_Occurred() != NULL) {
7533 0 : return -1;
7534 : }
7535 0 : if (test_var > uint_max) {
7536 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7537 : PyLong_Type.tp_name, uint_max, test_var);
7538 0 : return -1;
7539 : }
7540 0 : object->dwDsDomainVersion = test_var;
7541 : } else {
7542 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7543 : PyLong_Type.tp_name);
7544 0 : return -1;
7545 : }
7546 : }
7547 0 : return 0;
7548 : }
7549 :
7550 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDsaVersion(PyObject *obj, void *closure)
7551 : {
7552 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7553 0 : PyObject *py_dwDsDsaVersion;
7554 1 : py_dwDsDsaVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsDsaVersion);
7555 1 : return py_dwDsDsaVersion;
7556 : }
7557 :
7558 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDsaVersion(PyObject *py_obj, PyObject *value, void *closure)
7559 : {
7560 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7561 0 : if (value == NULL) {
7562 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsDsaVersion");
7563 0 : return -1;
7564 : }
7565 : {
7566 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsDsaVersion));
7567 0 : if (PyLong_Check(value)) {
7568 0 : unsigned long long test_var;
7569 0 : test_var = PyLong_AsUnsignedLongLong(value);
7570 0 : if (PyErr_Occurred() != NULL) {
7571 0 : return -1;
7572 : }
7573 0 : if (test_var > uint_max) {
7574 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7575 : PyLong_Type.tp_name, uint_max, test_var);
7576 0 : return -1;
7577 : }
7578 0 : object->dwDsDsaVersion = test_var;
7579 : } else {
7580 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7581 : PyLong_Type.tp_name);
7582 0 : return -1;
7583 : }
7584 : }
7585 0 : return 0;
7586 : }
7587 :
7588 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserveArray(PyObject *obj, void *closure)
7589 : {
7590 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7591 0 : PyObject *py_dwReserveArray;
7592 0 : py_dwReserveArray = PyList_New(4);
7593 0 : if (py_dwReserveArray == NULL) {
7594 0 : return NULL;
7595 : }
7596 : {
7597 : int dwReserveArray_cntr_0;
7598 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < (4); dwReserveArray_cntr_0++) {
7599 0 : PyObject *py_dwReserveArray_0;
7600 0 : py_dwReserveArray_0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserveArray[dwReserveArray_cntr_0]);
7601 0 : PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
7602 : }
7603 : }
7604 0 : return py_dwReserveArray;
7605 : }
7606 :
7607 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
7608 : {
7609 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7610 0 : if (value == NULL) {
7611 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserveArray");
7612 0 : return -1;
7613 : }
7614 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
7615 : {
7616 0 : int dwReserveArray_cntr_0;
7617 0 : if (ARRAY_SIZE(object->dwReserveArray) != PyList_GET_SIZE(value)) {
7618 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->dwReserveArray), PyList_GET_SIZE(value));
7619 0 : return -1;
7620 : }
7621 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
7622 0 : if (PyList_GET_ITEM(value, dwReserveArray_cntr_0) == NULL) {
7623 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserveArray[dwReserveArray_cntr_0]");
7624 0 : return -1;
7625 : }
7626 : {
7627 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserveArray[dwReserveArray_cntr_0]));
7628 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserveArray_cntr_0))) {
7629 0 : unsigned long long test_var;
7630 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
7631 0 : if (PyErr_Occurred() != NULL) {
7632 0 : return -1;
7633 : }
7634 0 : if (test_var > uint_max) {
7635 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7636 : PyLong_Type.tp_name, uint_max, test_var);
7637 0 : return -1;
7638 : }
7639 0 : object->dwReserveArray[dwReserveArray_cntr_0] = test_var;
7640 : } else {
7641 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7642 : PyLong_Type.tp_name);
7643 0 : return -1;
7644 : }
7645 : }
7646 : }
7647 : }
7648 0 : return 0;
7649 : }
7650 :
7651 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoReverseZones(PyObject *obj, void *closure)
7652 : {
7653 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7654 0 : PyObject *py_fAutoReverseZones;
7655 1 : py_fAutoReverseZones = PyLong_FromLong((uint16_t)object->fAutoReverseZones);
7656 1 : return py_fAutoReverseZones;
7657 : }
7658 :
7659 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
7660 : {
7661 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7662 0 : if (value == NULL) {
7663 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoReverseZones");
7664 0 : return -1;
7665 : }
7666 : {
7667 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoReverseZones));
7668 0 : if (PyLong_Check(value)) {
7669 0 : unsigned long long test_var;
7670 0 : test_var = PyLong_AsUnsignedLongLong(value);
7671 0 : if (PyErr_Occurred() != NULL) {
7672 0 : return -1;
7673 : }
7674 0 : if (test_var > uint_max) {
7675 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7676 : PyLong_Type.tp_name, uint_max, test_var);
7677 0 : return -1;
7678 : }
7679 0 : object->fAutoReverseZones = test_var;
7680 : } else {
7681 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7682 : PyLong_Type.tp_name);
7683 0 : return -1;
7684 : }
7685 : }
7686 0 : return 0;
7687 : }
7688 :
7689 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoCacheUpdate(PyObject *obj, void *closure)
7690 : {
7691 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7692 0 : PyObject *py_fAutoCacheUpdate;
7693 1 : py_fAutoCacheUpdate = PyLong_FromLong((uint16_t)object->fAutoCacheUpdate);
7694 1 : return py_fAutoCacheUpdate;
7695 : }
7696 :
7697 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
7698 : {
7699 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7700 0 : if (value == NULL) {
7701 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoCacheUpdate");
7702 0 : return -1;
7703 : }
7704 : {
7705 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCacheUpdate));
7706 0 : if (PyLong_Check(value)) {
7707 0 : unsigned long long test_var;
7708 0 : test_var = PyLong_AsUnsignedLongLong(value);
7709 0 : if (PyErr_Occurred() != NULL) {
7710 0 : return -1;
7711 : }
7712 0 : if (test_var > uint_max) {
7713 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7714 : PyLong_Type.tp_name, uint_max, test_var);
7715 0 : return -1;
7716 : }
7717 0 : object->fAutoCacheUpdate = test_var;
7718 : } else {
7719 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7720 : PyLong_Type.tp_name);
7721 0 : return -1;
7722 : }
7723 : }
7724 0 : return 0;
7725 : }
7726 :
7727 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
7728 : {
7729 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7730 0 : PyObject *py_fRecurseAfterForwarding;
7731 1 : py_fRecurseAfterForwarding = PyLong_FromLong((uint16_t)object->fRecurseAfterForwarding);
7732 1 : return py_fRecurseAfterForwarding;
7733 : }
7734 :
7735 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
7736 : {
7737 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7738 0 : if (value == NULL) {
7739 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRecurseAfterForwarding");
7740 0 : return -1;
7741 : }
7742 : {
7743 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
7744 0 : if (PyLong_Check(value)) {
7745 0 : unsigned long long test_var;
7746 0 : test_var = PyLong_AsUnsignedLongLong(value);
7747 0 : if (PyErr_Occurred() != NULL) {
7748 0 : return -1;
7749 : }
7750 0 : if (test_var > uint_max) {
7751 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7752 : PyLong_Type.tp_name, uint_max, test_var);
7753 0 : return -1;
7754 : }
7755 0 : object->fRecurseAfterForwarding = test_var;
7756 : } else {
7757 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7758 : PyLong_Type.tp_name);
7759 0 : return -1;
7760 : }
7761 : }
7762 0 : return 0;
7763 : }
7764 :
7765 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fForwardDelegations(PyObject *obj, void *closure)
7766 : {
7767 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7768 0 : PyObject *py_fForwardDelegations;
7769 1 : py_fForwardDelegations = PyLong_FromLong((uint16_t)object->fForwardDelegations);
7770 1 : return py_fForwardDelegations;
7771 : }
7772 :
7773 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
7774 : {
7775 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7776 0 : if (value == NULL) {
7777 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fForwardDelegations");
7778 0 : return -1;
7779 : }
7780 : {
7781 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwardDelegations));
7782 0 : if (PyLong_Check(value)) {
7783 0 : unsigned long long test_var;
7784 0 : test_var = PyLong_AsUnsignedLongLong(value);
7785 0 : if (PyErr_Occurred() != NULL) {
7786 0 : return -1;
7787 : }
7788 0 : if (test_var > uint_max) {
7789 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7790 : PyLong_Type.tp_name, uint_max, test_var);
7791 0 : return -1;
7792 : }
7793 0 : object->fForwardDelegations = test_var;
7794 : } else {
7795 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7796 : PyLong_Type.tp_name);
7797 0 : return -1;
7798 : }
7799 : }
7800 0 : return 0;
7801 : }
7802 :
7803 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fNoRecursion(PyObject *obj, void *closure)
7804 : {
7805 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7806 0 : PyObject *py_fNoRecursion;
7807 1 : py_fNoRecursion = PyLong_FromLong((uint16_t)object->fNoRecursion);
7808 1 : return py_fNoRecursion;
7809 : }
7810 :
7811 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
7812 : {
7813 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7814 0 : if (value == NULL) {
7815 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNoRecursion");
7816 0 : return -1;
7817 : }
7818 : {
7819 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNoRecursion));
7820 0 : if (PyLong_Check(value)) {
7821 0 : unsigned long long test_var;
7822 0 : test_var = PyLong_AsUnsignedLongLong(value);
7823 0 : if (PyErr_Occurred() != NULL) {
7824 0 : return -1;
7825 : }
7826 0 : if (test_var > uint_max) {
7827 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7828 : PyLong_Type.tp_name, uint_max, test_var);
7829 0 : return -1;
7830 : }
7831 0 : object->fNoRecursion = test_var;
7832 : } else {
7833 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7834 : PyLong_Type.tp_name);
7835 0 : return -1;
7836 : }
7837 : }
7838 0 : return 0;
7839 : }
7840 :
7841 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fSecureResponses(PyObject *obj, void *closure)
7842 : {
7843 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7844 0 : PyObject *py_fSecureResponses;
7845 1 : py_fSecureResponses = PyLong_FromLong((uint16_t)object->fSecureResponses);
7846 1 : return py_fSecureResponses;
7847 : }
7848 :
7849 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
7850 : {
7851 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7852 0 : if (value == NULL) {
7853 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureResponses");
7854 0 : return -1;
7855 : }
7856 : {
7857 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureResponses));
7858 0 : if (PyLong_Check(value)) {
7859 0 : unsigned long long test_var;
7860 0 : test_var = PyLong_AsUnsignedLongLong(value);
7861 0 : if (PyErr_Occurred() != NULL) {
7862 0 : return -1;
7863 : }
7864 0 : if (test_var > uint_max) {
7865 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7866 : PyLong_Type.tp_name, uint_max, test_var);
7867 0 : return -1;
7868 : }
7869 0 : object->fSecureResponses = test_var;
7870 : } else {
7871 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7872 : PyLong_Type.tp_name);
7873 0 : return -1;
7874 : }
7875 : }
7876 0 : return 0;
7877 : }
7878 :
7879 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fRoundRobin(PyObject *obj, void *closure)
7880 : {
7881 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7882 0 : PyObject *py_fRoundRobin;
7883 1 : py_fRoundRobin = PyLong_FromLong((uint16_t)object->fRoundRobin);
7884 1 : return py_fRoundRobin;
7885 : }
7886 :
7887 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
7888 : {
7889 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7890 0 : if (value == NULL) {
7891 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRoundRobin");
7892 0 : return -1;
7893 : }
7894 : {
7895 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRoundRobin));
7896 0 : if (PyLong_Check(value)) {
7897 0 : unsigned long long test_var;
7898 0 : test_var = PyLong_AsUnsignedLongLong(value);
7899 0 : if (PyErr_Occurred() != NULL) {
7900 0 : return -1;
7901 : }
7902 0 : if (test_var > uint_max) {
7903 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7904 : PyLong_Type.tp_name, uint_max, test_var);
7905 0 : return -1;
7906 : }
7907 0 : object->fRoundRobin = test_var;
7908 : } else {
7909 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7910 : PyLong_Type.tp_name);
7911 0 : return -1;
7912 : }
7913 : }
7914 0 : return 0;
7915 : }
7916 :
7917 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fLocalNetPriority(PyObject *obj, void *closure)
7918 : {
7919 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7920 0 : PyObject *py_fLocalNetPriority;
7921 1 : py_fLocalNetPriority = PyLong_FromLong((uint16_t)object->fLocalNetPriority);
7922 1 : return py_fLocalNetPriority;
7923 : }
7924 :
7925 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
7926 : {
7927 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7928 0 : if (value == NULL) {
7929 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLocalNetPriority");
7930 0 : return -1;
7931 : }
7932 : {
7933 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLocalNetPriority));
7934 0 : if (PyLong_Check(value)) {
7935 0 : unsigned long long test_var;
7936 0 : test_var = PyLong_AsUnsignedLongLong(value);
7937 0 : if (PyErr_Occurred() != NULL) {
7938 0 : return -1;
7939 : }
7940 0 : if (test_var > uint_max) {
7941 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7942 : PyLong_Type.tp_name, uint_max, test_var);
7943 0 : return -1;
7944 : }
7945 0 : object->fLocalNetPriority = test_var;
7946 : } else {
7947 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7948 : PyLong_Type.tp_name);
7949 0 : return -1;
7950 : }
7951 : }
7952 0 : return 0;
7953 : }
7954 :
7955 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fBindSecondaries(PyObject *obj, void *closure)
7956 : {
7957 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7958 0 : PyObject *py_fBindSecondaries;
7959 1 : py_fBindSecondaries = PyLong_FromLong((uint16_t)object->fBindSecondaries);
7960 1 : return py_fBindSecondaries;
7961 : }
7962 :
7963 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
7964 : {
7965 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
7966 0 : if (value == NULL) {
7967 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fBindSecondaries");
7968 0 : return -1;
7969 : }
7970 : {
7971 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBindSecondaries));
7972 0 : if (PyLong_Check(value)) {
7973 0 : unsigned long long test_var;
7974 0 : test_var = PyLong_AsUnsignedLongLong(value);
7975 0 : if (PyErr_Occurred() != NULL) {
7976 0 : return -1;
7977 : }
7978 0 : if (test_var > uint_max) {
7979 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
7980 : PyLong_Type.tp_name, uint_max, test_var);
7981 0 : return -1;
7982 : }
7983 0 : object->fBindSecondaries = test_var;
7984 : } else {
7985 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
7986 : PyLong_Type.tp_name);
7987 0 : return -1;
7988 : }
7989 : }
7990 0 : return 0;
7991 : }
7992 :
7993 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fWriteAuthorityNs(PyObject *obj, void *closure)
7994 : {
7995 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
7996 0 : PyObject *py_fWriteAuthorityNs;
7997 1 : py_fWriteAuthorityNs = PyLong_FromLong((uint16_t)object->fWriteAuthorityNs);
7998 1 : return py_fWriteAuthorityNs;
7999 : }
8000 :
8001 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
8002 : {
8003 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8004 0 : if (value == NULL) {
8005 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fWriteAuthorityNs");
8006 0 : return -1;
8007 : }
8008 : {
8009 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fWriteAuthorityNs));
8010 0 : if (PyLong_Check(value)) {
8011 0 : unsigned long long test_var;
8012 0 : test_var = PyLong_AsUnsignedLongLong(value);
8013 0 : if (PyErr_Occurred() != NULL) {
8014 0 : return -1;
8015 : }
8016 0 : if (test_var > uint_max) {
8017 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8018 : PyLong_Type.tp_name, uint_max, test_var);
8019 0 : return -1;
8020 : }
8021 0 : object->fWriteAuthorityNs = test_var;
8022 : } else {
8023 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8024 : PyLong_Type.tp_name);
8025 0 : return -1;
8026 : }
8027 : }
8028 0 : return 0;
8029 : }
8030 :
8031 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fStrictFileParsing(PyObject *obj, void *closure)
8032 : {
8033 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
8034 0 : PyObject *py_fStrictFileParsing;
8035 1 : py_fStrictFileParsing = PyLong_FromLong((uint16_t)object->fStrictFileParsing);
8036 1 : return py_fStrictFileParsing;
8037 : }
8038 :
8039 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
8040 : {
8041 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8042 0 : if (value == NULL) {
8043 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fStrictFileParsing");
8044 0 : return -1;
8045 : }
8046 : {
8047 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fStrictFileParsing));
8048 0 : if (PyLong_Check(value)) {
8049 0 : unsigned long long test_var;
8050 0 : test_var = PyLong_AsUnsignedLongLong(value);
8051 0 : if (PyErr_Occurred() != NULL) {
8052 0 : return -1;
8053 : }
8054 0 : if (test_var > uint_max) {
8055 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8056 : PyLong_Type.tp_name, uint_max, test_var);
8057 0 : return -1;
8058 : }
8059 0 : object->fStrictFileParsing = test_var;
8060 : } else {
8061 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8062 : PyLong_Type.tp_name);
8063 0 : return -1;
8064 : }
8065 : }
8066 0 : return 0;
8067 : }
8068 :
8069 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fLooseWildcarding(PyObject *obj, void *closure)
8070 : {
8071 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
8072 0 : PyObject *py_fLooseWildcarding;
8073 1 : py_fLooseWildcarding = PyLong_FromLong((uint16_t)object->fLooseWildcarding);
8074 1 : return py_fLooseWildcarding;
8075 : }
8076 :
8077 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
8078 : {
8079 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8080 0 : if (value == NULL) {
8081 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLooseWildcarding");
8082 0 : return -1;
8083 : }
8084 : {
8085 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLooseWildcarding));
8086 0 : if (PyLong_Check(value)) {
8087 0 : unsigned long long test_var;
8088 0 : test_var = PyLong_AsUnsignedLongLong(value);
8089 0 : if (PyErr_Occurred() != NULL) {
8090 0 : return -1;
8091 : }
8092 0 : if (test_var > uint_max) {
8093 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8094 : PyLong_Type.tp_name, uint_max, test_var);
8095 0 : return -1;
8096 : }
8097 0 : object->fLooseWildcarding = test_var;
8098 : } else {
8099 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8100 : PyLong_Type.tp_name);
8101 0 : return -1;
8102 : }
8103 : }
8104 0 : return 0;
8105 : }
8106 :
8107 1 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fDefaultAgingState(PyObject *obj, void *closure)
8108 : {
8109 1 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
8110 0 : PyObject *py_fDefaultAgingState;
8111 1 : py_fDefaultAgingState = PyLong_FromLong((uint16_t)object->fDefaultAgingState);
8112 1 : return py_fDefaultAgingState;
8113 : }
8114 :
8115 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
8116 : {
8117 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8118 0 : if (value == NULL) {
8119 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDefaultAgingState");
8120 0 : return -1;
8121 : }
8122 : {
8123 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDefaultAgingState));
8124 0 : if (PyLong_Check(value)) {
8125 0 : unsigned long long test_var;
8126 0 : test_var = PyLong_AsUnsignedLongLong(value);
8127 0 : if (PyErr_Occurred() != NULL) {
8128 0 : return -1;
8129 : }
8130 0 : if (test_var > uint_max) {
8131 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8132 : PyLong_Type.tp_name, uint_max, test_var);
8133 0 : return -1;
8134 : }
8135 0 : object->fDefaultAgingState = test_var;
8136 : } else {
8137 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8138 : PyLong_Type.tp_name);
8139 0 : return -1;
8140 : }
8141 : }
8142 0 : return 0;
8143 : }
8144 :
8145 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_get_fReserveArray(PyObject *obj, void *closure)
8146 : {
8147 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(obj);
8148 0 : PyObject *py_fReserveArray;
8149 0 : py_fReserveArray = PyList_New(15);
8150 0 : if (py_fReserveArray == NULL) {
8151 0 : return NULL;
8152 : }
8153 : {
8154 : int fReserveArray_cntr_0;
8155 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < (15); fReserveArray_cntr_0++) {
8156 0 : PyObject *py_fReserveArray_0;
8157 0 : py_fReserveArray_0 = PyLong_FromLong((uint16_t)object->fReserveArray[fReserveArray_cntr_0]);
8158 0 : PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
8159 : }
8160 : }
8161 0 : return py_fReserveArray;
8162 : }
8163 :
8164 0 : static int py_DNS_RPC_SERVER_INFO_DOTNET_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
8165 : {
8166 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8167 0 : if (value == NULL) {
8168 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReserveArray");
8169 0 : return -1;
8170 : }
8171 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
8172 : {
8173 0 : int fReserveArray_cntr_0;
8174 0 : if (ARRAY_SIZE(object->fReserveArray) != PyList_GET_SIZE(value)) {
8175 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->fReserveArray), PyList_GET_SIZE(value));
8176 0 : return -1;
8177 : }
8178 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
8179 0 : if (PyList_GET_ITEM(value, fReserveArray_cntr_0) == NULL) {
8180 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReserveArray[fReserveArray_cntr_0]");
8181 0 : return -1;
8182 : }
8183 : {
8184 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReserveArray[fReserveArray_cntr_0]));
8185 0 : if (PyLong_Check(PyList_GET_ITEM(value, fReserveArray_cntr_0))) {
8186 0 : unsigned long long test_var;
8187 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
8188 0 : if (PyErr_Occurred() != NULL) {
8189 0 : return -1;
8190 : }
8191 0 : if (test_var > uint_max) {
8192 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8193 : PyLong_Type.tp_name, uint_max, test_var);
8194 0 : return -1;
8195 : }
8196 0 : object->fReserveArray[fReserveArray_cntr_0] = test_var;
8197 : } else {
8198 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8199 : PyLong_Type.tp_name);
8200 0 : return -1;
8201 : }
8202 : }
8203 : }
8204 : }
8205 0 : return 0;
8206 : }
8207 :
8208 : static PyGetSetDef py_DNS_RPC_SERVER_INFO_DOTNET_getsetters[] = {
8209 : {
8210 : .name = discard_const_p(char, "dwRpcStructureVersion"),
8211 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcStructureVersion,
8212 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcStructureVersion,
8213 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8214 : },
8215 : {
8216 : .name = discard_const_p(char, "dwReserved0"),
8217 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserved0,
8218 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserved0,
8219 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8220 : },
8221 : {
8222 : .name = discard_const_p(char, "dwVersion"),
8223 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwVersion,
8224 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwVersion,
8225 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8226 : },
8227 : {
8228 : .name = discard_const_p(char, "fBootMethod"),
8229 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fBootMethod,
8230 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fBootMethod,
8231 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_BOOT_METHOD")
8232 : },
8233 : {
8234 : .name = discard_const_p(char, "fAdminConfigured"),
8235 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fAdminConfigured,
8236 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fAdminConfigured,
8237 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8238 : },
8239 : {
8240 : .name = discard_const_p(char, "fAllowUpdate"),
8241 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fAllowUpdate,
8242 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fAllowUpdate,
8243 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8244 : },
8245 : {
8246 : .name = discard_const_p(char, "fDsAvailable"),
8247 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fDsAvailable,
8248 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fDsAvailable,
8249 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8250 : },
8251 : {
8252 : .name = discard_const_p(char, "pszServerName"),
8253 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszServerName,
8254 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszServerName,
8255 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8256 : },
8257 : {
8258 : .name = discard_const_p(char, "pszDsContainer"),
8259 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDsContainer,
8260 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDsContainer,
8261 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
8262 : },
8263 : {
8264 : .name = discard_const_p(char, "aipServerAddrs"),
8265 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_aipServerAddrs,
8266 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_aipServerAddrs,
8267 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
8268 : },
8269 : {
8270 : .name = discard_const_p(char, "aipListenAddrs"),
8271 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_aipListenAddrs,
8272 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_aipListenAddrs,
8273 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
8274 : },
8275 : {
8276 : .name = discard_const_p(char, "aipForwarders"),
8277 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_aipForwarders,
8278 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_aipForwarders,
8279 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
8280 : },
8281 : {
8282 : .name = discard_const_p(char, "aipLogFilter"),
8283 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_aipLogFilter,
8284 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_aipLogFilter,
8285 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
8286 : },
8287 : {
8288 : .name = discard_const_p(char, "pwszLogFilePath"),
8289 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pwszLogFilePath,
8290 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pwszLogFilePath,
8291 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
8292 : },
8293 : {
8294 : .name = discard_const_p(char, "pszDomainName"),
8295 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainName,
8296 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainName,
8297 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8298 : },
8299 : {
8300 : .name = discard_const_p(char, "pszForestName"),
8301 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestName,
8302 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestName,
8303 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8304 : },
8305 : {
8306 : .name = discard_const_p(char, "pszDomainDirectoryPartition"),
8307 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszDomainDirectoryPartition,
8308 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszDomainDirectoryPartition,
8309 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8310 : },
8311 : {
8312 : .name = discard_const_p(char, "pszForestDirectoryPartition"),
8313 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pszForestDirectoryPartition,
8314 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pszForestDirectoryPartition,
8315 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8316 : },
8317 : {
8318 : .name = discard_const_p(char, "pExtensions"),
8319 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_pExtensions,
8320 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_pExtensions,
8321 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_EXTENSION")
8322 : },
8323 : {
8324 : .name = discard_const_p(char, "dwLogLevel"),
8325 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogLevel,
8326 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogLevel,
8327 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8328 : },
8329 : {
8330 : .name = discard_const_p(char, "dwDebugLevel"),
8331 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDebugLevel,
8332 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDebugLevel,
8333 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8334 : },
8335 : {
8336 : .name = discard_const_p(char, "dwForwardTimeout"),
8337 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwForwardTimeout,
8338 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwForwardTimeout,
8339 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8340 : },
8341 : {
8342 : .name = discard_const_p(char, "dwRpcProtocol"),
8343 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRpcProtocol,
8344 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRpcProtocol,
8345 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8346 : },
8347 : {
8348 : .name = discard_const_p(char, "dwNameCheckFlag"),
8349 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwNameCheckFlag,
8350 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwNameCheckFlag,
8351 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_NAME_CHECK_FLAG")
8352 : },
8353 : {
8354 : .name = discard_const_p(char, "cAddressAnswerLimit"),
8355 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_cAddressAnswerLimit,
8356 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_cAddressAnswerLimit,
8357 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8358 : },
8359 : {
8360 : .name = discard_const_p(char, "dwRecursionRetry"),
8361 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionRetry,
8362 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionRetry,
8363 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8364 : },
8365 : {
8366 : .name = discard_const_p(char, "dwRecursionTimeout"),
8367 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwRecursionTimeout,
8368 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwRecursionTimeout,
8369 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8370 : },
8371 : {
8372 : .name = discard_const_p(char, "dwMaxCacheTtl"),
8373 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwMaxCacheTtl,
8374 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwMaxCacheTtl,
8375 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8376 : },
8377 : {
8378 : .name = discard_const_p(char, "dwDsPollingInterval"),
8379 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsPollingInterval,
8380 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsPollingInterval,
8381 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8382 : },
8383 : {
8384 : .name = discard_const_p(char, "dwLocalNetPriorityNetMask"),
8385 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLocalNetPriorityNetMask,
8386 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLocalNetPriorityNetMask,
8387 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8388 : },
8389 : {
8390 : .name = discard_const_p(char, "dwScavengingInterval"),
8391 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwScavengingInterval,
8392 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwScavengingInterval,
8393 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8394 : },
8395 : {
8396 : .name = discard_const_p(char, "dwDefaultRefreshInterval"),
8397 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultRefreshInterval,
8398 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultRefreshInterval,
8399 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8400 : },
8401 : {
8402 : .name = discard_const_p(char, "dwDefaultNoRefreshInterval"),
8403 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDefaultNoRefreshInterval,
8404 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDefaultNoRefreshInterval,
8405 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8406 : },
8407 : {
8408 : .name = discard_const_p(char, "dwLastScavengeTime"),
8409 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLastScavengeTime,
8410 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLastScavengeTime,
8411 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8412 : },
8413 : {
8414 : .name = discard_const_p(char, "dwEventLogLevel"),
8415 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwEventLogLevel,
8416 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwEventLogLevel,
8417 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8418 : },
8419 : {
8420 : .name = discard_const_p(char, "dwLogFileMaxSize"),
8421 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwLogFileMaxSize,
8422 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwLogFileMaxSize,
8423 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8424 : },
8425 : {
8426 : .name = discard_const_p(char, "dwDsForestVersion"),
8427 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsForestVersion,
8428 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsForestVersion,
8429 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8430 : },
8431 : {
8432 : .name = discard_const_p(char, "dwDsDomainVersion"),
8433 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDomainVersion,
8434 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDomainVersion,
8435 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8436 : },
8437 : {
8438 : .name = discard_const_p(char, "dwDsDsaVersion"),
8439 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwDsDsaVersion,
8440 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwDsDsaVersion,
8441 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8442 : },
8443 : {
8444 : .name = discard_const_p(char, "dwReserveArray"),
8445 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_dwReserveArray,
8446 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_dwReserveArray,
8447 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
8448 : },
8449 : {
8450 : .name = discard_const_p(char, "fAutoReverseZones"),
8451 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoReverseZones,
8452 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoReverseZones,
8453 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8454 : },
8455 : {
8456 : .name = discard_const_p(char, "fAutoCacheUpdate"),
8457 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fAutoCacheUpdate,
8458 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fAutoCacheUpdate,
8459 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8460 : },
8461 : {
8462 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
8463 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fRecurseAfterForwarding,
8464 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fRecurseAfterForwarding,
8465 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8466 : },
8467 : {
8468 : .name = discard_const_p(char, "fForwardDelegations"),
8469 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fForwardDelegations,
8470 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fForwardDelegations,
8471 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8472 : },
8473 : {
8474 : .name = discard_const_p(char, "fNoRecursion"),
8475 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fNoRecursion,
8476 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fNoRecursion,
8477 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8478 : },
8479 : {
8480 : .name = discard_const_p(char, "fSecureResponses"),
8481 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fSecureResponses,
8482 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fSecureResponses,
8483 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8484 : },
8485 : {
8486 : .name = discard_const_p(char, "fRoundRobin"),
8487 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fRoundRobin,
8488 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fRoundRobin,
8489 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8490 : },
8491 : {
8492 : .name = discard_const_p(char, "fLocalNetPriority"),
8493 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fLocalNetPriority,
8494 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fLocalNetPriority,
8495 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8496 : },
8497 : {
8498 : .name = discard_const_p(char, "fBindSecondaries"),
8499 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fBindSecondaries,
8500 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fBindSecondaries,
8501 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8502 : },
8503 : {
8504 : .name = discard_const_p(char, "fWriteAuthorityNs"),
8505 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fWriteAuthorityNs,
8506 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fWriteAuthorityNs,
8507 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8508 : },
8509 : {
8510 : .name = discard_const_p(char, "fStrictFileParsing"),
8511 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fStrictFileParsing,
8512 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fStrictFileParsing,
8513 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8514 : },
8515 : {
8516 : .name = discard_const_p(char, "fLooseWildcarding"),
8517 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fLooseWildcarding,
8518 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fLooseWildcarding,
8519 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8520 : },
8521 : {
8522 : .name = discard_const_p(char, "fDefaultAgingState"),
8523 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fDefaultAgingState,
8524 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fDefaultAgingState,
8525 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8526 : },
8527 : {
8528 : .name = discard_const_p(char, "fReserveArray"),
8529 : .get = py_DNS_RPC_SERVER_INFO_DOTNET_get_fReserveArray,
8530 : .set = py_DNS_RPC_SERVER_INFO_DOTNET_set_fReserveArray,
8531 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
8532 : },
8533 : { .name = NULL }
8534 : };
8535 :
8536 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
8537 : {
8538 0 : return pytalloc_new(struct DNS_RPC_SERVER_INFO_DOTNET, type);
8539 : }
8540 :
8541 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
8542 : {
8543 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8544 0 : PyObject *ret = NULL;
8545 0 : DATA_BLOB blob;
8546 0 : enum ndr_err_code err;
8547 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
8548 0 : if (tmp_ctx == NULL) {
8549 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
8550 0 : return NULL;
8551 : }
8552 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_SERVER_INFO_DOTNET);
8553 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
8554 0 : TALLOC_FREE(tmp_ctx);
8555 0 : PyErr_SetNdrError(err);
8556 0 : return NULL;
8557 : }
8558 :
8559 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
8560 0 : TALLOC_FREE(tmp_ctx);
8561 0 : return ret;
8562 : }
8563 :
8564 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
8565 : {
8566 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8567 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
8568 0 : Py_ssize_t blob_length = 0;
8569 0 : enum ndr_err_code err;
8570 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
8571 0 : PyObject *allow_remaining_obj = NULL;
8572 0 : bool allow_remaining = false;
8573 :
8574 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
8575 : discard_const_p(char *, kwnames),
8576 : &blob.data, &blob_length,
8577 : &allow_remaining_obj)) {
8578 0 : return NULL;
8579 : }
8580 0 : blob.length = blob_length;
8581 :
8582 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
8583 0 : allow_remaining = true;
8584 : }
8585 :
8586 0 : if (allow_remaining) {
8587 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_SERVER_INFO_DOTNET);
8588 : } else {
8589 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_SERVER_INFO_DOTNET);
8590 : }
8591 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
8592 0 : PyErr_SetNdrError(err);
8593 0 : return NULL;
8594 : }
8595 :
8596 0 : Py_RETURN_NONE;
8597 : }
8598 :
8599 0 : static PyObject *py_DNS_RPC_SERVER_INFO_DOTNET_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
8600 : {
8601 0 : struct DNS_RPC_SERVER_INFO_DOTNET *object = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
8602 0 : PyObject *ret;
8603 0 : char *retstr;
8604 :
8605 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_SERVER_INFO_DOTNET, "DNS_RPC_SERVER_INFO_DOTNET", object);
8606 0 : ret = PyUnicode_FromString(retstr);
8607 0 : talloc_free(retstr);
8608 :
8609 0 : return ret;
8610 : }
8611 :
8612 : static PyMethodDef py_DNS_RPC_SERVER_INFO_DOTNET_methods[] = {
8613 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_SERVER_INFO_DOTNET_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
8614 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_SERVER_INFO_DOTNET_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
8615 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_SERVER_INFO_DOTNET_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
8616 : { NULL, NULL, 0, NULL }
8617 : };
8618 :
8619 :
8620 : static PyTypeObject DNS_RPC_SERVER_INFO_DOTNET_Type = {
8621 : PyVarObject_HEAD_INIT(NULL, 0)
8622 : .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_DOTNET",
8623 : .tp_getset = py_DNS_RPC_SERVER_INFO_DOTNET_getsetters,
8624 : .tp_methods = py_DNS_RPC_SERVER_INFO_DOTNET_methods,
8625 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
8626 : .tp_new = py_DNS_RPC_SERVER_INFO_DOTNET_new,
8627 : };
8628 :
8629 :
8630 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
8631 : {
8632 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8633 0 : PyObject *py_dwRpcStructureVersion;
8634 1 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
8635 1 : return py_dwRpcStructureVersion;
8636 : }
8637 :
8638 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
8639 : {
8640 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8641 0 : if (value == NULL) {
8642 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
8643 0 : return -1;
8644 : }
8645 : {
8646 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
8647 0 : if (PyLong_Check(value)) {
8648 0 : unsigned long long test_var;
8649 0 : test_var = PyLong_AsUnsignedLongLong(value);
8650 0 : if (PyErr_Occurred() != NULL) {
8651 0 : return -1;
8652 : }
8653 0 : if (test_var > uint_max) {
8654 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8655 : PyLong_Type.tp_name, uint_max, test_var);
8656 0 : return -1;
8657 : }
8658 0 : object->dwRpcStructureVersion = test_var;
8659 : } else {
8660 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8661 : PyLong_Type.tp_name);
8662 0 : return -1;
8663 : }
8664 : }
8665 0 : return 0;
8666 : }
8667 :
8668 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
8669 : {
8670 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8671 0 : PyObject *py_dwReserved0;
8672 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
8673 0 : return py_dwReserved0;
8674 : }
8675 :
8676 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
8677 : {
8678 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8679 0 : if (value == NULL) {
8680 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
8681 0 : return -1;
8682 : }
8683 : {
8684 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
8685 0 : if (PyLong_Check(value)) {
8686 0 : unsigned long long test_var;
8687 0 : test_var = PyLong_AsUnsignedLongLong(value);
8688 0 : if (PyErr_Occurred() != NULL) {
8689 0 : return -1;
8690 : }
8691 0 : if (test_var > uint_max) {
8692 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8693 : PyLong_Type.tp_name, uint_max, test_var);
8694 0 : return -1;
8695 : }
8696 0 : object->dwReserved0 = test_var;
8697 : } else {
8698 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8699 : PyLong_Type.tp_name);
8700 0 : return -1;
8701 : }
8702 : }
8703 0 : return 0;
8704 : }
8705 :
8706 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwVersion(PyObject *obj, void *closure)
8707 : {
8708 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8709 0 : PyObject *py_dwVersion;
8710 1 : py_dwVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwVersion);
8711 1 : return py_dwVersion;
8712 : }
8713 :
8714 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwVersion(PyObject *py_obj, PyObject *value, void *closure)
8715 : {
8716 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8717 0 : if (value == NULL) {
8718 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwVersion");
8719 0 : return -1;
8720 : }
8721 : {
8722 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwVersion));
8723 0 : if (PyLong_Check(value)) {
8724 0 : unsigned long long test_var;
8725 0 : test_var = PyLong_AsUnsignedLongLong(value);
8726 0 : if (PyErr_Occurred() != NULL) {
8727 0 : return -1;
8728 : }
8729 0 : if (test_var > uint_max) {
8730 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8731 : PyLong_Type.tp_name, uint_max, test_var);
8732 0 : return -1;
8733 : }
8734 0 : object->dwVersion = test_var;
8735 : } else {
8736 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8737 : PyLong_Type.tp_name);
8738 0 : return -1;
8739 : }
8740 : }
8741 0 : return 0;
8742 : }
8743 :
8744 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBootMethod(PyObject *obj, void *closure)
8745 : {
8746 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8747 0 : PyObject *py_fBootMethod;
8748 1 : py_fBootMethod = PyLong_FromLong((uint16_t)object->fBootMethod);
8749 1 : return py_fBootMethod;
8750 : }
8751 :
8752 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBootMethod(PyObject *py_obj, PyObject *value, void *closure)
8753 : {
8754 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8755 0 : if (value == NULL) {
8756 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fBootMethod");
8757 0 : return -1;
8758 : }
8759 : {
8760 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBootMethod));
8761 0 : if (PyLong_Check(value)) {
8762 0 : unsigned long long test_var;
8763 0 : test_var = PyLong_AsUnsignedLongLong(value);
8764 0 : if (PyErr_Occurred() != NULL) {
8765 0 : return -1;
8766 : }
8767 0 : if (test_var > uint_max) {
8768 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8769 : PyLong_Type.tp_name, uint_max, test_var);
8770 0 : return -1;
8771 : }
8772 0 : object->fBootMethod = test_var;
8773 : } else {
8774 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8775 : PyLong_Type.tp_name);
8776 0 : return -1;
8777 : }
8778 : }
8779 0 : return 0;
8780 : }
8781 :
8782 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAdminConfigured(PyObject *obj, void *closure)
8783 : {
8784 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8785 0 : PyObject *py_fAdminConfigured;
8786 1 : py_fAdminConfigured = PyLong_FromLong((uint16_t)object->fAdminConfigured);
8787 1 : return py_fAdminConfigured;
8788 : }
8789 :
8790 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAdminConfigured(PyObject *py_obj, PyObject *value, void *closure)
8791 : {
8792 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8793 0 : if (value == NULL) {
8794 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAdminConfigured");
8795 0 : return -1;
8796 : }
8797 : {
8798 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAdminConfigured));
8799 0 : if (PyLong_Check(value)) {
8800 0 : unsigned long long test_var;
8801 0 : test_var = PyLong_AsUnsignedLongLong(value);
8802 0 : if (PyErr_Occurred() != NULL) {
8803 0 : return -1;
8804 : }
8805 0 : if (test_var > uint_max) {
8806 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8807 : PyLong_Type.tp_name, uint_max, test_var);
8808 0 : return -1;
8809 : }
8810 0 : object->fAdminConfigured = test_var;
8811 : } else {
8812 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8813 : PyLong_Type.tp_name);
8814 0 : return -1;
8815 : }
8816 : }
8817 0 : return 0;
8818 : }
8819 :
8820 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
8821 : {
8822 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8823 0 : PyObject *py_fAllowUpdate;
8824 1 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
8825 1 : return py_fAllowUpdate;
8826 : }
8827 :
8828 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
8829 : {
8830 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8831 0 : if (value == NULL) {
8832 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
8833 0 : return -1;
8834 : }
8835 : {
8836 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
8837 0 : if (PyLong_Check(value)) {
8838 0 : unsigned long long test_var;
8839 0 : test_var = PyLong_AsUnsignedLongLong(value);
8840 0 : if (PyErr_Occurred() != NULL) {
8841 0 : return -1;
8842 : }
8843 0 : if (test_var > uint_max) {
8844 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8845 : PyLong_Type.tp_name, uint_max, test_var);
8846 0 : return -1;
8847 : }
8848 0 : object->fAllowUpdate = test_var;
8849 : } else {
8850 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8851 : PyLong_Type.tp_name);
8852 0 : return -1;
8853 : }
8854 : }
8855 0 : return 0;
8856 : }
8857 :
8858 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDsAvailable(PyObject *obj, void *closure)
8859 : {
8860 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8861 0 : PyObject *py_fDsAvailable;
8862 1 : py_fDsAvailable = PyLong_FromLong((uint16_t)object->fDsAvailable);
8863 1 : return py_fDsAvailable;
8864 : }
8865 :
8866 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDsAvailable(PyObject *py_obj, PyObject *value, void *closure)
8867 : {
8868 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8869 0 : if (value == NULL) {
8870 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDsAvailable");
8871 0 : return -1;
8872 : }
8873 : {
8874 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsAvailable));
8875 0 : if (PyLong_Check(value)) {
8876 0 : unsigned long long test_var;
8877 0 : test_var = PyLong_AsUnsignedLongLong(value);
8878 0 : if (PyErr_Occurred() != NULL) {
8879 0 : return -1;
8880 : }
8881 0 : if (test_var > uint_max) {
8882 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
8883 : PyLong_Type.tp_name, uint_max, test_var);
8884 0 : return -1;
8885 : }
8886 0 : object->fDsAvailable = test_var;
8887 : } else {
8888 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
8889 : PyLong_Type.tp_name);
8890 0 : return -1;
8891 : }
8892 : }
8893 0 : return 0;
8894 : }
8895 :
8896 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszServerName(PyObject *obj, void *closure)
8897 : {
8898 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8899 0 : PyObject *py_pszServerName;
8900 1 : if (object->pszServerName == NULL) {
8901 0 : Py_RETURN_NONE;
8902 : }
8903 1 : if (object->pszServerName == NULL) {
8904 0 : py_pszServerName = Py_None;
8905 0 : Py_INCREF(py_pszServerName);
8906 : } else {
8907 1 : if (object->pszServerName == NULL) {
8908 0 : py_pszServerName = Py_None;
8909 0 : Py_INCREF(py_pszServerName);
8910 : } else {
8911 1 : py_pszServerName = PyUnicode_Decode(object->pszServerName, strlen(object->pszServerName), "utf-8", "ignore");
8912 : }
8913 : }
8914 1 : return py_pszServerName;
8915 : }
8916 :
8917 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszServerName(PyObject *py_obj, PyObject *value, void *closure)
8918 : {
8919 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8920 0 : if (value == NULL) {
8921 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszServerName");
8922 0 : return -1;
8923 : }
8924 0 : if (value == Py_None) {
8925 0 : object->pszServerName = NULL;
8926 : } else {
8927 0 : object->pszServerName = NULL;
8928 : {
8929 0 : const char *test_str;
8930 0 : const char *talloc_str;
8931 0 : PyObject *unicode = NULL;
8932 0 : if (PyUnicode_Check(value)) {
8933 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8934 0 : if (unicode == NULL) {
8935 0 : PyErr_NoMemory();
8936 0 : return -1;
8937 : }
8938 0 : test_str = PyBytes_AS_STRING(unicode);
8939 0 : } else if (PyBytes_Check(value)) {
8940 0 : test_str = PyBytes_AS_STRING(value);
8941 : } else {
8942 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
8943 0 : return -1;
8944 : }
8945 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
8946 0 : if (unicode != NULL) {
8947 0 : Py_DECREF(unicode);
8948 : }
8949 0 : if (talloc_str == NULL) {
8950 0 : PyErr_NoMemory();
8951 0 : return -1;
8952 : }
8953 0 : object->pszServerName = talloc_str;
8954 : }
8955 : }
8956 0 : return 0;
8957 : }
8958 :
8959 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDsContainer(PyObject *obj, void *closure)
8960 : {
8961 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
8962 0 : PyObject *py_pszDsContainer;
8963 1 : if (object->pszDsContainer == NULL) {
8964 0 : Py_RETURN_NONE;
8965 : }
8966 1 : if (object->pszDsContainer == NULL) {
8967 0 : py_pszDsContainer = Py_None;
8968 0 : Py_INCREF(py_pszDsContainer);
8969 : } else {
8970 1 : if (object->pszDsContainer == NULL) {
8971 0 : py_pszDsContainer = Py_None;
8972 0 : Py_INCREF(py_pszDsContainer);
8973 : } else {
8974 1 : py_pszDsContainer = PyUnicode_Decode(object->pszDsContainer, strlen(object->pszDsContainer), "utf-8", "ignore");
8975 : }
8976 : }
8977 1 : return py_pszDsContainer;
8978 : }
8979 :
8980 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDsContainer(PyObject *py_obj, PyObject *value, void *closure)
8981 : {
8982 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
8983 0 : if (value == NULL) {
8984 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDsContainer");
8985 0 : return -1;
8986 : }
8987 0 : if (value == Py_None) {
8988 0 : object->pszDsContainer = NULL;
8989 : } else {
8990 0 : object->pszDsContainer = NULL;
8991 : {
8992 0 : const char *test_str;
8993 0 : const char *talloc_str;
8994 0 : PyObject *unicode = NULL;
8995 0 : if (PyUnicode_Check(value)) {
8996 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
8997 0 : if (unicode == NULL) {
8998 0 : PyErr_NoMemory();
8999 0 : return -1;
9000 : }
9001 0 : test_str = PyBytes_AS_STRING(unicode);
9002 0 : } else if (PyBytes_Check(value)) {
9003 0 : test_str = PyBytes_AS_STRING(value);
9004 : } else {
9005 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9006 0 : return -1;
9007 : }
9008 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9009 0 : if (unicode != NULL) {
9010 0 : Py_DECREF(unicode);
9011 : }
9012 0 : if (talloc_str == NULL) {
9013 0 : PyErr_NoMemory();
9014 0 : return -1;
9015 : }
9016 0 : object->pszDsContainer = talloc_str;
9017 : }
9018 : }
9019 0 : return 0;
9020 : }
9021 :
9022 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipServerAddrs(PyObject *obj, void *closure)
9023 : {
9024 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9025 0 : PyObject *py_aipServerAddrs;
9026 1 : if (object->aipServerAddrs == NULL) {
9027 0 : Py_RETURN_NONE;
9028 : }
9029 1 : if (object->aipServerAddrs == NULL) {
9030 0 : py_aipServerAddrs = Py_None;
9031 0 : Py_INCREF(py_aipServerAddrs);
9032 : } else {
9033 1 : py_aipServerAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipServerAddrs, object->aipServerAddrs);
9034 : }
9035 1 : return py_aipServerAddrs;
9036 : }
9037 :
9038 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipServerAddrs(PyObject *py_obj, PyObject *value, void *closure)
9039 : {
9040 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9041 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipServerAddrs));
9042 0 : if (value == NULL) {
9043 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipServerAddrs");
9044 0 : return -1;
9045 : }
9046 0 : if (value == Py_None) {
9047 0 : object->aipServerAddrs = NULL;
9048 : } else {
9049 0 : object->aipServerAddrs = NULL;
9050 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9051 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9052 0 : PyErr_NoMemory();
9053 0 : return -1;
9054 : }
9055 0 : object->aipServerAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9056 : }
9057 0 : return 0;
9058 : }
9059 :
9060 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipListenAddrs(PyObject *obj, void *closure)
9061 : {
9062 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9063 0 : PyObject *py_aipListenAddrs;
9064 1 : if (object->aipListenAddrs == NULL) {
9065 0 : Py_RETURN_NONE;
9066 : }
9067 1 : if (object->aipListenAddrs == NULL) {
9068 0 : py_aipListenAddrs = Py_None;
9069 0 : Py_INCREF(py_aipListenAddrs);
9070 : } else {
9071 1 : py_aipListenAddrs = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipListenAddrs, object->aipListenAddrs);
9072 : }
9073 1 : return py_aipListenAddrs;
9074 : }
9075 :
9076 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipListenAddrs(PyObject *py_obj, PyObject *value, void *closure)
9077 : {
9078 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9079 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipListenAddrs));
9080 0 : if (value == NULL) {
9081 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipListenAddrs");
9082 0 : return -1;
9083 : }
9084 0 : if (value == Py_None) {
9085 0 : object->aipListenAddrs = NULL;
9086 : } else {
9087 0 : object->aipListenAddrs = NULL;
9088 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9089 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9090 0 : PyErr_NoMemory();
9091 0 : return -1;
9092 : }
9093 0 : object->aipListenAddrs = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9094 : }
9095 0 : return 0;
9096 : }
9097 :
9098 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipForwarders(PyObject *obj, void *closure)
9099 : {
9100 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9101 0 : PyObject *py_aipForwarders;
9102 1 : if (object->aipForwarders == NULL) {
9103 1 : Py_RETURN_NONE;
9104 : }
9105 0 : if (object->aipForwarders == NULL) {
9106 0 : py_aipForwarders = Py_None;
9107 0 : Py_INCREF(py_aipForwarders);
9108 : } else {
9109 0 : py_aipForwarders = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipForwarders, object->aipForwarders);
9110 : }
9111 0 : return py_aipForwarders;
9112 : }
9113 :
9114 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
9115 : {
9116 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9117 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
9118 0 : if (value == NULL) {
9119 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipForwarders");
9120 0 : return -1;
9121 : }
9122 0 : if (value == Py_None) {
9123 0 : object->aipForwarders = NULL;
9124 : } else {
9125 0 : object->aipForwarders = NULL;
9126 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9127 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9128 0 : PyErr_NoMemory();
9129 0 : return -1;
9130 : }
9131 0 : object->aipForwarders = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9132 : }
9133 0 : return 0;
9134 : }
9135 :
9136 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipLogFilter(PyObject *obj, void *closure)
9137 : {
9138 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9139 0 : PyObject *py_aipLogFilter;
9140 1 : if (object->aipLogFilter == NULL) {
9141 1 : Py_RETURN_NONE;
9142 : }
9143 0 : if (object->aipLogFilter == NULL) {
9144 0 : py_aipLogFilter = Py_None;
9145 0 : Py_INCREF(py_aipLogFilter);
9146 : } else {
9147 0 : py_aipLogFilter = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipLogFilter, object->aipLogFilter);
9148 : }
9149 0 : return py_aipLogFilter;
9150 : }
9151 :
9152 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipLogFilter(PyObject *py_obj, PyObject *value, void *closure)
9153 : {
9154 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9155 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipLogFilter));
9156 0 : if (value == NULL) {
9157 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipLogFilter");
9158 0 : return -1;
9159 : }
9160 0 : if (value == Py_None) {
9161 0 : object->aipLogFilter = NULL;
9162 : } else {
9163 0 : object->aipLogFilter = NULL;
9164 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
9165 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
9166 0 : PyErr_NoMemory();
9167 0 : return -1;
9168 : }
9169 0 : object->aipLogFilter = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
9170 : }
9171 0 : return 0;
9172 : }
9173 :
9174 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pwszLogFilePath(PyObject *obj, void *closure)
9175 : {
9176 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9177 0 : PyObject *py_pwszLogFilePath;
9178 1 : if (object->pwszLogFilePath == NULL) {
9179 1 : Py_RETURN_NONE;
9180 : }
9181 0 : if (object->pwszLogFilePath == NULL) {
9182 0 : py_pwszLogFilePath = Py_None;
9183 0 : Py_INCREF(py_pwszLogFilePath);
9184 : } else {
9185 0 : if (object->pwszLogFilePath == NULL) {
9186 0 : py_pwszLogFilePath = Py_None;
9187 0 : Py_INCREF(py_pwszLogFilePath);
9188 : } else {
9189 0 : py_pwszLogFilePath = PyUnicode_Decode(object->pwszLogFilePath, strlen(object->pwszLogFilePath), "utf-8", "ignore");
9190 : }
9191 : }
9192 0 : return py_pwszLogFilePath;
9193 : }
9194 :
9195 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pwszLogFilePath(PyObject *py_obj, PyObject *value, void *closure)
9196 : {
9197 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9198 0 : if (value == NULL) {
9199 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwszLogFilePath");
9200 0 : return -1;
9201 : }
9202 0 : if (value == Py_None) {
9203 0 : object->pwszLogFilePath = NULL;
9204 : } else {
9205 0 : object->pwszLogFilePath = NULL;
9206 : {
9207 0 : const char *test_str;
9208 0 : const char *talloc_str;
9209 0 : PyObject *unicode = NULL;
9210 0 : if (PyUnicode_Check(value)) {
9211 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9212 0 : if (unicode == NULL) {
9213 0 : PyErr_NoMemory();
9214 0 : return -1;
9215 : }
9216 0 : test_str = PyBytes_AS_STRING(unicode);
9217 0 : } else if (PyBytes_Check(value)) {
9218 0 : test_str = PyBytes_AS_STRING(value);
9219 : } else {
9220 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9221 0 : return -1;
9222 : }
9223 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9224 0 : if (unicode != NULL) {
9225 0 : Py_DECREF(unicode);
9226 : }
9227 0 : if (talloc_str == NULL) {
9228 0 : PyErr_NoMemory();
9229 0 : return -1;
9230 : }
9231 0 : object->pwszLogFilePath = talloc_str;
9232 : }
9233 : }
9234 0 : return 0;
9235 : }
9236 :
9237 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainName(PyObject *obj, void *closure)
9238 : {
9239 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9240 0 : PyObject *py_pszDomainName;
9241 1 : if (object->pszDomainName == NULL) {
9242 0 : Py_RETURN_NONE;
9243 : }
9244 1 : if (object->pszDomainName == NULL) {
9245 0 : py_pszDomainName = Py_None;
9246 0 : Py_INCREF(py_pszDomainName);
9247 : } else {
9248 1 : if (object->pszDomainName == NULL) {
9249 0 : py_pszDomainName = Py_None;
9250 0 : Py_INCREF(py_pszDomainName);
9251 : } else {
9252 1 : py_pszDomainName = PyUnicode_Decode(object->pszDomainName, strlen(object->pszDomainName), "utf-8", "ignore");
9253 : }
9254 : }
9255 1 : return py_pszDomainName;
9256 : }
9257 :
9258 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainName(PyObject *py_obj, PyObject *value, void *closure)
9259 : {
9260 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9261 0 : if (value == NULL) {
9262 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDomainName");
9263 0 : return -1;
9264 : }
9265 0 : if (value == Py_None) {
9266 0 : object->pszDomainName = NULL;
9267 : } else {
9268 0 : object->pszDomainName = NULL;
9269 : {
9270 0 : const char *test_str;
9271 0 : const char *talloc_str;
9272 0 : PyObject *unicode = NULL;
9273 0 : if (PyUnicode_Check(value)) {
9274 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9275 0 : if (unicode == NULL) {
9276 0 : PyErr_NoMemory();
9277 0 : return -1;
9278 : }
9279 0 : test_str = PyBytes_AS_STRING(unicode);
9280 0 : } else if (PyBytes_Check(value)) {
9281 0 : test_str = PyBytes_AS_STRING(value);
9282 : } else {
9283 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9284 0 : return -1;
9285 : }
9286 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9287 0 : if (unicode != NULL) {
9288 0 : Py_DECREF(unicode);
9289 : }
9290 0 : if (talloc_str == NULL) {
9291 0 : PyErr_NoMemory();
9292 0 : return -1;
9293 : }
9294 0 : object->pszDomainName = talloc_str;
9295 : }
9296 : }
9297 0 : return 0;
9298 : }
9299 :
9300 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestName(PyObject *obj, void *closure)
9301 : {
9302 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9303 0 : PyObject *py_pszForestName;
9304 1 : if (object->pszForestName == NULL) {
9305 0 : Py_RETURN_NONE;
9306 : }
9307 1 : if (object->pszForestName == NULL) {
9308 0 : py_pszForestName = Py_None;
9309 0 : Py_INCREF(py_pszForestName);
9310 : } else {
9311 1 : if (object->pszForestName == NULL) {
9312 0 : py_pszForestName = Py_None;
9313 0 : Py_INCREF(py_pszForestName);
9314 : } else {
9315 1 : py_pszForestName = PyUnicode_Decode(object->pszForestName, strlen(object->pszForestName), "utf-8", "ignore");
9316 : }
9317 : }
9318 1 : return py_pszForestName;
9319 : }
9320 :
9321 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestName(PyObject *py_obj, PyObject *value, void *closure)
9322 : {
9323 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9324 0 : if (value == NULL) {
9325 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszForestName");
9326 0 : return -1;
9327 : }
9328 0 : if (value == Py_None) {
9329 0 : object->pszForestName = NULL;
9330 : } else {
9331 0 : object->pszForestName = NULL;
9332 : {
9333 0 : const char *test_str;
9334 0 : const char *talloc_str;
9335 0 : PyObject *unicode = NULL;
9336 0 : if (PyUnicode_Check(value)) {
9337 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9338 0 : if (unicode == NULL) {
9339 0 : PyErr_NoMemory();
9340 0 : return -1;
9341 : }
9342 0 : test_str = PyBytes_AS_STRING(unicode);
9343 0 : } else if (PyBytes_Check(value)) {
9344 0 : test_str = PyBytes_AS_STRING(value);
9345 : } else {
9346 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9347 0 : return -1;
9348 : }
9349 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9350 0 : if (unicode != NULL) {
9351 0 : Py_DECREF(unicode);
9352 : }
9353 0 : if (talloc_str == NULL) {
9354 0 : PyErr_NoMemory();
9355 0 : return -1;
9356 : }
9357 0 : object->pszForestName = talloc_str;
9358 : }
9359 : }
9360 0 : return 0;
9361 : }
9362 :
9363 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainDirectoryPartition(PyObject *obj, void *closure)
9364 : {
9365 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9366 0 : PyObject *py_pszDomainDirectoryPartition;
9367 1 : if (object->pszDomainDirectoryPartition == NULL) {
9368 0 : Py_RETURN_NONE;
9369 : }
9370 1 : if (object->pszDomainDirectoryPartition == NULL) {
9371 0 : py_pszDomainDirectoryPartition = Py_None;
9372 0 : Py_INCREF(py_pszDomainDirectoryPartition);
9373 : } else {
9374 1 : if (object->pszDomainDirectoryPartition == NULL) {
9375 0 : py_pszDomainDirectoryPartition = Py_None;
9376 0 : Py_INCREF(py_pszDomainDirectoryPartition);
9377 : } else {
9378 1 : py_pszDomainDirectoryPartition = PyUnicode_Decode(object->pszDomainDirectoryPartition, strlen(object->pszDomainDirectoryPartition), "utf-8", "ignore");
9379 : }
9380 : }
9381 1 : return py_pszDomainDirectoryPartition;
9382 : }
9383 :
9384 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
9385 : {
9386 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9387 0 : if (value == NULL) {
9388 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDomainDirectoryPartition");
9389 0 : return -1;
9390 : }
9391 0 : if (value == Py_None) {
9392 0 : object->pszDomainDirectoryPartition = NULL;
9393 : } else {
9394 0 : object->pszDomainDirectoryPartition = NULL;
9395 : {
9396 0 : const char *test_str;
9397 0 : const char *talloc_str;
9398 0 : PyObject *unicode = NULL;
9399 0 : if (PyUnicode_Check(value)) {
9400 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9401 0 : if (unicode == NULL) {
9402 0 : PyErr_NoMemory();
9403 0 : return -1;
9404 : }
9405 0 : test_str = PyBytes_AS_STRING(unicode);
9406 0 : } else if (PyBytes_Check(value)) {
9407 0 : test_str = PyBytes_AS_STRING(value);
9408 : } else {
9409 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9410 0 : return -1;
9411 : }
9412 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9413 0 : if (unicode != NULL) {
9414 0 : Py_DECREF(unicode);
9415 : }
9416 0 : if (talloc_str == NULL) {
9417 0 : PyErr_NoMemory();
9418 0 : return -1;
9419 : }
9420 0 : object->pszDomainDirectoryPartition = talloc_str;
9421 : }
9422 : }
9423 0 : return 0;
9424 : }
9425 :
9426 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestDirectoryPartition(PyObject *obj, void *closure)
9427 : {
9428 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9429 0 : PyObject *py_pszForestDirectoryPartition;
9430 1 : if (object->pszForestDirectoryPartition == NULL) {
9431 0 : Py_RETURN_NONE;
9432 : }
9433 1 : if (object->pszForestDirectoryPartition == NULL) {
9434 0 : py_pszForestDirectoryPartition = Py_None;
9435 0 : Py_INCREF(py_pszForestDirectoryPartition);
9436 : } else {
9437 1 : if (object->pszForestDirectoryPartition == NULL) {
9438 0 : py_pszForestDirectoryPartition = Py_None;
9439 0 : Py_INCREF(py_pszForestDirectoryPartition);
9440 : } else {
9441 1 : py_pszForestDirectoryPartition = PyUnicode_Decode(object->pszForestDirectoryPartition, strlen(object->pszForestDirectoryPartition), "utf-8", "ignore");
9442 : }
9443 : }
9444 1 : return py_pszForestDirectoryPartition;
9445 : }
9446 :
9447 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestDirectoryPartition(PyObject *py_obj, PyObject *value, void *closure)
9448 : {
9449 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9450 0 : if (value == NULL) {
9451 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszForestDirectoryPartition");
9452 0 : return -1;
9453 : }
9454 0 : if (value == Py_None) {
9455 0 : object->pszForestDirectoryPartition = NULL;
9456 : } else {
9457 0 : object->pszForestDirectoryPartition = NULL;
9458 : {
9459 0 : const char *test_str;
9460 0 : const char *talloc_str;
9461 0 : PyObject *unicode = NULL;
9462 0 : if (PyUnicode_Check(value)) {
9463 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
9464 0 : if (unicode == NULL) {
9465 0 : PyErr_NoMemory();
9466 0 : return -1;
9467 : }
9468 0 : test_str = PyBytes_AS_STRING(unicode);
9469 0 : } else if (PyBytes_Check(value)) {
9470 0 : test_str = PyBytes_AS_STRING(value);
9471 : } else {
9472 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
9473 0 : return -1;
9474 : }
9475 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
9476 0 : if (unicode != NULL) {
9477 0 : Py_DECREF(unicode);
9478 : }
9479 0 : if (talloc_str == NULL) {
9480 0 : PyErr_NoMemory();
9481 0 : return -1;
9482 : }
9483 0 : object->pszForestDirectoryPartition = talloc_str;
9484 : }
9485 : }
9486 0 : return 0;
9487 : }
9488 :
9489 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_pExtensions(PyObject *obj, void *closure)
9490 : {
9491 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9492 0 : PyObject *py_pExtensions;
9493 0 : py_pExtensions = PyList_New(6);
9494 0 : if (py_pExtensions == NULL) {
9495 0 : return NULL;
9496 : }
9497 : {
9498 : int pExtensions_cntr_0;
9499 0 : for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < (6); pExtensions_cntr_0++) {
9500 0 : PyObject *py_pExtensions_0;
9501 0 : py_pExtensions_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, pytalloc_get_mem_ctx(obj), &object->pExtensions[pExtensions_cntr_0]);
9502 0 : PyList_SetItem(py_pExtensions, pExtensions_cntr_0, py_pExtensions_0);
9503 : }
9504 : }
9505 0 : return py_pExtensions;
9506 : }
9507 :
9508 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_pExtensions(PyObject *py_obj, PyObject *value, void *closure)
9509 : {
9510 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9511 0 : if (value == NULL) {
9512 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtensions");
9513 0 : return -1;
9514 : }
9515 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
9516 : {
9517 0 : int pExtensions_cntr_0;
9518 0 : if (ARRAY_SIZE(object->pExtensions) != PyList_GET_SIZE(value)) {
9519 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->pExtensions), PyList_GET_SIZE(value));
9520 0 : return -1;
9521 : }
9522 0 : for (pExtensions_cntr_0 = 0; pExtensions_cntr_0 < PyList_GET_SIZE(value); pExtensions_cntr_0++) {
9523 0 : if (PyList_GET_ITEM(value, pExtensions_cntr_0) == NULL) {
9524 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pExtensions[pExtensions_cntr_0]");
9525 0 : return -1;
9526 : }
9527 0 : PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pExtensions_cntr_0), return -1;);
9528 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pExtensions_cntr_0))) == NULL) {
9529 0 : PyErr_NoMemory();
9530 0 : return -1;
9531 : }
9532 0 : object->pExtensions[pExtensions_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pExtensions_cntr_0));
9533 : }
9534 : }
9535 0 : return 0;
9536 : }
9537 :
9538 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogLevel(PyObject *obj, void *closure)
9539 : {
9540 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9541 0 : PyObject *py_dwLogLevel;
9542 1 : py_dwLogLevel = PyLong_FromUnsignedLongLong((uint32_t)object->dwLogLevel);
9543 1 : return py_dwLogLevel;
9544 : }
9545 :
9546 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogLevel(PyObject *py_obj, PyObject *value, void *closure)
9547 : {
9548 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9549 0 : if (value == NULL) {
9550 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLogLevel");
9551 0 : return -1;
9552 : }
9553 : {
9554 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogLevel));
9555 0 : if (PyLong_Check(value)) {
9556 0 : unsigned long long test_var;
9557 0 : test_var = PyLong_AsUnsignedLongLong(value);
9558 0 : if (PyErr_Occurred() != NULL) {
9559 0 : return -1;
9560 : }
9561 0 : if (test_var > uint_max) {
9562 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9563 : PyLong_Type.tp_name, uint_max, test_var);
9564 0 : return -1;
9565 : }
9566 0 : object->dwLogLevel = test_var;
9567 : } else {
9568 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9569 : PyLong_Type.tp_name);
9570 0 : return -1;
9571 : }
9572 : }
9573 0 : return 0;
9574 : }
9575 :
9576 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDebugLevel(PyObject *obj, void *closure)
9577 : {
9578 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9579 0 : PyObject *py_dwDebugLevel;
9580 1 : py_dwDebugLevel = PyLong_FromUnsignedLongLong((uint32_t)object->dwDebugLevel);
9581 1 : return py_dwDebugLevel;
9582 : }
9583 :
9584 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDebugLevel(PyObject *py_obj, PyObject *value, void *closure)
9585 : {
9586 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9587 0 : if (value == NULL) {
9588 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDebugLevel");
9589 0 : return -1;
9590 : }
9591 : {
9592 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDebugLevel));
9593 0 : if (PyLong_Check(value)) {
9594 0 : unsigned long long test_var;
9595 0 : test_var = PyLong_AsUnsignedLongLong(value);
9596 0 : if (PyErr_Occurred() != NULL) {
9597 0 : return -1;
9598 : }
9599 0 : if (test_var > uint_max) {
9600 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9601 : PyLong_Type.tp_name, uint_max, test_var);
9602 0 : return -1;
9603 : }
9604 0 : object->dwDebugLevel = test_var;
9605 : } else {
9606 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9607 : PyLong_Type.tp_name);
9608 0 : return -1;
9609 : }
9610 : }
9611 0 : return 0;
9612 : }
9613 :
9614 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwForwardTimeout(PyObject *obj, void *closure)
9615 : {
9616 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9617 0 : PyObject *py_dwForwardTimeout;
9618 1 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwForwardTimeout);
9619 1 : return py_dwForwardTimeout;
9620 : }
9621 :
9622 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
9623 : {
9624 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9625 0 : if (value == NULL) {
9626 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwForwardTimeout");
9627 0 : return -1;
9628 : }
9629 : {
9630 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
9631 0 : if (PyLong_Check(value)) {
9632 0 : unsigned long long test_var;
9633 0 : test_var = PyLong_AsUnsignedLongLong(value);
9634 0 : if (PyErr_Occurred() != NULL) {
9635 0 : return -1;
9636 : }
9637 0 : if (test_var > uint_max) {
9638 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9639 : PyLong_Type.tp_name, uint_max, test_var);
9640 0 : return -1;
9641 : }
9642 0 : object->dwForwardTimeout = test_var;
9643 : } else {
9644 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9645 : PyLong_Type.tp_name);
9646 0 : return -1;
9647 : }
9648 : }
9649 0 : return 0;
9650 : }
9651 :
9652 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcProtocol(PyObject *obj, void *closure)
9653 : {
9654 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9655 0 : PyObject *py_dwRpcProtocol;
9656 1 : py_dwRpcProtocol = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcProtocol);
9657 1 : return py_dwRpcProtocol;
9658 : }
9659 :
9660 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcProtocol(PyObject *py_obj, PyObject *value, void *closure)
9661 : {
9662 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9663 0 : if (value == NULL) {
9664 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcProtocol");
9665 0 : return -1;
9666 : }
9667 : {
9668 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcProtocol));
9669 0 : if (PyLong_Check(value)) {
9670 0 : unsigned long long test_var;
9671 0 : test_var = PyLong_AsUnsignedLongLong(value);
9672 0 : if (PyErr_Occurred() != NULL) {
9673 0 : return -1;
9674 : }
9675 0 : if (test_var > uint_max) {
9676 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9677 : PyLong_Type.tp_name, uint_max, test_var);
9678 0 : return -1;
9679 : }
9680 0 : object->dwRpcProtocol = test_var;
9681 : } else {
9682 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9683 : PyLong_Type.tp_name);
9684 0 : return -1;
9685 : }
9686 : }
9687 0 : return 0;
9688 : }
9689 :
9690 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwNameCheckFlag(PyObject *obj, void *closure)
9691 : {
9692 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9693 0 : PyObject *py_dwNameCheckFlag;
9694 1 : py_dwNameCheckFlag = PyLong_FromUnsignedLongLong((uint32_t)object->dwNameCheckFlag);
9695 1 : return py_dwNameCheckFlag;
9696 : }
9697 :
9698 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwNameCheckFlag(PyObject *py_obj, PyObject *value, void *closure)
9699 : {
9700 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9701 0 : if (value == NULL) {
9702 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwNameCheckFlag");
9703 0 : return -1;
9704 : }
9705 : {
9706 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNameCheckFlag));
9707 0 : if (PyLong_Check(value)) {
9708 0 : unsigned long long test_var;
9709 0 : test_var = PyLong_AsUnsignedLongLong(value);
9710 0 : if (PyErr_Occurred() != NULL) {
9711 0 : return -1;
9712 : }
9713 0 : if (test_var > uint_max) {
9714 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9715 : PyLong_Type.tp_name, uint_max, test_var);
9716 0 : return -1;
9717 : }
9718 0 : object->dwNameCheckFlag = test_var;
9719 : } else {
9720 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9721 : PyLong_Type.tp_name);
9722 0 : return -1;
9723 : }
9724 : }
9725 0 : return 0;
9726 : }
9727 :
9728 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_cAddressAnswerLimit(PyObject *obj, void *closure)
9729 : {
9730 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9731 0 : PyObject *py_cAddressAnswerLimit;
9732 1 : py_cAddressAnswerLimit = PyLong_FromUnsignedLongLong((uint32_t)object->cAddressAnswerLimit);
9733 1 : return py_cAddressAnswerLimit;
9734 : }
9735 :
9736 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_cAddressAnswerLimit(PyObject *py_obj, PyObject *value, void *closure)
9737 : {
9738 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9739 0 : if (value == NULL) {
9740 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->cAddressAnswerLimit");
9741 0 : return -1;
9742 : }
9743 : {
9744 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->cAddressAnswerLimit));
9745 0 : if (PyLong_Check(value)) {
9746 0 : unsigned long long test_var;
9747 0 : test_var = PyLong_AsUnsignedLongLong(value);
9748 0 : if (PyErr_Occurred() != NULL) {
9749 0 : return -1;
9750 : }
9751 0 : if (test_var > uint_max) {
9752 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9753 : PyLong_Type.tp_name, uint_max, test_var);
9754 0 : return -1;
9755 : }
9756 0 : object->cAddressAnswerLimit = test_var;
9757 : } else {
9758 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9759 : PyLong_Type.tp_name);
9760 0 : return -1;
9761 : }
9762 : }
9763 0 : return 0;
9764 : }
9765 :
9766 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionRetry(PyObject *obj, void *closure)
9767 : {
9768 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9769 0 : PyObject *py_dwRecursionRetry;
9770 1 : py_dwRecursionRetry = PyLong_FromUnsignedLongLong((uint32_t)object->dwRecursionRetry);
9771 1 : return py_dwRecursionRetry;
9772 : }
9773 :
9774 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionRetry(PyObject *py_obj, PyObject *value, void *closure)
9775 : {
9776 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9777 0 : if (value == NULL) {
9778 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRecursionRetry");
9779 0 : return -1;
9780 : }
9781 : {
9782 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionRetry));
9783 0 : if (PyLong_Check(value)) {
9784 0 : unsigned long long test_var;
9785 0 : test_var = PyLong_AsUnsignedLongLong(value);
9786 0 : if (PyErr_Occurred() != NULL) {
9787 0 : return -1;
9788 : }
9789 0 : if (test_var > uint_max) {
9790 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9791 : PyLong_Type.tp_name, uint_max, test_var);
9792 0 : return -1;
9793 : }
9794 0 : object->dwRecursionRetry = test_var;
9795 : } else {
9796 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9797 : PyLong_Type.tp_name);
9798 0 : return -1;
9799 : }
9800 : }
9801 0 : return 0;
9802 : }
9803 :
9804 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionTimeout(PyObject *obj, void *closure)
9805 : {
9806 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9807 0 : PyObject *py_dwRecursionTimeout;
9808 1 : py_dwRecursionTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwRecursionTimeout);
9809 1 : return py_dwRecursionTimeout;
9810 : }
9811 :
9812 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionTimeout(PyObject *py_obj, PyObject *value, void *closure)
9813 : {
9814 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9815 0 : if (value == NULL) {
9816 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRecursionTimeout");
9817 0 : return -1;
9818 : }
9819 : {
9820 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRecursionTimeout));
9821 0 : if (PyLong_Check(value)) {
9822 0 : unsigned long long test_var;
9823 0 : test_var = PyLong_AsUnsignedLongLong(value);
9824 0 : if (PyErr_Occurred() != NULL) {
9825 0 : return -1;
9826 : }
9827 0 : if (test_var > uint_max) {
9828 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9829 : PyLong_Type.tp_name, uint_max, test_var);
9830 0 : return -1;
9831 : }
9832 0 : object->dwRecursionTimeout = test_var;
9833 : } else {
9834 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9835 : PyLong_Type.tp_name);
9836 0 : return -1;
9837 : }
9838 : }
9839 0 : return 0;
9840 : }
9841 :
9842 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwMaxCacheTtl(PyObject *obj, void *closure)
9843 : {
9844 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9845 0 : PyObject *py_dwMaxCacheTtl;
9846 1 : py_dwMaxCacheTtl = PyLong_FromUnsignedLongLong((uint32_t)object->dwMaxCacheTtl);
9847 1 : return py_dwMaxCacheTtl;
9848 : }
9849 :
9850 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwMaxCacheTtl(PyObject *py_obj, PyObject *value, void *closure)
9851 : {
9852 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9853 0 : if (value == NULL) {
9854 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwMaxCacheTtl");
9855 0 : return -1;
9856 : }
9857 : {
9858 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwMaxCacheTtl));
9859 0 : if (PyLong_Check(value)) {
9860 0 : unsigned long long test_var;
9861 0 : test_var = PyLong_AsUnsignedLongLong(value);
9862 0 : if (PyErr_Occurred() != NULL) {
9863 0 : return -1;
9864 : }
9865 0 : if (test_var > uint_max) {
9866 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9867 : PyLong_Type.tp_name, uint_max, test_var);
9868 0 : return -1;
9869 : }
9870 0 : object->dwMaxCacheTtl = test_var;
9871 : } else {
9872 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9873 : PyLong_Type.tp_name);
9874 0 : return -1;
9875 : }
9876 : }
9877 0 : return 0;
9878 : }
9879 :
9880 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsPollingInterval(PyObject *obj, void *closure)
9881 : {
9882 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9883 0 : PyObject *py_dwDsPollingInterval;
9884 1 : py_dwDsPollingInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsPollingInterval);
9885 1 : return py_dwDsPollingInterval;
9886 : }
9887 :
9888 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsPollingInterval(PyObject *py_obj, PyObject *value, void *closure)
9889 : {
9890 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9891 0 : if (value == NULL) {
9892 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsPollingInterval");
9893 0 : return -1;
9894 : }
9895 : {
9896 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsPollingInterval));
9897 0 : if (PyLong_Check(value)) {
9898 0 : unsigned long long test_var;
9899 0 : test_var = PyLong_AsUnsignedLongLong(value);
9900 0 : if (PyErr_Occurred() != NULL) {
9901 0 : return -1;
9902 : }
9903 0 : if (test_var > uint_max) {
9904 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9905 : PyLong_Type.tp_name, uint_max, test_var);
9906 0 : return -1;
9907 : }
9908 0 : object->dwDsPollingInterval = test_var;
9909 : } else {
9910 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9911 : PyLong_Type.tp_name);
9912 0 : return -1;
9913 : }
9914 : }
9915 0 : return 0;
9916 : }
9917 :
9918 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLocalNetPriorityNetMask(PyObject *obj, void *closure)
9919 : {
9920 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9921 0 : PyObject *py_dwLocalNetPriorityNetMask;
9922 1 : py_dwLocalNetPriorityNetMask = PyLong_FromUnsignedLongLong((uint32_t)object->dwLocalNetPriorityNetMask);
9923 1 : return py_dwLocalNetPriorityNetMask;
9924 : }
9925 :
9926 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLocalNetPriorityNetMask(PyObject *py_obj, PyObject *value, void *closure)
9927 : {
9928 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9929 0 : if (value == NULL) {
9930 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLocalNetPriorityNetMask");
9931 0 : return -1;
9932 : }
9933 : {
9934 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLocalNetPriorityNetMask));
9935 0 : if (PyLong_Check(value)) {
9936 0 : unsigned long long test_var;
9937 0 : test_var = PyLong_AsUnsignedLongLong(value);
9938 0 : if (PyErr_Occurred() != NULL) {
9939 0 : return -1;
9940 : }
9941 0 : if (test_var > uint_max) {
9942 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9943 : PyLong_Type.tp_name, uint_max, test_var);
9944 0 : return -1;
9945 : }
9946 0 : object->dwLocalNetPriorityNetMask = test_var;
9947 : } else {
9948 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9949 : PyLong_Type.tp_name);
9950 0 : return -1;
9951 : }
9952 : }
9953 0 : return 0;
9954 : }
9955 :
9956 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwScavengingInterval(PyObject *obj, void *closure)
9957 : {
9958 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9959 0 : PyObject *py_dwScavengingInterval;
9960 1 : py_dwScavengingInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwScavengingInterval);
9961 1 : return py_dwScavengingInterval;
9962 : }
9963 :
9964 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwScavengingInterval(PyObject *py_obj, PyObject *value, void *closure)
9965 : {
9966 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
9967 0 : if (value == NULL) {
9968 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwScavengingInterval");
9969 0 : return -1;
9970 : }
9971 : {
9972 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwScavengingInterval));
9973 0 : if (PyLong_Check(value)) {
9974 0 : unsigned long long test_var;
9975 0 : test_var = PyLong_AsUnsignedLongLong(value);
9976 0 : if (PyErr_Occurred() != NULL) {
9977 0 : return -1;
9978 : }
9979 0 : if (test_var > uint_max) {
9980 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
9981 : PyLong_Type.tp_name, uint_max, test_var);
9982 0 : return -1;
9983 : }
9984 0 : object->dwScavengingInterval = test_var;
9985 : } else {
9986 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
9987 : PyLong_Type.tp_name);
9988 0 : return -1;
9989 : }
9990 : }
9991 0 : return 0;
9992 : }
9993 :
9994 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultRefreshInterval(PyObject *obj, void *closure)
9995 : {
9996 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
9997 0 : PyObject *py_dwDefaultRefreshInterval;
9998 1 : py_dwDefaultRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDefaultRefreshInterval);
9999 1 : return py_dwDefaultRefreshInterval;
10000 : }
10001 :
10002 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
10003 : {
10004 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10005 0 : if (value == NULL) {
10006 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDefaultRefreshInterval");
10007 0 : return -1;
10008 : }
10009 : {
10010 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultRefreshInterval));
10011 0 : if (PyLong_Check(value)) {
10012 0 : unsigned long long test_var;
10013 0 : test_var = PyLong_AsUnsignedLongLong(value);
10014 0 : if (PyErr_Occurred() != NULL) {
10015 0 : return -1;
10016 : }
10017 0 : if (test_var > uint_max) {
10018 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10019 : PyLong_Type.tp_name, uint_max, test_var);
10020 0 : return -1;
10021 : }
10022 0 : object->dwDefaultRefreshInterval = test_var;
10023 : } else {
10024 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10025 : PyLong_Type.tp_name);
10026 0 : return -1;
10027 : }
10028 : }
10029 0 : return 0;
10030 : }
10031 :
10032 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultNoRefreshInterval(PyObject *obj, void *closure)
10033 : {
10034 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10035 0 : PyObject *py_dwDefaultNoRefreshInterval;
10036 1 : py_dwDefaultNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwDefaultNoRefreshInterval);
10037 1 : return py_dwDefaultNoRefreshInterval;
10038 : }
10039 :
10040 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
10041 : {
10042 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10043 0 : if (value == NULL) {
10044 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDefaultNoRefreshInterval");
10045 0 : return -1;
10046 : }
10047 : {
10048 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDefaultNoRefreshInterval));
10049 0 : if (PyLong_Check(value)) {
10050 0 : unsigned long long test_var;
10051 0 : test_var = PyLong_AsUnsignedLongLong(value);
10052 0 : if (PyErr_Occurred() != NULL) {
10053 0 : return -1;
10054 : }
10055 0 : if (test_var > uint_max) {
10056 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10057 : PyLong_Type.tp_name, uint_max, test_var);
10058 0 : return -1;
10059 : }
10060 0 : object->dwDefaultNoRefreshInterval = test_var;
10061 : } else {
10062 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10063 : PyLong_Type.tp_name);
10064 0 : return -1;
10065 : }
10066 : }
10067 0 : return 0;
10068 : }
10069 :
10070 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLastScavengeTime(PyObject *obj, void *closure)
10071 : {
10072 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10073 0 : PyObject *py_dwLastScavengeTime;
10074 1 : py_dwLastScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)object->dwLastScavengeTime);
10075 1 : return py_dwLastScavengeTime;
10076 : }
10077 :
10078 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLastScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
10079 : {
10080 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10081 0 : if (value == NULL) {
10082 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLastScavengeTime");
10083 0 : return -1;
10084 : }
10085 : {
10086 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastScavengeTime));
10087 0 : if (PyLong_Check(value)) {
10088 0 : unsigned long long test_var;
10089 0 : test_var = PyLong_AsUnsignedLongLong(value);
10090 0 : if (PyErr_Occurred() != NULL) {
10091 0 : return -1;
10092 : }
10093 0 : if (test_var > uint_max) {
10094 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10095 : PyLong_Type.tp_name, uint_max, test_var);
10096 0 : return -1;
10097 : }
10098 0 : object->dwLastScavengeTime = test_var;
10099 : } else {
10100 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10101 : PyLong_Type.tp_name);
10102 0 : return -1;
10103 : }
10104 : }
10105 0 : return 0;
10106 : }
10107 :
10108 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwEventLogLevel(PyObject *obj, void *closure)
10109 : {
10110 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10111 0 : PyObject *py_dwEventLogLevel;
10112 1 : py_dwEventLogLevel = PyLong_FromUnsignedLongLong((uint32_t)object->dwEventLogLevel);
10113 1 : return py_dwEventLogLevel;
10114 : }
10115 :
10116 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwEventLogLevel(PyObject *py_obj, PyObject *value, void *closure)
10117 : {
10118 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10119 0 : if (value == NULL) {
10120 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwEventLogLevel");
10121 0 : return -1;
10122 : }
10123 : {
10124 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwEventLogLevel));
10125 0 : if (PyLong_Check(value)) {
10126 0 : unsigned long long test_var;
10127 0 : test_var = PyLong_AsUnsignedLongLong(value);
10128 0 : if (PyErr_Occurred() != NULL) {
10129 0 : return -1;
10130 : }
10131 0 : if (test_var > uint_max) {
10132 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10133 : PyLong_Type.tp_name, uint_max, test_var);
10134 0 : return -1;
10135 : }
10136 0 : object->dwEventLogLevel = test_var;
10137 : } else {
10138 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10139 : PyLong_Type.tp_name);
10140 0 : return -1;
10141 : }
10142 : }
10143 0 : return 0;
10144 : }
10145 :
10146 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogFileMaxSize(PyObject *obj, void *closure)
10147 : {
10148 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10149 0 : PyObject *py_dwLogFileMaxSize;
10150 1 : py_dwLogFileMaxSize = PyLong_FromUnsignedLongLong((uint32_t)object->dwLogFileMaxSize);
10151 1 : return py_dwLogFileMaxSize;
10152 : }
10153 :
10154 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogFileMaxSize(PyObject *py_obj, PyObject *value, void *closure)
10155 : {
10156 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10157 0 : if (value == NULL) {
10158 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLogFileMaxSize");
10159 0 : return -1;
10160 : }
10161 : {
10162 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLogFileMaxSize));
10163 0 : if (PyLong_Check(value)) {
10164 0 : unsigned long long test_var;
10165 0 : test_var = PyLong_AsUnsignedLongLong(value);
10166 0 : if (PyErr_Occurred() != NULL) {
10167 0 : return -1;
10168 : }
10169 0 : if (test_var > uint_max) {
10170 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10171 : PyLong_Type.tp_name, uint_max, test_var);
10172 0 : return -1;
10173 : }
10174 0 : object->dwLogFileMaxSize = test_var;
10175 : } else {
10176 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10177 : PyLong_Type.tp_name);
10178 0 : return -1;
10179 : }
10180 : }
10181 0 : return 0;
10182 : }
10183 :
10184 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsForestVersion(PyObject *obj, void *closure)
10185 : {
10186 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10187 0 : PyObject *py_dwDsForestVersion;
10188 1 : py_dwDsForestVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsForestVersion);
10189 1 : return py_dwDsForestVersion;
10190 : }
10191 :
10192 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsForestVersion(PyObject *py_obj, PyObject *value, void *closure)
10193 : {
10194 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10195 0 : if (value == NULL) {
10196 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsForestVersion");
10197 0 : return -1;
10198 : }
10199 : {
10200 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsForestVersion));
10201 0 : if (PyLong_Check(value)) {
10202 0 : unsigned long long test_var;
10203 0 : test_var = PyLong_AsUnsignedLongLong(value);
10204 0 : if (PyErr_Occurred() != NULL) {
10205 0 : return -1;
10206 : }
10207 0 : if (test_var > uint_max) {
10208 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10209 : PyLong_Type.tp_name, uint_max, test_var);
10210 0 : return -1;
10211 : }
10212 0 : object->dwDsForestVersion = test_var;
10213 : } else {
10214 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10215 : PyLong_Type.tp_name);
10216 0 : return -1;
10217 : }
10218 : }
10219 0 : return 0;
10220 : }
10221 :
10222 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDomainVersion(PyObject *obj, void *closure)
10223 : {
10224 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10225 0 : PyObject *py_dwDsDomainVersion;
10226 1 : py_dwDsDomainVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsDomainVersion);
10227 1 : return py_dwDsDomainVersion;
10228 : }
10229 :
10230 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDomainVersion(PyObject *py_obj, PyObject *value, void *closure)
10231 : {
10232 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10233 0 : if (value == NULL) {
10234 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsDomainVersion");
10235 0 : return -1;
10236 : }
10237 : {
10238 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsDomainVersion));
10239 0 : if (PyLong_Check(value)) {
10240 0 : unsigned long long test_var;
10241 0 : test_var = PyLong_AsUnsignedLongLong(value);
10242 0 : if (PyErr_Occurred() != NULL) {
10243 0 : return -1;
10244 : }
10245 0 : if (test_var > uint_max) {
10246 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10247 : PyLong_Type.tp_name, uint_max, test_var);
10248 0 : return -1;
10249 : }
10250 0 : object->dwDsDomainVersion = test_var;
10251 : } else {
10252 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10253 : PyLong_Type.tp_name);
10254 0 : return -1;
10255 : }
10256 : }
10257 0 : return 0;
10258 : }
10259 :
10260 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDsaVersion(PyObject *obj, void *closure)
10261 : {
10262 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10263 0 : PyObject *py_dwDsDsaVersion;
10264 1 : py_dwDsDsaVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwDsDsaVersion);
10265 1 : return py_dwDsDsaVersion;
10266 : }
10267 :
10268 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDsaVersion(PyObject *py_obj, PyObject *value, void *closure)
10269 : {
10270 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10271 0 : if (value == NULL) {
10272 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDsDsaVersion");
10273 0 : return -1;
10274 : }
10275 : {
10276 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDsDsaVersion));
10277 0 : if (PyLong_Check(value)) {
10278 0 : unsigned long long test_var;
10279 0 : test_var = PyLong_AsUnsignedLongLong(value);
10280 0 : if (PyErr_Occurred() != NULL) {
10281 0 : return -1;
10282 : }
10283 0 : if (test_var > uint_max) {
10284 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10285 : PyLong_Type.tp_name, uint_max, test_var);
10286 0 : return -1;
10287 : }
10288 0 : object->dwDsDsaVersion = test_var;
10289 : } else {
10290 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10291 : PyLong_Type.tp_name);
10292 0 : return -1;
10293 : }
10294 : }
10295 0 : return 0;
10296 : }
10297 :
10298 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReadOnlyDC(PyObject *obj, void *closure)
10299 : {
10300 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10301 0 : PyObject *py_fReadOnlyDC;
10302 1 : py_fReadOnlyDC = PyLong_FromLong((uint16_t)object->fReadOnlyDC);
10303 1 : return py_fReadOnlyDC;
10304 : }
10305 :
10306 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReadOnlyDC(PyObject *py_obj, PyObject *value, void *closure)
10307 : {
10308 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10309 0 : if (value == NULL) {
10310 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReadOnlyDC");
10311 0 : return -1;
10312 : }
10313 : {
10314 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReadOnlyDC));
10315 0 : if (PyLong_Check(value)) {
10316 0 : unsigned long long test_var;
10317 0 : test_var = PyLong_AsUnsignedLongLong(value);
10318 0 : if (PyErr_Occurred() != NULL) {
10319 0 : return -1;
10320 : }
10321 0 : if (test_var > uint_max) {
10322 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10323 : PyLong_Type.tp_name, uint_max, test_var);
10324 0 : return -1;
10325 : }
10326 0 : object->fReadOnlyDC = test_var;
10327 : } else {
10328 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10329 : PyLong_Type.tp_name);
10330 0 : return -1;
10331 : }
10332 : }
10333 0 : return 0;
10334 : }
10335 :
10336 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserveArray(PyObject *obj, void *closure)
10337 : {
10338 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10339 0 : PyObject *py_dwReserveArray;
10340 0 : py_dwReserveArray = PyList_New(3);
10341 0 : if (py_dwReserveArray == NULL) {
10342 0 : return NULL;
10343 : }
10344 : {
10345 : int dwReserveArray_cntr_0;
10346 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < (3); dwReserveArray_cntr_0++) {
10347 0 : PyObject *py_dwReserveArray_0;
10348 0 : py_dwReserveArray_0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserveArray[dwReserveArray_cntr_0]);
10349 0 : PyList_SetItem(py_dwReserveArray, dwReserveArray_cntr_0, py_dwReserveArray_0);
10350 : }
10351 : }
10352 0 : return py_dwReserveArray;
10353 : }
10354 :
10355 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserveArray(PyObject *py_obj, PyObject *value, void *closure)
10356 : {
10357 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10358 0 : if (value == NULL) {
10359 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserveArray");
10360 0 : return -1;
10361 : }
10362 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
10363 : {
10364 0 : int dwReserveArray_cntr_0;
10365 0 : if (ARRAY_SIZE(object->dwReserveArray) != PyList_GET_SIZE(value)) {
10366 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->dwReserveArray), PyList_GET_SIZE(value));
10367 0 : return -1;
10368 : }
10369 0 : for (dwReserveArray_cntr_0 = 0; dwReserveArray_cntr_0 < PyList_GET_SIZE(value); dwReserveArray_cntr_0++) {
10370 0 : if (PyList_GET_ITEM(value, dwReserveArray_cntr_0) == NULL) {
10371 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserveArray[dwReserveArray_cntr_0]");
10372 0 : return -1;
10373 : }
10374 : {
10375 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserveArray[dwReserveArray_cntr_0]));
10376 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserveArray_cntr_0))) {
10377 0 : unsigned long long test_var;
10378 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserveArray_cntr_0));
10379 0 : if (PyErr_Occurred() != NULL) {
10380 0 : return -1;
10381 : }
10382 0 : if (test_var > uint_max) {
10383 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10384 : PyLong_Type.tp_name, uint_max, test_var);
10385 0 : return -1;
10386 : }
10387 0 : object->dwReserveArray[dwReserveArray_cntr_0] = test_var;
10388 : } else {
10389 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10390 : PyLong_Type.tp_name);
10391 0 : return -1;
10392 : }
10393 : }
10394 : }
10395 : }
10396 0 : return 0;
10397 : }
10398 :
10399 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoReverseZones(PyObject *obj, void *closure)
10400 : {
10401 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10402 0 : PyObject *py_fAutoReverseZones;
10403 1 : py_fAutoReverseZones = PyLong_FromLong((uint16_t)object->fAutoReverseZones);
10404 1 : return py_fAutoReverseZones;
10405 : }
10406 :
10407 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoReverseZones(PyObject *py_obj, PyObject *value, void *closure)
10408 : {
10409 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10410 0 : if (value == NULL) {
10411 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoReverseZones");
10412 0 : return -1;
10413 : }
10414 : {
10415 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoReverseZones));
10416 0 : if (PyLong_Check(value)) {
10417 0 : unsigned long long test_var;
10418 0 : test_var = PyLong_AsUnsignedLongLong(value);
10419 0 : if (PyErr_Occurred() != NULL) {
10420 0 : return -1;
10421 : }
10422 0 : if (test_var > uint_max) {
10423 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10424 : PyLong_Type.tp_name, uint_max, test_var);
10425 0 : return -1;
10426 : }
10427 0 : object->fAutoReverseZones = test_var;
10428 : } else {
10429 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10430 : PyLong_Type.tp_name);
10431 0 : return -1;
10432 : }
10433 : }
10434 0 : return 0;
10435 : }
10436 :
10437 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoCacheUpdate(PyObject *obj, void *closure)
10438 : {
10439 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10440 0 : PyObject *py_fAutoCacheUpdate;
10441 1 : py_fAutoCacheUpdate = PyLong_FromLong((uint16_t)object->fAutoCacheUpdate);
10442 1 : return py_fAutoCacheUpdate;
10443 : }
10444 :
10445 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoCacheUpdate(PyObject *py_obj, PyObject *value, void *closure)
10446 : {
10447 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10448 0 : if (value == NULL) {
10449 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoCacheUpdate");
10450 0 : return -1;
10451 : }
10452 : {
10453 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCacheUpdate));
10454 0 : if (PyLong_Check(value)) {
10455 0 : unsigned long long test_var;
10456 0 : test_var = PyLong_AsUnsignedLongLong(value);
10457 0 : if (PyErr_Occurred() != NULL) {
10458 0 : return -1;
10459 : }
10460 0 : if (test_var > uint_max) {
10461 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10462 : PyLong_Type.tp_name, uint_max, test_var);
10463 0 : return -1;
10464 : }
10465 0 : object->fAutoCacheUpdate = test_var;
10466 : } else {
10467 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10468 : PyLong_Type.tp_name);
10469 0 : return -1;
10470 : }
10471 : }
10472 0 : return 0;
10473 : }
10474 :
10475 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
10476 : {
10477 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10478 0 : PyObject *py_fRecurseAfterForwarding;
10479 1 : py_fRecurseAfterForwarding = PyLong_FromLong((uint16_t)object->fRecurseAfterForwarding);
10480 1 : return py_fRecurseAfterForwarding;
10481 : }
10482 :
10483 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
10484 : {
10485 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10486 0 : if (value == NULL) {
10487 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRecurseAfterForwarding");
10488 0 : return -1;
10489 : }
10490 : {
10491 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
10492 0 : if (PyLong_Check(value)) {
10493 0 : unsigned long long test_var;
10494 0 : test_var = PyLong_AsUnsignedLongLong(value);
10495 0 : if (PyErr_Occurred() != NULL) {
10496 0 : return -1;
10497 : }
10498 0 : if (test_var > uint_max) {
10499 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10500 : PyLong_Type.tp_name, uint_max, test_var);
10501 0 : return -1;
10502 : }
10503 0 : object->fRecurseAfterForwarding = test_var;
10504 : } else {
10505 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10506 : PyLong_Type.tp_name);
10507 0 : return -1;
10508 : }
10509 : }
10510 0 : return 0;
10511 : }
10512 :
10513 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fForwardDelegations(PyObject *obj, void *closure)
10514 : {
10515 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10516 0 : PyObject *py_fForwardDelegations;
10517 1 : py_fForwardDelegations = PyLong_FromLong((uint16_t)object->fForwardDelegations);
10518 1 : return py_fForwardDelegations;
10519 : }
10520 :
10521 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fForwardDelegations(PyObject *py_obj, PyObject *value, void *closure)
10522 : {
10523 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10524 0 : if (value == NULL) {
10525 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fForwardDelegations");
10526 0 : return -1;
10527 : }
10528 : {
10529 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwardDelegations));
10530 0 : if (PyLong_Check(value)) {
10531 0 : unsigned long long test_var;
10532 0 : test_var = PyLong_AsUnsignedLongLong(value);
10533 0 : if (PyErr_Occurred() != NULL) {
10534 0 : return -1;
10535 : }
10536 0 : if (test_var > uint_max) {
10537 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10538 : PyLong_Type.tp_name, uint_max, test_var);
10539 0 : return -1;
10540 : }
10541 0 : object->fForwardDelegations = test_var;
10542 : } else {
10543 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10544 : PyLong_Type.tp_name);
10545 0 : return -1;
10546 : }
10547 : }
10548 0 : return 0;
10549 : }
10550 :
10551 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fNoRecursion(PyObject *obj, void *closure)
10552 : {
10553 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10554 0 : PyObject *py_fNoRecursion;
10555 1 : py_fNoRecursion = PyLong_FromLong((uint16_t)object->fNoRecursion);
10556 1 : return py_fNoRecursion;
10557 : }
10558 :
10559 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fNoRecursion(PyObject *py_obj, PyObject *value, void *closure)
10560 : {
10561 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10562 0 : if (value == NULL) {
10563 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNoRecursion");
10564 0 : return -1;
10565 : }
10566 : {
10567 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNoRecursion));
10568 0 : if (PyLong_Check(value)) {
10569 0 : unsigned long long test_var;
10570 0 : test_var = PyLong_AsUnsignedLongLong(value);
10571 0 : if (PyErr_Occurred() != NULL) {
10572 0 : return -1;
10573 : }
10574 0 : if (test_var > uint_max) {
10575 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10576 : PyLong_Type.tp_name, uint_max, test_var);
10577 0 : return -1;
10578 : }
10579 0 : object->fNoRecursion = test_var;
10580 : } else {
10581 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10582 : PyLong_Type.tp_name);
10583 0 : return -1;
10584 : }
10585 : }
10586 0 : return 0;
10587 : }
10588 :
10589 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fSecureResponses(PyObject *obj, void *closure)
10590 : {
10591 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10592 0 : PyObject *py_fSecureResponses;
10593 1 : py_fSecureResponses = PyLong_FromLong((uint16_t)object->fSecureResponses);
10594 1 : return py_fSecureResponses;
10595 : }
10596 :
10597 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fSecureResponses(PyObject *py_obj, PyObject *value, void *closure)
10598 : {
10599 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10600 0 : if (value == NULL) {
10601 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureResponses");
10602 0 : return -1;
10603 : }
10604 : {
10605 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureResponses));
10606 0 : if (PyLong_Check(value)) {
10607 0 : unsigned long long test_var;
10608 0 : test_var = PyLong_AsUnsignedLongLong(value);
10609 0 : if (PyErr_Occurred() != NULL) {
10610 0 : return -1;
10611 : }
10612 0 : if (test_var > uint_max) {
10613 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10614 : PyLong_Type.tp_name, uint_max, test_var);
10615 0 : return -1;
10616 : }
10617 0 : object->fSecureResponses = test_var;
10618 : } else {
10619 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10620 : PyLong_Type.tp_name);
10621 0 : return -1;
10622 : }
10623 : }
10624 0 : return 0;
10625 : }
10626 :
10627 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRoundRobin(PyObject *obj, void *closure)
10628 : {
10629 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10630 0 : PyObject *py_fRoundRobin;
10631 1 : py_fRoundRobin = PyLong_FromLong((uint16_t)object->fRoundRobin);
10632 1 : return py_fRoundRobin;
10633 : }
10634 :
10635 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRoundRobin(PyObject *py_obj, PyObject *value, void *closure)
10636 : {
10637 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10638 0 : if (value == NULL) {
10639 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRoundRobin");
10640 0 : return -1;
10641 : }
10642 : {
10643 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRoundRobin));
10644 0 : if (PyLong_Check(value)) {
10645 0 : unsigned long long test_var;
10646 0 : test_var = PyLong_AsUnsignedLongLong(value);
10647 0 : if (PyErr_Occurred() != NULL) {
10648 0 : return -1;
10649 : }
10650 0 : if (test_var > uint_max) {
10651 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10652 : PyLong_Type.tp_name, uint_max, test_var);
10653 0 : return -1;
10654 : }
10655 0 : object->fRoundRobin = test_var;
10656 : } else {
10657 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10658 : PyLong_Type.tp_name);
10659 0 : return -1;
10660 : }
10661 : }
10662 0 : return 0;
10663 : }
10664 :
10665 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLocalNetPriority(PyObject *obj, void *closure)
10666 : {
10667 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10668 0 : PyObject *py_fLocalNetPriority;
10669 1 : py_fLocalNetPriority = PyLong_FromLong((uint16_t)object->fLocalNetPriority);
10670 1 : return py_fLocalNetPriority;
10671 : }
10672 :
10673 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLocalNetPriority(PyObject *py_obj, PyObject *value, void *closure)
10674 : {
10675 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10676 0 : if (value == NULL) {
10677 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLocalNetPriority");
10678 0 : return -1;
10679 : }
10680 : {
10681 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLocalNetPriority));
10682 0 : if (PyLong_Check(value)) {
10683 0 : unsigned long long test_var;
10684 0 : test_var = PyLong_AsUnsignedLongLong(value);
10685 0 : if (PyErr_Occurred() != NULL) {
10686 0 : return -1;
10687 : }
10688 0 : if (test_var > uint_max) {
10689 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10690 : PyLong_Type.tp_name, uint_max, test_var);
10691 0 : return -1;
10692 : }
10693 0 : object->fLocalNetPriority = test_var;
10694 : } else {
10695 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10696 : PyLong_Type.tp_name);
10697 0 : return -1;
10698 : }
10699 : }
10700 0 : return 0;
10701 : }
10702 :
10703 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBindSecondaries(PyObject *obj, void *closure)
10704 : {
10705 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10706 0 : PyObject *py_fBindSecondaries;
10707 1 : py_fBindSecondaries = PyLong_FromLong((uint16_t)object->fBindSecondaries);
10708 1 : return py_fBindSecondaries;
10709 : }
10710 :
10711 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBindSecondaries(PyObject *py_obj, PyObject *value, void *closure)
10712 : {
10713 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10714 0 : if (value == NULL) {
10715 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fBindSecondaries");
10716 0 : return -1;
10717 : }
10718 : {
10719 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBindSecondaries));
10720 0 : if (PyLong_Check(value)) {
10721 0 : unsigned long long test_var;
10722 0 : test_var = PyLong_AsUnsignedLongLong(value);
10723 0 : if (PyErr_Occurred() != NULL) {
10724 0 : return -1;
10725 : }
10726 0 : if (test_var > uint_max) {
10727 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10728 : PyLong_Type.tp_name, uint_max, test_var);
10729 0 : return -1;
10730 : }
10731 0 : object->fBindSecondaries = test_var;
10732 : } else {
10733 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10734 : PyLong_Type.tp_name);
10735 0 : return -1;
10736 : }
10737 : }
10738 0 : return 0;
10739 : }
10740 :
10741 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fWriteAuthorityNs(PyObject *obj, void *closure)
10742 : {
10743 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10744 0 : PyObject *py_fWriteAuthorityNs;
10745 1 : py_fWriteAuthorityNs = PyLong_FromLong((uint16_t)object->fWriteAuthorityNs);
10746 1 : return py_fWriteAuthorityNs;
10747 : }
10748 :
10749 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fWriteAuthorityNs(PyObject *py_obj, PyObject *value, void *closure)
10750 : {
10751 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10752 0 : if (value == NULL) {
10753 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fWriteAuthorityNs");
10754 0 : return -1;
10755 : }
10756 : {
10757 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fWriteAuthorityNs));
10758 0 : if (PyLong_Check(value)) {
10759 0 : unsigned long long test_var;
10760 0 : test_var = PyLong_AsUnsignedLongLong(value);
10761 0 : if (PyErr_Occurred() != NULL) {
10762 0 : return -1;
10763 : }
10764 0 : if (test_var > uint_max) {
10765 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10766 : PyLong_Type.tp_name, uint_max, test_var);
10767 0 : return -1;
10768 : }
10769 0 : object->fWriteAuthorityNs = test_var;
10770 : } else {
10771 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10772 : PyLong_Type.tp_name);
10773 0 : return -1;
10774 : }
10775 : }
10776 0 : return 0;
10777 : }
10778 :
10779 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fStrictFileParsing(PyObject *obj, void *closure)
10780 : {
10781 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10782 0 : PyObject *py_fStrictFileParsing;
10783 1 : py_fStrictFileParsing = PyLong_FromLong((uint16_t)object->fStrictFileParsing);
10784 1 : return py_fStrictFileParsing;
10785 : }
10786 :
10787 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fStrictFileParsing(PyObject *py_obj, PyObject *value, void *closure)
10788 : {
10789 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10790 0 : if (value == NULL) {
10791 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fStrictFileParsing");
10792 0 : return -1;
10793 : }
10794 : {
10795 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fStrictFileParsing));
10796 0 : if (PyLong_Check(value)) {
10797 0 : unsigned long long test_var;
10798 0 : test_var = PyLong_AsUnsignedLongLong(value);
10799 0 : if (PyErr_Occurred() != NULL) {
10800 0 : return -1;
10801 : }
10802 0 : if (test_var > uint_max) {
10803 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10804 : PyLong_Type.tp_name, uint_max, test_var);
10805 0 : return -1;
10806 : }
10807 0 : object->fStrictFileParsing = test_var;
10808 : } else {
10809 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10810 : PyLong_Type.tp_name);
10811 0 : return -1;
10812 : }
10813 : }
10814 0 : return 0;
10815 : }
10816 :
10817 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLooseWildcarding(PyObject *obj, void *closure)
10818 : {
10819 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10820 0 : PyObject *py_fLooseWildcarding;
10821 1 : py_fLooseWildcarding = PyLong_FromLong((uint16_t)object->fLooseWildcarding);
10822 1 : return py_fLooseWildcarding;
10823 : }
10824 :
10825 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLooseWildcarding(PyObject *py_obj, PyObject *value, void *closure)
10826 : {
10827 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10828 0 : if (value == NULL) {
10829 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLooseWildcarding");
10830 0 : return -1;
10831 : }
10832 : {
10833 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLooseWildcarding));
10834 0 : if (PyLong_Check(value)) {
10835 0 : unsigned long long test_var;
10836 0 : test_var = PyLong_AsUnsignedLongLong(value);
10837 0 : if (PyErr_Occurred() != NULL) {
10838 0 : return -1;
10839 : }
10840 0 : if (test_var > uint_max) {
10841 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10842 : PyLong_Type.tp_name, uint_max, test_var);
10843 0 : return -1;
10844 : }
10845 0 : object->fLooseWildcarding = test_var;
10846 : } else {
10847 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10848 : PyLong_Type.tp_name);
10849 0 : return -1;
10850 : }
10851 : }
10852 0 : return 0;
10853 : }
10854 :
10855 1 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDefaultAgingState(PyObject *obj, void *closure)
10856 : {
10857 1 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10858 0 : PyObject *py_fDefaultAgingState;
10859 1 : py_fDefaultAgingState = PyLong_FromLong((uint16_t)object->fDefaultAgingState);
10860 1 : return py_fDefaultAgingState;
10861 : }
10862 :
10863 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDefaultAgingState(PyObject *py_obj, PyObject *value, void *closure)
10864 : {
10865 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10866 0 : if (value == NULL) {
10867 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDefaultAgingState");
10868 0 : return -1;
10869 : }
10870 : {
10871 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDefaultAgingState));
10872 0 : if (PyLong_Check(value)) {
10873 0 : unsigned long long test_var;
10874 0 : test_var = PyLong_AsUnsignedLongLong(value);
10875 0 : if (PyErr_Occurred() != NULL) {
10876 0 : return -1;
10877 : }
10878 0 : if (test_var > uint_max) {
10879 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10880 : PyLong_Type.tp_name, uint_max, test_var);
10881 0 : return -1;
10882 : }
10883 0 : object->fDefaultAgingState = test_var;
10884 : } else {
10885 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10886 : PyLong_Type.tp_name);
10887 0 : return -1;
10888 : }
10889 : }
10890 0 : return 0;
10891 : }
10892 :
10893 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReserveArray(PyObject *obj, void *closure)
10894 : {
10895 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(obj);
10896 0 : PyObject *py_fReserveArray;
10897 0 : py_fReserveArray = PyList_New(15);
10898 0 : if (py_fReserveArray == NULL) {
10899 0 : return NULL;
10900 : }
10901 : {
10902 : int fReserveArray_cntr_0;
10903 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < (15); fReserveArray_cntr_0++) {
10904 0 : PyObject *py_fReserveArray_0;
10905 0 : py_fReserveArray_0 = PyLong_FromLong((uint16_t)object->fReserveArray[fReserveArray_cntr_0]);
10906 0 : PyList_SetItem(py_fReserveArray, fReserveArray_cntr_0, py_fReserveArray_0);
10907 : }
10908 : }
10909 0 : return py_fReserveArray;
10910 : }
10911 :
10912 0 : static int py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReserveArray(PyObject *py_obj, PyObject *value, void *closure)
10913 : {
10914 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
10915 0 : if (value == NULL) {
10916 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReserveArray");
10917 0 : return -1;
10918 : }
10919 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
10920 : {
10921 0 : int fReserveArray_cntr_0;
10922 0 : if (ARRAY_SIZE(object->fReserveArray) != PyList_GET_SIZE(value)) {
10923 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->fReserveArray), PyList_GET_SIZE(value));
10924 0 : return -1;
10925 : }
10926 0 : for (fReserveArray_cntr_0 = 0; fReserveArray_cntr_0 < PyList_GET_SIZE(value); fReserveArray_cntr_0++) {
10927 0 : if (PyList_GET_ITEM(value, fReserveArray_cntr_0) == NULL) {
10928 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReserveArray[fReserveArray_cntr_0]");
10929 0 : return -1;
10930 : }
10931 : {
10932 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReserveArray[fReserveArray_cntr_0]));
10933 0 : if (PyLong_Check(PyList_GET_ITEM(value, fReserveArray_cntr_0))) {
10934 0 : unsigned long long test_var;
10935 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, fReserveArray_cntr_0));
10936 0 : if (PyErr_Occurred() != NULL) {
10937 0 : return -1;
10938 : }
10939 0 : if (test_var > uint_max) {
10940 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
10941 : PyLong_Type.tp_name, uint_max, test_var);
10942 0 : return -1;
10943 : }
10944 0 : object->fReserveArray[fReserveArray_cntr_0] = test_var;
10945 : } else {
10946 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
10947 : PyLong_Type.tp_name);
10948 0 : return -1;
10949 : }
10950 : }
10951 : }
10952 : }
10953 0 : return 0;
10954 : }
10955 :
10956 : static PyGetSetDef py_DNS_RPC_SERVER_INFO_LONGHORN_getsetters[] = {
10957 : {
10958 : .name = discard_const_p(char, "dwRpcStructureVersion"),
10959 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcStructureVersion,
10960 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcStructureVersion,
10961 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10962 : },
10963 : {
10964 : .name = discard_const_p(char, "dwReserved0"),
10965 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserved0,
10966 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserved0,
10967 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10968 : },
10969 : {
10970 : .name = discard_const_p(char, "dwVersion"),
10971 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwVersion,
10972 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwVersion,
10973 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
10974 : },
10975 : {
10976 : .name = discard_const_p(char, "fBootMethod"),
10977 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBootMethod,
10978 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBootMethod,
10979 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_BOOT_METHOD")
10980 : },
10981 : {
10982 : .name = discard_const_p(char, "fAdminConfigured"),
10983 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAdminConfigured,
10984 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAdminConfigured,
10985 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
10986 : },
10987 : {
10988 : .name = discard_const_p(char, "fAllowUpdate"),
10989 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAllowUpdate,
10990 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAllowUpdate,
10991 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
10992 : },
10993 : {
10994 : .name = discard_const_p(char, "fDsAvailable"),
10995 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDsAvailable,
10996 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDsAvailable,
10997 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
10998 : },
10999 : {
11000 : .name = discard_const_p(char, "pszServerName"),
11001 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszServerName,
11002 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszServerName,
11003 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11004 : },
11005 : {
11006 : .name = discard_const_p(char, "pszDsContainer"),
11007 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDsContainer,
11008 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDsContainer,
11009 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
11010 : },
11011 : {
11012 : .name = discard_const_p(char, "aipServerAddrs"),
11013 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipServerAddrs,
11014 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipServerAddrs,
11015 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
11016 : },
11017 : {
11018 : .name = discard_const_p(char, "aipListenAddrs"),
11019 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipListenAddrs,
11020 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipListenAddrs,
11021 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
11022 : },
11023 : {
11024 : .name = discard_const_p(char, "aipForwarders"),
11025 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipForwarders,
11026 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipForwarders,
11027 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
11028 : },
11029 : {
11030 : .name = discard_const_p(char, "aipLogFilter"),
11031 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_aipLogFilter,
11032 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_aipLogFilter,
11033 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
11034 : },
11035 : {
11036 : .name = discard_const_p(char, "pwszLogFilePath"),
11037 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pwszLogFilePath,
11038 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pwszLogFilePath,
11039 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
11040 : },
11041 : {
11042 : .name = discard_const_p(char, "pszDomainName"),
11043 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainName,
11044 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainName,
11045 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11046 : },
11047 : {
11048 : .name = discard_const_p(char, "pszForestName"),
11049 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestName,
11050 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestName,
11051 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11052 : },
11053 : {
11054 : .name = discard_const_p(char, "pszDomainDirectoryPartition"),
11055 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszDomainDirectoryPartition,
11056 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszDomainDirectoryPartition,
11057 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11058 : },
11059 : {
11060 : .name = discard_const_p(char, "pszForestDirectoryPartition"),
11061 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pszForestDirectoryPartition,
11062 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pszForestDirectoryPartition,
11063 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11064 : },
11065 : {
11066 : .name = discard_const_p(char, "pExtensions"),
11067 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_pExtensions,
11068 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_pExtensions,
11069 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_EXTENSION")
11070 : },
11071 : {
11072 : .name = discard_const_p(char, "dwLogLevel"),
11073 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogLevel,
11074 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogLevel,
11075 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11076 : },
11077 : {
11078 : .name = discard_const_p(char, "dwDebugLevel"),
11079 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDebugLevel,
11080 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDebugLevel,
11081 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11082 : },
11083 : {
11084 : .name = discard_const_p(char, "dwForwardTimeout"),
11085 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwForwardTimeout,
11086 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwForwardTimeout,
11087 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11088 : },
11089 : {
11090 : .name = discard_const_p(char, "dwRpcProtocol"),
11091 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRpcProtocol,
11092 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRpcProtocol,
11093 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11094 : },
11095 : {
11096 : .name = discard_const_p(char, "dwNameCheckFlag"),
11097 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwNameCheckFlag,
11098 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwNameCheckFlag,
11099 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_NAME_CHECK_FLAG")
11100 : },
11101 : {
11102 : .name = discard_const_p(char, "cAddressAnswerLimit"),
11103 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_cAddressAnswerLimit,
11104 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_cAddressAnswerLimit,
11105 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11106 : },
11107 : {
11108 : .name = discard_const_p(char, "dwRecursionRetry"),
11109 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionRetry,
11110 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionRetry,
11111 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11112 : },
11113 : {
11114 : .name = discard_const_p(char, "dwRecursionTimeout"),
11115 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwRecursionTimeout,
11116 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwRecursionTimeout,
11117 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11118 : },
11119 : {
11120 : .name = discard_const_p(char, "dwMaxCacheTtl"),
11121 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwMaxCacheTtl,
11122 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwMaxCacheTtl,
11123 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11124 : },
11125 : {
11126 : .name = discard_const_p(char, "dwDsPollingInterval"),
11127 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsPollingInterval,
11128 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsPollingInterval,
11129 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11130 : },
11131 : {
11132 : .name = discard_const_p(char, "dwLocalNetPriorityNetMask"),
11133 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLocalNetPriorityNetMask,
11134 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLocalNetPriorityNetMask,
11135 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11136 : },
11137 : {
11138 : .name = discard_const_p(char, "dwScavengingInterval"),
11139 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwScavengingInterval,
11140 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwScavengingInterval,
11141 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11142 : },
11143 : {
11144 : .name = discard_const_p(char, "dwDefaultRefreshInterval"),
11145 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultRefreshInterval,
11146 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultRefreshInterval,
11147 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11148 : },
11149 : {
11150 : .name = discard_const_p(char, "dwDefaultNoRefreshInterval"),
11151 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDefaultNoRefreshInterval,
11152 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDefaultNoRefreshInterval,
11153 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11154 : },
11155 : {
11156 : .name = discard_const_p(char, "dwLastScavengeTime"),
11157 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLastScavengeTime,
11158 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLastScavengeTime,
11159 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11160 : },
11161 : {
11162 : .name = discard_const_p(char, "dwEventLogLevel"),
11163 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwEventLogLevel,
11164 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwEventLogLevel,
11165 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11166 : },
11167 : {
11168 : .name = discard_const_p(char, "dwLogFileMaxSize"),
11169 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwLogFileMaxSize,
11170 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwLogFileMaxSize,
11171 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11172 : },
11173 : {
11174 : .name = discard_const_p(char, "dwDsForestVersion"),
11175 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsForestVersion,
11176 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsForestVersion,
11177 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11178 : },
11179 : {
11180 : .name = discard_const_p(char, "dwDsDomainVersion"),
11181 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDomainVersion,
11182 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDomainVersion,
11183 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11184 : },
11185 : {
11186 : .name = discard_const_p(char, "dwDsDsaVersion"),
11187 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwDsDsaVersion,
11188 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwDsDsaVersion,
11189 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11190 : },
11191 : {
11192 : .name = discard_const_p(char, "fReadOnlyDC"),
11193 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReadOnlyDC,
11194 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReadOnlyDC,
11195 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11196 : },
11197 : {
11198 : .name = discard_const_p(char, "dwReserveArray"),
11199 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_dwReserveArray,
11200 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_dwReserveArray,
11201 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
11202 : },
11203 : {
11204 : .name = discard_const_p(char, "fAutoReverseZones"),
11205 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoReverseZones,
11206 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoReverseZones,
11207 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11208 : },
11209 : {
11210 : .name = discard_const_p(char, "fAutoCacheUpdate"),
11211 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fAutoCacheUpdate,
11212 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fAutoCacheUpdate,
11213 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11214 : },
11215 : {
11216 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
11217 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRecurseAfterForwarding,
11218 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRecurseAfterForwarding,
11219 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11220 : },
11221 : {
11222 : .name = discard_const_p(char, "fForwardDelegations"),
11223 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fForwardDelegations,
11224 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fForwardDelegations,
11225 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11226 : },
11227 : {
11228 : .name = discard_const_p(char, "fNoRecursion"),
11229 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fNoRecursion,
11230 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fNoRecursion,
11231 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11232 : },
11233 : {
11234 : .name = discard_const_p(char, "fSecureResponses"),
11235 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fSecureResponses,
11236 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fSecureResponses,
11237 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11238 : },
11239 : {
11240 : .name = discard_const_p(char, "fRoundRobin"),
11241 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fRoundRobin,
11242 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fRoundRobin,
11243 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11244 : },
11245 : {
11246 : .name = discard_const_p(char, "fLocalNetPriority"),
11247 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLocalNetPriority,
11248 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLocalNetPriority,
11249 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11250 : },
11251 : {
11252 : .name = discard_const_p(char, "fBindSecondaries"),
11253 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fBindSecondaries,
11254 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fBindSecondaries,
11255 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11256 : },
11257 : {
11258 : .name = discard_const_p(char, "fWriteAuthorityNs"),
11259 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fWriteAuthorityNs,
11260 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fWriteAuthorityNs,
11261 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11262 : },
11263 : {
11264 : .name = discard_const_p(char, "fStrictFileParsing"),
11265 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fStrictFileParsing,
11266 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fStrictFileParsing,
11267 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11268 : },
11269 : {
11270 : .name = discard_const_p(char, "fLooseWildcarding"),
11271 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fLooseWildcarding,
11272 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fLooseWildcarding,
11273 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11274 : },
11275 : {
11276 : .name = discard_const_p(char, "fDefaultAgingState"),
11277 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fDefaultAgingState,
11278 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fDefaultAgingState,
11279 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11280 : },
11281 : {
11282 : .name = discard_const_p(char, "fReserveArray"),
11283 : .get = py_DNS_RPC_SERVER_INFO_LONGHORN_get_fReserveArray,
11284 : .set = py_DNS_RPC_SERVER_INFO_LONGHORN_set_fReserveArray,
11285 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
11286 : },
11287 : { .name = NULL }
11288 : };
11289 :
11290 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11291 : {
11292 0 : return pytalloc_new(struct DNS_RPC_SERVER_INFO_LONGHORN, type);
11293 : }
11294 :
11295 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
11296 : {
11297 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11298 0 : PyObject *ret = NULL;
11299 0 : DATA_BLOB blob;
11300 0 : enum ndr_err_code err;
11301 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
11302 0 : if (tmp_ctx == NULL) {
11303 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
11304 0 : return NULL;
11305 : }
11306 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_SERVER_INFO_LONGHORN);
11307 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
11308 0 : TALLOC_FREE(tmp_ctx);
11309 0 : PyErr_SetNdrError(err);
11310 0 : return NULL;
11311 : }
11312 :
11313 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
11314 0 : TALLOC_FREE(tmp_ctx);
11315 0 : return ret;
11316 : }
11317 :
11318 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
11319 : {
11320 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11321 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
11322 0 : Py_ssize_t blob_length = 0;
11323 0 : enum ndr_err_code err;
11324 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
11325 0 : PyObject *allow_remaining_obj = NULL;
11326 0 : bool allow_remaining = false;
11327 :
11328 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
11329 : discard_const_p(char *, kwnames),
11330 : &blob.data, &blob_length,
11331 : &allow_remaining_obj)) {
11332 0 : return NULL;
11333 : }
11334 0 : blob.length = blob_length;
11335 :
11336 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
11337 0 : allow_remaining = true;
11338 : }
11339 :
11340 0 : if (allow_remaining) {
11341 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_SERVER_INFO_LONGHORN);
11342 : } else {
11343 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_SERVER_INFO_LONGHORN);
11344 : }
11345 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
11346 0 : PyErr_SetNdrError(err);
11347 0 : return NULL;
11348 : }
11349 :
11350 0 : Py_RETURN_NONE;
11351 : }
11352 :
11353 0 : static PyObject *py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
11354 : {
11355 0 : struct DNS_RPC_SERVER_INFO_LONGHORN *object = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
11356 0 : PyObject *ret;
11357 0 : char *retstr;
11358 :
11359 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_SERVER_INFO_LONGHORN, "DNS_RPC_SERVER_INFO_LONGHORN", object);
11360 0 : ret = PyUnicode_FromString(retstr);
11361 0 : talloc_free(retstr);
11362 :
11363 0 : return ret;
11364 : }
11365 :
11366 : static PyMethodDef py_DNS_RPC_SERVER_INFO_LONGHORN_methods[] = {
11367 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
11368 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
11369 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_SERVER_INFO_LONGHORN_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
11370 : { NULL, NULL, 0, NULL }
11371 : };
11372 :
11373 :
11374 : static PyTypeObject DNS_RPC_SERVER_INFO_LONGHORN_Type = {
11375 : PyVarObject_HEAD_INIT(NULL, 0)
11376 : .tp_name = "dnsserver.DNS_RPC_SERVER_INFO_LONGHORN",
11377 : .tp_getset = py_DNS_RPC_SERVER_INFO_LONGHORN_getsetters,
11378 : .tp_methods = py_DNS_RPC_SERVER_INFO_LONGHORN_methods,
11379 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11380 : .tp_new = py_DNS_RPC_SERVER_INFO_LONGHORN_new,
11381 : };
11382 :
11383 :
11384 0 : static PyObject *py_DNS_RPC_DP_REPLICA_get_pszReplicaDn(PyObject *obj, void *closure)
11385 : {
11386 0 : struct DNS_RPC_DP_REPLICA *object = (struct DNS_RPC_DP_REPLICA *)pytalloc_get_ptr(obj);
11387 0 : PyObject *py_pszReplicaDn;
11388 0 : if (object->pszReplicaDn == NULL) {
11389 0 : Py_RETURN_NONE;
11390 : }
11391 0 : if (object->pszReplicaDn == NULL) {
11392 0 : py_pszReplicaDn = Py_None;
11393 0 : Py_INCREF(py_pszReplicaDn);
11394 : } else {
11395 0 : if (object->pszReplicaDn == NULL) {
11396 0 : py_pszReplicaDn = Py_None;
11397 0 : Py_INCREF(py_pszReplicaDn);
11398 : } else {
11399 0 : py_pszReplicaDn = PyUnicode_Decode(object->pszReplicaDn, strlen(object->pszReplicaDn), "utf-8", "ignore");
11400 : }
11401 : }
11402 0 : return py_pszReplicaDn;
11403 : }
11404 :
11405 0 : static int py_DNS_RPC_DP_REPLICA_set_pszReplicaDn(PyObject *py_obj, PyObject *value, void *closure)
11406 : {
11407 0 : struct DNS_RPC_DP_REPLICA *object = (struct DNS_RPC_DP_REPLICA *)pytalloc_get_ptr(py_obj);
11408 0 : if (value == NULL) {
11409 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszReplicaDn");
11410 0 : return -1;
11411 : }
11412 0 : if (value == Py_None) {
11413 0 : object->pszReplicaDn = NULL;
11414 : } else {
11415 0 : object->pszReplicaDn = NULL;
11416 : {
11417 0 : const char *test_str;
11418 0 : const char *talloc_str;
11419 0 : PyObject *unicode = NULL;
11420 0 : if (PyUnicode_Check(value)) {
11421 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11422 0 : if (unicode == NULL) {
11423 0 : PyErr_NoMemory();
11424 0 : return -1;
11425 : }
11426 0 : test_str = PyBytes_AS_STRING(unicode);
11427 0 : } else if (PyBytes_Check(value)) {
11428 0 : test_str = PyBytes_AS_STRING(value);
11429 : } else {
11430 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11431 0 : return -1;
11432 : }
11433 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11434 0 : if (unicode != NULL) {
11435 0 : Py_DECREF(unicode);
11436 : }
11437 0 : if (talloc_str == NULL) {
11438 0 : PyErr_NoMemory();
11439 0 : return -1;
11440 : }
11441 0 : object->pszReplicaDn = talloc_str;
11442 : }
11443 : }
11444 0 : return 0;
11445 : }
11446 :
11447 : static PyGetSetDef py_DNS_RPC_DP_REPLICA_getsetters[] = {
11448 : {
11449 : .name = discard_const_p(char, "pszReplicaDn"),
11450 : .get = py_DNS_RPC_DP_REPLICA_get_pszReplicaDn,
11451 : .set = py_DNS_RPC_DP_REPLICA_set_pszReplicaDn,
11452 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
11453 : },
11454 : { .name = NULL }
11455 : };
11456 :
11457 0 : static PyObject *py_DNS_RPC_DP_REPLICA_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
11458 : {
11459 0 : return pytalloc_new(struct DNS_RPC_DP_REPLICA, type);
11460 : }
11461 :
11462 :
11463 : static PyTypeObject DNS_RPC_DP_REPLICA_Type = {
11464 : PyVarObject_HEAD_INIT(NULL, 0)
11465 : .tp_name = "dnsserver.DNS_RPC_DP_REPLICA",
11466 : .tp_getset = py_DNS_RPC_DP_REPLICA_getsetters,
11467 : .tp_methods = NULL,
11468 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
11469 : .tp_new = py_DNS_RPC_DP_REPLICA_new,
11470 : };
11471 :
11472 :
11473 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwRpcStructureVersion(PyObject *obj, void *closure)
11474 : {
11475 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11476 0 : PyObject *py_dwRpcStructureVersion;
11477 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
11478 0 : return py_dwRpcStructureVersion;
11479 : }
11480 :
11481 0 : static int py_DNS_RPC_DP_INFO_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
11482 : {
11483 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11484 0 : if (value == NULL) {
11485 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
11486 0 : return -1;
11487 : }
11488 : {
11489 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
11490 0 : if (PyLong_Check(value)) {
11491 0 : unsigned long long test_var;
11492 0 : test_var = PyLong_AsUnsignedLongLong(value);
11493 0 : if (PyErr_Occurred() != NULL) {
11494 0 : return -1;
11495 : }
11496 0 : if (test_var > uint_max) {
11497 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11498 : PyLong_Type.tp_name, uint_max, test_var);
11499 0 : return -1;
11500 : }
11501 0 : object->dwRpcStructureVersion = test_var;
11502 : } else {
11503 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11504 : PyLong_Type.tp_name);
11505 0 : return -1;
11506 : }
11507 : }
11508 0 : return 0;
11509 : }
11510 :
11511 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwReserved0(PyObject *obj, void *closure)
11512 : {
11513 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11514 0 : PyObject *py_dwReserved0;
11515 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
11516 0 : return py_dwReserved0;
11517 : }
11518 :
11519 0 : static int py_DNS_RPC_DP_INFO_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
11520 : {
11521 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11522 0 : if (value == NULL) {
11523 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
11524 0 : return -1;
11525 : }
11526 : {
11527 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
11528 0 : if (PyLong_Check(value)) {
11529 0 : unsigned long long test_var;
11530 0 : test_var = PyLong_AsUnsignedLongLong(value);
11531 0 : if (PyErr_Occurred() != NULL) {
11532 0 : return -1;
11533 : }
11534 0 : if (test_var > uint_max) {
11535 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11536 : PyLong_Type.tp_name, uint_max, test_var);
11537 0 : return -1;
11538 : }
11539 0 : object->dwReserved0 = test_var;
11540 : } else {
11541 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11542 : PyLong_Type.tp_name);
11543 0 : return -1;
11544 : }
11545 : }
11546 0 : return 0;
11547 : }
11548 :
11549 0 : static PyObject *py_DNS_RPC_DP_INFO_get_pszDpFqdn(PyObject *obj, void *closure)
11550 : {
11551 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11552 0 : PyObject *py_pszDpFqdn;
11553 0 : if (object->pszDpFqdn == NULL) {
11554 0 : Py_RETURN_NONE;
11555 : }
11556 0 : if (object->pszDpFqdn == NULL) {
11557 0 : py_pszDpFqdn = Py_None;
11558 0 : Py_INCREF(py_pszDpFqdn);
11559 : } else {
11560 0 : if (object->pszDpFqdn == NULL) {
11561 0 : py_pszDpFqdn = Py_None;
11562 0 : Py_INCREF(py_pszDpFqdn);
11563 : } else {
11564 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
11565 : }
11566 : }
11567 0 : return py_pszDpFqdn;
11568 : }
11569 :
11570 0 : static int py_DNS_RPC_DP_INFO_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
11571 : {
11572 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11573 0 : if (value == NULL) {
11574 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpFqdn");
11575 0 : return -1;
11576 : }
11577 0 : if (value == Py_None) {
11578 0 : object->pszDpFqdn = NULL;
11579 : } else {
11580 0 : object->pszDpFqdn = NULL;
11581 : {
11582 0 : const char *test_str;
11583 0 : const char *talloc_str;
11584 0 : PyObject *unicode = NULL;
11585 0 : if (PyUnicode_Check(value)) {
11586 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11587 0 : if (unicode == NULL) {
11588 0 : PyErr_NoMemory();
11589 0 : return -1;
11590 : }
11591 0 : test_str = PyBytes_AS_STRING(unicode);
11592 0 : } else if (PyBytes_Check(value)) {
11593 0 : test_str = PyBytes_AS_STRING(value);
11594 : } else {
11595 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11596 0 : return -1;
11597 : }
11598 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11599 0 : if (unicode != NULL) {
11600 0 : Py_DECREF(unicode);
11601 : }
11602 0 : if (talloc_str == NULL) {
11603 0 : PyErr_NoMemory();
11604 0 : return -1;
11605 : }
11606 0 : object->pszDpFqdn = talloc_str;
11607 : }
11608 : }
11609 0 : return 0;
11610 : }
11611 :
11612 0 : static PyObject *py_DNS_RPC_DP_INFO_get_pszDpDn(PyObject *obj, void *closure)
11613 : {
11614 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11615 0 : PyObject *py_pszDpDn;
11616 0 : if (object->pszDpDn == NULL) {
11617 0 : Py_RETURN_NONE;
11618 : }
11619 0 : if (object->pszDpDn == NULL) {
11620 0 : py_pszDpDn = Py_None;
11621 0 : Py_INCREF(py_pszDpDn);
11622 : } else {
11623 0 : if (object->pszDpDn == NULL) {
11624 0 : py_pszDpDn = Py_None;
11625 0 : Py_INCREF(py_pszDpDn);
11626 : } else {
11627 0 : py_pszDpDn = PyUnicode_Decode(object->pszDpDn, strlen(object->pszDpDn), "utf-8", "ignore");
11628 : }
11629 : }
11630 0 : return py_pszDpDn;
11631 : }
11632 :
11633 0 : static int py_DNS_RPC_DP_INFO_set_pszDpDn(PyObject *py_obj, PyObject *value, void *closure)
11634 : {
11635 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11636 0 : if (value == NULL) {
11637 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpDn");
11638 0 : return -1;
11639 : }
11640 0 : if (value == Py_None) {
11641 0 : object->pszDpDn = NULL;
11642 : } else {
11643 0 : object->pszDpDn = NULL;
11644 : {
11645 0 : const char *test_str;
11646 0 : const char *talloc_str;
11647 0 : PyObject *unicode = NULL;
11648 0 : if (PyUnicode_Check(value)) {
11649 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11650 0 : if (unicode == NULL) {
11651 0 : PyErr_NoMemory();
11652 0 : return -1;
11653 : }
11654 0 : test_str = PyBytes_AS_STRING(unicode);
11655 0 : } else if (PyBytes_Check(value)) {
11656 0 : test_str = PyBytes_AS_STRING(value);
11657 : } else {
11658 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11659 0 : return -1;
11660 : }
11661 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11662 0 : if (unicode != NULL) {
11663 0 : Py_DECREF(unicode);
11664 : }
11665 0 : if (talloc_str == NULL) {
11666 0 : PyErr_NoMemory();
11667 0 : return -1;
11668 : }
11669 0 : object->pszDpDn = talloc_str;
11670 : }
11671 : }
11672 0 : return 0;
11673 : }
11674 :
11675 0 : static PyObject *py_DNS_RPC_DP_INFO_get_pszCrDn(PyObject *obj, void *closure)
11676 : {
11677 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11678 0 : PyObject *py_pszCrDn;
11679 0 : if (object->pszCrDn == NULL) {
11680 0 : Py_RETURN_NONE;
11681 : }
11682 0 : if (object->pszCrDn == NULL) {
11683 0 : py_pszCrDn = Py_None;
11684 0 : Py_INCREF(py_pszCrDn);
11685 : } else {
11686 0 : if (object->pszCrDn == NULL) {
11687 0 : py_pszCrDn = Py_None;
11688 0 : Py_INCREF(py_pszCrDn);
11689 : } else {
11690 0 : py_pszCrDn = PyUnicode_Decode(object->pszCrDn, strlen(object->pszCrDn), "utf-8", "ignore");
11691 : }
11692 : }
11693 0 : return py_pszCrDn;
11694 : }
11695 :
11696 0 : static int py_DNS_RPC_DP_INFO_set_pszCrDn(PyObject *py_obj, PyObject *value, void *closure)
11697 : {
11698 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11699 0 : if (value == NULL) {
11700 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszCrDn");
11701 0 : return -1;
11702 : }
11703 0 : if (value == Py_None) {
11704 0 : object->pszCrDn = NULL;
11705 : } else {
11706 0 : object->pszCrDn = NULL;
11707 : {
11708 0 : const char *test_str;
11709 0 : const char *talloc_str;
11710 0 : PyObject *unicode = NULL;
11711 0 : if (PyUnicode_Check(value)) {
11712 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
11713 0 : if (unicode == NULL) {
11714 0 : PyErr_NoMemory();
11715 0 : return -1;
11716 : }
11717 0 : test_str = PyBytes_AS_STRING(unicode);
11718 0 : } else if (PyBytes_Check(value)) {
11719 0 : test_str = PyBytes_AS_STRING(value);
11720 : } else {
11721 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
11722 0 : return -1;
11723 : }
11724 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
11725 0 : if (unicode != NULL) {
11726 0 : Py_DECREF(unicode);
11727 : }
11728 0 : if (talloc_str == NULL) {
11729 0 : PyErr_NoMemory();
11730 0 : return -1;
11731 : }
11732 0 : object->pszCrDn = talloc_str;
11733 : }
11734 : }
11735 0 : return 0;
11736 : }
11737 :
11738 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwFlags(PyObject *obj, void *closure)
11739 : {
11740 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11741 0 : PyObject *py_dwFlags;
11742 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwFlags);
11743 0 : return py_dwFlags;
11744 : }
11745 :
11746 0 : static int py_DNS_RPC_DP_INFO_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
11747 : {
11748 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11749 0 : if (value == NULL) {
11750 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFlags");
11751 0 : return -1;
11752 : }
11753 : {
11754 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
11755 0 : if (PyLong_Check(value)) {
11756 0 : unsigned long long test_var;
11757 0 : test_var = PyLong_AsUnsignedLongLong(value);
11758 0 : if (PyErr_Occurred() != NULL) {
11759 0 : return -1;
11760 : }
11761 0 : if (test_var > uint_max) {
11762 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11763 : PyLong_Type.tp_name, uint_max, test_var);
11764 0 : return -1;
11765 : }
11766 0 : object->dwFlags = test_var;
11767 : } else {
11768 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11769 : PyLong_Type.tp_name);
11770 0 : return -1;
11771 : }
11772 : }
11773 0 : return 0;
11774 : }
11775 :
11776 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwZoneCount(PyObject *obj, void *closure)
11777 : {
11778 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11779 0 : PyObject *py_dwZoneCount;
11780 0 : py_dwZoneCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneCount);
11781 0 : return py_dwZoneCount;
11782 : }
11783 :
11784 0 : static int py_DNS_RPC_DP_INFO_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
11785 : {
11786 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11787 0 : if (value == NULL) {
11788 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneCount");
11789 0 : return -1;
11790 : }
11791 : {
11792 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneCount));
11793 0 : if (PyLong_Check(value)) {
11794 0 : unsigned long long test_var;
11795 0 : test_var = PyLong_AsUnsignedLongLong(value);
11796 0 : if (PyErr_Occurred() != NULL) {
11797 0 : return -1;
11798 : }
11799 0 : if (test_var > uint_max) {
11800 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11801 : PyLong_Type.tp_name, uint_max, test_var);
11802 0 : return -1;
11803 : }
11804 0 : object->dwZoneCount = test_var;
11805 : } else {
11806 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11807 : PyLong_Type.tp_name);
11808 0 : return -1;
11809 : }
11810 : }
11811 0 : return 0;
11812 : }
11813 :
11814 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwState(PyObject *obj, void *closure)
11815 : {
11816 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11817 0 : PyObject *py_dwState;
11818 0 : py_dwState = PyLong_FromUnsignedLongLong((uint32_t)object->dwState);
11819 0 : return py_dwState;
11820 : }
11821 :
11822 0 : static int py_DNS_RPC_DP_INFO_set_dwState(PyObject *py_obj, PyObject *value, void *closure)
11823 : {
11824 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11825 0 : if (value == NULL) {
11826 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwState");
11827 0 : return -1;
11828 : }
11829 : {
11830 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwState));
11831 0 : if (PyLong_Check(value)) {
11832 0 : unsigned long long test_var;
11833 0 : test_var = PyLong_AsUnsignedLongLong(value);
11834 0 : if (PyErr_Occurred() != NULL) {
11835 0 : return -1;
11836 : }
11837 0 : if (test_var > uint_max) {
11838 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11839 : PyLong_Type.tp_name, uint_max, test_var);
11840 0 : return -1;
11841 : }
11842 0 : object->dwState = test_var;
11843 : } else {
11844 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11845 : PyLong_Type.tp_name);
11846 0 : return -1;
11847 : }
11848 : }
11849 0 : return 0;
11850 : }
11851 :
11852 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwReserved(PyObject *obj, void *closure)
11853 : {
11854 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11855 0 : PyObject *py_dwReserved;
11856 0 : py_dwReserved = PyList_New(3);
11857 0 : if (py_dwReserved == NULL) {
11858 0 : return NULL;
11859 : }
11860 : {
11861 : int dwReserved_cntr_0;
11862 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < (3); dwReserved_cntr_0++) {
11863 0 : PyObject *py_dwReserved_0;
11864 0 : py_dwReserved_0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved[dwReserved_cntr_0]);
11865 0 : PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
11866 : }
11867 : }
11868 0 : return py_dwReserved;
11869 : }
11870 :
11871 0 : static int py_DNS_RPC_DP_INFO_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
11872 : {
11873 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11874 0 : if (value == NULL) {
11875 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved");
11876 0 : return -1;
11877 : }
11878 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
11879 : {
11880 0 : int dwReserved_cntr_0;
11881 0 : if (ARRAY_SIZE(object->dwReserved) != PyList_GET_SIZE(value)) {
11882 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->dwReserved), PyList_GET_SIZE(value));
11883 0 : return -1;
11884 : }
11885 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
11886 0 : if (PyList_GET_ITEM(value, dwReserved_cntr_0) == NULL) {
11887 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved[dwReserved_cntr_0]");
11888 0 : return -1;
11889 : }
11890 : {
11891 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved[dwReserved_cntr_0]));
11892 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserved_cntr_0))) {
11893 0 : unsigned long long test_var;
11894 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
11895 0 : if (PyErr_Occurred() != NULL) {
11896 0 : return -1;
11897 : }
11898 0 : if (test_var > uint_max) {
11899 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11900 : PyLong_Type.tp_name, uint_max, test_var);
11901 0 : return -1;
11902 : }
11903 0 : object->dwReserved[dwReserved_cntr_0] = test_var;
11904 : } else {
11905 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11906 : PyLong_Type.tp_name);
11907 0 : return -1;
11908 : }
11909 : }
11910 : }
11911 : }
11912 0 : return 0;
11913 : }
11914 :
11915 0 : static PyObject *py_DNS_RPC_DP_INFO_get_pwszReserved(PyObject *obj, void *closure)
11916 : {
11917 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11918 0 : PyObject *py_pwszReserved;
11919 0 : py_pwszReserved = PyList_New(3);
11920 0 : if (py_pwszReserved == NULL) {
11921 0 : return NULL;
11922 : }
11923 : {
11924 : int pwszReserved_cntr_0;
11925 0 : for (pwszReserved_cntr_0 = 0; pwszReserved_cntr_0 < (3); pwszReserved_cntr_0++) {
11926 0 : PyObject *py_pwszReserved_0;
11927 0 : py_pwszReserved_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, pytalloc_get_mem_ctx(obj), &object->pwszReserved[pwszReserved_cntr_0]);
11928 0 : PyList_SetItem(py_pwszReserved, pwszReserved_cntr_0, py_pwszReserved_0);
11929 : }
11930 : }
11931 0 : return py_pwszReserved;
11932 : }
11933 :
11934 0 : static int py_DNS_RPC_DP_INFO_set_pwszReserved(PyObject *py_obj, PyObject *value, void *closure)
11935 : {
11936 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11937 0 : if (value == NULL) {
11938 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwszReserved");
11939 0 : return -1;
11940 : }
11941 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
11942 : {
11943 0 : int pwszReserved_cntr_0;
11944 0 : if (ARRAY_SIZE(object->pwszReserved) != PyList_GET_SIZE(value)) {
11945 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->pwszReserved), PyList_GET_SIZE(value));
11946 0 : return -1;
11947 : }
11948 0 : for (pwszReserved_cntr_0 = 0; pwszReserved_cntr_0 < PyList_GET_SIZE(value); pwszReserved_cntr_0++) {
11949 0 : if (PyList_GET_ITEM(value, pwszReserved_cntr_0) == NULL) {
11950 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwszReserved[pwszReserved_cntr_0]");
11951 0 : return -1;
11952 : }
11953 0 : PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pwszReserved_cntr_0), return -1;);
11954 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pwszReserved_cntr_0))) == NULL) {
11955 0 : PyErr_NoMemory();
11956 0 : return -1;
11957 : }
11958 0 : object->pwszReserved[pwszReserved_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pwszReserved_cntr_0));
11959 : }
11960 : }
11961 0 : return 0;
11962 : }
11963 :
11964 0 : static PyObject *py_DNS_RPC_DP_INFO_get_dwReplicaCount(PyObject *obj, void *closure)
11965 : {
11966 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
11967 0 : PyObject *py_dwReplicaCount;
11968 0 : py_dwReplicaCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwReplicaCount);
11969 0 : return py_dwReplicaCount;
11970 : }
11971 :
11972 0 : static int py_DNS_RPC_DP_INFO_set_dwReplicaCount(PyObject *py_obj, PyObject *value, void *closure)
11973 : {
11974 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
11975 0 : if (value == NULL) {
11976 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReplicaCount");
11977 0 : return -1;
11978 : }
11979 : {
11980 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReplicaCount));
11981 0 : if (PyLong_Check(value)) {
11982 0 : unsigned long long test_var;
11983 0 : test_var = PyLong_AsUnsignedLongLong(value);
11984 0 : if (PyErr_Occurred() != NULL) {
11985 0 : return -1;
11986 : }
11987 0 : if (test_var > uint_max) {
11988 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
11989 : PyLong_Type.tp_name, uint_max, test_var);
11990 0 : return -1;
11991 : }
11992 0 : object->dwReplicaCount = test_var;
11993 : } else {
11994 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
11995 : PyLong_Type.tp_name);
11996 0 : return -1;
11997 : }
11998 : }
11999 0 : return 0;
12000 : }
12001 :
12002 0 : static PyObject *py_DNS_RPC_DP_INFO_get_ReplicaArray(PyObject *obj, void *closure)
12003 : {
12004 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(obj);
12005 0 : PyObject *py_ReplicaArray;
12006 0 : py_ReplicaArray = PyList_New(object->dwReplicaCount);
12007 0 : if (py_ReplicaArray == NULL) {
12008 0 : return NULL;
12009 : }
12010 : {
12011 : int ReplicaArray_cntr_0;
12012 0 : for (ReplicaArray_cntr_0 = 0; ReplicaArray_cntr_0 < (object->dwReplicaCount); ReplicaArray_cntr_0++) {
12013 0 : PyObject *py_ReplicaArray_0;
12014 0 : if (object->ReplicaArray[ReplicaArray_cntr_0] == NULL) {
12015 0 : py_ReplicaArray_0 = Py_None;
12016 0 : Py_INCREF(py_ReplicaArray_0);
12017 : } else {
12018 0 : py_ReplicaArray_0 = pytalloc_reference_ex(&DNS_RPC_DP_REPLICA_Type, object->ReplicaArray[ReplicaArray_cntr_0], object->ReplicaArray[ReplicaArray_cntr_0]);
12019 : }
12020 0 : PyList_SetItem(py_ReplicaArray, ReplicaArray_cntr_0, py_ReplicaArray_0);
12021 : }
12022 : }
12023 0 : return py_ReplicaArray;
12024 : }
12025 :
12026 0 : static int py_DNS_RPC_DP_INFO_set_ReplicaArray(PyObject *py_obj, PyObject *value, void *closure)
12027 : {
12028 0 : struct DNS_RPC_DP_INFO *object = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(py_obj);
12029 0 : if (value == NULL) {
12030 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ReplicaArray");
12031 0 : return -1;
12032 : }
12033 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
12034 : {
12035 0 : int ReplicaArray_cntr_0;
12036 0 : object->ReplicaArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ReplicaArray, PyList_GET_SIZE(value));
12037 0 : if (!object->ReplicaArray) { return -1; }
12038 0 : talloc_set_name_const(object->ReplicaArray, "ARRAY: object->ReplicaArray");
12039 0 : for (ReplicaArray_cntr_0 = 0; ReplicaArray_cntr_0 < PyList_GET_SIZE(value); ReplicaArray_cntr_0++) {
12040 0 : if (PyList_GET_ITEM(value, ReplicaArray_cntr_0) == NULL) {
12041 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ReplicaArray[ReplicaArray_cntr_0]");
12042 0 : return -1;
12043 : }
12044 0 : if (PyList_GET_ITEM(value, ReplicaArray_cntr_0) == Py_None) {
12045 0 : object->ReplicaArray[ReplicaArray_cntr_0] = NULL;
12046 : } else {
12047 0 : object->ReplicaArray[ReplicaArray_cntr_0] = NULL;
12048 0 : PY_CHECK_TYPE(&DNS_RPC_DP_REPLICA_Type, PyList_GET_ITEM(value, ReplicaArray_cntr_0), return -1;);
12049 0 : if (talloc_reference(object->ReplicaArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ReplicaArray_cntr_0))) == NULL) {
12050 0 : PyErr_NoMemory();
12051 0 : return -1;
12052 : }
12053 0 : object->ReplicaArray[ReplicaArray_cntr_0] = (struct DNS_RPC_DP_REPLICA *)pytalloc_get_ptr(PyList_GET_ITEM(value, ReplicaArray_cntr_0));
12054 : }
12055 : }
12056 : }
12057 0 : return 0;
12058 : }
12059 :
12060 : static PyGetSetDef py_DNS_RPC_DP_INFO_getsetters[] = {
12061 : {
12062 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12063 : .get = py_DNS_RPC_DP_INFO_get_dwRpcStructureVersion,
12064 : .set = py_DNS_RPC_DP_INFO_set_dwRpcStructureVersion,
12065 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12066 : },
12067 : {
12068 : .name = discard_const_p(char, "dwReserved0"),
12069 : .get = py_DNS_RPC_DP_INFO_get_dwReserved0,
12070 : .set = py_DNS_RPC_DP_INFO_set_dwReserved0,
12071 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12072 : },
12073 : {
12074 : .name = discard_const_p(char, "pszDpFqdn"),
12075 : .get = py_DNS_RPC_DP_INFO_get_pszDpFqdn,
12076 : .set = py_DNS_RPC_DP_INFO_set_pszDpFqdn,
12077 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12078 : },
12079 : {
12080 : .name = discard_const_p(char, "pszDpDn"),
12081 : .get = py_DNS_RPC_DP_INFO_get_pszDpDn,
12082 : .set = py_DNS_RPC_DP_INFO_set_pszDpDn,
12083 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
12084 : },
12085 : {
12086 : .name = discard_const_p(char, "pszCrDn"),
12087 : .get = py_DNS_RPC_DP_INFO_get_pszCrDn,
12088 : .set = py_DNS_RPC_DP_INFO_set_pszCrDn,
12089 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
12090 : },
12091 : {
12092 : .name = discard_const_p(char, "dwFlags"),
12093 : .get = py_DNS_RPC_DP_INFO_get_dwFlags,
12094 : .set = py_DNS_RPC_DP_INFO_set_dwFlags,
12095 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12096 : },
12097 : {
12098 : .name = discard_const_p(char, "dwZoneCount"),
12099 : .get = py_DNS_RPC_DP_INFO_get_dwZoneCount,
12100 : .set = py_DNS_RPC_DP_INFO_set_dwZoneCount,
12101 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12102 : },
12103 : {
12104 : .name = discard_const_p(char, "dwState"),
12105 : .get = py_DNS_RPC_DP_INFO_get_dwState,
12106 : .set = py_DNS_RPC_DP_INFO_set_dwState,
12107 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_DP_STATE")
12108 : },
12109 : {
12110 : .name = discard_const_p(char, "dwReserved"),
12111 : .get = py_DNS_RPC_DP_INFO_get_dwReserved,
12112 : .set = py_DNS_RPC_DP_INFO_set_dwReserved,
12113 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12114 : },
12115 : {
12116 : .name = discard_const_p(char, "pwszReserved"),
12117 : .get = py_DNS_RPC_DP_INFO_get_pwszReserved,
12118 : .set = py_DNS_RPC_DP_INFO_set_pwszReserved,
12119 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_EXTENSION")
12120 : },
12121 : {
12122 : .name = discard_const_p(char, "dwReplicaCount"),
12123 : .get = py_DNS_RPC_DP_INFO_get_dwReplicaCount,
12124 : .set = py_DNS_RPC_DP_INFO_set_dwReplicaCount,
12125 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12126 : },
12127 : {
12128 : .name = discard_const_p(char, "ReplicaArray"),
12129 : .get = py_DNS_RPC_DP_INFO_get_ReplicaArray,
12130 : .set = py_DNS_RPC_DP_INFO_set_ReplicaArray,
12131 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_DP_REPLICA")
12132 : },
12133 : { .name = NULL }
12134 : };
12135 :
12136 0 : static PyObject *py_DNS_RPC_DP_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12137 : {
12138 0 : return pytalloc_new(struct DNS_RPC_DP_INFO, type);
12139 : }
12140 :
12141 :
12142 : static PyTypeObject DNS_RPC_DP_INFO_Type = {
12143 : PyVarObject_HEAD_INIT(NULL, 0)
12144 : .tp_name = "dnsserver.DNS_RPC_DP_INFO",
12145 : .tp_getset = py_DNS_RPC_DP_INFO_getsetters,
12146 : .tp_methods = NULL,
12147 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12148 : .tp_new = py_DNS_RPC_DP_INFO_new,
12149 : };
12150 :
12151 :
12152 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12153 : {
12154 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
12155 0 : PyObject *py_dwRpcStructureVersion;
12156 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
12157 0 : return py_dwRpcStructureVersion;
12158 : }
12159 :
12160 0 : static int py_DNS_RPC_DP_ENUM_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12161 : {
12162 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
12163 0 : if (value == NULL) {
12164 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
12165 0 : return -1;
12166 : }
12167 : {
12168 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
12169 0 : if (PyLong_Check(value)) {
12170 0 : unsigned long long test_var;
12171 0 : test_var = PyLong_AsUnsignedLongLong(value);
12172 0 : if (PyErr_Occurred() != NULL) {
12173 0 : return -1;
12174 : }
12175 0 : if (test_var > uint_max) {
12176 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12177 : PyLong_Type.tp_name, uint_max, test_var);
12178 0 : return -1;
12179 : }
12180 0 : object->dwRpcStructureVersion = test_var;
12181 : } else {
12182 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12183 : PyLong_Type.tp_name);
12184 0 : return -1;
12185 : }
12186 : }
12187 0 : return 0;
12188 : }
12189 :
12190 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_dwReserved0(PyObject *obj, void *closure)
12191 : {
12192 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
12193 0 : PyObject *py_dwReserved0;
12194 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
12195 0 : return py_dwReserved0;
12196 : }
12197 :
12198 0 : static int py_DNS_RPC_DP_ENUM_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12199 : {
12200 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
12201 0 : if (value == NULL) {
12202 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
12203 0 : return -1;
12204 : }
12205 : {
12206 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
12207 0 : if (PyLong_Check(value)) {
12208 0 : unsigned long long test_var;
12209 0 : test_var = PyLong_AsUnsignedLongLong(value);
12210 0 : if (PyErr_Occurred() != NULL) {
12211 0 : return -1;
12212 : }
12213 0 : if (test_var > uint_max) {
12214 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12215 : PyLong_Type.tp_name, uint_max, test_var);
12216 0 : return -1;
12217 : }
12218 0 : object->dwReserved0 = test_var;
12219 : } else {
12220 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12221 : PyLong_Type.tp_name);
12222 0 : return -1;
12223 : }
12224 : }
12225 0 : return 0;
12226 : }
12227 :
12228 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_pszDpFqdn(PyObject *obj, void *closure)
12229 : {
12230 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
12231 0 : PyObject *py_pszDpFqdn;
12232 0 : if (object->pszDpFqdn == NULL) {
12233 0 : Py_RETURN_NONE;
12234 : }
12235 0 : if (object->pszDpFqdn == NULL) {
12236 0 : py_pszDpFqdn = Py_None;
12237 0 : Py_INCREF(py_pszDpFqdn);
12238 : } else {
12239 0 : if (object->pszDpFqdn == NULL) {
12240 0 : py_pszDpFqdn = Py_None;
12241 0 : Py_INCREF(py_pszDpFqdn);
12242 : } else {
12243 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
12244 : }
12245 : }
12246 0 : return py_pszDpFqdn;
12247 : }
12248 :
12249 0 : static int py_DNS_RPC_DP_ENUM_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
12250 : {
12251 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
12252 0 : if (value == NULL) {
12253 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpFqdn");
12254 0 : return -1;
12255 : }
12256 0 : if (value == Py_None) {
12257 0 : object->pszDpFqdn = NULL;
12258 : } else {
12259 0 : object->pszDpFqdn = NULL;
12260 : {
12261 0 : const char *test_str;
12262 0 : const char *talloc_str;
12263 0 : PyObject *unicode = NULL;
12264 0 : if (PyUnicode_Check(value)) {
12265 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12266 0 : if (unicode == NULL) {
12267 0 : PyErr_NoMemory();
12268 0 : return -1;
12269 : }
12270 0 : test_str = PyBytes_AS_STRING(unicode);
12271 0 : } else if (PyBytes_Check(value)) {
12272 0 : test_str = PyBytes_AS_STRING(value);
12273 : } else {
12274 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12275 0 : return -1;
12276 : }
12277 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12278 0 : if (unicode != NULL) {
12279 0 : Py_DECREF(unicode);
12280 : }
12281 0 : if (talloc_str == NULL) {
12282 0 : PyErr_NoMemory();
12283 0 : return -1;
12284 : }
12285 0 : object->pszDpFqdn = talloc_str;
12286 : }
12287 : }
12288 0 : return 0;
12289 : }
12290 :
12291 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_dwFlags(PyObject *obj, void *closure)
12292 : {
12293 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
12294 0 : PyObject *py_dwFlags;
12295 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwFlags);
12296 0 : return py_dwFlags;
12297 : }
12298 :
12299 0 : static int py_DNS_RPC_DP_ENUM_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
12300 : {
12301 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
12302 0 : if (value == NULL) {
12303 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFlags");
12304 0 : return -1;
12305 : }
12306 : {
12307 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
12308 0 : if (PyLong_Check(value)) {
12309 0 : unsigned long long test_var;
12310 0 : test_var = PyLong_AsUnsignedLongLong(value);
12311 0 : if (PyErr_Occurred() != NULL) {
12312 0 : return -1;
12313 : }
12314 0 : if (test_var > uint_max) {
12315 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12316 : PyLong_Type.tp_name, uint_max, test_var);
12317 0 : return -1;
12318 : }
12319 0 : object->dwFlags = test_var;
12320 : } else {
12321 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12322 : PyLong_Type.tp_name);
12323 0 : return -1;
12324 : }
12325 : }
12326 0 : return 0;
12327 : }
12328 :
12329 0 : static PyObject *py_DNS_RPC_DP_ENUM_get_dwZoneCount(PyObject *obj, void *closure)
12330 : {
12331 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(obj);
12332 0 : PyObject *py_dwZoneCount;
12333 0 : py_dwZoneCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneCount);
12334 0 : return py_dwZoneCount;
12335 : }
12336 :
12337 0 : static int py_DNS_RPC_DP_ENUM_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
12338 : {
12339 0 : struct DNS_RPC_DP_ENUM *object = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(py_obj);
12340 0 : if (value == NULL) {
12341 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneCount");
12342 0 : return -1;
12343 : }
12344 : {
12345 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneCount));
12346 0 : if (PyLong_Check(value)) {
12347 0 : unsigned long long test_var;
12348 0 : test_var = PyLong_AsUnsignedLongLong(value);
12349 0 : if (PyErr_Occurred() != NULL) {
12350 0 : return -1;
12351 : }
12352 0 : if (test_var > uint_max) {
12353 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12354 : PyLong_Type.tp_name, uint_max, test_var);
12355 0 : return -1;
12356 : }
12357 0 : object->dwZoneCount = test_var;
12358 : } else {
12359 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12360 : PyLong_Type.tp_name);
12361 0 : return -1;
12362 : }
12363 : }
12364 0 : return 0;
12365 : }
12366 :
12367 : static PyGetSetDef py_DNS_RPC_DP_ENUM_getsetters[] = {
12368 : {
12369 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12370 : .get = py_DNS_RPC_DP_ENUM_get_dwRpcStructureVersion,
12371 : .set = py_DNS_RPC_DP_ENUM_set_dwRpcStructureVersion,
12372 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12373 : },
12374 : {
12375 : .name = discard_const_p(char, "dwReserved0"),
12376 : .get = py_DNS_RPC_DP_ENUM_get_dwReserved0,
12377 : .set = py_DNS_RPC_DP_ENUM_set_dwReserved0,
12378 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12379 : },
12380 : {
12381 : .name = discard_const_p(char, "pszDpFqdn"),
12382 : .get = py_DNS_RPC_DP_ENUM_get_pszDpFqdn,
12383 : .set = py_DNS_RPC_DP_ENUM_set_pszDpFqdn,
12384 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12385 : },
12386 : {
12387 : .name = discard_const_p(char, "dwFlags"),
12388 : .get = py_DNS_RPC_DP_ENUM_get_dwFlags,
12389 : .set = py_DNS_RPC_DP_ENUM_set_dwFlags,
12390 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12391 : },
12392 : {
12393 : .name = discard_const_p(char, "dwZoneCount"),
12394 : .get = py_DNS_RPC_DP_ENUM_get_dwZoneCount,
12395 : .set = py_DNS_RPC_DP_ENUM_set_dwZoneCount,
12396 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12397 : },
12398 : { .name = NULL }
12399 : };
12400 :
12401 0 : static PyObject *py_DNS_RPC_DP_ENUM_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12402 : {
12403 0 : return pytalloc_new(struct DNS_RPC_DP_ENUM, type);
12404 : }
12405 :
12406 :
12407 : static PyTypeObject DNS_RPC_DP_ENUM_Type = {
12408 : PyVarObject_HEAD_INIT(NULL, 0)
12409 : .tp_name = "dnsserver.DNS_RPC_DP_ENUM",
12410 : .tp_getset = py_DNS_RPC_DP_ENUM_getsetters,
12411 : .tp_methods = NULL,
12412 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12413 : .tp_new = py_DNS_RPC_DP_ENUM_new,
12414 : };
12415 :
12416 :
12417 0 : static PyObject *py_DNS_RPC_DP_LIST_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12418 : {
12419 0 : struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(obj);
12420 0 : PyObject *py_dwRpcStructureVersion;
12421 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
12422 0 : return py_dwRpcStructureVersion;
12423 : }
12424 :
12425 0 : static int py_DNS_RPC_DP_LIST_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12426 : {
12427 0 : struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(py_obj);
12428 0 : if (value == NULL) {
12429 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
12430 0 : return -1;
12431 : }
12432 : {
12433 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
12434 0 : if (PyLong_Check(value)) {
12435 0 : unsigned long long test_var;
12436 0 : test_var = PyLong_AsUnsignedLongLong(value);
12437 0 : if (PyErr_Occurred() != NULL) {
12438 0 : return -1;
12439 : }
12440 0 : if (test_var > uint_max) {
12441 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12442 : PyLong_Type.tp_name, uint_max, test_var);
12443 0 : return -1;
12444 : }
12445 0 : object->dwRpcStructureVersion = test_var;
12446 : } else {
12447 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12448 : PyLong_Type.tp_name);
12449 0 : return -1;
12450 : }
12451 : }
12452 0 : return 0;
12453 : }
12454 :
12455 0 : static PyObject *py_DNS_RPC_DP_LIST_get_dwReserved0(PyObject *obj, void *closure)
12456 : {
12457 0 : struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(obj);
12458 0 : PyObject *py_dwReserved0;
12459 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
12460 0 : return py_dwReserved0;
12461 : }
12462 :
12463 0 : static int py_DNS_RPC_DP_LIST_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12464 : {
12465 0 : struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(py_obj);
12466 0 : if (value == NULL) {
12467 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
12468 0 : return -1;
12469 : }
12470 : {
12471 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
12472 0 : if (PyLong_Check(value)) {
12473 0 : unsigned long long test_var;
12474 0 : test_var = PyLong_AsUnsignedLongLong(value);
12475 0 : if (PyErr_Occurred() != NULL) {
12476 0 : return -1;
12477 : }
12478 0 : if (test_var > uint_max) {
12479 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12480 : PyLong_Type.tp_name, uint_max, test_var);
12481 0 : return -1;
12482 : }
12483 0 : object->dwReserved0 = test_var;
12484 : } else {
12485 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12486 : PyLong_Type.tp_name);
12487 0 : return -1;
12488 : }
12489 : }
12490 0 : return 0;
12491 : }
12492 :
12493 0 : static PyObject *py_DNS_RPC_DP_LIST_get_dwDpCount(PyObject *obj, void *closure)
12494 : {
12495 0 : struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(obj);
12496 0 : PyObject *py_dwDpCount;
12497 0 : py_dwDpCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwDpCount);
12498 0 : return py_dwDpCount;
12499 : }
12500 :
12501 0 : static int py_DNS_RPC_DP_LIST_set_dwDpCount(PyObject *py_obj, PyObject *value, void *closure)
12502 : {
12503 0 : struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(py_obj);
12504 0 : if (value == NULL) {
12505 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDpCount");
12506 0 : return -1;
12507 : }
12508 : {
12509 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpCount));
12510 0 : if (PyLong_Check(value)) {
12511 0 : unsigned long long test_var;
12512 0 : test_var = PyLong_AsUnsignedLongLong(value);
12513 0 : if (PyErr_Occurred() != NULL) {
12514 0 : return -1;
12515 : }
12516 0 : if (test_var > uint_max) {
12517 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12518 : PyLong_Type.tp_name, uint_max, test_var);
12519 0 : return -1;
12520 : }
12521 0 : object->dwDpCount = test_var;
12522 : } else {
12523 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12524 : PyLong_Type.tp_name);
12525 0 : return -1;
12526 : }
12527 : }
12528 0 : return 0;
12529 : }
12530 :
12531 0 : static PyObject *py_DNS_RPC_DP_LIST_get_DpArray(PyObject *obj, void *closure)
12532 : {
12533 0 : struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(obj);
12534 0 : PyObject *py_DpArray;
12535 0 : py_DpArray = PyList_New(object->dwDpCount);
12536 0 : if (py_DpArray == NULL) {
12537 0 : return NULL;
12538 : }
12539 : {
12540 : int DpArray_cntr_0;
12541 0 : for (DpArray_cntr_0 = 0; DpArray_cntr_0 < (object->dwDpCount); DpArray_cntr_0++) {
12542 0 : PyObject *py_DpArray_0;
12543 0 : if (object->DpArray[DpArray_cntr_0] == NULL) {
12544 0 : py_DpArray_0 = Py_None;
12545 0 : Py_INCREF(py_DpArray_0);
12546 : } else {
12547 0 : py_DpArray_0 = pytalloc_reference_ex(&DNS_RPC_DP_ENUM_Type, object->DpArray[DpArray_cntr_0], object->DpArray[DpArray_cntr_0]);
12548 : }
12549 0 : PyList_SetItem(py_DpArray, DpArray_cntr_0, py_DpArray_0);
12550 : }
12551 : }
12552 0 : return py_DpArray;
12553 : }
12554 :
12555 0 : static int py_DNS_RPC_DP_LIST_set_DpArray(PyObject *py_obj, PyObject *value, void *closure)
12556 : {
12557 0 : struct DNS_RPC_DP_LIST *object = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(py_obj);
12558 0 : if (value == NULL) {
12559 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->DpArray");
12560 0 : return -1;
12561 : }
12562 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
12563 : {
12564 0 : int DpArray_cntr_0;
12565 0 : object->DpArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->DpArray, PyList_GET_SIZE(value));
12566 0 : if (!object->DpArray) { return -1; }
12567 0 : talloc_set_name_const(object->DpArray, "ARRAY: object->DpArray");
12568 0 : for (DpArray_cntr_0 = 0; DpArray_cntr_0 < PyList_GET_SIZE(value); DpArray_cntr_0++) {
12569 0 : if (PyList_GET_ITEM(value, DpArray_cntr_0) == NULL) {
12570 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->DpArray[DpArray_cntr_0]");
12571 0 : return -1;
12572 : }
12573 0 : if (PyList_GET_ITEM(value, DpArray_cntr_0) == Py_None) {
12574 0 : object->DpArray[DpArray_cntr_0] = NULL;
12575 : } else {
12576 0 : object->DpArray[DpArray_cntr_0] = NULL;
12577 0 : PY_CHECK_TYPE(&DNS_RPC_DP_ENUM_Type, PyList_GET_ITEM(value, DpArray_cntr_0), return -1;);
12578 0 : if (talloc_reference(object->DpArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, DpArray_cntr_0))) == NULL) {
12579 0 : PyErr_NoMemory();
12580 0 : return -1;
12581 : }
12582 0 : object->DpArray[DpArray_cntr_0] = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(PyList_GET_ITEM(value, DpArray_cntr_0));
12583 : }
12584 : }
12585 : }
12586 0 : return 0;
12587 : }
12588 :
12589 : static PyGetSetDef py_DNS_RPC_DP_LIST_getsetters[] = {
12590 : {
12591 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12592 : .get = py_DNS_RPC_DP_LIST_get_dwRpcStructureVersion,
12593 : .set = py_DNS_RPC_DP_LIST_set_dwRpcStructureVersion,
12594 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12595 : },
12596 : {
12597 : .name = discard_const_p(char, "dwReserved0"),
12598 : .get = py_DNS_RPC_DP_LIST_get_dwReserved0,
12599 : .set = py_DNS_RPC_DP_LIST_set_dwReserved0,
12600 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12601 : },
12602 : {
12603 : .name = discard_const_p(char, "dwDpCount"),
12604 : .get = py_DNS_RPC_DP_LIST_get_dwDpCount,
12605 : .set = py_DNS_RPC_DP_LIST_set_dwDpCount,
12606 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12607 : },
12608 : {
12609 : .name = discard_const_p(char, "DpArray"),
12610 : .get = py_DNS_RPC_DP_LIST_get_DpArray,
12611 : .set = py_DNS_RPC_DP_LIST_set_DpArray,
12612 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_DP_ENUM")
12613 : },
12614 : { .name = NULL }
12615 : };
12616 :
12617 0 : static PyObject *py_DNS_RPC_DP_LIST_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12618 : {
12619 0 : return pytalloc_new(struct DNS_RPC_DP_LIST, type);
12620 : }
12621 :
12622 :
12623 : static PyTypeObject DNS_RPC_DP_LIST_Type = {
12624 : PyVarObject_HEAD_INIT(NULL, 0)
12625 : .tp_name = "dnsserver.DNS_RPC_DP_LIST",
12626 : .tp_getset = py_DNS_RPC_DP_LIST_getsetters,
12627 : .tp_methods = NULL,
12628 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12629 : .tp_new = py_DNS_RPC_DP_LIST_new,
12630 : };
12631 :
12632 :
12633 0 : static PyObject *py_DNS_RPC_ENLIST_DP_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12634 : {
12635 0 : struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(obj);
12636 0 : PyObject *py_dwRpcStructureVersion;
12637 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
12638 0 : return py_dwRpcStructureVersion;
12639 : }
12640 :
12641 0 : static int py_DNS_RPC_ENLIST_DP_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12642 : {
12643 0 : struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(py_obj);
12644 0 : if (value == NULL) {
12645 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
12646 0 : return -1;
12647 : }
12648 : {
12649 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
12650 0 : if (PyLong_Check(value)) {
12651 0 : unsigned long long test_var;
12652 0 : test_var = PyLong_AsUnsignedLongLong(value);
12653 0 : if (PyErr_Occurred() != NULL) {
12654 0 : return -1;
12655 : }
12656 0 : if (test_var > uint_max) {
12657 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12658 : PyLong_Type.tp_name, uint_max, test_var);
12659 0 : return -1;
12660 : }
12661 0 : object->dwRpcStructureVersion = test_var;
12662 : } else {
12663 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12664 : PyLong_Type.tp_name);
12665 0 : return -1;
12666 : }
12667 : }
12668 0 : return 0;
12669 : }
12670 :
12671 0 : static PyObject *py_DNS_RPC_ENLIST_DP_get_dwReserved0(PyObject *obj, void *closure)
12672 : {
12673 0 : struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(obj);
12674 0 : PyObject *py_dwReserved0;
12675 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
12676 0 : return py_dwReserved0;
12677 : }
12678 :
12679 0 : static int py_DNS_RPC_ENLIST_DP_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12680 : {
12681 0 : struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(py_obj);
12682 0 : if (value == NULL) {
12683 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
12684 0 : return -1;
12685 : }
12686 : {
12687 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
12688 0 : if (PyLong_Check(value)) {
12689 0 : unsigned long long test_var;
12690 0 : test_var = PyLong_AsUnsignedLongLong(value);
12691 0 : if (PyErr_Occurred() != NULL) {
12692 0 : return -1;
12693 : }
12694 0 : if (test_var > uint_max) {
12695 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12696 : PyLong_Type.tp_name, uint_max, test_var);
12697 0 : return -1;
12698 : }
12699 0 : object->dwReserved0 = test_var;
12700 : } else {
12701 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12702 : PyLong_Type.tp_name);
12703 0 : return -1;
12704 : }
12705 : }
12706 0 : return 0;
12707 : }
12708 :
12709 0 : static PyObject *py_DNS_RPC_ENLIST_DP_get_pszDpFqdn(PyObject *obj, void *closure)
12710 : {
12711 0 : struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(obj);
12712 0 : PyObject *py_pszDpFqdn;
12713 0 : if (object->pszDpFqdn == NULL) {
12714 0 : Py_RETURN_NONE;
12715 : }
12716 0 : if (object->pszDpFqdn == NULL) {
12717 0 : py_pszDpFqdn = Py_None;
12718 0 : Py_INCREF(py_pszDpFqdn);
12719 : } else {
12720 0 : if (object->pszDpFqdn == NULL) {
12721 0 : py_pszDpFqdn = Py_None;
12722 0 : Py_INCREF(py_pszDpFqdn);
12723 : } else {
12724 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
12725 : }
12726 : }
12727 0 : return py_pszDpFqdn;
12728 : }
12729 :
12730 0 : static int py_DNS_RPC_ENLIST_DP_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
12731 : {
12732 0 : struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(py_obj);
12733 0 : if (value == NULL) {
12734 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpFqdn");
12735 0 : return -1;
12736 : }
12737 0 : if (value == Py_None) {
12738 0 : object->pszDpFqdn = NULL;
12739 : } else {
12740 0 : object->pszDpFqdn = NULL;
12741 : {
12742 0 : const char *test_str;
12743 0 : const char *talloc_str;
12744 0 : PyObject *unicode = NULL;
12745 0 : if (PyUnicode_Check(value)) {
12746 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12747 0 : if (unicode == NULL) {
12748 0 : PyErr_NoMemory();
12749 0 : return -1;
12750 : }
12751 0 : test_str = PyBytes_AS_STRING(unicode);
12752 0 : } else if (PyBytes_Check(value)) {
12753 0 : test_str = PyBytes_AS_STRING(value);
12754 : } else {
12755 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12756 0 : return -1;
12757 : }
12758 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12759 0 : if (unicode != NULL) {
12760 0 : Py_DECREF(unicode);
12761 : }
12762 0 : if (talloc_str == NULL) {
12763 0 : PyErr_NoMemory();
12764 0 : return -1;
12765 : }
12766 0 : object->pszDpFqdn = talloc_str;
12767 : }
12768 : }
12769 0 : return 0;
12770 : }
12771 :
12772 0 : static PyObject *py_DNS_RPC_ENLIST_DP_get_dwOperation(PyObject *obj, void *closure)
12773 : {
12774 0 : struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(obj);
12775 0 : PyObject *py_dwOperation;
12776 0 : py_dwOperation = PyLong_FromUnsignedLongLong((uint32_t)object->dwOperation);
12777 0 : return py_dwOperation;
12778 : }
12779 :
12780 0 : static int py_DNS_RPC_ENLIST_DP_set_dwOperation(PyObject *py_obj, PyObject *value, void *closure)
12781 : {
12782 0 : struct DNS_RPC_ENLIST_DP *object = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(py_obj);
12783 0 : if (value == NULL) {
12784 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwOperation");
12785 0 : return -1;
12786 : }
12787 : {
12788 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwOperation));
12789 0 : if (PyLong_Check(value)) {
12790 0 : unsigned long long test_var;
12791 0 : test_var = PyLong_AsUnsignedLongLong(value);
12792 0 : if (PyErr_Occurred() != NULL) {
12793 0 : return -1;
12794 : }
12795 0 : if (test_var > uint_max) {
12796 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12797 : PyLong_Type.tp_name, uint_max, test_var);
12798 0 : return -1;
12799 : }
12800 0 : object->dwOperation = test_var;
12801 : } else {
12802 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12803 : PyLong_Type.tp_name);
12804 0 : return -1;
12805 : }
12806 : }
12807 0 : return 0;
12808 : }
12809 :
12810 : static PyGetSetDef py_DNS_RPC_ENLIST_DP_getsetters[] = {
12811 : {
12812 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12813 : .get = py_DNS_RPC_ENLIST_DP_get_dwRpcStructureVersion,
12814 : .set = py_DNS_RPC_ENLIST_DP_set_dwRpcStructureVersion,
12815 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12816 : },
12817 : {
12818 : .name = discard_const_p(char, "dwReserved0"),
12819 : .get = py_DNS_RPC_ENLIST_DP_get_dwReserved0,
12820 : .set = py_DNS_RPC_ENLIST_DP_set_dwReserved0,
12821 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12822 : },
12823 : {
12824 : .name = discard_const_p(char, "pszDpFqdn"),
12825 : .get = py_DNS_RPC_ENLIST_DP_get_pszDpFqdn,
12826 : .set = py_DNS_RPC_ENLIST_DP_set_pszDpFqdn,
12827 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
12828 : },
12829 : {
12830 : .name = discard_const_p(char, "dwOperation"),
12831 : .get = py_DNS_RPC_ENLIST_DP_get_dwOperation,
12832 : .set = py_DNS_RPC_ENLIST_DP_set_dwOperation,
12833 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12834 : },
12835 : { .name = NULL }
12836 : };
12837 :
12838 0 : static PyObject *py_DNS_RPC_ENLIST_DP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
12839 : {
12840 0 : return pytalloc_new(struct DNS_RPC_ENLIST_DP, type);
12841 : }
12842 :
12843 :
12844 : static PyTypeObject DNS_RPC_ENLIST_DP_Type = {
12845 : PyVarObject_HEAD_INIT(NULL, 0)
12846 : .tp_name = "dnsserver.DNS_RPC_ENLIST_DP",
12847 : .tp_getset = py_DNS_RPC_ENLIST_DP_getsetters,
12848 : .tp_methods = NULL,
12849 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
12850 : .tp_new = py_DNS_RPC_ENLIST_DP_new,
12851 : };
12852 :
12853 :
12854 0 : static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_dwRpcStructureVersion(PyObject *obj, void *closure)
12855 : {
12856 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(obj);
12857 0 : PyObject *py_dwRpcStructureVersion;
12858 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
12859 0 : return py_dwRpcStructureVersion;
12860 : }
12861 :
12862 0 : static int py_DNS_RPC_ZONE_CHANGE_DP_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
12863 : {
12864 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(py_obj);
12865 0 : if (value == NULL) {
12866 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
12867 0 : return -1;
12868 : }
12869 : {
12870 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
12871 0 : if (PyLong_Check(value)) {
12872 0 : unsigned long long test_var;
12873 0 : test_var = PyLong_AsUnsignedLongLong(value);
12874 0 : if (PyErr_Occurred() != NULL) {
12875 0 : return -1;
12876 : }
12877 0 : if (test_var > uint_max) {
12878 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12879 : PyLong_Type.tp_name, uint_max, test_var);
12880 0 : return -1;
12881 : }
12882 0 : object->dwRpcStructureVersion = test_var;
12883 : } else {
12884 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12885 : PyLong_Type.tp_name);
12886 0 : return -1;
12887 : }
12888 : }
12889 0 : return 0;
12890 : }
12891 :
12892 0 : static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_dwReserved0(PyObject *obj, void *closure)
12893 : {
12894 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(obj);
12895 0 : PyObject *py_dwReserved0;
12896 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
12897 0 : return py_dwReserved0;
12898 : }
12899 :
12900 0 : static int py_DNS_RPC_ZONE_CHANGE_DP_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
12901 : {
12902 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(py_obj);
12903 0 : if (value == NULL) {
12904 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
12905 0 : return -1;
12906 : }
12907 : {
12908 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
12909 0 : if (PyLong_Check(value)) {
12910 0 : unsigned long long test_var;
12911 0 : test_var = PyLong_AsUnsignedLongLong(value);
12912 0 : if (PyErr_Occurred() != NULL) {
12913 0 : return -1;
12914 : }
12915 0 : if (test_var > uint_max) {
12916 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
12917 : PyLong_Type.tp_name, uint_max, test_var);
12918 0 : return -1;
12919 : }
12920 0 : object->dwReserved0 = test_var;
12921 : } else {
12922 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
12923 : PyLong_Type.tp_name);
12924 0 : return -1;
12925 : }
12926 : }
12927 0 : return 0;
12928 : }
12929 :
12930 0 : static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_get_pszDestPartition(PyObject *obj, void *closure)
12931 : {
12932 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(obj);
12933 0 : PyObject *py_pszDestPartition;
12934 0 : if (object->pszDestPartition == NULL) {
12935 0 : Py_RETURN_NONE;
12936 : }
12937 0 : if (object->pszDestPartition == NULL) {
12938 0 : py_pszDestPartition = Py_None;
12939 0 : Py_INCREF(py_pszDestPartition);
12940 : } else {
12941 0 : if (object->pszDestPartition == NULL) {
12942 0 : py_pszDestPartition = Py_None;
12943 0 : Py_INCREF(py_pszDestPartition);
12944 : } else {
12945 0 : py_pszDestPartition = PyUnicode_Decode(object->pszDestPartition, strlen(object->pszDestPartition), "utf-8", "ignore");
12946 : }
12947 : }
12948 0 : return py_pszDestPartition;
12949 : }
12950 :
12951 0 : static int py_DNS_RPC_ZONE_CHANGE_DP_set_pszDestPartition(PyObject *py_obj, PyObject *value, void *closure)
12952 : {
12953 0 : struct DNS_RPC_ZONE_CHANGE_DP *object = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(py_obj);
12954 0 : if (value == NULL) {
12955 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDestPartition");
12956 0 : return -1;
12957 : }
12958 0 : if (value == Py_None) {
12959 0 : object->pszDestPartition = NULL;
12960 : } else {
12961 0 : object->pszDestPartition = NULL;
12962 : {
12963 0 : const char *test_str;
12964 0 : const char *talloc_str;
12965 0 : PyObject *unicode = NULL;
12966 0 : if (PyUnicode_Check(value)) {
12967 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
12968 0 : if (unicode == NULL) {
12969 0 : PyErr_NoMemory();
12970 0 : return -1;
12971 : }
12972 0 : test_str = PyBytes_AS_STRING(unicode);
12973 0 : } else if (PyBytes_Check(value)) {
12974 0 : test_str = PyBytes_AS_STRING(value);
12975 : } else {
12976 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
12977 0 : return -1;
12978 : }
12979 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
12980 0 : if (unicode != NULL) {
12981 0 : Py_DECREF(unicode);
12982 : }
12983 0 : if (talloc_str == NULL) {
12984 0 : PyErr_NoMemory();
12985 0 : return -1;
12986 : }
12987 0 : object->pszDestPartition = talloc_str;
12988 : }
12989 : }
12990 0 : return 0;
12991 : }
12992 :
12993 : static PyGetSetDef py_DNS_RPC_ZONE_CHANGE_DP_getsetters[] = {
12994 : {
12995 : .name = discard_const_p(char, "dwRpcStructureVersion"),
12996 : .get = py_DNS_RPC_ZONE_CHANGE_DP_get_dwRpcStructureVersion,
12997 : .set = py_DNS_RPC_ZONE_CHANGE_DP_set_dwRpcStructureVersion,
12998 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
12999 : },
13000 : {
13001 : .name = discard_const_p(char, "dwReserved0"),
13002 : .get = py_DNS_RPC_ZONE_CHANGE_DP_get_dwReserved0,
13003 : .set = py_DNS_RPC_ZONE_CHANGE_DP_set_dwReserved0,
13004 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13005 : },
13006 : {
13007 : .name = discard_const_p(char, "pszDestPartition"),
13008 : .get = py_DNS_RPC_ZONE_CHANGE_DP_get_pszDestPartition,
13009 : .set = py_DNS_RPC_ZONE_CHANGE_DP_set_pszDestPartition,
13010 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13011 : },
13012 : { .name = NULL }
13013 : };
13014 :
13015 0 : static PyObject *py_DNS_RPC_ZONE_CHANGE_DP_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13016 : {
13017 0 : return pytalloc_new(struct DNS_RPC_ZONE_CHANGE_DP, type);
13018 : }
13019 :
13020 :
13021 : static PyTypeObject DNS_RPC_ZONE_CHANGE_DP_Type = {
13022 : PyVarObject_HEAD_INIT(NULL, 0)
13023 : .tp_name = "dnsserver.DNS_RPC_ZONE_CHANGE_DP",
13024 : .tp_getset = py_DNS_RPC_ZONE_CHANGE_DP_getsetters,
13025 : .tp_methods = NULL,
13026 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13027 : .tp_new = py_DNS_RPC_ZONE_CHANGE_DP_new,
13028 : };
13029 :
13030 :
13031 0 : static PyObject *py_DNS_RPC_ZONE_W2K_get_pszZoneName(PyObject *obj, void *closure)
13032 : {
13033 0 : struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(obj);
13034 0 : PyObject *py_pszZoneName;
13035 0 : if (object->pszZoneName == NULL) {
13036 0 : Py_RETURN_NONE;
13037 : }
13038 0 : if (object->pszZoneName == NULL) {
13039 0 : py_pszZoneName = Py_None;
13040 0 : Py_INCREF(py_pszZoneName);
13041 : } else {
13042 0 : if (object->pszZoneName == NULL) {
13043 0 : py_pszZoneName = Py_None;
13044 0 : Py_INCREF(py_pszZoneName);
13045 : } else {
13046 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
13047 : }
13048 : }
13049 0 : return py_pszZoneName;
13050 : }
13051 :
13052 0 : static int py_DNS_RPC_ZONE_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
13053 : {
13054 0 : struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(py_obj);
13055 0 : if (value == NULL) {
13056 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneName");
13057 0 : return -1;
13058 : }
13059 0 : if (value == Py_None) {
13060 0 : object->pszZoneName = NULL;
13061 : } else {
13062 0 : object->pszZoneName = NULL;
13063 : {
13064 0 : const char *test_str;
13065 0 : const char *talloc_str;
13066 0 : PyObject *unicode = NULL;
13067 0 : if (PyUnicode_Check(value)) {
13068 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
13069 0 : if (unicode == NULL) {
13070 0 : PyErr_NoMemory();
13071 0 : return -1;
13072 : }
13073 0 : test_str = PyBytes_AS_STRING(unicode);
13074 0 : } else if (PyBytes_Check(value)) {
13075 0 : test_str = PyBytes_AS_STRING(value);
13076 : } else {
13077 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
13078 0 : return -1;
13079 : }
13080 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
13081 0 : if (unicode != NULL) {
13082 0 : Py_DECREF(unicode);
13083 : }
13084 0 : if (talloc_str == NULL) {
13085 0 : PyErr_NoMemory();
13086 0 : return -1;
13087 : }
13088 0 : object->pszZoneName = talloc_str;
13089 : }
13090 : }
13091 0 : return 0;
13092 : }
13093 :
13094 0 : static PyObject *py_DNS_RPC_ZONE_W2K_get_Flags(PyObject *obj, void *closure)
13095 : {
13096 0 : struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(obj);
13097 0 : PyObject *py_Flags;
13098 0 : py_Flags = PyLong_FromUnsignedLongLong((uint32_t)object->Flags);
13099 0 : return py_Flags;
13100 : }
13101 :
13102 0 : static int py_DNS_RPC_ZONE_W2K_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
13103 : {
13104 0 : struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(py_obj);
13105 0 : if (value == NULL) {
13106 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Flags");
13107 0 : return -1;
13108 : }
13109 : {
13110 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Flags));
13111 0 : if (PyLong_Check(value)) {
13112 0 : unsigned long long test_var;
13113 0 : test_var = PyLong_AsUnsignedLongLong(value);
13114 0 : if (PyErr_Occurred() != NULL) {
13115 0 : return -1;
13116 : }
13117 0 : if (test_var > uint_max) {
13118 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13119 : PyLong_Type.tp_name, uint_max, test_var);
13120 0 : return -1;
13121 : }
13122 0 : object->Flags = test_var;
13123 : } else {
13124 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13125 : PyLong_Type.tp_name);
13126 0 : return -1;
13127 : }
13128 : }
13129 0 : return 0;
13130 : }
13131 :
13132 0 : static PyObject *py_DNS_RPC_ZONE_W2K_get_ZoneType(PyObject *obj, void *closure)
13133 : {
13134 0 : struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(obj);
13135 0 : PyObject *py_ZoneType;
13136 0 : py_ZoneType = PyLong_FromLong((uint16_t)object->ZoneType);
13137 0 : return py_ZoneType;
13138 : }
13139 :
13140 0 : static int py_DNS_RPC_ZONE_W2K_set_ZoneType(PyObject *py_obj, PyObject *value, void *closure)
13141 : {
13142 0 : struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(py_obj);
13143 0 : if (value == NULL) {
13144 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ZoneType");
13145 0 : return -1;
13146 : }
13147 : {
13148 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ZoneType));
13149 0 : if (PyLong_Check(value)) {
13150 0 : unsigned long long test_var;
13151 0 : test_var = PyLong_AsUnsignedLongLong(value);
13152 0 : if (PyErr_Occurred() != NULL) {
13153 0 : return -1;
13154 : }
13155 0 : if (test_var > uint_max) {
13156 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13157 : PyLong_Type.tp_name, uint_max, test_var);
13158 0 : return -1;
13159 : }
13160 0 : object->ZoneType = test_var;
13161 : } else {
13162 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13163 : PyLong_Type.tp_name);
13164 0 : return -1;
13165 : }
13166 : }
13167 0 : return 0;
13168 : }
13169 :
13170 0 : static PyObject *py_DNS_RPC_ZONE_W2K_get_Version(PyObject *obj, void *closure)
13171 : {
13172 0 : struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(obj);
13173 0 : PyObject *py_Version;
13174 0 : py_Version = PyLong_FromLong((uint16_t)object->Version);
13175 0 : return py_Version;
13176 : }
13177 :
13178 0 : static int py_DNS_RPC_ZONE_W2K_set_Version(PyObject *py_obj, PyObject *value, void *closure)
13179 : {
13180 0 : struct DNS_RPC_ZONE_W2K *object = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(py_obj);
13181 0 : if (value == NULL) {
13182 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Version");
13183 0 : return -1;
13184 : }
13185 : {
13186 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Version));
13187 0 : if (PyLong_Check(value)) {
13188 0 : unsigned long long test_var;
13189 0 : test_var = PyLong_AsUnsignedLongLong(value);
13190 0 : if (PyErr_Occurred() != NULL) {
13191 0 : return -1;
13192 : }
13193 0 : if (test_var > uint_max) {
13194 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13195 : PyLong_Type.tp_name, uint_max, test_var);
13196 0 : return -1;
13197 : }
13198 0 : object->Version = test_var;
13199 : } else {
13200 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13201 : PyLong_Type.tp_name);
13202 0 : return -1;
13203 : }
13204 : }
13205 0 : return 0;
13206 : }
13207 :
13208 : static PyGetSetDef py_DNS_RPC_ZONE_W2K_getsetters[] = {
13209 : {
13210 : .name = discard_const_p(char, "pszZoneName"),
13211 : .get = py_DNS_RPC_ZONE_W2K_get_pszZoneName,
13212 : .set = py_DNS_RPC_ZONE_W2K_set_pszZoneName,
13213 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
13214 : },
13215 : {
13216 : .name = discard_const_p(char, "Flags"),
13217 : .get = py_DNS_RPC_ZONE_W2K_get_Flags,
13218 : .set = py_DNS_RPC_ZONE_W2K_set_Flags,
13219 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_ZONE_FLAGS")
13220 : },
13221 : {
13222 : .name = discard_const_p(char, "ZoneType"),
13223 : .get = py_DNS_RPC_ZONE_W2K_get_ZoneType,
13224 : .set = py_DNS_RPC_ZONE_W2K_set_ZoneType,
13225 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13226 : },
13227 : {
13228 : .name = discard_const_p(char, "Version"),
13229 : .get = py_DNS_RPC_ZONE_W2K_get_Version,
13230 : .set = py_DNS_RPC_ZONE_W2K_set_Version,
13231 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13232 : },
13233 : { .name = NULL }
13234 : };
13235 :
13236 0 : static PyObject *py_DNS_RPC_ZONE_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13237 : {
13238 0 : return pytalloc_new(struct DNS_RPC_ZONE_W2K, type);
13239 : }
13240 :
13241 :
13242 : static PyTypeObject DNS_RPC_ZONE_W2K_Type = {
13243 : PyVarObject_HEAD_INIT(NULL, 0)
13244 : .tp_name = "dnsserver.DNS_RPC_ZONE_W2K",
13245 : .tp_getset = py_DNS_RPC_ZONE_W2K_getsetters,
13246 : .tp_methods = NULL,
13247 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13248 : .tp_new = py_DNS_RPC_ZONE_W2K_new,
13249 : };
13250 :
13251 :
13252 0 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
13253 : {
13254 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
13255 0 : PyObject *py_dwRpcStructureVersion;
13256 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
13257 0 : return py_dwRpcStructureVersion;
13258 : }
13259 :
13260 0 : static int py_DNS_RPC_ZONE_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
13261 : {
13262 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
13263 0 : if (value == NULL) {
13264 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
13265 0 : return -1;
13266 : }
13267 : {
13268 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
13269 0 : if (PyLong_Check(value)) {
13270 0 : unsigned long long test_var;
13271 0 : test_var = PyLong_AsUnsignedLongLong(value);
13272 0 : if (PyErr_Occurred() != NULL) {
13273 0 : return -1;
13274 : }
13275 0 : if (test_var > uint_max) {
13276 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13277 : PyLong_Type.tp_name, uint_max, test_var);
13278 0 : return -1;
13279 : }
13280 0 : object->dwRpcStructureVersion = test_var;
13281 : } else {
13282 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13283 : PyLong_Type.tp_name);
13284 0 : return -1;
13285 : }
13286 : }
13287 0 : return 0;
13288 : }
13289 :
13290 0 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
13291 : {
13292 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
13293 0 : PyObject *py_dwReserved0;
13294 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
13295 0 : return py_dwReserved0;
13296 : }
13297 :
13298 0 : static int py_DNS_RPC_ZONE_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
13299 : {
13300 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
13301 0 : if (value == NULL) {
13302 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
13303 0 : return -1;
13304 : }
13305 : {
13306 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
13307 0 : if (PyLong_Check(value)) {
13308 0 : unsigned long long test_var;
13309 0 : test_var = PyLong_AsUnsignedLongLong(value);
13310 0 : if (PyErr_Occurred() != NULL) {
13311 0 : return -1;
13312 : }
13313 0 : if (test_var > uint_max) {
13314 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13315 : PyLong_Type.tp_name, uint_max, test_var);
13316 0 : return -1;
13317 : }
13318 0 : object->dwReserved0 = test_var;
13319 : } else {
13320 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13321 : PyLong_Type.tp_name);
13322 0 : return -1;
13323 : }
13324 : }
13325 0 : return 0;
13326 : }
13327 :
13328 18 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
13329 : {
13330 18 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
13331 0 : PyObject *py_pszZoneName;
13332 18 : if (object->pszZoneName == NULL) {
13333 0 : Py_RETURN_NONE;
13334 : }
13335 18 : if (object->pszZoneName == NULL) {
13336 0 : py_pszZoneName = Py_None;
13337 0 : Py_INCREF(py_pszZoneName);
13338 : } else {
13339 18 : if (object->pszZoneName == NULL) {
13340 0 : py_pszZoneName = Py_None;
13341 0 : Py_INCREF(py_pszZoneName);
13342 : } else {
13343 18 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
13344 : }
13345 : }
13346 18 : return py_pszZoneName;
13347 : }
13348 :
13349 0 : static int py_DNS_RPC_ZONE_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
13350 : {
13351 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
13352 0 : if (value == NULL) {
13353 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneName");
13354 0 : return -1;
13355 : }
13356 0 : if (value == Py_None) {
13357 0 : object->pszZoneName = NULL;
13358 : } else {
13359 0 : object->pszZoneName = NULL;
13360 : {
13361 0 : const char *test_str;
13362 0 : const char *talloc_str;
13363 0 : PyObject *unicode = NULL;
13364 0 : if (PyUnicode_Check(value)) {
13365 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
13366 0 : if (unicode == NULL) {
13367 0 : PyErr_NoMemory();
13368 0 : return -1;
13369 : }
13370 0 : test_str = PyBytes_AS_STRING(unicode);
13371 0 : } else if (PyBytes_Check(value)) {
13372 0 : test_str = PyBytes_AS_STRING(value);
13373 : } else {
13374 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
13375 0 : return -1;
13376 : }
13377 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
13378 0 : if (unicode != NULL) {
13379 0 : Py_DECREF(unicode);
13380 : }
13381 0 : if (talloc_str == NULL) {
13382 0 : PyErr_NoMemory();
13383 0 : return -1;
13384 : }
13385 0 : object->pszZoneName = talloc_str;
13386 : }
13387 : }
13388 0 : return 0;
13389 : }
13390 :
13391 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_Flags(PyObject *obj, void *closure)
13392 : {
13393 6 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
13394 0 : PyObject *py_Flags;
13395 6 : py_Flags = PyLong_FromUnsignedLongLong((uint32_t)object->Flags);
13396 6 : return py_Flags;
13397 : }
13398 :
13399 0 : static int py_DNS_RPC_ZONE_DOTNET_set_Flags(PyObject *py_obj, PyObject *value, void *closure)
13400 : {
13401 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
13402 0 : if (value == NULL) {
13403 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Flags");
13404 0 : return -1;
13405 : }
13406 : {
13407 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Flags));
13408 0 : if (PyLong_Check(value)) {
13409 0 : unsigned long long test_var;
13410 0 : test_var = PyLong_AsUnsignedLongLong(value);
13411 0 : if (PyErr_Occurred() != NULL) {
13412 0 : return -1;
13413 : }
13414 0 : if (test_var > uint_max) {
13415 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13416 : PyLong_Type.tp_name, uint_max, test_var);
13417 0 : return -1;
13418 : }
13419 0 : object->Flags = test_var;
13420 : } else {
13421 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13422 : PyLong_Type.tp_name);
13423 0 : return -1;
13424 : }
13425 : }
13426 0 : return 0;
13427 : }
13428 :
13429 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_ZoneType(PyObject *obj, void *closure)
13430 : {
13431 6 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
13432 0 : PyObject *py_ZoneType;
13433 6 : py_ZoneType = PyLong_FromLong((uint16_t)object->ZoneType);
13434 6 : return py_ZoneType;
13435 : }
13436 :
13437 0 : static int py_DNS_RPC_ZONE_DOTNET_set_ZoneType(PyObject *py_obj, PyObject *value, void *closure)
13438 : {
13439 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
13440 0 : if (value == NULL) {
13441 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ZoneType");
13442 0 : return -1;
13443 : }
13444 : {
13445 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->ZoneType));
13446 0 : if (PyLong_Check(value)) {
13447 0 : unsigned long long test_var;
13448 0 : test_var = PyLong_AsUnsignedLongLong(value);
13449 0 : if (PyErr_Occurred() != NULL) {
13450 0 : return -1;
13451 : }
13452 0 : if (test_var > uint_max) {
13453 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13454 : PyLong_Type.tp_name, uint_max, test_var);
13455 0 : return -1;
13456 : }
13457 0 : object->ZoneType = test_var;
13458 : } else {
13459 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13460 : PyLong_Type.tp_name);
13461 0 : return -1;
13462 : }
13463 : }
13464 0 : return 0;
13465 : }
13466 :
13467 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_Version(PyObject *obj, void *closure)
13468 : {
13469 6 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
13470 0 : PyObject *py_Version;
13471 6 : py_Version = PyLong_FromLong((uint16_t)object->Version);
13472 6 : return py_Version;
13473 : }
13474 :
13475 0 : static int py_DNS_RPC_ZONE_DOTNET_set_Version(PyObject *py_obj, PyObject *value, void *closure)
13476 : {
13477 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
13478 0 : if (value == NULL) {
13479 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Version");
13480 0 : return -1;
13481 : }
13482 : {
13483 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Version));
13484 0 : if (PyLong_Check(value)) {
13485 0 : unsigned long long test_var;
13486 0 : test_var = PyLong_AsUnsignedLongLong(value);
13487 0 : if (PyErr_Occurred() != NULL) {
13488 0 : return -1;
13489 : }
13490 0 : if (test_var > uint_max) {
13491 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13492 : PyLong_Type.tp_name, uint_max, test_var);
13493 0 : return -1;
13494 : }
13495 0 : object->Version = test_var;
13496 : } else {
13497 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13498 : PyLong_Type.tp_name);
13499 0 : return -1;
13500 : }
13501 : }
13502 0 : return 0;
13503 : }
13504 :
13505 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
13506 : {
13507 6 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
13508 0 : PyObject *py_dwDpFlags;
13509 6 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwDpFlags);
13510 6 : return py_dwDpFlags;
13511 : }
13512 :
13513 0 : static int py_DNS_RPC_ZONE_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
13514 : {
13515 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
13516 0 : if (value == NULL) {
13517 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDpFlags");
13518 0 : return -1;
13519 : }
13520 : {
13521 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
13522 0 : if (PyLong_Check(value)) {
13523 0 : unsigned long long test_var;
13524 0 : test_var = PyLong_AsUnsignedLongLong(value);
13525 0 : if (PyErr_Occurred() != NULL) {
13526 0 : return -1;
13527 : }
13528 0 : if (test_var > uint_max) {
13529 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13530 : PyLong_Type.tp_name, uint_max, test_var);
13531 0 : return -1;
13532 : }
13533 0 : object->dwDpFlags = test_var;
13534 : } else {
13535 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13536 : PyLong_Type.tp_name);
13537 0 : return -1;
13538 : }
13539 : }
13540 0 : return 0;
13541 : }
13542 :
13543 6 : static PyObject *py_DNS_RPC_ZONE_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
13544 : {
13545 6 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(obj);
13546 0 : PyObject *py_pszDpFqdn;
13547 6 : if (object->pszDpFqdn == NULL) {
13548 0 : Py_RETURN_NONE;
13549 : }
13550 6 : if (object->pszDpFqdn == NULL) {
13551 0 : py_pszDpFqdn = Py_None;
13552 0 : Py_INCREF(py_pszDpFqdn);
13553 : } else {
13554 6 : if (object->pszDpFqdn == NULL) {
13555 0 : py_pszDpFqdn = Py_None;
13556 0 : Py_INCREF(py_pszDpFqdn);
13557 : } else {
13558 6 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
13559 : }
13560 : }
13561 6 : return py_pszDpFqdn;
13562 : }
13563 :
13564 0 : static int py_DNS_RPC_ZONE_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
13565 : {
13566 0 : struct DNS_RPC_ZONE_DOTNET *object = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(py_obj);
13567 0 : if (value == NULL) {
13568 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpFqdn");
13569 0 : return -1;
13570 : }
13571 0 : if (value == Py_None) {
13572 0 : object->pszDpFqdn = NULL;
13573 : } else {
13574 0 : object->pszDpFqdn = NULL;
13575 : {
13576 0 : const char *test_str;
13577 0 : const char *talloc_str;
13578 0 : PyObject *unicode = NULL;
13579 0 : if (PyUnicode_Check(value)) {
13580 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
13581 0 : if (unicode == NULL) {
13582 0 : PyErr_NoMemory();
13583 0 : return -1;
13584 : }
13585 0 : test_str = PyBytes_AS_STRING(unicode);
13586 0 : } else if (PyBytes_Check(value)) {
13587 0 : test_str = PyBytes_AS_STRING(value);
13588 : } else {
13589 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
13590 0 : return -1;
13591 : }
13592 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
13593 0 : if (unicode != NULL) {
13594 0 : Py_DECREF(unicode);
13595 : }
13596 0 : if (talloc_str == NULL) {
13597 0 : PyErr_NoMemory();
13598 0 : return -1;
13599 : }
13600 0 : object->pszDpFqdn = talloc_str;
13601 : }
13602 : }
13603 0 : return 0;
13604 : }
13605 :
13606 : static PyGetSetDef py_DNS_RPC_ZONE_DOTNET_getsetters[] = {
13607 : {
13608 : .name = discard_const_p(char, "dwRpcStructureVersion"),
13609 : .get = py_DNS_RPC_ZONE_DOTNET_get_dwRpcStructureVersion,
13610 : .set = py_DNS_RPC_ZONE_DOTNET_set_dwRpcStructureVersion,
13611 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13612 : },
13613 : {
13614 : .name = discard_const_p(char, "dwReserved0"),
13615 : .get = py_DNS_RPC_ZONE_DOTNET_get_dwReserved0,
13616 : .set = py_DNS_RPC_ZONE_DOTNET_set_dwReserved0,
13617 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13618 : },
13619 : {
13620 : .name = discard_const_p(char, "pszZoneName"),
13621 : .get = py_DNS_RPC_ZONE_DOTNET_get_pszZoneName,
13622 : .set = py_DNS_RPC_ZONE_DOTNET_set_pszZoneName,
13623 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
13624 : },
13625 : {
13626 : .name = discard_const_p(char, "Flags"),
13627 : .get = py_DNS_RPC_ZONE_DOTNET_get_Flags,
13628 : .set = py_DNS_RPC_ZONE_DOTNET_set_Flags,
13629 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_ZONE_FLAGS")
13630 : },
13631 : {
13632 : .name = discard_const_p(char, "ZoneType"),
13633 : .get = py_DNS_RPC_ZONE_DOTNET_get_ZoneType,
13634 : .set = py_DNS_RPC_ZONE_DOTNET_set_ZoneType,
13635 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13636 : },
13637 : {
13638 : .name = discard_const_p(char, "Version"),
13639 : .get = py_DNS_RPC_ZONE_DOTNET_get_Version,
13640 : .set = py_DNS_RPC_ZONE_DOTNET_set_Version,
13641 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13642 : },
13643 : {
13644 : .name = discard_const_p(char, "dwDpFlags"),
13645 : .get = py_DNS_RPC_ZONE_DOTNET_get_dwDpFlags,
13646 : .set = py_DNS_RPC_ZONE_DOTNET_set_dwDpFlags,
13647 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_DP_FLAGS")
13648 : },
13649 : {
13650 : .name = discard_const_p(char, "pszDpFqdn"),
13651 : .get = py_DNS_RPC_ZONE_DOTNET_get_pszDpFqdn,
13652 : .set = py_DNS_RPC_ZONE_DOTNET_set_pszDpFqdn,
13653 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
13654 : },
13655 : { .name = NULL }
13656 : };
13657 :
13658 0 : static PyObject *py_DNS_RPC_ZONE_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13659 : {
13660 0 : return pytalloc_new(struct DNS_RPC_ZONE_DOTNET, type);
13661 : }
13662 :
13663 :
13664 : static PyTypeObject DNS_RPC_ZONE_DOTNET_Type = {
13665 : PyVarObject_HEAD_INIT(NULL, 0)
13666 : .tp_name = "dnsserver.DNS_RPC_ZONE_DOTNET",
13667 : .tp_getset = py_DNS_RPC_ZONE_DOTNET_getsetters,
13668 : .tp_methods = NULL,
13669 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13670 : .tp_new = py_DNS_RPC_ZONE_DOTNET_new,
13671 : };
13672 :
13673 :
13674 0 : static PyObject *py_DNS_RPC_ZONE_LIST_W2K_get_dwZoneCount(PyObject *obj, void *closure)
13675 : {
13676 0 : struct DNS_RPC_ZONE_LIST_W2K *object = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(obj);
13677 0 : PyObject *py_dwZoneCount;
13678 0 : py_dwZoneCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneCount);
13679 0 : return py_dwZoneCount;
13680 : }
13681 :
13682 0 : static int py_DNS_RPC_ZONE_LIST_W2K_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
13683 : {
13684 0 : struct DNS_RPC_ZONE_LIST_W2K *object = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(py_obj);
13685 0 : if (value == NULL) {
13686 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneCount");
13687 0 : return -1;
13688 : }
13689 : {
13690 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneCount));
13691 0 : if (PyLong_Check(value)) {
13692 0 : unsigned long long test_var;
13693 0 : test_var = PyLong_AsUnsignedLongLong(value);
13694 0 : if (PyErr_Occurred() != NULL) {
13695 0 : return -1;
13696 : }
13697 0 : if (test_var > uint_max) {
13698 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13699 : PyLong_Type.tp_name, uint_max, test_var);
13700 0 : return -1;
13701 : }
13702 0 : object->dwZoneCount = test_var;
13703 : } else {
13704 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13705 : PyLong_Type.tp_name);
13706 0 : return -1;
13707 : }
13708 : }
13709 0 : return 0;
13710 : }
13711 :
13712 0 : static PyObject *py_DNS_RPC_ZONE_LIST_W2K_get_ZoneArray(PyObject *obj, void *closure)
13713 : {
13714 0 : struct DNS_RPC_ZONE_LIST_W2K *object = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(obj);
13715 0 : PyObject *py_ZoneArray;
13716 0 : py_ZoneArray = PyList_New(object->dwZoneCount);
13717 0 : if (py_ZoneArray == NULL) {
13718 0 : return NULL;
13719 : }
13720 : {
13721 : int ZoneArray_cntr_0;
13722 0 : for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < (object->dwZoneCount); ZoneArray_cntr_0++) {
13723 0 : PyObject *py_ZoneArray_0;
13724 0 : if (object->ZoneArray[ZoneArray_cntr_0] == NULL) {
13725 0 : py_ZoneArray_0 = Py_None;
13726 0 : Py_INCREF(py_ZoneArray_0);
13727 : } else {
13728 0 : py_ZoneArray_0 = pytalloc_reference_ex(&DNS_RPC_ZONE_W2K_Type, object->ZoneArray[ZoneArray_cntr_0], object->ZoneArray[ZoneArray_cntr_0]);
13729 : }
13730 0 : PyList_SetItem(py_ZoneArray, ZoneArray_cntr_0, py_ZoneArray_0);
13731 : }
13732 : }
13733 0 : return py_ZoneArray;
13734 : }
13735 :
13736 0 : static int py_DNS_RPC_ZONE_LIST_W2K_set_ZoneArray(PyObject *py_obj, PyObject *value, void *closure)
13737 : {
13738 0 : struct DNS_RPC_ZONE_LIST_W2K *object = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(py_obj);
13739 0 : if (value == NULL) {
13740 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ZoneArray");
13741 0 : return -1;
13742 : }
13743 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13744 : {
13745 0 : int ZoneArray_cntr_0;
13746 0 : object->ZoneArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ZoneArray, PyList_GET_SIZE(value));
13747 0 : if (!object->ZoneArray) { return -1; }
13748 0 : talloc_set_name_const(object->ZoneArray, "ARRAY: object->ZoneArray");
13749 0 : for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < PyList_GET_SIZE(value); ZoneArray_cntr_0++) {
13750 0 : if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == NULL) {
13751 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ZoneArray[ZoneArray_cntr_0]");
13752 0 : return -1;
13753 : }
13754 0 : if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == Py_None) {
13755 0 : object->ZoneArray[ZoneArray_cntr_0] = NULL;
13756 : } else {
13757 0 : object->ZoneArray[ZoneArray_cntr_0] = NULL;
13758 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_W2K_Type, PyList_GET_ITEM(value, ZoneArray_cntr_0), return -1;);
13759 0 : if (talloc_reference(object->ZoneArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ZoneArray_cntr_0))) == NULL) {
13760 0 : PyErr_NoMemory();
13761 0 : return -1;
13762 : }
13763 0 : object->ZoneArray[ZoneArray_cntr_0] = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(PyList_GET_ITEM(value, ZoneArray_cntr_0));
13764 : }
13765 : }
13766 : }
13767 0 : return 0;
13768 : }
13769 :
13770 : static PyGetSetDef py_DNS_RPC_ZONE_LIST_W2K_getsetters[] = {
13771 : {
13772 : .name = discard_const_p(char, "dwZoneCount"),
13773 : .get = py_DNS_RPC_ZONE_LIST_W2K_get_dwZoneCount,
13774 : .set = py_DNS_RPC_ZONE_LIST_W2K_set_dwZoneCount,
13775 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13776 : },
13777 : {
13778 : .name = discard_const_p(char, "ZoneArray"),
13779 : .get = py_DNS_RPC_ZONE_LIST_W2K_get_ZoneArray,
13780 : .set = py_DNS_RPC_ZONE_LIST_W2K_set_ZoneArray,
13781 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_ZONE_W2K")
13782 : },
13783 : { .name = NULL }
13784 : };
13785 :
13786 0 : static PyObject *py_DNS_RPC_ZONE_LIST_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
13787 : {
13788 0 : return pytalloc_new(struct DNS_RPC_ZONE_LIST_W2K, type);
13789 : }
13790 :
13791 :
13792 : static PyTypeObject DNS_RPC_ZONE_LIST_W2K_Type = {
13793 : PyVarObject_HEAD_INIT(NULL, 0)
13794 : .tp_name = "dnsserver.DNS_RPC_ZONE_LIST_W2K",
13795 : .tp_getset = py_DNS_RPC_ZONE_LIST_W2K_getsetters,
13796 : .tp_methods = NULL,
13797 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
13798 : .tp_new = py_DNS_RPC_ZONE_LIST_W2K_new,
13799 : };
13800 :
13801 :
13802 0 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
13803 : {
13804 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(obj);
13805 0 : PyObject *py_dwRpcStructureVersion;
13806 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
13807 0 : return py_dwRpcStructureVersion;
13808 : }
13809 :
13810 0 : static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
13811 : {
13812 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(py_obj);
13813 0 : if (value == NULL) {
13814 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
13815 0 : return -1;
13816 : }
13817 : {
13818 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
13819 0 : if (PyLong_Check(value)) {
13820 0 : unsigned long long test_var;
13821 0 : test_var = PyLong_AsUnsignedLongLong(value);
13822 0 : if (PyErr_Occurred() != NULL) {
13823 0 : return -1;
13824 : }
13825 0 : if (test_var > uint_max) {
13826 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13827 : PyLong_Type.tp_name, uint_max, test_var);
13828 0 : return -1;
13829 : }
13830 0 : object->dwRpcStructureVersion = test_var;
13831 : } else {
13832 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13833 : PyLong_Type.tp_name);
13834 0 : return -1;
13835 : }
13836 : }
13837 0 : return 0;
13838 : }
13839 :
13840 0 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
13841 : {
13842 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(obj);
13843 0 : PyObject *py_dwReserved0;
13844 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
13845 0 : return py_dwReserved0;
13846 : }
13847 :
13848 0 : static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
13849 : {
13850 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(py_obj);
13851 0 : if (value == NULL) {
13852 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
13853 0 : return -1;
13854 : }
13855 : {
13856 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
13857 0 : if (PyLong_Check(value)) {
13858 0 : unsigned long long test_var;
13859 0 : test_var = PyLong_AsUnsignedLongLong(value);
13860 0 : if (PyErr_Occurred() != NULL) {
13861 0 : return -1;
13862 : }
13863 0 : if (test_var > uint_max) {
13864 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13865 : PyLong_Type.tp_name, uint_max, test_var);
13866 0 : return -1;
13867 : }
13868 0 : object->dwReserved0 = test_var;
13869 : } else {
13870 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13871 : PyLong_Type.tp_name);
13872 0 : return -1;
13873 : }
13874 : }
13875 0 : return 0;
13876 : }
13877 :
13878 14 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_dwZoneCount(PyObject *obj, void *closure)
13879 : {
13880 14 : struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(obj);
13881 0 : PyObject *py_dwZoneCount;
13882 14 : py_dwZoneCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneCount);
13883 14 : return py_dwZoneCount;
13884 : }
13885 :
13886 0 : static int py_DNS_RPC_ZONE_LIST_DOTNET_set_dwZoneCount(PyObject *py_obj, PyObject *value, void *closure)
13887 : {
13888 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(py_obj);
13889 0 : if (value == NULL) {
13890 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneCount");
13891 0 : return -1;
13892 : }
13893 : {
13894 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneCount));
13895 0 : if (PyLong_Check(value)) {
13896 0 : unsigned long long test_var;
13897 0 : test_var = PyLong_AsUnsignedLongLong(value);
13898 0 : if (PyErr_Occurred() != NULL) {
13899 0 : return -1;
13900 : }
13901 0 : if (test_var > uint_max) {
13902 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
13903 : PyLong_Type.tp_name, uint_max, test_var);
13904 0 : return -1;
13905 : }
13906 0 : object->dwZoneCount = test_var;
13907 : } else {
13908 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
13909 : PyLong_Type.tp_name);
13910 0 : return -1;
13911 : }
13912 : }
13913 0 : return 0;
13914 : }
13915 :
13916 5 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_get_ZoneArray(PyObject *obj, void *closure)
13917 : {
13918 5 : struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(obj);
13919 0 : PyObject *py_ZoneArray;
13920 5 : py_ZoneArray = PyList_New(object->dwZoneCount);
13921 5 : if (py_ZoneArray == NULL) {
13922 0 : return NULL;
13923 : }
13924 : {
13925 : int ZoneArray_cntr_0;
13926 23 : for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < (object->dwZoneCount); ZoneArray_cntr_0++) {
13927 0 : PyObject *py_ZoneArray_0;
13928 18 : if (object->ZoneArray[ZoneArray_cntr_0] == NULL) {
13929 0 : py_ZoneArray_0 = Py_None;
13930 0 : Py_INCREF(py_ZoneArray_0);
13931 : } else {
13932 18 : py_ZoneArray_0 = pytalloc_reference_ex(&DNS_RPC_ZONE_DOTNET_Type, object->ZoneArray[ZoneArray_cntr_0], object->ZoneArray[ZoneArray_cntr_0]);
13933 : }
13934 18 : PyList_SetItem(py_ZoneArray, ZoneArray_cntr_0, py_ZoneArray_0);
13935 : }
13936 : }
13937 5 : return py_ZoneArray;
13938 : }
13939 :
13940 0 : static int py_DNS_RPC_ZONE_LIST_DOTNET_set_ZoneArray(PyObject *py_obj, PyObject *value, void *closure)
13941 : {
13942 0 : struct DNS_RPC_ZONE_LIST_DOTNET *object = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(py_obj);
13943 0 : if (value == NULL) {
13944 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ZoneArray");
13945 0 : return -1;
13946 : }
13947 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
13948 : {
13949 0 : int ZoneArray_cntr_0;
13950 0 : object->ZoneArray = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->ZoneArray, PyList_GET_SIZE(value));
13951 0 : if (!object->ZoneArray) { return -1; }
13952 0 : talloc_set_name_const(object->ZoneArray, "ARRAY: object->ZoneArray");
13953 0 : for (ZoneArray_cntr_0 = 0; ZoneArray_cntr_0 < PyList_GET_SIZE(value); ZoneArray_cntr_0++) {
13954 0 : if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == NULL) {
13955 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->ZoneArray[ZoneArray_cntr_0]");
13956 0 : return -1;
13957 : }
13958 0 : if (PyList_GET_ITEM(value, ZoneArray_cntr_0) == Py_None) {
13959 0 : object->ZoneArray[ZoneArray_cntr_0] = NULL;
13960 : } else {
13961 0 : object->ZoneArray[ZoneArray_cntr_0] = NULL;
13962 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_DOTNET_Type, PyList_GET_ITEM(value, ZoneArray_cntr_0), return -1;);
13963 0 : if (talloc_reference(object->ZoneArray, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, ZoneArray_cntr_0))) == NULL) {
13964 0 : PyErr_NoMemory();
13965 0 : return -1;
13966 : }
13967 0 : object->ZoneArray[ZoneArray_cntr_0] = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(PyList_GET_ITEM(value, ZoneArray_cntr_0));
13968 : }
13969 : }
13970 : }
13971 0 : return 0;
13972 : }
13973 :
13974 : static PyGetSetDef py_DNS_RPC_ZONE_LIST_DOTNET_getsetters[] = {
13975 : {
13976 : .name = discard_const_p(char, "dwRpcStructureVersion"),
13977 : .get = py_DNS_RPC_ZONE_LIST_DOTNET_get_dwRpcStructureVersion,
13978 : .set = py_DNS_RPC_ZONE_LIST_DOTNET_set_dwRpcStructureVersion,
13979 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13980 : },
13981 : {
13982 : .name = discard_const_p(char, "dwReserved0"),
13983 : .get = py_DNS_RPC_ZONE_LIST_DOTNET_get_dwReserved0,
13984 : .set = py_DNS_RPC_ZONE_LIST_DOTNET_set_dwReserved0,
13985 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13986 : },
13987 : {
13988 : .name = discard_const_p(char, "dwZoneCount"),
13989 : .get = py_DNS_RPC_ZONE_LIST_DOTNET_get_dwZoneCount,
13990 : .set = py_DNS_RPC_ZONE_LIST_DOTNET_set_dwZoneCount,
13991 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
13992 : },
13993 : {
13994 : .name = discard_const_p(char, "ZoneArray"),
13995 : .get = py_DNS_RPC_ZONE_LIST_DOTNET_get_ZoneArray,
13996 : .set = py_DNS_RPC_ZONE_LIST_DOTNET_set_ZoneArray,
13997 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_ZONE_DOTNET")
13998 : },
13999 : { .name = NULL }
14000 : };
14001 :
14002 0 : static PyObject *py_DNS_RPC_ZONE_LIST_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
14003 : {
14004 0 : return pytalloc_new(struct DNS_RPC_ZONE_LIST_DOTNET, type);
14005 : }
14006 :
14007 :
14008 : static PyTypeObject DNS_RPC_ZONE_LIST_DOTNET_Type = {
14009 : PyVarObject_HEAD_INIT(NULL, 0)
14010 : .tp_name = "dnsserver.DNS_RPC_ZONE_LIST_DOTNET",
14011 : .tp_getset = py_DNS_RPC_ZONE_LIST_DOTNET_getsetters,
14012 : .tp_methods = NULL,
14013 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
14014 : .tp_new = py_DNS_RPC_ZONE_LIST_DOTNET_new,
14015 : };
14016 :
14017 :
14018 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pszZoneName(PyObject *obj, void *closure)
14019 : {
14020 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14021 0 : PyObject *py_pszZoneName;
14022 0 : if (object->pszZoneName == NULL) {
14023 0 : Py_RETURN_NONE;
14024 : }
14025 0 : if (object->pszZoneName == NULL) {
14026 0 : py_pszZoneName = Py_None;
14027 0 : Py_INCREF(py_pszZoneName);
14028 : } else {
14029 0 : if (object->pszZoneName == NULL) {
14030 0 : py_pszZoneName = Py_None;
14031 0 : Py_INCREF(py_pszZoneName);
14032 : } else {
14033 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
14034 : }
14035 : }
14036 0 : return py_pszZoneName;
14037 : }
14038 :
14039 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
14040 : {
14041 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14042 0 : if (value == NULL) {
14043 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneName");
14044 0 : return -1;
14045 : }
14046 0 : if (value == Py_None) {
14047 0 : object->pszZoneName = NULL;
14048 : } else {
14049 0 : object->pszZoneName = NULL;
14050 : {
14051 0 : const char *test_str;
14052 0 : const char *talloc_str;
14053 0 : PyObject *unicode = NULL;
14054 0 : if (PyUnicode_Check(value)) {
14055 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
14056 0 : if (unicode == NULL) {
14057 0 : PyErr_NoMemory();
14058 0 : return -1;
14059 : }
14060 0 : test_str = PyBytes_AS_STRING(unicode);
14061 0 : } else if (PyBytes_Check(value)) {
14062 0 : test_str = PyBytes_AS_STRING(value);
14063 : } else {
14064 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
14065 0 : return -1;
14066 : }
14067 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
14068 0 : if (unicode != NULL) {
14069 0 : Py_DECREF(unicode);
14070 : }
14071 0 : if (talloc_str == NULL) {
14072 0 : PyErr_NoMemory();
14073 0 : return -1;
14074 : }
14075 0 : object->pszZoneName = talloc_str;
14076 : }
14077 : }
14078 0 : return 0;
14079 : }
14080 :
14081 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwZoneType(PyObject *obj, void *closure)
14082 : {
14083 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14084 0 : PyObject *py_dwZoneType;
14085 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneType);
14086 0 : return py_dwZoneType;
14087 : }
14088 :
14089 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
14090 : {
14091 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14092 0 : if (value == NULL) {
14093 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneType");
14094 0 : return -1;
14095 : }
14096 : {
14097 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
14098 0 : if (PyLong_Check(value)) {
14099 0 : unsigned long long test_var;
14100 0 : test_var = PyLong_AsUnsignedLongLong(value);
14101 0 : if (PyErr_Occurred() != NULL) {
14102 0 : return -1;
14103 : }
14104 0 : if (test_var > uint_max) {
14105 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14106 : PyLong_Type.tp_name, uint_max, test_var);
14107 0 : return -1;
14108 : }
14109 0 : object->dwZoneType = test_var;
14110 : } else {
14111 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14112 : PyLong_Type.tp_name);
14113 0 : return -1;
14114 : }
14115 : }
14116 0 : return 0;
14117 : }
14118 :
14119 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fReverse(PyObject *obj, void *closure)
14120 : {
14121 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14122 0 : PyObject *py_fReverse;
14123 0 : py_fReverse = PyLong_FromUnsignedLongLong((uint32_t)object->fReverse);
14124 0 : return py_fReverse;
14125 : }
14126 :
14127 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
14128 : {
14129 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14130 0 : if (value == NULL) {
14131 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReverse");
14132 0 : return -1;
14133 : }
14134 : {
14135 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReverse));
14136 0 : if (PyLong_Check(value)) {
14137 0 : unsigned long long test_var;
14138 0 : test_var = PyLong_AsUnsignedLongLong(value);
14139 0 : if (PyErr_Occurred() != NULL) {
14140 0 : return -1;
14141 : }
14142 0 : if (test_var > uint_max) {
14143 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14144 : PyLong_Type.tp_name, uint_max, test_var);
14145 0 : return -1;
14146 : }
14147 0 : object->fReverse = test_var;
14148 : } else {
14149 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14150 : PyLong_Type.tp_name);
14151 0 : return -1;
14152 : }
14153 : }
14154 0 : return 0;
14155 : }
14156 :
14157 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
14158 : {
14159 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14160 0 : PyObject *py_fAllowUpdate;
14161 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
14162 0 : return py_fAllowUpdate;
14163 : }
14164 :
14165 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
14166 : {
14167 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14168 0 : if (value == NULL) {
14169 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
14170 0 : return -1;
14171 : }
14172 : {
14173 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
14174 0 : if (PyLong_Check(value)) {
14175 0 : unsigned long long test_var;
14176 0 : test_var = PyLong_AsUnsignedLongLong(value);
14177 0 : if (PyErr_Occurred() != NULL) {
14178 0 : return -1;
14179 : }
14180 0 : if (test_var > uint_max) {
14181 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14182 : PyLong_Type.tp_name, uint_max, test_var);
14183 0 : return -1;
14184 : }
14185 0 : object->fAllowUpdate = test_var;
14186 : } else {
14187 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14188 : PyLong_Type.tp_name);
14189 0 : return -1;
14190 : }
14191 : }
14192 0 : return 0;
14193 : }
14194 :
14195 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fPaused(PyObject *obj, void *closure)
14196 : {
14197 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14198 0 : PyObject *py_fPaused;
14199 0 : py_fPaused = PyLong_FromUnsignedLongLong((uint32_t)object->fPaused);
14200 0 : return py_fPaused;
14201 : }
14202 :
14203 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
14204 : {
14205 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14206 0 : if (value == NULL) {
14207 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fPaused");
14208 0 : return -1;
14209 : }
14210 : {
14211 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fPaused));
14212 0 : if (PyLong_Check(value)) {
14213 0 : unsigned long long test_var;
14214 0 : test_var = PyLong_AsUnsignedLongLong(value);
14215 0 : if (PyErr_Occurred() != NULL) {
14216 0 : return -1;
14217 : }
14218 0 : if (test_var > uint_max) {
14219 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14220 : PyLong_Type.tp_name, uint_max, test_var);
14221 0 : return -1;
14222 : }
14223 0 : object->fPaused = test_var;
14224 : } else {
14225 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14226 : PyLong_Type.tp_name);
14227 0 : return -1;
14228 : }
14229 : }
14230 0 : return 0;
14231 : }
14232 :
14233 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fShutdown(PyObject *obj, void *closure)
14234 : {
14235 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14236 0 : PyObject *py_fShutdown;
14237 0 : py_fShutdown = PyLong_FromUnsignedLongLong((uint32_t)object->fShutdown);
14238 0 : return py_fShutdown;
14239 : }
14240 :
14241 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
14242 : {
14243 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14244 0 : if (value == NULL) {
14245 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fShutdown");
14246 0 : return -1;
14247 : }
14248 : {
14249 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fShutdown));
14250 0 : if (PyLong_Check(value)) {
14251 0 : unsigned long long test_var;
14252 0 : test_var = PyLong_AsUnsignedLongLong(value);
14253 0 : if (PyErr_Occurred() != NULL) {
14254 0 : return -1;
14255 : }
14256 0 : if (test_var > uint_max) {
14257 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14258 : PyLong_Type.tp_name, uint_max, test_var);
14259 0 : return -1;
14260 : }
14261 0 : object->fShutdown = test_var;
14262 : } else {
14263 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14264 : PyLong_Type.tp_name);
14265 0 : return -1;
14266 : }
14267 : }
14268 0 : return 0;
14269 : }
14270 :
14271 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAutoCreated(PyObject *obj, void *closure)
14272 : {
14273 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14274 0 : PyObject *py_fAutoCreated;
14275 0 : py_fAutoCreated = PyLong_FromUnsignedLongLong((uint32_t)object->fAutoCreated);
14276 0 : return py_fAutoCreated;
14277 : }
14278 :
14279 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
14280 : {
14281 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14282 0 : if (value == NULL) {
14283 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoCreated");
14284 0 : return -1;
14285 : }
14286 : {
14287 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCreated));
14288 0 : if (PyLong_Check(value)) {
14289 0 : unsigned long long test_var;
14290 0 : test_var = PyLong_AsUnsignedLongLong(value);
14291 0 : if (PyErr_Occurred() != NULL) {
14292 0 : return -1;
14293 : }
14294 0 : if (test_var > uint_max) {
14295 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14296 : PyLong_Type.tp_name, uint_max, test_var);
14297 0 : return -1;
14298 : }
14299 0 : object->fAutoCreated = test_var;
14300 : } else {
14301 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14302 : PyLong_Type.tp_name);
14303 0 : return -1;
14304 : }
14305 : }
14306 0 : return 0;
14307 : }
14308 :
14309 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseDatabase(PyObject *obj, void *closure)
14310 : {
14311 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14312 0 : PyObject *py_fUseDatabase;
14313 0 : py_fUseDatabase = PyLong_FromUnsignedLongLong((uint32_t)object->fUseDatabase);
14314 0 : return py_fUseDatabase;
14315 : }
14316 :
14317 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
14318 : {
14319 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14320 0 : if (value == NULL) {
14321 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseDatabase");
14322 0 : return -1;
14323 : }
14324 : {
14325 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseDatabase));
14326 0 : if (PyLong_Check(value)) {
14327 0 : unsigned long long test_var;
14328 0 : test_var = PyLong_AsUnsignedLongLong(value);
14329 0 : if (PyErr_Occurred() != NULL) {
14330 0 : return -1;
14331 : }
14332 0 : if (test_var > uint_max) {
14333 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14334 : PyLong_Type.tp_name, uint_max, test_var);
14335 0 : return -1;
14336 : }
14337 0 : object->fUseDatabase = test_var;
14338 : } else {
14339 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14340 : PyLong_Type.tp_name);
14341 0 : return -1;
14342 : }
14343 : }
14344 0 : return 0;
14345 : }
14346 :
14347 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pszDataFile(PyObject *obj, void *closure)
14348 : {
14349 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14350 0 : PyObject *py_pszDataFile;
14351 0 : if (object->pszDataFile == NULL) {
14352 0 : Py_RETURN_NONE;
14353 : }
14354 0 : if (object->pszDataFile == NULL) {
14355 0 : py_pszDataFile = Py_None;
14356 0 : Py_INCREF(py_pszDataFile);
14357 : } else {
14358 0 : if (object->pszDataFile == NULL) {
14359 0 : py_pszDataFile = Py_None;
14360 0 : Py_INCREF(py_pszDataFile);
14361 : } else {
14362 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
14363 : }
14364 : }
14365 0 : return py_pszDataFile;
14366 : }
14367 :
14368 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
14369 : {
14370 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14371 0 : if (value == NULL) {
14372 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDataFile");
14373 0 : return -1;
14374 : }
14375 0 : if (value == Py_None) {
14376 0 : object->pszDataFile = NULL;
14377 : } else {
14378 0 : object->pszDataFile = NULL;
14379 : {
14380 0 : const char *test_str;
14381 0 : const char *talloc_str;
14382 0 : PyObject *unicode = NULL;
14383 0 : if (PyUnicode_Check(value)) {
14384 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
14385 0 : if (unicode == NULL) {
14386 0 : PyErr_NoMemory();
14387 0 : return -1;
14388 : }
14389 0 : test_str = PyBytes_AS_STRING(unicode);
14390 0 : } else if (PyBytes_Check(value)) {
14391 0 : test_str = PyBytes_AS_STRING(value);
14392 : } else {
14393 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
14394 0 : return -1;
14395 : }
14396 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
14397 0 : if (unicode != NULL) {
14398 0 : Py_DECREF(unicode);
14399 : }
14400 0 : if (talloc_str == NULL) {
14401 0 : PyErr_NoMemory();
14402 0 : return -1;
14403 : }
14404 0 : object->pszDataFile = talloc_str;
14405 : }
14406 : }
14407 0 : return 0;
14408 : }
14409 :
14410 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipMasters(PyObject *obj, void *closure)
14411 : {
14412 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14413 0 : PyObject *py_aipMasters;
14414 0 : if (object->aipMasters == NULL) {
14415 0 : Py_RETURN_NONE;
14416 : }
14417 0 : if (object->aipMasters == NULL) {
14418 0 : py_aipMasters = Py_None;
14419 0 : Py_INCREF(py_aipMasters);
14420 : } else {
14421 0 : py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
14422 : }
14423 0 : return py_aipMasters;
14424 : }
14425 :
14426 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
14427 : {
14428 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14429 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
14430 0 : if (value == NULL) {
14431 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipMasters");
14432 0 : return -1;
14433 : }
14434 0 : if (value == Py_None) {
14435 0 : object->aipMasters = NULL;
14436 : } else {
14437 0 : object->aipMasters = NULL;
14438 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
14439 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14440 0 : PyErr_NoMemory();
14441 0 : return -1;
14442 : }
14443 0 : object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
14444 : }
14445 0 : return 0;
14446 : }
14447 :
14448 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
14449 : {
14450 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14451 0 : PyObject *py_fSecureSecondaries;
14452 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
14453 0 : return py_fSecureSecondaries;
14454 : }
14455 :
14456 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
14457 : {
14458 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14459 0 : if (value == NULL) {
14460 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
14461 0 : return -1;
14462 : }
14463 : {
14464 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
14465 0 : if (PyLong_Check(value)) {
14466 0 : unsigned long long test_var;
14467 0 : test_var = PyLong_AsUnsignedLongLong(value);
14468 0 : if (PyErr_Occurred() != NULL) {
14469 0 : return -1;
14470 : }
14471 0 : if (test_var > uint_max) {
14472 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14473 : PyLong_Type.tp_name, uint_max, test_var);
14474 0 : return -1;
14475 : }
14476 0 : object->fSecureSecondaries = test_var;
14477 : } else {
14478 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14479 : PyLong_Type.tp_name);
14480 0 : return -1;
14481 : }
14482 : }
14483 0 : return 0;
14484 : }
14485 :
14486 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
14487 : {
14488 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14489 0 : PyObject *py_fNotifyLevel;
14490 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
14491 0 : return py_fNotifyLevel;
14492 : }
14493 :
14494 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
14495 : {
14496 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14497 0 : if (value == NULL) {
14498 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
14499 0 : return -1;
14500 : }
14501 : {
14502 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
14503 0 : if (PyLong_Check(value)) {
14504 0 : unsigned long long test_var;
14505 0 : test_var = PyLong_AsUnsignedLongLong(value);
14506 0 : if (PyErr_Occurred() != NULL) {
14507 0 : return -1;
14508 : }
14509 0 : if (test_var > uint_max) {
14510 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14511 : PyLong_Type.tp_name, uint_max, test_var);
14512 0 : return -1;
14513 : }
14514 0 : object->fNotifyLevel = test_var;
14515 : } else {
14516 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14517 : PyLong_Type.tp_name);
14518 0 : return -1;
14519 : }
14520 : }
14521 0 : return 0;
14522 : }
14523 :
14524 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipSecondaries(PyObject *obj, void *closure)
14525 : {
14526 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14527 0 : PyObject *py_aipSecondaries;
14528 0 : if (object->aipSecondaries == NULL) {
14529 0 : Py_RETURN_NONE;
14530 : }
14531 0 : if (object->aipSecondaries == NULL) {
14532 0 : py_aipSecondaries = Py_None;
14533 0 : Py_INCREF(py_aipSecondaries);
14534 : } else {
14535 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
14536 : }
14537 0 : return py_aipSecondaries;
14538 : }
14539 :
14540 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
14541 : {
14542 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14543 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
14544 0 : if (value == NULL) {
14545 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
14546 0 : return -1;
14547 : }
14548 0 : if (value == Py_None) {
14549 0 : object->aipSecondaries = NULL;
14550 : } else {
14551 0 : object->aipSecondaries = NULL;
14552 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
14553 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14554 0 : PyErr_NoMemory();
14555 0 : return -1;
14556 : }
14557 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
14558 : }
14559 0 : return 0;
14560 : }
14561 :
14562 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipNotify(PyObject *obj, void *closure)
14563 : {
14564 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14565 0 : PyObject *py_aipNotify;
14566 0 : if (object->aipNotify == NULL) {
14567 0 : Py_RETURN_NONE;
14568 : }
14569 0 : if (object->aipNotify == NULL) {
14570 0 : py_aipNotify = Py_None;
14571 0 : Py_INCREF(py_aipNotify);
14572 : } else {
14573 0 : py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
14574 : }
14575 0 : return py_aipNotify;
14576 : }
14577 :
14578 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
14579 : {
14580 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14581 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
14582 0 : if (value == NULL) {
14583 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipNotify");
14584 0 : return -1;
14585 : }
14586 0 : if (value == Py_None) {
14587 0 : object->aipNotify = NULL;
14588 : } else {
14589 0 : object->aipNotify = NULL;
14590 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
14591 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14592 0 : PyErr_NoMemory();
14593 0 : return -1;
14594 : }
14595 0 : object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
14596 : }
14597 0 : return 0;
14598 : }
14599 :
14600 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseWins(PyObject *obj, void *closure)
14601 : {
14602 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14603 0 : PyObject *py_fUseWins;
14604 0 : py_fUseWins = PyLong_FromUnsignedLongLong((uint32_t)object->fUseWins);
14605 0 : return py_fUseWins;
14606 : }
14607 :
14608 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
14609 : {
14610 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14611 0 : if (value == NULL) {
14612 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseWins");
14613 0 : return -1;
14614 : }
14615 : {
14616 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseWins));
14617 0 : if (PyLong_Check(value)) {
14618 0 : unsigned long long test_var;
14619 0 : test_var = PyLong_AsUnsignedLongLong(value);
14620 0 : if (PyErr_Occurred() != NULL) {
14621 0 : return -1;
14622 : }
14623 0 : if (test_var > uint_max) {
14624 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14625 : PyLong_Type.tp_name, uint_max, test_var);
14626 0 : return -1;
14627 : }
14628 0 : object->fUseWins = test_var;
14629 : } else {
14630 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14631 : PyLong_Type.tp_name);
14632 0 : return -1;
14633 : }
14634 : }
14635 0 : return 0;
14636 : }
14637 :
14638 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fUseNbstat(PyObject *obj, void *closure)
14639 : {
14640 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14641 0 : PyObject *py_fUseNbstat;
14642 0 : py_fUseNbstat = PyLong_FromUnsignedLongLong((uint32_t)object->fUseNbstat);
14643 0 : return py_fUseNbstat;
14644 : }
14645 :
14646 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
14647 : {
14648 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14649 0 : if (value == NULL) {
14650 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseNbstat");
14651 0 : return -1;
14652 : }
14653 : {
14654 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseNbstat));
14655 0 : if (PyLong_Check(value)) {
14656 0 : unsigned long long test_var;
14657 0 : test_var = PyLong_AsUnsignedLongLong(value);
14658 0 : if (PyErr_Occurred() != NULL) {
14659 0 : return -1;
14660 : }
14661 0 : if (test_var > uint_max) {
14662 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14663 : PyLong_Type.tp_name, uint_max, test_var);
14664 0 : return -1;
14665 : }
14666 0 : object->fUseNbstat = test_var;
14667 : } else {
14668 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14669 : PyLong_Type.tp_name);
14670 0 : return -1;
14671 : }
14672 : }
14673 0 : return 0;
14674 : }
14675 :
14676 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_fAging(PyObject *obj, void *closure)
14677 : {
14678 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14679 0 : PyObject *py_fAging;
14680 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)object->fAging);
14681 0 : return py_fAging;
14682 : }
14683 :
14684 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
14685 : {
14686 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14687 0 : if (value == NULL) {
14688 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAging");
14689 0 : return -1;
14690 : }
14691 : {
14692 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
14693 0 : if (PyLong_Check(value)) {
14694 0 : unsigned long long test_var;
14695 0 : test_var = PyLong_AsUnsignedLongLong(value);
14696 0 : if (PyErr_Occurred() != NULL) {
14697 0 : return -1;
14698 : }
14699 0 : if (test_var > uint_max) {
14700 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14701 : PyLong_Type.tp_name, uint_max, test_var);
14702 0 : return -1;
14703 : }
14704 0 : object->fAging = test_var;
14705 : } else {
14706 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14707 : PyLong_Type.tp_name);
14708 0 : return -1;
14709 : }
14710 : }
14711 0 : return 0;
14712 : }
14713 :
14714 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwNoRefreshInterval(PyObject *obj, void *closure)
14715 : {
14716 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14717 0 : PyObject *py_dwNoRefreshInterval;
14718 0 : py_dwNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwNoRefreshInterval);
14719 0 : return py_dwNoRefreshInterval;
14720 : }
14721 :
14722 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
14723 : {
14724 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14725 0 : if (value == NULL) {
14726 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwNoRefreshInterval");
14727 0 : return -1;
14728 : }
14729 : {
14730 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNoRefreshInterval));
14731 0 : if (PyLong_Check(value)) {
14732 0 : unsigned long long test_var;
14733 0 : test_var = PyLong_AsUnsignedLongLong(value);
14734 0 : if (PyErr_Occurred() != NULL) {
14735 0 : return -1;
14736 : }
14737 0 : if (test_var > uint_max) {
14738 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14739 : PyLong_Type.tp_name, uint_max, test_var);
14740 0 : return -1;
14741 : }
14742 0 : object->dwNoRefreshInterval = test_var;
14743 : } else {
14744 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14745 : PyLong_Type.tp_name);
14746 0 : return -1;
14747 : }
14748 : }
14749 0 : return 0;
14750 : }
14751 :
14752 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwRefreshInterval(PyObject *obj, void *closure)
14753 : {
14754 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14755 0 : PyObject *py_dwRefreshInterval;
14756 0 : py_dwRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwRefreshInterval);
14757 0 : return py_dwRefreshInterval;
14758 : }
14759 :
14760 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
14761 : {
14762 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14763 0 : if (value == NULL) {
14764 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRefreshInterval");
14765 0 : return -1;
14766 : }
14767 : {
14768 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRefreshInterval));
14769 0 : if (PyLong_Check(value)) {
14770 0 : unsigned long long test_var;
14771 0 : test_var = PyLong_AsUnsignedLongLong(value);
14772 0 : if (PyErr_Occurred() != NULL) {
14773 0 : return -1;
14774 : }
14775 0 : if (test_var > uint_max) {
14776 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14777 : PyLong_Type.tp_name, uint_max, test_var);
14778 0 : return -1;
14779 : }
14780 0 : object->dwRefreshInterval = test_var;
14781 : } else {
14782 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14783 : PyLong_Type.tp_name);
14784 0 : return -1;
14785 : }
14786 : }
14787 0 : return 0;
14788 : }
14789 :
14790 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
14791 : {
14792 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14793 0 : PyObject *py_dwAvailForScavengeTime;
14794 0 : py_dwAvailForScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)object->dwAvailForScavengeTime);
14795 0 : return py_dwAvailForScavengeTime;
14796 : }
14797 :
14798 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
14799 : {
14800 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14801 0 : if (value == NULL) {
14802 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwAvailForScavengeTime");
14803 0 : return -1;
14804 : }
14805 : {
14806 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwAvailForScavengeTime));
14807 0 : if (PyLong_Check(value)) {
14808 0 : unsigned long long test_var;
14809 0 : test_var = PyLong_AsUnsignedLongLong(value);
14810 0 : if (PyErr_Occurred() != NULL) {
14811 0 : return -1;
14812 : }
14813 0 : if (test_var > uint_max) {
14814 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14815 : PyLong_Type.tp_name, uint_max, test_var);
14816 0 : return -1;
14817 : }
14818 0 : object->dwAvailForScavengeTime = test_var;
14819 : } else {
14820 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14821 : PyLong_Type.tp_name);
14822 0 : return -1;
14823 : }
14824 : }
14825 0 : return 0;
14826 : }
14827 :
14828 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_aipScavengeServers(PyObject *obj, void *closure)
14829 : {
14830 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14831 0 : PyObject *py_aipScavengeServers;
14832 0 : if (object->aipScavengeServers == NULL) {
14833 0 : Py_RETURN_NONE;
14834 : }
14835 0 : if (object->aipScavengeServers == NULL) {
14836 0 : py_aipScavengeServers = Py_None;
14837 0 : Py_INCREF(py_aipScavengeServers);
14838 : } else {
14839 0 : py_aipScavengeServers = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
14840 : }
14841 0 : return py_aipScavengeServers;
14842 : }
14843 :
14844 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
14845 : {
14846 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14847 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipScavengeServers));
14848 0 : if (value == NULL) {
14849 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipScavengeServers");
14850 0 : return -1;
14851 : }
14852 0 : if (value == Py_None) {
14853 0 : object->aipScavengeServers = NULL;
14854 : } else {
14855 0 : object->aipScavengeServers = NULL;
14856 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
14857 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
14858 0 : PyErr_NoMemory();
14859 0 : return -1;
14860 : }
14861 0 : object->aipScavengeServers = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
14862 : }
14863 0 : return 0;
14864 : }
14865 :
14866 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved1(PyObject *obj, void *closure)
14867 : {
14868 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14869 0 : PyObject *py_pvReserved1;
14870 0 : py_pvReserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->pvReserved1);
14871 0 : return py_pvReserved1;
14872 : }
14873 :
14874 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved1(PyObject *py_obj, PyObject *value, void *closure)
14875 : {
14876 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14877 0 : if (value == NULL) {
14878 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved1");
14879 0 : return -1;
14880 : }
14881 : {
14882 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pvReserved1));
14883 0 : if (PyLong_Check(value)) {
14884 0 : unsigned long long test_var;
14885 0 : test_var = PyLong_AsUnsignedLongLong(value);
14886 0 : if (PyErr_Occurred() != NULL) {
14887 0 : return -1;
14888 : }
14889 0 : if (test_var > uint_max) {
14890 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14891 : PyLong_Type.tp_name, uint_max, test_var);
14892 0 : return -1;
14893 : }
14894 0 : object->pvReserved1 = test_var;
14895 : } else {
14896 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14897 : PyLong_Type.tp_name);
14898 0 : return -1;
14899 : }
14900 : }
14901 0 : return 0;
14902 : }
14903 :
14904 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved2(PyObject *obj, void *closure)
14905 : {
14906 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14907 0 : PyObject *py_pvReserved2;
14908 0 : py_pvReserved2 = PyLong_FromUnsignedLongLong((uint32_t)object->pvReserved2);
14909 0 : return py_pvReserved2;
14910 : }
14911 :
14912 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved2(PyObject *py_obj, PyObject *value, void *closure)
14913 : {
14914 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14915 0 : if (value == NULL) {
14916 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved2");
14917 0 : return -1;
14918 : }
14919 : {
14920 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pvReserved2));
14921 0 : if (PyLong_Check(value)) {
14922 0 : unsigned long long test_var;
14923 0 : test_var = PyLong_AsUnsignedLongLong(value);
14924 0 : if (PyErr_Occurred() != NULL) {
14925 0 : return -1;
14926 : }
14927 0 : if (test_var > uint_max) {
14928 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14929 : PyLong_Type.tp_name, uint_max, test_var);
14930 0 : return -1;
14931 : }
14932 0 : object->pvReserved2 = test_var;
14933 : } else {
14934 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14935 : PyLong_Type.tp_name);
14936 0 : return -1;
14937 : }
14938 : }
14939 0 : return 0;
14940 : }
14941 :
14942 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved3(PyObject *obj, void *closure)
14943 : {
14944 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14945 0 : PyObject *py_pvReserved3;
14946 0 : py_pvReserved3 = PyLong_FromUnsignedLongLong((uint32_t)object->pvReserved3);
14947 0 : return py_pvReserved3;
14948 : }
14949 :
14950 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved3(PyObject *py_obj, PyObject *value, void *closure)
14951 : {
14952 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14953 0 : if (value == NULL) {
14954 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved3");
14955 0 : return -1;
14956 : }
14957 : {
14958 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pvReserved3));
14959 0 : if (PyLong_Check(value)) {
14960 0 : unsigned long long test_var;
14961 0 : test_var = PyLong_AsUnsignedLongLong(value);
14962 0 : if (PyErr_Occurred() != NULL) {
14963 0 : return -1;
14964 : }
14965 0 : if (test_var > uint_max) {
14966 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
14967 : PyLong_Type.tp_name, uint_max, test_var);
14968 0 : return -1;
14969 : }
14970 0 : object->pvReserved3 = test_var;
14971 : } else {
14972 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
14973 : PyLong_Type.tp_name);
14974 0 : return -1;
14975 : }
14976 : }
14977 0 : return 0;
14978 : }
14979 :
14980 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved4(PyObject *obj, void *closure)
14981 : {
14982 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(obj);
14983 0 : PyObject *py_pvReserved4;
14984 0 : py_pvReserved4 = PyLong_FromUnsignedLongLong((uint32_t)object->pvReserved4);
14985 0 : return py_pvReserved4;
14986 : }
14987 :
14988 0 : static int py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved4(PyObject *py_obj, PyObject *value, void *closure)
14989 : {
14990 0 : struct DNS_RPC_ZONE_INFO_W2K *object = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(py_obj);
14991 0 : if (value == NULL) {
14992 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved4");
14993 0 : return -1;
14994 : }
14995 : {
14996 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->pvReserved4));
14997 0 : if (PyLong_Check(value)) {
14998 0 : unsigned long long test_var;
14999 0 : test_var = PyLong_AsUnsignedLongLong(value);
15000 0 : if (PyErr_Occurred() != NULL) {
15001 0 : return -1;
15002 : }
15003 0 : if (test_var > uint_max) {
15004 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15005 : PyLong_Type.tp_name, uint_max, test_var);
15006 0 : return -1;
15007 : }
15008 0 : object->pvReserved4 = test_var;
15009 : } else {
15010 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15011 : PyLong_Type.tp_name);
15012 0 : return -1;
15013 : }
15014 : }
15015 0 : return 0;
15016 : }
15017 :
15018 : static PyGetSetDef py_DNS_RPC_ZONE_INFO_W2K_getsetters[] = {
15019 : {
15020 : .name = discard_const_p(char, "pszZoneName"),
15021 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pszZoneName,
15022 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pszZoneName,
15023 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
15024 : },
15025 : {
15026 : .name = discard_const_p(char, "dwZoneType"),
15027 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_dwZoneType,
15028 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_dwZoneType,
15029 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15030 : },
15031 : {
15032 : .name = discard_const_p(char, "fReverse"),
15033 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fReverse,
15034 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fReverse,
15035 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15036 : },
15037 : {
15038 : .name = discard_const_p(char, "fAllowUpdate"),
15039 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fAllowUpdate,
15040 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fAllowUpdate,
15041 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
15042 : },
15043 : {
15044 : .name = discard_const_p(char, "fPaused"),
15045 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fPaused,
15046 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fPaused,
15047 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15048 : },
15049 : {
15050 : .name = discard_const_p(char, "fShutdown"),
15051 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fShutdown,
15052 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fShutdown,
15053 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15054 : },
15055 : {
15056 : .name = discard_const_p(char, "fAutoCreated"),
15057 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fAutoCreated,
15058 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fAutoCreated,
15059 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15060 : },
15061 : {
15062 : .name = discard_const_p(char, "fUseDatabase"),
15063 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fUseDatabase,
15064 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fUseDatabase,
15065 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15066 : },
15067 : {
15068 : .name = discard_const_p(char, "pszDataFile"),
15069 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pszDataFile,
15070 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pszDataFile,
15071 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
15072 : },
15073 : {
15074 : .name = discard_const_p(char, "aipMasters"),
15075 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_aipMasters,
15076 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_aipMasters,
15077 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
15078 : },
15079 : {
15080 : .name = discard_const_p(char, "fSecureSecondaries"),
15081 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fSecureSecondaries,
15082 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fSecureSecondaries,
15083 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
15084 : },
15085 : {
15086 : .name = discard_const_p(char, "fNotifyLevel"),
15087 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fNotifyLevel,
15088 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fNotifyLevel,
15089 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
15090 : },
15091 : {
15092 : .name = discard_const_p(char, "aipSecondaries"),
15093 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_aipSecondaries,
15094 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_aipSecondaries,
15095 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
15096 : },
15097 : {
15098 : .name = discard_const_p(char, "aipNotify"),
15099 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_aipNotify,
15100 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_aipNotify,
15101 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
15102 : },
15103 : {
15104 : .name = discard_const_p(char, "fUseWins"),
15105 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fUseWins,
15106 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fUseWins,
15107 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15108 : },
15109 : {
15110 : .name = discard_const_p(char, "fUseNbstat"),
15111 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fUseNbstat,
15112 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fUseNbstat,
15113 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15114 : },
15115 : {
15116 : .name = discard_const_p(char, "fAging"),
15117 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_fAging,
15118 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_fAging,
15119 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15120 : },
15121 : {
15122 : .name = discard_const_p(char, "dwNoRefreshInterval"),
15123 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_dwNoRefreshInterval,
15124 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_dwNoRefreshInterval,
15125 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15126 : },
15127 : {
15128 : .name = discard_const_p(char, "dwRefreshInterval"),
15129 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_dwRefreshInterval,
15130 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_dwRefreshInterval,
15131 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15132 : },
15133 : {
15134 : .name = discard_const_p(char, "dwAvailForScavengeTime"),
15135 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_dwAvailForScavengeTime,
15136 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_dwAvailForScavengeTime,
15137 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15138 : },
15139 : {
15140 : .name = discard_const_p(char, "aipScavengeServers"),
15141 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_aipScavengeServers,
15142 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_aipScavengeServers,
15143 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
15144 : },
15145 : {
15146 : .name = discard_const_p(char, "pvReserved1"),
15147 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved1,
15148 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved1,
15149 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15150 : },
15151 : {
15152 : .name = discard_const_p(char, "pvReserved2"),
15153 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved2,
15154 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved2,
15155 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15156 : },
15157 : {
15158 : .name = discard_const_p(char, "pvReserved3"),
15159 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved3,
15160 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved3,
15161 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15162 : },
15163 : {
15164 : .name = discard_const_p(char, "pvReserved4"),
15165 : .get = py_DNS_RPC_ZONE_INFO_W2K_get_pvReserved4,
15166 : .set = py_DNS_RPC_ZONE_INFO_W2K_set_pvReserved4,
15167 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
15168 : },
15169 : { .name = NULL }
15170 : };
15171 :
15172 0 : static PyObject *py_DNS_RPC_ZONE_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
15173 : {
15174 0 : return pytalloc_new(struct DNS_RPC_ZONE_INFO_W2K, type);
15175 : }
15176 :
15177 :
15178 : static PyTypeObject DNS_RPC_ZONE_INFO_W2K_Type = {
15179 : PyVarObject_HEAD_INIT(NULL, 0)
15180 : .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_W2K",
15181 : .tp_getset = py_DNS_RPC_ZONE_INFO_W2K_getsetters,
15182 : .tp_methods = NULL,
15183 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
15184 : .tp_new = py_DNS_RPC_ZONE_INFO_W2K_new,
15185 : };
15186 :
15187 :
15188 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
15189 : {
15190 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15191 0 : PyObject *py_dwRpcStructureVersion;
15192 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
15193 0 : return py_dwRpcStructureVersion;
15194 : }
15195 :
15196 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
15197 : {
15198 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15199 0 : if (value == NULL) {
15200 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
15201 0 : return -1;
15202 : }
15203 : {
15204 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
15205 0 : if (PyLong_Check(value)) {
15206 0 : unsigned long long test_var;
15207 0 : test_var = PyLong_AsUnsignedLongLong(value);
15208 0 : if (PyErr_Occurred() != NULL) {
15209 0 : return -1;
15210 : }
15211 0 : if (test_var > uint_max) {
15212 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15213 : PyLong_Type.tp_name, uint_max, test_var);
15214 0 : return -1;
15215 : }
15216 0 : object->dwRpcStructureVersion = test_var;
15217 : } else {
15218 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15219 : PyLong_Type.tp_name);
15220 0 : return -1;
15221 : }
15222 : }
15223 0 : return 0;
15224 : }
15225 :
15226 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
15227 : {
15228 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15229 0 : PyObject *py_dwReserved0;
15230 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
15231 0 : return py_dwReserved0;
15232 : }
15233 :
15234 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
15235 : {
15236 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15237 0 : if (value == NULL) {
15238 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
15239 0 : return -1;
15240 : }
15241 : {
15242 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
15243 0 : if (PyLong_Check(value)) {
15244 0 : unsigned long long test_var;
15245 0 : test_var = PyLong_AsUnsignedLongLong(value);
15246 0 : if (PyErr_Occurred() != NULL) {
15247 0 : return -1;
15248 : }
15249 0 : if (test_var > uint_max) {
15250 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15251 : PyLong_Type.tp_name, uint_max, test_var);
15252 0 : return -1;
15253 : }
15254 0 : object->dwReserved0 = test_var;
15255 : } else {
15256 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15257 : PyLong_Type.tp_name);
15258 0 : return -1;
15259 : }
15260 : }
15261 0 : return 0;
15262 : }
15263 :
15264 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
15265 : {
15266 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15267 0 : PyObject *py_pszZoneName;
15268 0 : if (object->pszZoneName == NULL) {
15269 0 : Py_RETURN_NONE;
15270 : }
15271 0 : if (object->pszZoneName == NULL) {
15272 0 : py_pszZoneName = Py_None;
15273 0 : Py_INCREF(py_pszZoneName);
15274 : } else {
15275 0 : if (object->pszZoneName == NULL) {
15276 0 : py_pszZoneName = Py_None;
15277 0 : Py_INCREF(py_pszZoneName);
15278 : } else {
15279 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
15280 : }
15281 : }
15282 0 : return py_pszZoneName;
15283 : }
15284 :
15285 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
15286 : {
15287 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15288 0 : if (value == NULL) {
15289 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneName");
15290 0 : return -1;
15291 : }
15292 0 : if (value == Py_None) {
15293 0 : object->pszZoneName = NULL;
15294 : } else {
15295 0 : object->pszZoneName = NULL;
15296 : {
15297 0 : const char *test_str;
15298 0 : const char *talloc_str;
15299 0 : PyObject *unicode = NULL;
15300 0 : if (PyUnicode_Check(value)) {
15301 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
15302 0 : if (unicode == NULL) {
15303 0 : PyErr_NoMemory();
15304 0 : return -1;
15305 : }
15306 0 : test_str = PyBytes_AS_STRING(unicode);
15307 0 : } else if (PyBytes_Check(value)) {
15308 0 : test_str = PyBytes_AS_STRING(value);
15309 : } else {
15310 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
15311 0 : return -1;
15312 : }
15313 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
15314 0 : if (unicode != NULL) {
15315 0 : Py_DECREF(unicode);
15316 : }
15317 0 : if (talloc_str == NULL) {
15318 0 : PyErr_NoMemory();
15319 0 : return -1;
15320 : }
15321 0 : object->pszZoneName = talloc_str;
15322 : }
15323 : }
15324 0 : return 0;
15325 : }
15326 :
15327 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwZoneType(PyObject *obj, void *closure)
15328 : {
15329 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15330 0 : PyObject *py_dwZoneType;
15331 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneType);
15332 0 : return py_dwZoneType;
15333 : }
15334 :
15335 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
15336 : {
15337 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15338 0 : if (value == NULL) {
15339 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneType");
15340 0 : return -1;
15341 : }
15342 : {
15343 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
15344 0 : if (PyLong_Check(value)) {
15345 0 : unsigned long long test_var;
15346 0 : test_var = PyLong_AsUnsignedLongLong(value);
15347 0 : if (PyErr_Occurred() != NULL) {
15348 0 : return -1;
15349 : }
15350 0 : if (test_var > uint_max) {
15351 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15352 : PyLong_Type.tp_name, uint_max, test_var);
15353 0 : return -1;
15354 : }
15355 0 : object->dwZoneType = test_var;
15356 : } else {
15357 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15358 : PyLong_Type.tp_name);
15359 0 : return -1;
15360 : }
15361 : }
15362 0 : return 0;
15363 : }
15364 :
15365 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fReverse(PyObject *obj, void *closure)
15366 : {
15367 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15368 0 : PyObject *py_fReverse;
15369 0 : py_fReverse = PyLong_FromUnsignedLongLong((uint32_t)object->fReverse);
15370 0 : return py_fReverse;
15371 : }
15372 :
15373 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
15374 : {
15375 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15376 0 : if (value == NULL) {
15377 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReverse");
15378 0 : return -1;
15379 : }
15380 : {
15381 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReverse));
15382 0 : if (PyLong_Check(value)) {
15383 0 : unsigned long long test_var;
15384 0 : test_var = PyLong_AsUnsignedLongLong(value);
15385 0 : if (PyErr_Occurred() != NULL) {
15386 0 : return -1;
15387 : }
15388 0 : if (test_var > uint_max) {
15389 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15390 : PyLong_Type.tp_name, uint_max, test_var);
15391 0 : return -1;
15392 : }
15393 0 : object->fReverse = test_var;
15394 : } else {
15395 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15396 : PyLong_Type.tp_name);
15397 0 : return -1;
15398 : }
15399 : }
15400 0 : return 0;
15401 : }
15402 :
15403 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
15404 : {
15405 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15406 0 : PyObject *py_fAllowUpdate;
15407 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
15408 0 : return py_fAllowUpdate;
15409 : }
15410 :
15411 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
15412 : {
15413 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15414 0 : if (value == NULL) {
15415 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
15416 0 : return -1;
15417 : }
15418 : {
15419 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
15420 0 : if (PyLong_Check(value)) {
15421 0 : unsigned long long test_var;
15422 0 : test_var = PyLong_AsUnsignedLongLong(value);
15423 0 : if (PyErr_Occurred() != NULL) {
15424 0 : return -1;
15425 : }
15426 0 : if (test_var > uint_max) {
15427 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15428 : PyLong_Type.tp_name, uint_max, test_var);
15429 0 : return -1;
15430 : }
15431 0 : object->fAllowUpdate = test_var;
15432 : } else {
15433 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15434 : PyLong_Type.tp_name);
15435 0 : return -1;
15436 : }
15437 : }
15438 0 : return 0;
15439 : }
15440 :
15441 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fPaused(PyObject *obj, void *closure)
15442 : {
15443 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15444 0 : PyObject *py_fPaused;
15445 0 : py_fPaused = PyLong_FromUnsignedLongLong((uint32_t)object->fPaused);
15446 0 : return py_fPaused;
15447 : }
15448 :
15449 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
15450 : {
15451 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15452 0 : if (value == NULL) {
15453 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fPaused");
15454 0 : return -1;
15455 : }
15456 : {
15457 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fPaused));
15458 0 : if (PyLong_Check(value)) {
15459 0 : unsigned long long test_var;
15460 0 : test_var = PyLong_AsUnsignedLongLong(value);
15461 0 : if (PyErr_Occurred() != NULL) {
15462 0 : return -1;
15463 : }
15464 0 : if (test_var > uint_max) {
15465 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15466 : PyLong_Type.tp_name, uint_max, test_var);
15467 0 : return -1;
15468 : }
15469 0 : object->fPaused = test_var;
15470 : } else {
15471 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15472 : PyLong_Type.tp_name);
15473 0 : return -1;
15474 : }
15475 : }
15476 0 : return 0;
15477 : }
15478 :
15479 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fShutdown(PyObject *obj, void *closure)
15480 : {
15481 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15482 0 : PyObject *py_fShutdown;
15483 0 : py_fShutdown = PyLong_FromUnsignedLongLong((uint32_t)object->fShutdown);
15484 0 : return py_fShutdown;
15485 : }
15486 :
15487 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
15488 : {
15489 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15490 0 : if (value == NULL) {
15491 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fShutdown");
15492 0 : return -1;
15493 : }
15494 : {
15495 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fShutdown));
15496 0 : if (PyLong_Check(value)) {
15497 0 : unsigned long long test_var;
15498 0 : test_var = PyLong_AsUnsignedLongLong(value);
15499 0 : if (PyErr_Occurred() != NULL) {
15500 0 : return -1;
15501 : }
15502 0 : if (test_var > uint_max) {
15503 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15504 : PyLong_Type.tp_name, uint_max, test_var);
15505 0 : return -1;
15506 : }
15507 0 : object->fShutdown = test_var;
15508 : } else {
15509 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15510 : PyLong_Type.tp_name);
15511 0 : return -1;
15512 : }
15513 : }
15514 0 : return 0;
15515 : }
15516 :
15517 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAutoCreated(PyObject *obj, void *closure)
15518 : {
15519 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15520 0 : PyObject *py_fAutoCreated;
15521 0 : py_fAutoCreated = PyLong_FromUnsignedLongLong((uint32_t)object->fAutoCreated);
15522 0 : return py_fAutoCreated;
15523 : }
15524 :
15525 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
15526 : {
15527 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15528 0 : if (value == NULL) {
15529 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoCreated");
15530 0 : return -1;
15531 : }
15532 : {
15533 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCreated));
15534 0 : if (PyLong_Check(value)) {
15535 0 : unsigned long long test_var;
15536 0 : test_var = PyLong_AsUnsignedLongLong(value);
15537 0 : if (PyErr_Occurred() != NULL) {
15538 0 : return -1;
15539 : }
15540 0 : if (test_var > uint_max) {
15541 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15542 : PyLong_Type.tp_name, uint_max, test_var);
15543 0 : return -1;
15544 : }
15545 0 : object->fAutoCreated = test_var;
15546 : } else {
15547 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15548 : PyLong_Type.tp_name);
15549 0 : return -1;
15550 : }
15551 : }
15552 0 : return 0;
15553 : }
15554 :
15555 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseDatabase(PyObject *obj, void *closure)
15556 : {
15557 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15558 0 : PyObject *py_fUseDatabase;
15559 0 : py_fUseDatabase = PyLong_FromUnsignedLongLong((uint32_t)object->fUseDatabase);
15560 0 : return py_fUseDatabase;
15561 : }
15562 :
15563 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
15564 : {
15565 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15566 0 : if (value == NULL) {
15567 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseDatabase");
15568 0 : return -1;
15569 : }
15570 : {
15571 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseDatabase));
15572 0 : if (PyLong_Check(value)) {
15573 0 : unsigned long long test_var;
15574 0 : test_var = PyLong_AsUnsignedLongLong(value);
15575 0 : if (PyErr_Occurred() != NULL) {
15576 0 : return -1;
15577 : }
15578 0 : if (test_var > uint_max) {
15579 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15580 : PyLong_Type.tp_name, uint_max, test_var);
15581 0 : return -1;
15582 : }
15583 0 : object->fUseDatabase = test_var;
15584 : } else {
15585 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15586 : PyLong_Type.tp_name);
15587 0 : return -1;
15588 : }
15589 : }
15590 0 : return 0;
15591 : }
15592 :
15593 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDataFile(PyObject *obj, void *closure)
15594 : {
15595 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15596 0 : PyObject *py_pszDataFile;
15597 0 : if (object->pszDataFile == NULL) {
15598 0 : Py_RETURN_NONE;
15599 : }
15600 0 : if (object->pszDataFile == NULL) {
15601 0 : py_pszDataFile = Py_None;
15602 0 : Py_INCREF(py_pszDataFile);
15603 : } else {
15604 0 : if (object->pszDataFile == NULL) {
15605 0 : py_pszDataFile = Py_None;
15606 0 : Py_INCREF(py_pszDataFile);
15607 : } else {
15608 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
15609 : }
15610 : }
15611 0 : return py_pszDataFile;
15612 : }
15613 :
15614 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
15615 : {
15616 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15617 0 : if (value == NULL) {
15618 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDataFile");
15619 0 : return -1;
15620 : }
15621 0 : if (value == Py_None) {
15622 0 : object->pszDataFile = NULL;
15623 : } else {
15624 0 : object->pszDataFile = NULL;
15625 : {
15626 0 : const char *test_str;
15627 0 : const char *talloc_str;
15628 0 : PyObject *unicode = NULL;
15629 0 : if (PyUnicode_Check(value)) {
15630 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
15631 0 : if (unicode == NULL) {
15632 0 : PyErr_NoMemory();
15633 0 : return -1;
15634 : }
15635 0 : test_str = PyBytes_AS_STRING(unicode);
15636 0 : } else if (PyBytes_Check(value)) {
15637 0 : test_str = PyBytes_AS_STRING(value);
15638 : } else {
15639 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
15640 0 : return -1;
15641 : }
15642 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
15643 0 : if (unicode != NULL) {
15644 0 : Py_DECREF(unicode);
15645 : }
15646 0 : if (talloc_str == NULL) {
15647 0 : PyErr_NoMemory();
15648 0 : return -1;
15649 : }
15650 0 : object->pszDataFile = talloc_str;
15651 : }
15652 : }
15653 0 : return 0;
15654 : }
15655 :
15656 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipMasters(PyObject *obj, void *closure)
15657 : {
15658 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15659 0 : PyObject *py_aipMasters;
15660 0 : if (object->aipMasters == NULL) {
15661 0 : Py_RETURN_NONE;
15662 : }
15663 0 : if (object->aipMasters == NULL) {
15664 0 : py_aipMasters = Py_None;
15665 0 : Py_INCREF(py_aipMasters);
15666 : } else {
15667 0 : py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
15668 : }
15669 0 : return py_aipMasters;
15670 : }
15671 :
15672 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
15673 : {
15674 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15675 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
15676 0 : if (value == NULL) {
15677 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipMasters");
15678 0 : return -1;
15679 : }
15680 0 : if (value == Py_None) {
15681 0 : object->aipMasters = NULL;
15682 : } else {
15683 0 : object->aipMasters = NULL;
15684 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
15685 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
15686 0 : PyErr_NoMemory();
15687 0 : return -1;
15688 : }
15689 0 : object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
15690 : }
15691 0 : return 0;
15692 : }
15693 :
15694 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
15695 : {
15696 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15697 0 : PyObject *py_fSecureSecondaries;
15698 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
15699 0 : return py_fSecureSecondaries;
15700 : }
15701 :
15702 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
15703 : {
15704 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15705 0 : if (value == NULL) {
15706 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
15707 0 : return -1;
15708 : }
15709 : {
15710 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
15711 0 : if (PyLong_Check(value)) {
15712 0 : unsigned long long test_var;
15713 0 : test_var = PyLong_AsUnsignedLongLong(value);
15714 0 : if (PyErr_Occurred() != NULL) {
15715 0 : return -1;
15716 : }
15717 0 : if (test_var > uint_max) {
15718 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15719 : PyLong_Type.tp_name, uint_max, test_var);
15720 0 : return -1;
15721 : }
15722 0 : object->fSecureSecondaries = test_var;
15723 : } else {
15724 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15725 : PyLong_Type.tp_name);
15726 0 : return -1;
15727 : }
15728 : }
15729 0 : return 0;
15730 : }
15731 :
15732 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
15733 : {
15734 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15735 0 : PyObject *py_fNotifyLevel;
15736 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
15737 0 : return py_fNotifyLevel;
15738 : }
15739 :
15740 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
15741 : {
15742 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15743 0 : if (value == NULL) {
15744 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
15745 0 : return -1;
15746 : }
15747 : {
15748 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
15749 0 : if (PyLong_Check(value)) {
15750 0 : unsigned long long test_var;
15751 0 : test_var = PyLong_AsUnsignedLongLong(value);
15752 0 : if (PyErr_Occurred() != NULL) {
15753 0 : return -1;
15754 : }
15755 0 : if (test_var > uint_max) {
15756 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15757 : PyLong_Type.tp_name, uint_max, test_var);
15758 0 : return -1;
15759 : }
15760 0 : object->fNotifyLevel = test_var;
15761 : } else {
15762 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15763 : PyLong_Type.tp_name);
15764 0 : return -1;
15765 : }
15766 : }
15767 0 : return 0;
15768 : }
15769 :
15770 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
15771 : {
15772 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15773 0 : PyObject *py_aipSecondaries;
15774 0 : if (object->aipSecondaries == NULL) {
15775 0 : Py_RETURN_NONE;
15776 : }
15777 0 : if (object->aipSecondaries == NULL) {
15778 0 : py_aipSecondaries = Py_None;
15779 0 : Py_INCREF(py_aipSecondaries);
15780 : } else {
15781 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
15782 : }
15783 0 : return py_aipSecondaries;
15784 : }
15785 :
15786 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
15787 : {
15788 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15789 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
15790 0 : if (value == NULL) {
15791 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
15792 0 : return -1;
15793 : }
15794 0 : if (value == Py_None) {
15795 0 : object->aipSecondaries = NULL;
15796 : } else {
15797 0 : object->aipSecondaries = NULL;
15798 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
15799 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
15800 0 : PyErr_NoMemory();
15801 0 : return -1;
15802 : }
15803 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
15804 : }
15805 0 : return 0;
15806 : }
15807 :
15808 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipNotify(PyObject *obj, void *closure)
15809 : {
15810 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15811 0 : PyObject *py_aipNotify;
15812 0 : if (object->aipNotify == NULL) {
15813 0 : Py_RETURN_NONE;
15814 : }
15815 0 : if (object->aipNotify == NULL) {
15816 0 : py_aipNotify = Py_None;
15817 0 : Py_INCREF(py_aipNotify);
15818 : } else {
15819 0 : py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
15820 : }
15821 0 : return py_aipNotify;
15822 : }
15823 :
15824 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
15825 : {
15826 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15827 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
15828 0 : if (value == NULL) {
15829 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipNotify");
15830 0 : return -1;
15831 : }
15832 0 : if (value == Py_None) {
15833 0 : object->aipNotify = NULL;
15834 : } else {
15835 0 : object->aipNotify = NULL;
15836 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
15837 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
15838 0 : PyErr_NoMemory();
15839 0 : return -1;
15840 : }
15841 0 : object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
15842 : }
15843 0 : return 0;
15844 : }
15845 :
15846 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseWins(PyObject *obj, void *closure)
15847 : {
15848 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15849 0 : PyObject *py_fUseWins;
15850 0 : py_fUseWins = PyLong_FromUnsignedLongLong((uint32_t)object->fUseWins);
15851 0 : return py_fUseWins;
15852 : }
15853 :
15854 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
15855 : {
15856 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15857 0 : if (value == NULL) {
15858 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseWins");
15859 0 : return -1;
15860 : }
15861 : {
15862 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseWins));
15863 0 : if (PyLong_Check(value)) {
15864 0 : unsigned long long test_var;
15865 0 : test_var = PyLong_AsUnsignedLongLong(value);
15866 0 : if (PyErr_Occurred() != NULL) {
15867 0 : return -1;
15868 : }
15869 0 : if (test_var > uint_max) {
15870 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15871 : PyLong_Type.tp_name, uint_max, test_var);
15872 0 : return -1;
15873 : }
15874 0 : object->fUseWins = test_var;
15875 : } else {
15876 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15877 : PyLong_Type.tp_name);
15878 0 : return -1;
15879 : }
15880 : }
15881 0 : return 0;
15882 : }
15883 :
15884 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseNbstat(PyObject *obj, void *closure)
15885 : {
15886 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15887 0 : PyObject *py_fUseNbstat;
15888 0 : py_fUseNbstat = PyLong_FromUnsignedLongLong((uint32_t)object->fUseNbstat);
15889 0 : return py_fUseNbstat;
15890 : }
15891 :
15892 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
15893 : {
15894 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15895 0 : if (value == NULL) {
15896 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseNbstat");
15897 0 : return -1;
15898 : }
15899 : {
15900 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseNbstat));
15901 0 : if (PyLong_Check(value)) {
15902 0 : unsigned long long test_var;
15903 0 : test_var = PyLong_AsUnsignedLongLong(value);
15904 0 : if (PyErr_Occurred() != NULL) {
15905 0 : return -1;
15906 : }
15907 0 : if (test_var > uint_max) {
15908 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15909 : PyLong_Type.tp_name, uint_max, test_var);
15910 0 : return -1;
15911 : }
15912 0 : object->fUseNbstat = test_var;
15913 : } else {
15914 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15915 : PyLong_Type.tp_name);
15916 0 : return -1;
15917 : }
15918 : }
15919 0 : return 0;
15920 : }
15921 :
15922 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fAging(PyObject *obj, void *closure)
15923 : {
15924 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15925 0 : PyObject *py_fAging;
15926 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)object->fAging);
15927 0 : return py_fAging;
15928 : }
15929 :
15930 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
15931 : {
15932 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15933 0 : if (value == NULL) {
15934 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAging");
15935 0 : return -1;
15936 : }
15937 : {
15938 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
15939 0 : if (PyLong_Check(value)) {
15940 0 : unsigned long long test_var;
15941 0 : test_var = PyLong_AsUnsignedLongLong(value);
15942 0 : if (PyErr_Occurred() != NULL) {
15943 0 : return -1;
15944 : }
15945 0 : if (test_var > uint_max) {
15946 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15947 : PyLong_Type.tp_name, uint_max, test_var);
15948 0 : return -1;
15949 : }
15950 0 : object->fAging = test_var;
15951 : } else {
15952 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15953 : PyLong_Type.tp_name);
15954 0 : return -1;
15955 : }
15956 : }
15957 0 : return 0;
15958 : }
15959 :
15960 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwNoRefreshInterval(PyObject *obj, void *closure)
15961 : {
15962 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
15963 0 : PyObject *py_dwNoRefreshInterval;
15964 0 : py_dwNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwNoRefreshInterval);
15965 0 : return py_dwNoRefreshInterval;
15966 : }
15967 :
15968 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
15969 : {
15970 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
15971 0 : if (value == NULL) {
15972 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwNoRefreshInterval");
15973 0 : return -1;
15974 : }
15975 : {
15976 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNoRefreshInterval));
15977 0 : if (PyLong_Check(value)) {
15978 0 : unsigned long long test_var;
15979 0 : test_var = PyLong_AsUnsignedLongLong(value);
15980 0 : if (PyErr_Occurred() != NULL) {
15981 0 : return -1;
15982 : }
15983 0 : if (test_var > uint_max) {
15984 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
15985 : PyLong_Type.tp_name, uint_max, test_var);
15986 0 : return -1;
15987 : }
15988 0 : object->dwNoRefreshInterval = test_var;
15989 : } else {
15990 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
15991 : PyLong_Type.tp_name);
15992 0 : return -1;
15993 : }
15994 : }
15995 0 : return 0;
15996 : }
15997 :
15998 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRefreshInterval(PyObject *obj, void *closure)
15999 : {
16000 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16001 0 : PyObject *py_dwRefreshInterval;
16002 0 : py_dwRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwRefreshInterval);
16003 0 : return py_dwRefreshInterval;
16004 : }
16005 :
16006 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
16007 : {
16008 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16009 0 : if (value == NULL) {
16010 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRefreshInterval");
16011 0 : return -1;
16012 : }
16013 : {
16014 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRefreshInterval));
16015 0 : if (PyLong_Check(value)) {
16016 0 : unsigned long long test_var;
16017 0 : test_var = PyLong_AsUnsignedLongLong(value);
16018 0 : if (PyErr_Occurred() != NULL) {
16019 0 : return -1;
16020 : }
16021 0 : if (test_var > uint_max) {
16022 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16023 : PyLong_Type.tp_name, uint_max, test_var);
16024 0 : return -1;
16025 : }
16026 0 : object->dwRefreshInterval = test_var;
16027 : } else {
16028 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16029 : PyLong_Type.tp_name);
16030 0 : return -1;
16031 : }
16032 : }
16033 0 : return 0;
16034 : }
16035 :
16036 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
16037 : {
16038 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16039 0 : PyObject *py_dwAvailForScavengeTime;
16040 0 : py_dwAvailForScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)object->dwAvailForScavengeTime);
16041 0 : return py_dwAvailForScavengeTime;
16042 : }
16043 :
16044 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
16045 : {
16046 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16047 0 : if (value == NULL) {
16048 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwAvailForScavengeTime");
16049 0 : return -1;
16050 : }
16051 : {
16052 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwAvailForScavengeTime));
16053 0 : if (PyLong_Check(value)) {
16054 0 : unsigned long long test_var;
16055 0 : test_var = PyLong_AsUnsignedLongLong(value);
16056 0 : if (PyErr_Occurred() != NULL) {
16057 0 : return -1;
16058 : }
16059 0 : if (test_var > uint_max) {
16060 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16061 : PyLong_Type.tp_name, uint_max, test_var);
16062 0 : return -1;
16063 : }
16064 0 : object->dwAvailForScavengeTime = test_var;
16065 : } else {
16066 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16067 : PyLong_Type.tp_name);
16068 0 : return -1;
16069 : }
16070 : }
16071 0 : return 0;
16072 : }
16073 :
16074 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipScavengeServers(PyObject *obj, void *closure)
16075 : {
16076 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16077 0 : PyObject *py_aipScavengeServers;
16078 0 : if (object->aipScavengeServers == NULL) {
16079 0 : Py_RETURN_NONE;
16080 : }
16081 0 : if (object->aipScavengeServers == NULL) {
16082 0 : py_aipScavengeServers = Py_None;
16083 0 : Py_INCREF(py_aipScavengeServers);
16084 : } else {
16085 0 : py_aipScavengeServers = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
16086 : }
16087 0 : return py_aipScavengeServers;
16088 : }
16089 :
16090 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
16091 : {
16092 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16093 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipScavengeServers));
16094 0 : if (value == NULL) {
16095 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipScavengeServers");
16096 0 : return -1;
16097 : }
16098 0 : if (value == Py_None) {
16099 0 : object->aipScavengeServers = NULL;
16100 : } else {
16101 0 : object->aipScavengeServers = NULL;
16102 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
16103 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
16104 0 : PyErr_NoMemory();
16105 0 : return -1;
16106 : }
16107 0 : object->aipScavengeServers = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
16108 : }
16109 0 : return 0;
16110 : }
16111 :
16112 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwForwarderTimeout(PyObject *obj, void *closure)
16113 : {
16114 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16115 0 : PyObject *py_dwForwarderTimeout;
16116 0 : py_dwForwarderTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwForwarderTimeout);
16117 0 : return py_dwForwarderTimeout;
16118 : }
16119 :
16120 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwForwarderTimeout(PyObject *py_obj, PyObject *value, void *closure)
16121 : {
16122 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16123 0 : if (value == NULL) {
16124 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwForwarderTimeout");
16125 0 : return -1;
16126 : }
16127 : {
16128 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwarderTimeout));
16129 0 : if (PyLong_Check(value)) {
16130 0 : unsigned long long test_var;
16131 0 : test_var = PyLong_AsUnsignedLongLong(value);
16132 0 : if (PyErr_Occurred() != NULL) {
16133 0 : return -1;
16134 : }
16135 0 : if (test_var > uint_max) {
16136 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16137 : PyLong_Type.tp_name, uint_max, test_var);
16138 0 : return -1;
16139 : }
16140 0 : object->dwForwarderTimeout = test_var;
16141 : } else {
16142 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16143 : PyLong_Type.tp_name);
16144 0 : return -1;
16145 : }
16146 : }
16147 0 : return 0;
16148 : }
16149 :
16150 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_fForwarderSlave(PyObject *obj, void *closure)
16151 : {
16152 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16153 0 : PyObject *py_fForwarderSlave;
16154 0 : py_fForwarderSlave = PyLong_FromUnsignedLongLong((uint32_t)object->fForwarderSlave);
16155 0 : return py_fForwarderSlave;
16156 : }
16157 :
16158 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_fForwarderSlave(PyObject *py_obj, PyObject *value, void *closure)
16159 : {
16160 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16161 0 : if (value == NULL) {
16162 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fForwarderSlave");
16163 0 : return -1;
16164 : }
16165 : {
16166 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwarderSlave));
16167 0 : if (PyLong_Check(value)) {
16168 0 : unsigned long long test_var;
16169 0 : test_var = PyLong_AsUnsignedLongLong(value);
16170 0 : if (PyErr_Occurred() != NULL) {
16171 0 : return -1;
16172 : }
16173 0 : if (test_var > uint_max) {
16174 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16175 : PyLong_Type.tp_name, uint_max, test_var);
16176 0 : return -1;
16177 : }
16178 0 : object->fForwarderSlave = test_var;
16179 : } else {
16180 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16181 : PyLong_Type.tp_name);
16182 0 : return -1;
16183 : }
16184 : }
16185 0 : return 0;
16186 : }
16187 :
16188 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_aipLocalMasters(PyObject *obj, void *closure)
16189 : {
16190 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16191 0 : PyObject *py_aipLocalMasters;
16192 0 : if (object->aipLocalMasters == NULL) {
16193 0 : Py_RETURN_NONE;
16194 : }
16195 0 : if (object->aipLocalMasters == NULL) {
16196 0 : py_aipLocalMasters = Py_None;
16197 0 : Py_INCREF(py_aipLocalMasters);
16198 : } else {
16199 0 : py_aipLocalMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipLocalMasters, object->aipLocalMasters);
16200 : }
16201 0 : return py_aipLocalMasters;
16202 : }
16203 :
16204 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_aipLocalMasters(PyObject *py_obj, PyObject *value, void *closure)
16205 : {
16206 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16207 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipLocalMasters));
16208 0 : if (value == NULL) {
16209 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipLocalMasters");
16210 0 : return -1;
16211 : }
16212 0 : if (value == Py_None) {
16213 0 : object->aipLocalMasters = NULL;
16214 : } else {
16215 0 : object->aipLocalMasters = NULL;
16216 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
16217 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
16218 0 : PyErr_NoMemory();
16219 0 : return -1;
16220 : }
16221 0 : object->aipLocalMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
16222 : }
16223 0 : return 0;
16224 : }
16225 :
16226 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
16227 : {
16228 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16229 0 : PyObject *py_dwDpFlags;
16230 0 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwDpFlags);
16231 0 : return py_dwDpFlags;
16232 : }
16233 :
16234 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
16235 : {
16236 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16237 0 : if (value == NULL) {
16238 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDpFlags");
16239 0 : return -1;
16240 : }
16241 : {
16242 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
16243 0 : if (PyLong_Check(value)) {
16244 0 : unsigned long long test_var;
16245 0 : test_var = PyLong_AsUnsignedLongLong(value);
16246 0 : if (PyErr_Occurred() != NULL) {
16247 0 : return -1;
16248 : }
16249 0 : if (test_var > uint_max) {
16250 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16251 : PyLong_Type.tp_name, uint_max, test_var);
16252 0 : return -1;
16253 : }
16254 0 : object->dwDpFlags = test_var;
16255 : } else {
16256 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16257 : PyLong_Type.tp_name);
16258 0 : return -1;
16259 : }
16260 : }
16261 0 : return 0;
16262 : }
16263 :
16264 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
16265 : {
16266 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16267 0 : PyObject *py_pszDpFqdn;
16268 0 : if (object->pszDpFqdn == NULL) {
16269 0 : Py_RETURN_NONE;
16270 : }
16271 0 : if (object->pszDpFqdn == NULL) {
16272 0 : py_pszDpFqdn = Py_None;
16273 0 : Py_INCREF(py_pszDpFqdn);
16274 : } else {
16275 0 : if (object->pszDpFqdn == NULL) {
16276 0 : py_pszDpFqdn = Py_None;
16277 0 : Py_INCREF(py_pszDpFqdn);
16278 : } else {
16279 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
16280 : }
16281 : }
16282 0 : return py_pszDpFqdn;
16283 : }
16284 :
16285 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
16286 : {
16287 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16288 0 : if (value == NULL) {
16289 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpFqdn");
16290 0 : return -1;
16291 : }
16292 0 : if (value == Py_None) {
16293 0 : object->pszDpFqdn = NULL;
16294 : } else {
16295 0 : object->pszDpFqdn = NULL;
16296 : {
16297 0 : const char *test_str;
16298 0 : const char *talloc_str;
16299 0 : PyObject *unicode = NULL;
16300 0 : if (PyUnicode_Check(value)) {
16301 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16302 0 : if (unicode == NULL) {
16303 0 : PyErr_NoMemory();
16304 0 : return -1;
16305 : }
16306 0 : test_str = PyBytes_AS_STRING(unicode);
16307 0 : } else if (PyBytes_Check(value)) {
16308 0 : test_str = PyBytes_AS_STRING(value);
16309 : } else {
16310 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16311 0 : return -1;
16312 : }
16313 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16314 0 : if (unicode != NULL) {
16315 0 : Py_DECREF(unicode);
16316 : }
16317 0 : if (talloc_str == NULL) {
16318 0 : PyErr_NoMemory();
16319 0 : return -1;
16320 : }
16321 0 : object->pszDpFqdn = talloc_str;
16322 : }
16323 : }
16324 0 : return 0;
16325 : }
16326 :
16327 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pwszZoneDn(PyObject *obj, void *closure)
16328 : {
16329 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16330 0 : PyObject *py_pwszZoneDn;
16331 0 : if (object->pwszZoneDn == NULL) {
16332 0 : Py_RETURN_NONE;
16333 : }
16334 0 : if (object->pwszZoneDn == NULL) {
16335 0 : py_pwszZoneDn = Py_None;
16336 0 : Py_INCREF(py_pwszZoneDn);
16337 : } else {
16338 0 : if (object->pwszZoneDn == NULL) {
16339 0 : py_pwszZoneDn = Py_None;
16340 0 : Py_INCREF(py_pwszZoneDn);
16341 : } else {
16342 0 : py_pwszZoneDn = PyUnicode_Decode(object->pwszZoneDn, strlen(object->pwszZoneDn), "utf-8", "ignore");
16343 : }
16344 : }
16345 0 : return py_pwszZoneDn;
16346 : }
16347 :
16348 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pwszZoneDn(PyObject *py_obj, PyObject *value, void *closure)
16349 : {
16350 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16351 0 : if (value == NULL) {
16352 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwszZoneDn");
16353 0 : return -1;
16354 : }
16355 0 : if (value == Py_None) {
16356 0 : object->pwszZoneDn = NULL;
16357 : } else {
16358 0 : object->pwszZoneDn = NULL;
16359 : {
16360 0 : const char *test_str;
16361 0 : const char *talloc_str;
16362 0 : PyObject *unicode = NULL;
16363 0 : if (PyUnicode_Check(value)) {
16364 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16365 0 : if (unicode == NULL) {
16366 0 : PyErr_NoMemory();
16367 0 : return -1;
16368 : }
16369 0 : test_str = PyBytes_AS_STRING(unicode);
16370 0 : } else if (PyBytes_Check(value)) {
16371 0 : test_str = PyBytes_AS_STRING(value);
16372 : } else {
16373 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16374 0 : return -1;
16375 : }
16376 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16377 0 : if (unicode != NULL) {
16378 0 : Py_DECREF(unicode);
16379 : }
16380 0 : if (talloc_str == NULL) {
16381 0 : PyErr_NoMemory();
16382 0 : return -1;
16383 : }
16384 0 : object->pwszZoneDn = talloc_str;
16385 : }
16386 : }
16387 0 : return 0;
16388 : }
16389 :
16390 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulSoaCheck(PyObject *obj, void *closure)
16391 : {
16392 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16393 0 : PyObject *py_dwLastSuccessfulSoaCheck;
16394 0 : py_dwLastSuccessfulSoaCheck = PyLong_FromUnsignedLongLong((uint32_t)object->dwLastSuccessfulSoaCheck);
16395 0 : return py_dwLastSuccessfulSoaCheck;
16396 : }
16397 :
16398 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulSoaCheck(PyObject *py_obj, PyObject *value, void *closure)
16399 : {
16400 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16401 0 : if (value == NULL) {
16402 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLastSuccessfulSoaCheck");
16403 0 : return -1;
16404 : }
16405 : {
16406 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastSuccessfulSoaCheck));
16407 0 : if (PyLong_Check(value)) {
16408 0 : unsigned long long test_var;
16409 0 : test_var = PyLong_AsUnsignedLongLong(value);
16410 0 : if (PyErr_Occurred() != NULL) {
16411 0 : return -1;
16412 : }
16413 0 : if (test_var > uint_max) {
16414 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16415 : PyLong_Type.tp_name, uint_max, test_var);
16416 0 : return -1;
16417 : }
16418 0 : object->dwLastSuccessfulSoaCheck = test_var;
16419 : } else {
16420 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16421 : PyLong_Type.tp_name);
16422 0 : return -1;
16423 : }
16424 : }
16425 0 : return 0;
16426 : }
16427 :
16428 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulXfr(PyObject *obj, void *closure)
16429 : {
16430 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16431 0 : PyObject *py_dwLastSuccessfulXfr;
16432 0 : py_dwLastSuccessfulXfr = PyLong_FromUnsignedLongLong((uint32_t)object->dwLastSuccessfulXfr);
16433 0 : return py_dwLastSuccessfulXfr;
16434 : }
16435 :
16436 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulXfr(PyObject *py_obj, PyObject *value, void *closure)
16437 : {
16438 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16439 0 : if (value == NULL) {
16440 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLastSuccessfulXfr");
16441 0 : return -1;
16442 : }
16443 : {
16444 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastSuccessfulXfr));
16445 0 : if (PyLong_Check(value)) {
16446 0 : unsigned long long test_var;
16447 0 : test_var = PyLong_AsUnsignedLongLong(value);
16448 0 : if (PyErr_Occurred() != NULL) {
16449 0 : return -1;
16450 : }
16451 0 : if (test_var > uint_max) {
16452 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16453 : PyLong_Type.tp_name, uint_max, test_var);
16454 0 : return -1;
16455 : }
16456 0 : object->dwLastSuccessfulXfr = test_var;
16457 : } else {
16458 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16459 : PyLong_Type.tp_name);
16460 0 : return -1;
16461 : }
16462 : }
16463 0 : return 0;
16464 : }
16465 :
16466 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved1(PyObject *obj, void *closure)
16467 : {
16468 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16469 0 : PyObject *py_dwReserved1;
16470 0 : py_dwReserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved1);
16471 0 : return py_dwReserved1;
16472 : }
16473 :
16474 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
16475 : {
16476 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16477 0 : if (value == NULL) {
16478 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved1");
16479 0 : return -1;
16480 : }
16481 : {
16482 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved1));
16483 0 : if (PyLong_Check(value)) {
16484 0 : unsigned long long test_var;
16485 0 : test_var = PyLong_AsUnsignedLongLong(value);
16486 0 : if (PyErr_Occurred() != NULL) {
16487 0 : return -1;
16488 : }
16489 0 : if (test_var > uint_max) {
16490 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16491 : PyLong_Type.tp_name, uint_max, test_var);
16492 0 : return -1;
16493 : }
16494 0 : object->dwReserved1 = test_var;
16495 : } else {
16496 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16497 : PyLong_Type.tp_name);
16498 0 : return -1;
16499 : }
16500 : }
16501 0 : return 0;
16502 : }
16503 :
16504 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved2(PyObject *obj, void *closure)
16505 : {
16506 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16507 0 : PyObject *py_dwReserved2;
16508 0 : py_dwReserved2 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved2);
16509 0 : return py_dwReserved2;
16510 : }
16511 :
16512 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved2(PyObject *py_obj, PyObject *value, void *closure)
16513 : {
16514 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16515 0 : if (value == NULL) {
16516 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved2");
16517 0 : return -1;
16518 : }
16519 : {
16520 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved2));
16521 0 : if (PyLong_Check(value)) {
16522 0 : unsigned long long test_var;
16523 0 : test_var = PyLong_AsUnsignedLongLong(value);
16524 0 : if (PyErr_Occurred() != NULL) {
16525 0 : return -1;
16526 : }
16527 0 : if (test_var > uint_max) {
16528 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16529 : PyLong_Type.tp_name, uint_max, test_var);
16530 0 : return -1;
16531 : }
16532 0 : object->dwReserved2 = test_var;
16533 : } else {
16534 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16535 : PyLong_Type.tp_name);
16536 0 : return -1;
16537 : }
16538 : }
16539 0 : return 0;
16540 : }
16541 :
16542 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved3(PyObject *obj, void *closure)
16543 : {
16544 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16545 0 : PyObject *py_dwReserved3;
16546 0 : py_dwReserved3 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved3);
16547 0 : return py_dwReserved3;
16548 : }
16549 :
16550 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved3(PyObject *py_obj, PyObject *value, void *closure)
16551 : {
16552 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16553 0 : if (value == NULL) {
16554 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved3");
16555 0 : return -1;
16556 : }
16557 : {
16558 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved3));
16559 0 : if (PyLong_Check(value)) {
16560 0 : unsigned long long test_var;
16561 0 : test_var = PyLong_AsUnsignedLongLong(value);
16562 0 : if (PyErr_Occurred() != NULL) {
16563 0 : return -1;
16564 : }
16565 0 : if (test_var > uint_max) {
16566 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16567 : PyLong_Type.tp_name, uint_max, test_var);
16568 0 : return -1;
16569 : }
16570 0 : object->dwReserved3 = test_var;
16571 : } else {
16572 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16573 : PyLong_Type.tp_name);
16574 0 : return -1;
16575 : }
16576 : }
16577 0 : return 0;
16578 : }
16579 :
16580 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved4(PyObject *obj, void *closure)
16581 : {
16582 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16583 0 : PyObject *py_dwReserved4;
16584 0 : py_dwReserved4 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved4);
16585 0 : return py_dwReserved4;
16586 : }
16587 :
16588 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved4(PyObject *py_obj, PyObject *value, void *closure)
16589 : {
16590 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16591 0 : if (value == NULL) {
16592 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved4");
16593 0 : return -1;
16594 : }
16595 : {
16596 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved4));
16597 0 : if (PyLong_Check(value)) {
16598 0 : unsigned long long test_var;
16599 0 : test_var = PyLong_AsUnsignedLongLong(value);
16600 0 : if (PyErr_Occurred() != NULL) {
16601 0 : return -1;
16602 : }
16603 0 : if (test_var > uint_max) {
16604 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16605 : PyLong_Type.tp_name, uint_max, test_var);
16606 0 : return -1;
16607 : }
16608 0 : object->dwReserved4 = test_var;
16609 : } else {
16610 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16611 : PyLong_Type.tp_name);
16612 0 : return -1;
16613 : }
16614 : }
16615 0 : return 0;
16616 : }
16617 :
16618 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved5(PyObject *obj, void *closure)
16619 : {
16620 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16621 0 : PyObject *py_dwReserved5;
16622 0 : py_dwReserved5 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved5);
16623 0 : return py_dwReserved5;
16624 : }
16625 :
16626 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved5(PyObject *py_obj, PyObject *value, void *closure)
16627 : {
16628 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16629 0 : if (value == NULL) {
16630 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved5");
16631 0 : return -1;
16632 : }
16633 : {
16634 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved5));
16635 0 : if (PyLong_Check(value)) {
16636 0 : unsigned long long test_var;
16637 0 : test_var = PyLong_AsUnsignedLongLong(value);
16638 0 : if (PyErr_Occurred() != NULL) {
16639 0 : return -1;
16640 : }
16641 0 : if (test_var > uint_max) {
16642 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
16643 : PyLong_Type.tp_name, uint_max, test_var);
16644 0 : return -1;
16645 : }
16646 0 : object->dwReserved5 = test_var;
16647 : } else {
16648 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
16649 : PyLong_Type.tp_name);
16650 0 : return -1;
16651 : }
16652 : }
16653 0 : return 0;
16654 : }
16655 :
16656 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved1(PyObject *obj, void *closure)
16657 : {
16658 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16659 0 : PyObject *py_pReserved1;
16660 0 : if (object->pReserved1 == NULL) {
16661 0 : Py_RETURN_NONE;
16662 : }
16663 0 : if (object->pReserved1 == NULL) {
16664 0 : py_pReserved1 = Py_None;
16665 0 : Py_INCREF(py_pReserved1);
16666 : } else {
16667 0 : if (object->pReserved1 == NULL) {
16668 0 : py_pReserved1 = Py_None;
16669 0 : Py_INCREF(py_pReserved1);
16670 : } else {
16671 0 : py_pReserved1 = PyUnicode_Decode(object->pReserved1, strlen(object->pReserved1), "utf-8", "ignore");
16672 : }
16673 : }
16674 0 : return py_pReserved1;
16675 : }
16676 :
16677 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved1(PyObject *py_obj, PyObject *value, void *closure)
16678 : {
16679 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16680 0 : if (value == NULL) {
16681 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pReserved1");
16682 0 : return -1;
16683 : }
16684 0 : if (value == Py_None) {
16685 0 : object->pReserved1 = NULL;
16686 : } else {
16687 0 : object->pReserved1 = NULL;
16688 : {
16689 0 : const char *test_str;
16690 0 : const char *talloc_str;
16691 0 : PyObject *unicode = NULL;
16692 0 : if (PyUnicode_Check(value)) {
16693 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16694 0 : if (unicode == NULL) {
16695 0 : PyErr_NoMemory();
16696 0 : return -1;
16697 : }
16698 0 : test_str = PyBytes_AS_STRING(unicode);
16699 0 : } else if (PyBytes_Check(value)) {
16700 0 : test_str = PyBytes_AS_STRING(value);
16701 : } else {
16702 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16703 0 : return -1;
16704 : }
16705 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16706 0 : if (unicode != NULL) {
16707 0 : Py_DECREF(unicode);
16708 : }
16709 0 : if (talloc_str == NULL) {
16710 0 : PyErr_NoMemory();
16711 0 : return -1;
16712 : }
16713 0 : object->pReserved1 = talloc_str;
16714 : }
16715 : }
16716 0 : return 0;
16717 : }
16718 :
16719 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved2(PyObject *obj, void *closure)
16720 : {
16721 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16722 0 : PyObject *py_pReserved2;
16723 0 : if (object->pReserved2 == NULL) {
16724 0 : Py_RETURN_NONE;
16725 : }
16726 0 : if (object->pReserved2 == NULL) {
16727 0 : py_pReserved2 = Py_None;
16728 0 : Py_INCREF(py_pReserved2);
16729 : } else {
16730 0 : if (object->pReserved2 == NULL) {
16731 0 : py_pReserved2 = Py_None;
16732 0 : Py_INCREF(py_pReserved2);
16733 : } else {
16734 0 : py_pReserved2 = PyUnicode_Decode(object->pReserved2, strlen(object->pReserved2), "utf-8", "ignore");
16735 : }
16736 : }
16737 0 : return py_pReserved2;
16738 : }
16739 :
16740 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved2(PyObject *py_obj, PyObject *value, void *closure)
16741 : {
16742 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16743 0 : if (value == NULL) {
16744 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pReserved2");
16745 0 : return -1;
16746 : }
16747 0 : if (value == Py_None) {
16748 0 : object->pReserved2 = NULL;
16749 : } else {
16750 0 : object->pReserved2 = NULL;
16751 : {
16752 0 : const char *test_str;
16753 0 : const char *talloc_str;
16754 0 : PyObject *unicode = NULL;
16755 0 : if (PyUnicode_Check(value)) {
16756 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16757 0 : if (unicode == NULL) {
16758 0 : PyErr_NoMemory();
16759 0 : return -1;
16760 : }
16761 0 : test_str = PyBytes_AS_STRING(unicode);
16762 0 : } else if (PyBytes_Check(value)) {
16763 0 : test_str = PyBytes_AS_STRING(value);
16764 : } else {
16765 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16766 0 : return -1;
16767 : }
16768 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16769 0 : if (unicode != NULL) {
16770 0 : Py_DECREF(unicode);
16771 : }
16772 0 : if (talloc_str == NULL) {
16773 0 : PyErr_NoMemory();
16774 0 : return -1;
16775 : }
16776 0 : object->pReserved2 = talloc_str;
16777 : }
16778 : }
16779 0 : return 0;
16780 : }
16781 :
16782 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved3(PyObject *obj, void *closure)
16783 : {
16784 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16785 0 : PyObject *py_pReserved3;
16786 0 : if (object->pReserved3 == NULL) {
16787 0 : Py_RETURN_NONE;
16788 : }
16789 0 : if (object->pReserved3 == NULL) {
16790 0 : py_pReserved3 = Py_None;
16791 0 : Py_INCREF(py_pReserved3);
16792 : } else {
16793 0 : if (object->pReserved3 == NULL) {
16794 0 : py_pReserved3 = Py_None;
16795 0 : Py_INCREF(py_pReserved3);
16796 : } else {
16797 0 : py_pReserved3 = PyUnicode_Decode(object->pReserved3, strlen(object->pReserved3), "utf-8", "ignore");
16798 : }
16799 : }
16800 0 : return py_pReserved3;
16801 : }
16802 :
16803 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved3(PyObject *py_obj, PyObject *value, void *closure)
16804 : {
16805 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16806 0 : if (value == NULL) {
16807 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pReserved3");
16808 0 : return -1;
16809 : }
16810 0 : if (value == Py_None) {
16811 0 : object->pReserved3 = NULL;
16812 : } else {
16813 0 : object->pReserved3 = NULL;
16814 : {
16815 0 : const char *test_str;
16816 0 : const char *talloc_str;
16817 0 : PyObject *unicode = NULL;
16818 0 : if (PyUnicode_Check(value)) {
16819 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16820 0 : if (unicode == NULL) {
16821 0 : PyErr_NoMemory();
16822 0 : return -1;
16823 : }
16824 0 : test_str = PyBytes_AS_STRING(unicode);
16825 0 : } else if (PyBytes_Check(value)) {
16826 0 : test_str = PyBytes_AS_STRING(value);
16827 : } else {
16828 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16829 0 : return -1;
16830 : }
16831 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16832 0 : if (unicode != NULL) {
16833 0 : Py_DECREF(unicode);
16834 : }
16835 0 : if (talloc_str == NULL) {
16836 0 : PyErr_NoMemory();
16837 0 : return -1;
16838 : }
16839 0 : object->pReserved3 = talloc_str;
16840 : }
16841 : }
16842 0 : return 0;
16843 : }
16844 :
16845 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved4(PyObject *obj, void *closure)
16846 : {
16847 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(obj);
16848 0 : PyObject *py_pReserved4;
16849 0 : if (object->pReserved4 == NULL) {
16850 0 : Py_RETURN_NONE;
16851 : }
16852 0 : if (object->pReserved4 == NULL) {
16853 0 : py_pReserved4 = Py_None;
16854 0 : Py_INCREF(py_pReserved4);
16855 : } else {
16856 0 : if (object->pReserved4 == NULL) {
16857 0 : py_pReserved4 = Py_None;
16858 0 : Py_INCREF(py_pReserved4);
16859 : } else {
16860 0 : py_pReserved4 = PyUnicode_Decode(object->pReserved4, strlen(object->pReserved4), "utf-8", "ignore");
16861 : }
16862 : }
16863 0 : return py_pReserved4;
16864 : }
16865 :
16866 0 : static int py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved4(PyObject *py_obj, PyObject *value, void *closure)
16867 : {
16868 0 : struct DNS_RPC_ZONE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
16869 0 : if (value == NULL) {
16870 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pReserved4");
16871 0 : return -1;
16872 : }
16873 0 : if (value == Py_None) {
16874 0 : object->pReserved4 = NULL;
16875 : } else {
16876 0 : object->pReserved4 = NULL;
16877 : {
16878 0 : const char *test_str;
16879 0 : const char *talloc_str;
16880 0 : PyObject *unicode = NULL;
16881 0 : if (PyUnicode_Check(value)) {
16882 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
16883 0 : if (unicode == NULL) {
16884 0 : PyErr_NoMemory();
16885 0 : return -1;
16886 : }
16887 0 : test_str = PyBytes_AS_STRING(unicode);
16888 0 : } else if (PyBytes_Check(value)) {
16889 0 : test_str = PyBytes_AS_STRING(value);
16890 : } else {
16891 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
16892 0 : return -1;
16893 : }
16894 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
16895 0 : if (unicode != NULL) {
16896 0 : Py_DECREF(unicode);
16897 : }
16898 0 : if (talloc_str == NULL) {
16899 0 : PyErr_NoMemory();
16900 0 : return -1;
16901 : }
16902 0 : object->pReserved4 = talloc_str;
16903 : }
16904 : }
16905 0 : return 0;
16906 : }
16907 :
16908 : static PyGetSetDef py_DNS_RPC_ZONE_INFO_DOTNET_getsetters[] = {
16909 : {
16910 : .name = discard_const_p(char, "dwRpcStructureVersion"),
16911 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRpcStructureVersion,
16912 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRpcStructureVersion,
16913 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16914 : },
16915 : {
16916 : .name = discard_const_p(char, "dwReserved0"),
16917 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved0,
16918 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved0,
16919 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16920 : },
16921 : {
16922 : .name = discard_const_p(char, "pszZoneName"),
16923 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pszZoneName,
16924 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pszZoneName,
16925 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
16926 : },
16927 : {
16928 : .name = discard_const_p(char, "dwZoneType"),
16929 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwZoneType,
16930 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwZoneType,
16931 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16932 : },
16933 : {
16934 : .name = discard_const_p(char, "fReverse"),
16935 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fReverse,
16936 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fReverse,
16937 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16938 : },
16939 : {
16940 : .name = discard_const_p(char, "fAllowUpdate"),
16941 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fAllowUpdate,
16942 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fAllowUpdate,
16943 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
16944 : },
16945 : {
16946 : .name = discard_const_p(char, "fPaused"),
16947 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fPaused,
16948 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fPaused,
16949 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16950 : },
16951 : {
16952 : .name = discard_const_p(char, "fShutdown"),
16953 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fShutdown,
16954 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fShutdown,
16955 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16956 : },
16957 : {
16958 : .name = discard_const_p(char, "fAutoCreated"),
16959 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fAutoCreated,
16960 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fAutoCreated,
16961 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16962 : },
16963 : {
16964 : .name = discard_const_p(char, "fUseDatabase"),
16965 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseDatabase,
16966 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseDatabase,
16967 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
16968 : },
16969 : {
16970 : .name = discard_const_p(char, "pszDataFile"),
16971 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDataFile,
16972 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDataFile,
16973 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
16974 : },
16975 : {
16976 : .name = discard_const_p(char, "aipMasters"),
16977 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipMasters,
16978 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipMasters,
16979 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
16980 : },
16981 : {
16982 : .name = discard_const_p(char, "fSecureSecondaries"),
16983 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fSecureSecondaries,
16984 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fSecureSecondaries,
16985 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
16986 : },
16987 : {
16988 : .name = discard_const_p(char, "fNotifyLevel"),
16989 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fNotifyLevel,
16990 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fNotifyLevel,
16991 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
16992 : },
16993 : {
16994 : .name = discard_const_p(char, "aipSecondaries"),
16995 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipSecondaries,
16996 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipSecondaries,
16997 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
16998 : },
16999 : {
17000 : .name = discard_const_p(char, "aipNotify"),
17001 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipNotify,
17002 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipNotify,
17003 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
17004 : },
17005 : {
17006 : .name = discard_const_p(char, "fUseWins"),
17007 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseWins,
17008 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseWins,
17009 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17010 : },
17011 : {
17012 : .name = discard_const_p(char, "fUseNbstat"),
17013 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fUseNbstat,
17014 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fUseNbstat,
17015 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17016 : },
17017 : {
17018 : .name = discard_const_p(char, "fAging"),
17019 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fAging,
17020 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fAging,
17021 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17022 : },
17023 : {
17024 : .name = discard_const_p(char, "dwNoRefreshInterval"),
17025 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwNoRefreshInterval,
17026 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwNoRefreshInterval,
17027 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17028 : },
17029 : {
17030 : .name = discard_const_p(char, "dwRefreshInterval"),
17031 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwRefreshInterval,
17032 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwRefreshInterval,
17033 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17034 : },
17035 : {
17036 : .name = discard_const_p(char, "dwAvailForScavengeTime"),
17037 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwAvailForScavengeTime,
17038 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwAvailForScavengeTime,
17039 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17040 : },
17041 : {
17042 : .name = discard_const_p(char, "aipScavengeServers"),
17043 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipScavengeServers,
17044 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipScavengeServers,
17045 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
17046 : },
17047 : {
17048 : .name = discard_const_p(char, "dwForwarderTimeout"),
17049 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwForwarderTimeout,
17050 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwForwarderTimeout,
17051 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17052 : },
17053 : {
17054 : .name = discard_const_p(char, "fForwarderSlave"),
17055 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_fForwarderSlave,
17056 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_fForwarderSlave,
17057 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17058 : },
17059 : {
17060 : .name = discard_const_p(char, "aipLocalMasters"),
17061 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_aipLocalMasters,
17062 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_aipLocalMasters,
17063 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
17064 : },
17065 : {
17066 : .name = discard_const_p(char, "dwDpFlags"),
17067 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwDpFlags,
17068 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwDpFlags,
17069 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17070 : },
17071 : {
17072 : .name = discard_const_p(char, "pszDpFqdn"),
17073 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pszDpFqdn,
17074 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pszDpFqdn,
17075 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17076 : },
17077 : {
17078 : .name = discard_const_p(char, "pwszZoneDn"),
17079 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pwszZoneDn,
17080 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pwszZoneDn,
17081 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
17082 : },
17083 : {
17084 : .name = discard_const_p(char, "dwLastSuccessfulSoaCheck"),
17085 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulSoaCheck,
17086 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulSoaCheck,
17087 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17088 : },
17089 : {
17090 : .name = discard_const_p(char, "dwLastSuccessfulXfr"),
17091 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwLastSuccessfulXfr,
17092 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwLastSuccessfulXfr,
17093 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17094 : },
17095 : {
17096 : .name = discard_const_p(char, "dwReserved1"),
17097 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved1,
17098 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved1,
17099 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17100 : },
17101 : {
17102 : .name = discard_const_p(char, "dwReserved2"),
17103 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved2,
17104 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved2,
17105 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17106 : },
17107 : {
17108 : .name = discard_const_p(char, "dwReserved3"),
17109 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved3,
17110 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved3,
17111 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17112 : },
17113 : {
17114 : .name = discard_const_p(char, "dwReserved4"),
17115 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved4,
17116 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved4,
17117 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17118 : },
17119 : {
17120 : .name = discard_const_p(char, "dwReserved5"),
17121 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_dwReserved5,
17122 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_dwReserved5,
17123 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
17124 : },
17125 : {
17126 : .name = discard_const_p(char, "pReserved1"),
17127 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved1,
17128 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved1,
17129 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17130 : },
17131 : {
17132 : .name = discard_const_p(char, "pReserved2"),
17133 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved2,
17134 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved2,
17135 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17136 : },
17137 : {
17138 : .name = discard_const_p(char, "pReserved3"),
17139 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved3,
17140 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved3,
17141 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17142 : },
17143 : {
17144 : .name = discard_const_p(char, "pReserved4"),
17145 : .get = py_DNS_RPC_ZONE_INFO_DOTNET_get_pReserved4,
17146 : .set = py_DNS_RPC_ZONE_INFO_DOTNET_set_pReserved4,
17147 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
17148 : },
17149 : { .name = NULL }
17150 : };
17151 :
17152 0 : static PyObject *py_DNS_RPC_ZONE_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
17153 : {
17154 0 : return pytalloc_new(struct DNS_RPC_ZONE_INFO_DOTNET, type);
17155 : }
17156 :
17157 :
17158 : static PyTypeObject DNS_RPC_ZONE_INFO_DOTNET_Type = {
17159 : PyVarObject_HEAD_INIT(NULL, 0)
17160 : .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_DOTNET",
17161 : .tp_getset = py_DNS_RPC_ZONE_INFO_DOTNET_getsetters,
17162 : .tp_methods = NULL,
17163 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
17164 : .tp_new = py_DNS_RPC_ZONE_INFO_DOTNET_new,
17165 : };
17166 :
17167 :
17168 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
17169 : {
17170 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17171 0 : PyObject *py_dwRpcStructureVersion;
17172 17 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
17173 17 : return py_dwRpcStructureVersion;
17174 : }
17175 :
17176 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
17177 : {
17178 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17179 0 : if (value == NULL) {
17180 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
17181 0 : return -1;
17182 : }
17183 : {
17184 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
17185 0 : if (PyLong_Check(value)) {
17186 0 : unsigned long long test_var;
17187 0 : test_var = PyLong_AsUnsignedLongLong(value);
17188 0 : if (PyErr_Occurred() != NULL) {
17189 0 : return -1;
17190 : }
17191 0 : if (test_var > uint_max) {
17192 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17193 : PyLong_Type.tp_name, uint_max, test_var);
17194 0 : return -1;
17195 : }
17196 0 : object->dwRpcStructureVersion = test_var;
17197 : } else {
17198 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17199 : PyLong_Type.tp_name);
17200 0 : return -1;
17201 : }
17202 : }
17203 0 : return 0;
17204 : }
17205 :
17206 0 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
17207 : {
17208 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17209 0 : PyObject *py_dwReserved0;
17210 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
17211 0 : return py_dwReserved0;
17212 : }
17213 :
17214 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
17215 : {
17216 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17217 0 : if (value == NULL) {
17218 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
17219 0 : return -1;
17220 : }
17221 : {
17222 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
17223 0 : if (PyLong_Check(value)) {
17224 0 : unsigned long long test_var;
17225 0 : test_var = PyLong_AsUnsignedLongLong(value);
17226 0 : if (PyErr_Occurred() != NULL) {
17227 0 : return -1;
17228 : }
17229 0 : if (test_var > uint_max) {
17230 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17231 : PyLong_Type.tp_name, uint_max, test_var);
17232 0 : return -1;
17233 : }
17234 0 : object->dwReserved0 = test_var;
17235 : } else {
17236 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17237 : PyLong_Type.tp_name);
17238 0 : return -1;
17239 : }
17240 : }
17241 0 : return 0;
17242 : }
17243 :
17244 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszZoneName(PyObject *obj, void *closure)
17245 : {
17246 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17247 0 : PyObject *py_pszZoneName;
17248 17 : if (object->pszZoneName == NULL) {
17249 0 : Py_RETURN_NONE;
17250 : }
17251 17 : if (object->pszZoneName == NULL) {
17252 0 : py_pszZoneName = Py_None;
17253 0 : Py_INCREF(py_pszZoneName);
17254 : } else {
17255 17 : if (object->pszZoneName == NULL) {
17256 0 : py_pszZoneName = Py_None;
17257 0 : Py_INCREF(py_pszZoneName);
17258 : } else {
17259 17 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
17260 : }
17261 : }
17262 17 : return py_pszZoneName;
17263 : }
17264 :
17265 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
17266 : {
17267 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17268 0 : if (value == NULL) {
17269 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneName");
17270 0 : return -1;
17271 : }
17272 0 : if (value == Py_None) {
17273 0 : object->pszZoneName = NULL;
17274 : } else {
17275 0 : object->pszZoneName = NULL;
17276 : {
17277 0 : const char *test_str;
17278 0 : const char *talloc_str;
17279 0 : PyObject *unicode = NULL;
17280 0 : if (PyUnicode_Check(value)) {
17281 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17282 0 : if (unicode == NULL) {
17283 0 : PyErr_NoMemory();
17284 0 : return -1;
17285 : }
17286 0 : test_str = PyBytes_AS_STRING(unicode);
17287 0 : } else if (PyBytes_Check(value)) {
17288 0 : test_str = PyBytes_AS_STRING(value);
17289 : } else {
17290 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
17291 0 : return -1;
17292 : }
17293 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
17294 0 : if (unicode != NULL) {
17295 0 : Py_DECREF(unicode);
17296 : }
17297 0 : if (talloc_str == NULL) {
17298 0 : PyErr_NoMemory();
17299 0 : return -1;
17300 : }
17301 0 : object->pszZoneName = talloc_str;
17302 : }
17303 : }
17304 0 : return 0;
17305 : }
17306 :
17307 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwZoneType(PyObject *obj, void *closure)
17308 : {
17309 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17310 0 : PyObject *py_dwZoneType;
17311 17 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneType);
17312 17 : return py_dwZoneType;
17313 : }
17314 :
17315 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
17316 : {
17317 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17318 0 : if (value == NULL) {
17319 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneType");
17320 0 : return -1;
17321 : }
17322 : {
17323 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
17324 0 : if (PyLong_Check(value)) {
17325 0 : unsigned long long test_var;
17326 0 : test_var = PyLong_AsUnsignedLongLong(value);
17327 0 : if (PyErr_Occurred() != NULL) {
17328 0 : return -1;
17329 : }
17330 0 : if (test_var > uint_max) {
17331 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17332 : PyLong_Type.tp_name, uint_max, test_var);
17333 0 : return -1;
17334 : }
17335 0 : object->dwZoneType = test_var;
17336 : } else {
17337 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17338 : PyLong_Type.tp_name);
17339 0 : return -1;
17340 : }
17341 : }
17342 0 : return 0;
17343 : }
17344 :
17345 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReverse(PyObject *obj, void *closure)
17346 : {
17347 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17348 0 : PyObject *py_fReverse;
17349 17 : py_fReverse = PyLong_FromUnsignedLongLong((uint32_t)object->fReverse);
17350 17 : return py_fReverse;
17351 : }
17352 :
17353 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReverse(PyObject *py_obj, PyObject *value, void *closure)
17354 : {
17355 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17356 0 : if (value == NULL) {
17357 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReverse");
17358 0 : return -1;
17359 : }
17360 : {
17361 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReverse));
17362 0 : if (PyLong_Check(value)) {
17363 0 : unsigned long long test_var;
17364 0 : test_var = PyLong_AsUnsignedLongLong(value);
17365 0 : if (PyErr_Occurred() != NULL) {
17366 0 : return -1;
17367 : }
17368 0 : if (test_var > uint_max) {
17369 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17370 : PyLong_Type.tp_name, uint_max, test_var);
17371 0 : return -1;
17372 : }
17373 0 : object->fReverse = test_var;
17374 : } else {
17375 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17376 : PyLong_Type.tp_name);
17377 0 : return -1;
17378 : }
17379 : }
17380 0 : return 0;
17381 : }
17382 :
17383 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
17384 : {
17385 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17386 0 : PyObject *py_fAllowUpdate;
17387 17 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
17388 17 : return py_fAllowUpdate;
17389 : }
17390 :
17391 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
17392 : {
17393 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17394 0 : if (value == NULL) {
17395 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
17396 0 : return -1;
17397 : }
17398 : {
17399 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
17400 0 : if (PyLong_Check(value)) {
17401 0 : unsigned long long test_var;
17402 0 : test_var = PyLong_AsUnsignedLongLong(value);
17403 0 : if (PyErr_Occurred() != NULL) {
17404 0 : return -1;
17405 : }
17406 0 : if (test_var > uint_max) {
17407 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17408 : PyLong_Type.tp_name, uint_max, test_var);
17409 0 : return -1;
17410 : }
17411 0 : object->fAllowUpdate = test_var;
17412 : } else {
17413 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17414 : PyLong_Type.tp_name);
17415 0 : return -1;
17416 : }
17417 : }
17418 0 : return 0;
17419 : }
17420 :
17421 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fPaused(PyObject *obj, void *closure)
17422 : {
17423 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17424 0 : PyObject *py_fPaused;
17425 17 : py_fPaused = PyLong_FromUnsignedLongLong((uint32_t)object->fPaused);
17426 17 : return py_fPaused;
17427 : }
17428 :
17429 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fPaused(PyObject *py_obj, PyObject *value, void *closure)
17430 : {
17431 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17432 0 : if (value == NULL) {
17433 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fPaused");
17434 0 : return -1;
17435 : }
17436 : {
17437 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fPaused));
17438 0 : if (PyLong_Check(value)) {
17439 0 : unsigned long long test_var;
17440 0 : test_var = PyLong_AsUnsignedLongLong(value);
17441 0 : if (PyErr_Occurred() != NULL) {
17442 0 : return -1;
17443 : }
17444 0 : if (test_var > uint_max) {
17445 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17446 : PyLong_Type.tp_name, uint_max, test_var);
17447 0 : return -1;
17448 : }
17449 0 : object->fPaused = test_var;
17450 : } else {
17451 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17452 : PyLong_Type.tp_name);
17453 0 : return -1;
17454 : }
17455 : }
17456 0 : return 0;
17457 : }
17458 :
17459 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fShutdown(PyObject *obj, void *closure)
17460 : {
17461 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17462 0 : PyObject *py_fShutdown;
17463 17 : py_fShutdown = PyLong_FromUnsignedLongLong((uint32_t)object->fShutdown);
17464 17 : return py_fShutdown;
17465 : }
17466 :
17467 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fShutdown(PyObject *py_obj, PyObject *value, void *closure)
17468 : {
17469 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17470 0 : if (value == NULL) {
17471 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fShutdown");
17472 0 : return -1;
17473 : }
17474 : {
17475 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fShutdown));
17476 0 : if (PyLong_Check(value)) {
17477 0 : unsigned long long test_var;
17478 0 : test_var = PyLong_AsUnsignedLongLong(value);
17479 0 : if (PyErr_Occurred() != NULL) {
17480 0 : return -1;
17481 : }
17482 0 : if (test_var > uint_max) {
17483 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17484 : PyLong_Type.tp_name, uint_max, test_var);
17485 0 : return -1;
17486 : }
17487 0 : object->fShutdown = test_var;
17488 : } else {
17489 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17490 : PyLong_Type.tp_name);
17491 0 : return -1;
17492 : }
17493 : }
17494 0 : return 0;
17495 : }
17496 :
17497 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAutoCreated(PyObject *obj, void *closure)
17498 : {
17499 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17500 0 : PyObject *py_fAutoCreated;
17501 17 : py_fAutoCreated = PyLong_FromUnsignedLongLong((uint32_t)object->fAutoCreated);
17502 17 : return py_fAutoCreated;
17503 : }
17504 :
17505 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAutoCreated(PyObject *py_obj, PyObject *value, void *closure)
17506 : {
17507 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17508 0 : if (value == NULL) {
17509 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAutoCreated");
17510 0 : return -1;
17511 : }
17512 : {
17513 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAutoCreated));
17514 0 : if (PyLong_Check(value)) {
17515 0 : unsigned long long test_var;
17516 0 : test_var = PyLong_AsUnsignedLongLong(value);
17517 0 : if (PyErr_Occurred() != NULL) {
17518 0 : return -1;
17519 : }
17520 0 : if (test_var > uint_max) {
17521 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17522 : PyLong_Type.tp_name, uint_max, test_var);
17523 0 : return -1;
17524 : }
17525 0 : object->fAutoCreated = test_var;
17526 : } else {
17527 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17528 : PyLong_Type.tp_name);
17529 0 : return -1;
17530 : }
17531 : }
17532 0 : return 0;
17533 : }
17534 :
17535 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseDatabase(PyObject *obj, void *closure)
17536 : {
17537 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17538 0 : PyObject *py_fUseDatabase;
17539 17 : py_fUseDatabase = PyLong_FromUnsignedLongLong((uint32_t)object->fUseDatabase);
17540 17 : return py_fUseDatabase;
17541 : }
17542 :
17543 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseDatabase(PyObject *py_obj, PyObject *value, void *closure)
17544 : {
17545 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17546 0 : if (value == NULL) {
17547 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseDatabase");
17548 0 : return -1;
17549 : }
17550 : {
17551 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseDatabase));
17552 0 : if (PyLong_Check(value)) {
17553 0 : unsigned long long test_var;
17554 0 : test_var = PyLong_AsUnsignedLongLong(value);
17555 0 : if (PyErr_Occurred() != NULL) {
17556 0 : return -1;
17557 : }
17558 0 : if (test_var > uint_max) {
17559 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17560 : PyLong_Type.tp_name, uint_max, test_var);
17561 0 : return -1;
17562 : }
17563 0 : object->fUseDatabase = test_var;
17564 : } else {
17565 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17566 : PyLong_Type.tp_name);
17567 0 : return -1;
17568 : }
17569 : }
17570 0 : return 0;
17571 : }
17572 :
17573 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDataFile(PyObject *obj, void *closure)
17574 : {
17575 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17576 0 : PyObject *py_pszDataFile;
17577 17 : if (object->pszDataFile == NULL) {
17578 17 : Py_RETURN_NONE;
17579 : }
17580 0 : if (object->pszDataFile == NULL) {
17581 0 : py_pszDataFile = Py_None;
17582 0 : Py_INCREF(py_pszDataFile);
17583 : } else {
17584 0 : if (object->pszDataFile == NULL) {
17585 0 : py_pszDataFile = Py_None;
17586 0 : Py_INCREF(py_pszDataFile);
17587 : } else {
17588 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
17589 : }
17590 : }
17591 0 : return py_pszDataFile;
17592 : }
17593 :
17594 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
17595 : {
17596 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17597 0 : if (value == NULL) {
17598 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDataFile");
17599 0 : return -1;
17600 : }
17601 0 : if (value == Py_None) {
17602 0 : object->pszDataFile = NULL;
17603 : } else {
17604 0 : object->pszDataFile = NULL;
17605 : {
17606 0 : const char *test_str;
17607 0 : const char *talloc_str;
17608 0 : PyObject *unicode = NULL;
17609 0 : if (PyUnicode_Check(value)) {
17610 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
17611 0 : if (unicode == NULL) {
17612 0 : PyErr_NoMemory();
17613 0 : return -1;
17614 : }
17615 0 : test_str = PyBytes_AS_STRING(unicode);
17616 0 : } else if (PyBytes_Check(value)) {
17617 0 : test_str = PyBytes_AS_STRING(value);
17618 : } else {
17619 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
17620 0 : return -1;
17621 : }
17622 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
17623 0 : if (unicode != NULL) {
17624 0 : Py_DECREF(unicode);
17625 : }
17626 0 : if (talloc_str == NULL) {
17627 0 : PyErr_NoMemory();
17628 0 : return -1;
17629 : }
17630 0 : object->pszDataFile = talloc_str;
17631 : }
17632 : }
17633 0 : return 0;
17634 : }
17635 :
17636 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipMasters(PyObject *obj, void *closure)
17637 : {
17638 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17639 0 : PyObject *py_aipMasters;
17640 17 : if (object->aipMasters == NULL) {
17641 17 : Py_RETURN_NONE;
17642 : }
17643 0 : if (object->aipMasters == NULL) {
17644 0 : py_aipMasters = Py_None;
17645 0 : Py_INCREF(py_aipMasters);
17646 : } else {
17647 0 : py_aipMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipMasters, object->aipMasters);
17648 : }
17649 0 : return py_aipMasters;
17650 : }
17651 :
17652 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
17653 : {
17654 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17655 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
17656 0 : if (value == NULL) {
17657 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipMasters");
17658 0 : return -1;
17659 : }
17660 0 : if (value == Py_None) {
17661 0 : object->aipMasters = NULL;
17662 : } else {
17663 0 : object->aipMasters = NULL;
17664 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
17665 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
17666 0 : PyErr_NoMemory();
17667 0 : return -1;
17668 : }
17669 0 : object->aipMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
17670 : }
17671 0 : return 0;
17672 : }
17673 :
17674 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
17675 : {
17676 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17677 0 : PyObject *py_fSecureSecondaries;
17678 17 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
17679 17 : return py_fSecureSecondaries;
17680 : }
17681 :
17682 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
17683 : {
17684 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17685 0 : if (value == NULL) {
17686 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
17687 0 : return -1;
17688 : }
17689 : {
17690 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
17691 0 : if (PyLong_Check(value)) {
17692 0 : unsigned long long test_var;
17693 0 : test_var = PyLong_AsUnsignedLongLong(value);
17694 0 : if (PyErr_Occurred() != NULL) {
17695 0 : return -1;
17696 : }
17697 0 : if (test_var > uint_max) {
17698 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17699 : PyLong_Type.tp_name, uint_max, test_var);
17700 0 : return -1;
17701 : }
17702 0 : object->fSecureSecondaries = test_var;
17703 : } else {
17704 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17705 : PyLong_Type.tp_name);
17706 0 : return -1;
17707 : }
17708 : }
17709 0 : return 0;
17710 : }
17711 :
17712 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
17713 : {
17714 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17715 0 : PyObject *py_fNotifyLevel;
17716 17 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
17717 17 : return py_fNotifyLevel;
17718 : }
17719 :
17720 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
17721 : {
17722 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17723 0 : if (value == NULL) {
17724 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
17725 0 : return -1;
17726 : }
17727 : {
17728 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
17729 0 : if (PyLong_Check(value)) {
17730 0 : unsigned long long test_var;
17731 0 : test_var = PyLong_AsUnsignedLongLong(value);
17732 0 : if (PyErr_Occurred() != NULL) {
17733 0 : return -1;
17734 : }
17735 0 : if (test_var > uint_max) {
17736 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17737 : PyLong_Type.tp_name, uint_max, test_var);
17738 0 : return -1;
17739 : }
17740 0 : object->fNotifyLevel = test_var;
17741 : } else {
17742 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17743 : PyLong_Type.tp_name);
17744 0 : return -1;
17745 : }
17746 : }
17747 0 : return 0;
17748 : }
17749 :
17750 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
17751 : {
17752 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17753 0 : PyObject *py_aipSecondaries;
17754 17 : if (object->aipSecondaries == NULL) {
17755 17 : Py_RETURN_NONE;
17756 : }
17757 0 : if (object->aipSecondaries == NULL) {
17758 0 : py_aipSecondaries = Py_None;
17759 0 : Py_INCREF(py_aipSecondaries);
17760 : } else {
17761 0 : py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
17762 : }
17763 0 : return py_aipSecondaries;
17764 : }
17765 :
17766 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
17767 : {
17768 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17769 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
17770 0 : if (value == NULL) {
17771 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
17772 0 : return -1;
17773 : }
17774 0 : if (value == Py_None) {
17775 0 : object->aipSecondaries = NULL;
17776 : } else {
17777 0 : object->aipSecondaries = NULL;
17778 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
17779 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
17780 0 : PyErr_NoMemory();
17781 0 : return -1;
17782 : }
17783 0 : object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
17784 : }
17785 0 : return 0;
17786 : }
17787 :
17788 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipNotify(PyObject *obj, void *closure)
17789 : {
17790 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17791 0 : PyObject *py_aipNotify;
17792 17 : if (object->aipNotify == NULL) {
17793 17 : Py_RETURN_NONE;
17794 : }
17795 0 : if (object->aipNotify == NULL) {
17796 0 : py_aipNotify = Py_None;
17797 0 : Py_INCREF(py_aipNotify);
17798 : } else {
17799 0 : py_aipNotify = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipNotify, object->aipNotify);
17800 : }
17801 0 : return py_aipNotify;
17802 : }
17803 :
17804 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
17805 : {
17806 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17807 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
17808 0 : if (value == NULL) {
17809 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipNotify");
17810 0 : return -1;
17811 : }
17812 0 : if (value == Py_None) {
17813 0 : object->aipNotify = NULL;
17814 : } else {
17815 0 : object->aipNotify = NULL;
17816 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
17817 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
17818 0 : PyErr_NoMemory();
17819 0 : return -1;
17820 : }
17821 0 : object->aipNotify = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
17822 : }
17823 0 : return 0;
17824 : }
17825 :
17826 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseWins(PyObject *obj, void *closure)
17827 : {
17828 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17829 0 : PyObject *py_fUseWins;
17830 17 : py_fUseWins = PyLong_FromUnsignedLongLong((uint32_t)object->fUseWins);
17831 17 : return py_fUseWins;
17832 : }
17833 :
17834 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseWins(PyObject *py_obj, PyObject *value, void *closure)
17835 : {
17836 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17837 0 : if (value == NULL) {
17838 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseWins");
17839 0 : return -1;
17840 : }
17841 : {
17842 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseWins));
17843 0 : if (PyLong_Check(value)) {
17844 0 : unsigned long long test_var;
17845 0 : test_var = PyLong_AsUnsignedLongLong(value);
17846 0 : if (PyErr_Occurred() != NULL) {
17847 0 : return -1;
17848 : }
17849 0 : if (test_var > uint_max) {
17850 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17851 : PyLong_Type.tp_name, uint_max, test_var);
17852 0 : return -1;
17853 : }
17854 0 : object->fUseWins = test_var;
17855 : } else {
17856 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17857 : PyLong_Type.tp_name);
17858 0 : return -1;
17859 : }
17860 : }
17861 0 : return 0;
17862 : }
17863 :
17864 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseNbstat(PyObject *obj, void *closure)
17865 : {
17866 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17867 0 : PyObject *py_fUseNbstat;
17868 17 : py_fUseNbstat = PyLong_FromUnsignedLongLong((uint32_t)object->fUseNbstat);
17869 17 : return py_fUseNbstat;
17870 : }
17871 :
17872 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseNbstat(PyObject *py_obj, PyObject *value, void *closure)
17873 : {
17874 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17875 0 : if (value == NULL) {
17876 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fUseNbstat");
17877 0 : return -1;
17878 : }
17879 : {
17880 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fUseNbstat));
17881 0 : if (PyLong_Check(value)) {
17882 0 : unsigned long long test_var;
17883 0 : test_var = PyLong_AsUnsignedLongLong(value);
17884 0 : if (PyErr_Occurred() != NULL) {
17885 0 : return -1;
17886 : }
17887 0 : if (test_var > uint_max) {
17888 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17889 : PyLong_Type.tp_name, uint_max, test_var);
17890 0 : return -1;
17891 : }
17892 0 : object->fUseNbstat = test_var;
17893 : } else {
17894 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17895 : PyLong_Type.tp_name);
17896 0 : return -1;
17897 : }
17898 : }
17899 0 : return 0;
17900 : }
17901 :
17902 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAging(PyObject *obj, void *closure)
17903 : {
17904 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17905 0 : PyObject *py_fAging;
17906 17 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)object->fAging);
17907 17 : return py_fAging;
17908 : }
17909 :
17910 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
17911 : {
17912 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17913 0 : if (value == NULL) {
17914 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAging");
17915 0 : return -1;
17916 : }
17917 : {
17918 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
17919 0 : if (PyLong_Check(value)) {
17920 0 : unsigned long long test_var;
17921 0 : test_var = PyLong_AsUnsignedLongLong(value);
17922 0 : if (PyErr_Occurred() != NULL) {
17923 0 : return -1;
17924 : }
17925 0 : if (test_var > uint_max) {
17926 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17927 : PyLong_Type.tp_name, uint_max, test_var);
17928 0 : return -1;
17929 : }
17930 0 : object->fAging = test_var;
17931 : } else {
17932 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17933 : PyLong_Type.tp_name);
17934 0 : return -1;
17935 : }
17936 : }
17937 0 : return 0;
17938 : }
17939 :
17940 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwNoRefreshInterval(PyObject *obj, void *closure)
17941 : {
17942 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17943 0 : PyObject *py_dwNoRefreshInterval;
17944 17 : py_dwNoRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwNoRefreshInterval);
17945 17 : return py_dwNoRefreshInterval;
17946 : }
17947 :
17948 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwNoRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
17949 : {
17950 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17951 0 : if (value == NULL) {
17952 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwNoRefreshInterval");
17953 0 : return -1;
17954 : }
17955 : {
17956 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwNoRefreshInterval));
17957 0 : if (PyLong_Check(value)) {
17958 0 : unsigned long long test_var;
17959 0 : test_var = PyLong_AsUnsignedLongLong(value);
17960 0 : if (PyErr_Occurred() != NULL) {
17961 0 : return -1;
17962 : }
17963 0 : if (test_var > uint_max) {
17964 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
17965 : PyLong_Type.tp_name, uint_max, test_var);
17966 0 : return -1;
17967 : }
17968 0 : object->dwNoRefreshInterval = test_var;
17969 : } else {
17970 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
17971 : PyLong_Type.tp_name);
17972 0 : return -1;
17973 : }
17974 : }
17975 0 : return 0;
17976 : }
17977 :
17978 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRefreshInterval(PyObject *obj, void *closure)
17979 : {
17980 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
17981 0 : PyObject *py_dwRefreshInterval;
17982 17 : py_dwRefreshInterval = PyLong_FromUnsignedLongLong((uint32_t)object->dwRefreshInterval);
17983 17 : return py_dwRefreshInterval;
17984 : }
17985 :
17986 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRefreshInterval(PyObject *py_obj, PyObject *value, void *closure)
17987 : {
17988 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
17989 0 : if (value == NULL) {
17990 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRefreshInterval");
17991 0 : return -1;
17992 : }
17993 : {
17994 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRefreshInterval));
17995 0 : if (PyLong_Check(value)) {
17996 0 : unsigned long long test_var;
17997 0 : test_var = PyLong_AsUnsignedLongLong(value);
17998 0 : if (PyErr_Occurred() != NULL) {
17999 0 : return -1;
18000 : }
18001 0 : if (test_var > uint_max) {
18002 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18003 : PyLong_Type.tp_name, uint_max, test_var);
18004 0 : return -1;
18005 : }
18006 0 : object->dwRefreshInterval = test_var;
18007 : } else {
18008 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18009 : PyLong_Type.tp_name);
18010 0 : return -1;
18011 : }
18012 : }
18013 0 : return 0;
18014 : }
18015 :
18016 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwAvailForScavengeTime(PyObject *obj, void *closure)
18017 : {
18018 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18019 0 : PyObject *py_dwAvailForScavengeTime;
18020 17 : py_dwAvailForScavengeTime = PyLong_FromUnsignedLongLong((uint32_t)object->dwAvailForScavengeTime);
18021 17 : return py_dwAvailForScavengeTime;
18022 : }
18023 :
18024 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwAvailForScavengeTime(PyObject *py_obj, PyObject *value, void *closure)
18025 : {
18026 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18027 0 : if (value == NULL) {
18028 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwAvailForScavengeTime");
18029 0 : return -1;
18030 : }
18031 : {
18032 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwAvailForScavengeTime));
18033 0 : if (PyLong_Check(value)) {
18034 0 : unsigned long long test_var;
18035 0 : test_var = PyLong_AsUnsignedLongLong(value);
18036 0 : if (PyErr_Occurred() != NULL) {
18037 0 : return -1;
18038 : }
18039 0 : if (test_var > uint_max) {
18040 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18041 : PyLong_Type.tp_name, uint_max, test_var);
18042 0 : return -1;
18043 : }
18044 0 : object->dwAvailForScavengeTime = test_var;
18045 : } else {
18046 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18047 : PyLong_Type.tp_name);
18048 0 : return -1;
18049 : }
18050 : }
18051 0 : return 0;
18052 : }
18053 :
18054 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipScavengeServers(PyObject *obj, void *closure)
18055 : {
18056 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18057 0 : PyObject *py_aipScavengeServers;
18058 17 : if (object->aipScavengeServers == NULL) {
18059 17 : Py_RETURN_NONE;
18060 : }
18061 0 : if (object->aipScavengeServers == NULL) {
18062 0 : py_aipScavengeServers = Py_None;
18063 0 : Py_INCREF(py_aipScavengeServers);
18064 : } else {
18065 0 : py_aipScavengeServers = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipScavengeServers, object->aipScavengeServers);
18066 : }
18067 0 : return py_aipScavengeServers;
18068 : }
18069 :
18070 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipScavengeServers(PyObject *py_obj, PyObject *value, void *closure)
18071 : {
18072 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18073 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipScavengeServers));
18074 0 : if (value == NULL) {
18075 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipScavengeServers");
18076 0 : return -1;
18077 : }
18078 0 : if (value == Py_None) {
18079 0 : object->aipScavengeServers = NULL;
18080 : } else {
18081 0 : object->aipScavengeServers = NULL;
18082 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
18083 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
18084 0 : PyErr_NoMemory();
18085 0 : return -1;
18086 : }
18087 0 : object->aipScavengeServers = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
18088 : }
18089 0 : return 0;
18090 : }
18091 :
18092 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwForwarderTimeout(PyObject *obj, void *closure)
18093 : {
18094 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18095 0 : PyObject *py_dwForwarderTimeout;
18096 17 : py_dwForwarderTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwForwarderTimeout);
18097 17 : return py_dwForwarderTimeout;
18098 : }
18099 :
18100 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwForwarderTimeout(PyObject *py_obj, PyObject *value, void *closure)
18101 : {
18102 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18103 0 : if (value == NULL) {
18104 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwForwarderTimeout");
18105 0 : return -1;
18106 : }
18107 : {
18108 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwarderTimeout));
18109 0 : if (PyLong_Check(value)) {
18110 0 : unsigned long long test_var;
18111 0 : test_var = PyLong_AsUnsignedLongLong(value);
18112 0 : if (PyErr_Occurred() != NULL) {
18113 0 : return -1;
18114 : }
18115 0 : if (test_var > uint_max) {
18116 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18117 : PyLong_Type.tp_name, uint_max, test_var);
18118 0 : return -1;
18119 : }
18120 0 : object->dwForwarderTimeout = test_var;
18121 : } else {
18122 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18123 : PyLong_Type.tp_name);
18124 0 : return -1;
18125 : }
18126 : }
18127 0 : return 0;
18128 : }
18129 :
18130 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fForwarderSlave(PyObject *obj, void *closure)
18131 : {
18132 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18133 0 : PyObject *py_fForwarderSlave;
18134 17 : py_fForwarderSlave = PyLong_FromUnsignedLongLong((uint32_t)object->fForwarderSlave);
18135 17 : return py_fForwarderSlave;
18136 : }
18137 :
18138 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fForwarderSlave(PyObject *py_obj, PyObject *value, void *closure)
18139 : {
18140 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18141 0 : if (value == NULL) {
18142 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fForwarderSlave");
18143 0 : return -1;
18144 : }
18145 : {
18146 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fForwarderSlave));
18147 0 : if (PyLong_Check(value)) {
18148 0 : unsigned long long test_var;
18149 0 : test_var = PyLong_AsUnsignedLongLong(value);
18150 0 : if (PyErr_Occurred() != NULL) {
18151 0 : return -1;
18152 : }
18153 0 : if (test_var > uint_max) {
18154 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18155 : PyLong_Type.tp_name, uint_max, test_var);
18156 0 : return -1;
18157 : }
18158 0 : object->fForwarderSlave = test_var;
18159 : } else {
18160 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18161 : PyLong_Type.tp_name);
18162 0 : return -1;
18163 : }
18164 : }
18165 0 : return 0;
18166 : }
18167 :
18168 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipLocalMasters(PyObject *obj, void *closure)
18169 : {
18170 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18171 0 : PyObject *py_aipLocalMasters;
18172 17 : if (object->aipLocalMasters == NULL) {
18173 17 : Py_RETURN_NONE;
18174 : }
18175 0 : if (object->aipLocalMasters == NULL) {
18176 0 : py_aipLocalMasters = Py_None;
18177 0 : Py_INCREF(py_aipLocalMasters);
18178 : } else {
18179 0 : py_aipLocalMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipLocalMasters, object->aipLocalMasters);
18180 : }
18181 0 : return py_aipLocalMasters;
18182 : }
18183 :
18184 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipLocalMasters(PyObject *py_obj, PyObject *value, void *closure)
18185 : {
18186 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18187 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipLocalMasters));
18188 0 : if (value == NULL) {
18189 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipLocalMasters");
18190 0 : return -1;
18191 : }
18192 0 : if (value == Py_None) {
18193 0 : object->aipLocalMasters = NULL;
18194 : } else {
18195 0 : object->aipLocalMasters = NULL;
18196 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
18197 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
18198 0 : PyErr_NoMemory();
18199 0 : return -1;
18200 : }
18201 0 : object->aipLocalMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
18202 : }
18203 0 : return 0;
18204 : }
18205 :
18206 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwDpFlags(PyObject *obj, void *closure)
18207 : {
18208 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18209 0 : PyObject *py_dwDpFlags;
18210 17 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwDpFlags);
18211 17 : return py_dwDpFlags;
18212 : }
18213 :
18214 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
18215 : {
18216 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18217 0 : if (value == NULL) {
18218 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDpFlags");
18219 0 : return -1;
18220 : }
18221 : {
18222 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
18223 0 : if (PyLong_Check(value)) {
18224 0 : unsigned long long test_var;
18225 0 : test_var = PyLong_AsUnsignedLongLong(value);
18226 0 : if (PyErr_Occurred() != NULL) {
18227 0 : return -1;
18228 : }
18229 0 : if (test_var > uint_max) {
18230 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18231 : PyLong_Type.tp_name, uint_max, test_var);
18232 0 : return -1;
18233 : }
18234 0 : object->dwDpFlags = test_var;
18235 : } else {
18236 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18237 : PyLong_Type.tp_name);
18238 0 : return -1;
18239 : }
18240 : }
18241 0 : return 0;
18242 : }
18243 :
18244 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDpFqdn(PyObject *obj, void *closure)
18245 : {
18246 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18247 0 : PyObject *py_pszDpFqdn;
18248 17 : if (object->pszDpFqdn == NULL) {
18249 0 : Py_RETURN_NONE;
18250 : }
18251 17 : if (object->pszDpFqdn == NULL) {
18252 0 : py_pszDpFqdn = Py_None;
18253 0 : Py_INCREF(py_pszDpFqdn);
18254 : } else {
18255 17 : if (object->pszDpFqdn == NULL) {
18256 0 : py_pszDpFqdn = Py_None;
18257 0 : Py_INCREF(py_pszDpFqdn);
18258 : } else {
18259 17 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
18260 : }
18261 : }
18262 17 : return py_pszDpFqdn;
18263 : }
18264 :
18265 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
18266 : {
18267 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18268 0 : if (value == NULL) {
18269 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpFqdn");
18270 0 : return -1;
18271 : }
18272 0 : if (value == Py_None) {
18273 0 : object->pszDpFqdn = NULL;
18274 : } else {
18275 0 : object->pszDpFqdn = NULL;
18276 : {
18277 0 : const char *test_str;
18278 0 : const char *talloc_str;
18279 0 : PyObject *unicode = NULL;
18280 0 : if (PyUnicode_Check(value)) {
18281 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18282 0 : if (unicode == NULL) {
18283 0 : PyErr_NoMemory();
18284 0 : return -1;
18285 : }
18286 0 : test_str = PyBytes_AS_STRING(unicode);
18287 0 : } else if (PyBytes_Check(value)) {
18288 0 : test_str = PyBytes_AS_STRING(value);
18289 : } else {
18290 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18291 0 : return -1;
18292 : }
18293 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18294 0 : if (unicode != NULL) {
18295 0 : Py_DECREF(unicode);
18296 : }
18297 0 : if (talloc_str == NULL) {
18298 0 : PyErr_NoMemory();
18299 0 : return -1;
18300 : }
18301 0 : object->pszDpFqdn = talloc_str;
18302 : }
18303 : }
18304 0 : return 0;
18305 : }
18306 :
18307 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_pwszZoneDn(PyObject *obj, void *closure)
18308 : {
18309 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18310 0 : PyObject *py_pwszZoneDn;
18311 17 : if (object->pwszZoneDn == NULL) {
18312 0 : Py_RETURN_NONE;
18313 : }
18314 17 : if (object->pwszZoneDn == NULL) {
18315 0 : py_pwszZoneDn = Py_None;
18316 0 : Py_INCREF(py_pwszZoneDn);
18317 : } else {
18318 17 : if (object->pwszZoneDn == NULL) {
18319 0 : py_pwszZoneDn = Py_None;
18320 0 : Py_INCREF(py_pwszZoneDn);
18321 : } else {
18322 17 : py_pwszZoneDn = PyUnicode_Decode(object->pwszZoneDn, strlen(object->pwszZoneDn), "utf-8", "ignore");
18323 : }
18324 : }
18325 17 : return py_pwszZoneDn;
18326 : }
18327 :
18328 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_pwszZoneDn(PyObject *py_obj, PyObject *value, void *closure)
18329 : {
18330 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18331 0 : if (value == NULL) {
18332 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pwszZoneDn");
18333 0 : return -1;
18334 : }
18335 0 : if (value == Py_None) {
18336 0 : object->pwszZoneDn = NULL;
18337 : } else {
18338 0 : object->pwszZoneDn = NULL;
18339 : {
18340 0 : const char *test_str;
18341 0 : const char *talloc_str;
18342 0 : PyObject *unicode = NULL;
18343 0 : if (PyUnicode_Check(value)) {
18344 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
18345 0 : if (unicode == NULL) {
18346 0 : PyErr_NoMemory();
18347 0 : return -1;
18348 : }
18349 0 : test_str = PyBytes_AS_STRING(unicode);
18350 0 : } else if (PyBytes_Check(value)) {
18351 0 : test_str = PyBytes_AS_STRING(value);
18352 : } else {
18353 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
18354 0 : return -1;
18355 : }
18356 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
18357 0 : if (unicode != NULL) {
18358 0 : Py_DECREF(unicode);
18359 : }
18360 0 : if (talloc_str == NULL) {
18361 0 : PyErr_NoMemory();
18362 0 : return -1;
18363 : }
18364 0 : object->pwszZoneDn = talloc_str;
18365 : }
18366 : }
18367 0 : return 0;
18368 : }
18369 :
18370 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulSoaCheck(PyObject *obj, void *closure)
18371 : {
18372 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18373 0 : PyObject *py_dwLastSuccessfulSoaCheck;
18374 17 : py_dwLastSuccessfulSoaCheck = PyLong_FromUnsignedLongLong((uint32_t)object->dwLastSuccessfulSoaCheck);
18375 17 : return py_dwLastSuccessfulSoaCheck;
18376 : }
18377 :
18378 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulSoaCheck(PyObject *py_obj, PyObject *value, void *closure)
18379 : {
18380 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18381 0 : if (value == NULL) {
18382 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLastSuccessfulSoaCheck");
18383 0 : return -1;
18384 : }
18385 : {
18386 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastSuccessfulSoaCheck));
18387 0 : if (PyLong_Check(value)) {
18388 0 : unsigned long long test_var;
18389 0 : test_var = PyLong_AsUnsignedLongLong(value);
18390 0 : if (PyErr_Occurred() != NULL) {
18391 0 : return -1;
18392 : }
18393 0 : if (test_var > uint_max) {
18394 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18395 : PyLong_Type.tp_name, uint_max, test_var);
18396 0 : return -1;
18397 : }
18398 0 : object->dwLastSuccessfulSoaCheck = test_var;
18399 : } else {
18400 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18401 : PyLong_Type.tp_name);
18402 0 : return -1;
18403 : }
18404 : }
18405 0 : return 0;
18406 : }
18407 :
18408 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulXfr(PyObject *obj, void *closure)
18409 : {
18410 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18411 0 : PyObject *py_dwLastSuccessfulXfr;
18412 17 : py_dwLastSuccessfulXfr = PyLong_FromUnsignedLongLong((uint32_t)object->dwLastSuccessfulXfr);
18413 17 : return py_dwLastSuccessfulXfr;
18414 : }
18415 :
18416 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulXfr(PyObject *py_obj, PyObject *value, void *closure)
18417 : {
18418 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18419 0 : if (value == NULL) {
18420 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLastSuccessfulXfr");
18421 0 : return -1;
18422 : }
18423 : {
18424 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastSuccessfulXfr));
18425 0 : if (PyLong_Check(value)) {
18426 0 : unsigned long long test_var;
18427 0 : test_var = PyLong_AsUnsignedLongLong(value);
18428 0 : if (PyErr_Occurred() != NULL) {
18429 0 : return -1;
18430 : }
18431 0 : if (test_var > uint_max) {
18432 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18433 : PyLong_Type.tp_name, uint_max, test_var);
18434 0 : return -1;
18435 : }
18436 0 : object->dwLastSuccessfulXfr = test_var;
18437 : } else {
18438 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18439 : PyLong_Type.tp_name);
18440 0 : return -1;
18441 : }
18442 : }
18443 0 : return 0;
18444 : }
18445 :
18446 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fQueuedForBackgroundLoad(PyObject *obj, void *closure)
18447 : {
18448 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18449 0 : PyObject *py_fQueuedForBackgroundLoad;
18450 17 : py_fQueuedForBackgroundLoad = PyLong_FromUnsignedLongLong((uint32_t)object->fQueuedForBackgroundLoad);
18451 17 : return py_fQueuedForBackgroundLoad;
18452 : }
18453 :
18454 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fQueuedForBackgroundLoad(PyObject *py_obj, PyObject *value, void *closure)
18455 : {
18456 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18457 0 : if (value == NULL) {
18458 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fQueuedForBackgroundLoad");
18459 0 : return -1;
18460 : }
18461 : {
18462 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fQueuedForBackgroundLoad));
18463 0 : if (PyLong_Check(value)) {
18464 0 : unsigned long long test_var;
18465 0 : test_var = PyLong_AsUnsignedLongLong(value);
18466 0 : if (PyErr_Occurred() != NULL) {
18467 0 : return -1;
18468 : }
18469 0 : if (test_var > uint_max) {
18470 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18471 : PyLong_Type.tp_name, uint_max, test_var);
18472 0 : return -1;
18473 : }
18474 0 : object->fQueuedForBackgroundLoad = test_var;
18475 : } else {
18476 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18477 : PyLong_Type.tp_name);
18478 0 : return -1;
18479 : }
18480 : }
18481 0 : return 0;
18482 : }
18483 :
18484 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fBackgroundLoadInProgress(PyObject *obj, void *closure)
18485 : {
18486 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18487 0 : PyObject *py_fBackgroundLoadInProgress;
18488 17 : py_fBackgroundLoadInProgress = PyLong_FromUnsignedLongLong((uint32_t)object->fBackgroundLoadInProgress);
18489 17 : return py_fBackgroundLoadInProgress;
18490 : }
18491 :
18492 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fBackgroundLoadInProgress(PyObject *py_obj, PyObject *value, void *closure)
18493 : {
18494 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18495 0 : if (value == NULL) {
18496 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fBackgroundLoadInProgress");
18497 0 : return -1;
18498 : }
18499 : {
18500 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fBackgroundLoadInProgress));
18501 0 : if (PyLong_Check(value)) {
18502 0 : unsigned long long test_var;
18503 0 : test_var = PyLong_AsUnsignedLongLong(value);
18504 0 : if (PyErr_Occurred() != NULL) {
18505 0 : return -1;
18506 : }
18507 0 : if (test_var > uint_max) {
18508 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18509 : PyLong_Type.tp_name, uint_max, test_var);
18510 0 : return -1;
18511 : }
18512 0 : object->fBackgroundLoadInProgress = test_var;
18513 : } else {
18514 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18515 : PyLong_Type.tp_name);
18516 0 : return -1;
18517 : }
18518 : }
18519 0 : return 0;
18520 : }
18521 :
18522 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReadOnlyZone(PyObject *obj, void *closure)
18523 : {
18524 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18525 0 : PyObject *py_fReadOnlyZone;
18526 17 : py_fReadOnlyZone = PyLong_FromUnsignedLongLong((uint32_t)object->fReadOnlyZone);
18527 17 : return py_fReadOnlyZone;
18528 : }
18529 :
18530 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReadOnlyZone(PyObject *py_obj, PyObject *value, void *closure)
18531 : {
18532 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18533 0 : if (value == NULL) {
18534 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReadOnlyZone");
18535 0 : return -1;
18536 : }
18537 : {
18538 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReadOnlyZone));
18539 0 : if (PyLong_Check(value)) {
18540 0 : unsigned long long test_var;
18541 0 : test_var = PyLong_AsUnsignedLongLong(value);
18542 0 : if (PyErr_Occurred() != NULL) {
18543 0 : return -1;
18544 : }
18545 0 : if (test_var > uint_max) {
18546 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18547 : PyLong_Type.tp_name, uint_max, test_var);
18548 0 : return -1;
18549 : }
18550 0 : object->fReadOnlyZone = test_var;
18551 : } else {
18552 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18553 : PyLong_Type.tp_name);
18554 0 : return -1;
18555 : }
18556 : }
18557 0 : return 0;
18558 : }
18559 :
18560 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrAttempt(PyObject *obj, void *closure)
18561 : {
18562 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18563 0 : PyObject *py_dwLastXfrAttempt;
18564 17 : py_dwLastXfrAttempt = PyLong_FromUnsignedLongLong((uint32_t)object->dwLastXfrAttempt);
18565 17 : return py_dwLastXfrAttempt;
18566 : }
18567 :
18568 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrAttempt(PyObject *py_obj, PyObject *value, void *closure)
18569 : {
18570 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18571 0 : if (value == NULL) {
18572 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLastXfrAttempt");
18573 0 : return -1;
18574 : }
18575 : {
18576 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastXfrAttempt));
18577 0 : if (PyLong_Check(value)) {
18578 0 : unsigned long long test_var;
18579 0 : test_var = PyLong_AsUnsignedLongLong(value);
18580 0 : if (PyErr_Occurred() != NULL) {
18581 0 : return -1;
18582 : }
18583 0 : if (test_var > uint_max) {
18584 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18585 : PyLong_Type.tp_name, uint_max, test_var);
18586 0 : return -1;
18587 : }
18588 0 : object->dwLastXfrAttempt = test_var;
18589 : } else {
18590 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18591 : PyLong_Type.tp_name);
18592 0 : return -1;
18593 : }
18594 : }
18595 0 : return 0;
18596 : }
18597 :
18598 17 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrResult(PyObject *obj, void *closure)
18599 : {
18600 17 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
18601 0 : PyObject *py_dwLastXfrResult;
18602 17 : py_dwLastXfrResult = PyLong_FromUnsignedLongLong((uint32_t)object->dwLastXfrResult);
18603 17 : return py_dwLastXfrResult;
18604 : }
18605 :
18606 0 : static int py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrResult(PyObject *py_obj, PyObject *value, void *closure)
18607 : {
18608 0 : struct DNS_RPC_ZONE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
18609 0 : if (value == NULL) {
18610 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwLastXfrResult");
18611 0 : return -1;
18612 : }
18613 : {
18614 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwLastXfrResult));
18615 0 : if (PyLong_Check(value)) {
18616 0 : unsigned long long test_var;
18617 0 : test_var = PyLong_AsUnsignedLongLong(value);
18618 0 : if (PyErr_Occurred() != NULL) {
18619 0 : return -1;
18620 : }
18621 0 : if (test_var > uint_max) {
18622 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18623 : PyLong_Type.tp_name, uint_max, test_var);
18624 0 : return -1;
18625 : }
18626 0 : object->dwLastXfrResult = test_var;
18627 : } else {
18628 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18629 : PyLong_Type.tp_name);
18630 0 : return -1;
18631 : }
18632 : }
18633 0 : return 0;
18634 : }
18635 :
18636 : static PyGetSetDef py_DNS_RPC_ZONE_INFO_LONGHORN_getsetters[] = {
18637 : {
18638 : .name = discard_const_p(char, "dwRpcStructureVersion"),
18639 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRpcStructureVersion,
18640 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRpcStructureVersion,
18641 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18642 : },
18643 : {
18644 : .name = discard_const_p(char, "dwReserved0"),
18645 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwReserved0,
18646 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwReserved0,
18647 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18648 : },
18649 : {
18650 : .name = discard_const_p(char, "pszZoneName"),
18651 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszZoneName,
18652 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszZoneName,
18653 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
18654 : },
18655 : {
18656 : .name = discard_const_p(char, "dwZoneType"),
18657 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwZoneType,
18658 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwZoneType,
18659 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18660 : },
18661 : {
18662 : .name = discard_const_p(char, "fReverse"),
18663 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReverse,
18664 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReverse,
18665 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18666 : },
18667 : {
18668 : .name = discard_const_p(char, "fAllowUpdate"),
18669 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAllowUpdate,
18670 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAllowUpdate,
18671 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
18672 : },
18673 : {
18674 : .name = discard_const_p(char, "fPaused"),
18675 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fPaused,
18676 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fPaused,
18677 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18678 : },
18679 : {
18680 : .name = discard_const_p(char, "fShutdown"),
18681 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fShutdown,
18682 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fShutdown,
18683 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18684 : },
18685 : {
18686 : .name = discard_const_p(char, "fAutoCreated"),
18687 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAutoCreated,
18688 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAutoCreated,
18689 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18690 : },
18691 : {
18692 : .name = discard_const_p(char, "fUseDatabase"),
18693 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseDatabase,
18694 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseDatabase,
18695 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18696 : },
18697 : {
18698 : .name = discard_const_p(char, "pszDataFile"),
18699 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDataFile,
18700 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDataFile,
18701 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
18702 : },
18703 : {
18704 : .name = discard_const_p(char, "aipMasters"),
18705 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipMasters,
18706 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipMasters,
18707 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18708 : },
18709 : {
18710 : .name = discard_const_p(char, "fSecureSecondaries"),
18711 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fSecureSecondaries,
18712 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fSecureSecondaries,
18713 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
18714 : },
18715 : {
18716 : .name = discard_const_p(char, "fNotifyLevel"),
18717 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fNotifyLevel,
18718 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fNotifyLevel,
18719 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
18720 : },
18721 : {
18722 : .name = discard_const_p(char, "aipSecondaries"),
18723 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipSecondaries,
18724 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipSecondaries,
18725 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18726 : },
18727 : {
18728 : .name = discard_const_p(char, "aipNotify"),
18729 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipNotify,
18730 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipNotify,
18731 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18732 : },
18733 : {
18734 : .name = discard_const_p(char, "fUseWins"),
18735 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseWins,
18736 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseWins,
18737 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18738 : },
18739 : {
18740 : .name = discard_const_p(char, "fUseNbstat"),
18741 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fUseNbstat,
18742 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fUseNbstat,
18743 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18744 : },
18745 : {
18746 : .name = discard_const_p(char, "fAging"),
18747 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fAging,
18748 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fAging,
18749 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18750 : },
18751 : {
18752 : .name = discard_const_p(char, "dwNoRefreshInterval"),
18753 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwNoRefreshInterval,
18754 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwNoRefreshInterval,
18755 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18756 : },
18757 : {
18758 : .name = discard_const_p(char, "dwRefreshInterval"),
18759 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwRefreshInterval,
18760 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwRefreshInterval,
18761 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18762 : },
18763 : {
18764 : .name = discard_const_p(char, "dwAvailForScavengeTime"),
18765 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwAvailForScavengeTime,
18766 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwAvailForScavengeTime,
18767 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18768 : },
18769 : {
18770 : .name = discard_const_p(char, "aipScavengeServers"),
18771 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipScavengeServers,
18772 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipScavengeServers,
18773 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18774 : },
18775 : {
18776 : .name = discard_const_p(char, "dwForwarderTimeout"),
18777 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwForwarderTimeout,
18778 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwForwarderTimeout,
18779 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18780 : },
18781 : {
18782 : .name = discard_const_p(char, "fForwarderSlave"),
18783 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fForwarderSlave,
18784 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fForwarderSlave,
18785 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18786 : },
18787 : {
18788 : .name = discard_const_p(char, "aipLocalMasters"),
18789 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_aipLocalMasters,
18790 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_aipLocalMasters,
18791 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
18792 : },
18793 : {
18794 : .name = discard_const_p(char, "dwDpFlags"),
18795 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwDpFlags,
18796 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwDpFlags,
18797 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18798 : },
18799 : {
18800 : .name = discard_const_p(char, "pszDpFqdn"),
18801 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_pszDpFqdn,
18802 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_pszDpFqdn,
18803 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
18804 : },
18805 : {
18806 : .name = discard_const_p(char, "pwszZoneDn"),
18807 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_pwszZoneDn,
18808 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_pwszZoneDn,
18809 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
18810 : },
18811 : {
18812 : .name = discard_const_p(char, "dwLastSuccessfulSoaCheck"),
18813 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulSoaCheck,
18814 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulSoaCheck,
18815 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18816 : },
18817 : {
18818 : .name = discard_const_p(char, "dwLastSuccessfulXfr"),
18819 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastSuccessfulXfr,
18820 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastSuccessfulXfr,
18821 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18822 : },
18823 : {
18824 : .name = discard_const_p(char, "fQueuedForBackgroundLoad"),
18825 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fQueuedForBackgroundLoad,
18826 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fQueuedForBackgroundLoad,
18827 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18828 : },
18829 : {
18830 : .name = discard_const_p(char, "fBackgroundLoadInProgress"),
18831 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fBackgroundLoadInProgress,
18832 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fBackgroundLoadInProgress,
18833 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18834 : },
18835 : {
18836 : .name = discard_const_p(char, "fReadOnlyZone"),
18837 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_fReadOnlyZone,
18838 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_fReadOnlyZone,
18839 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18840 : },
18841 : {
18842 : .name = discard_const_p(char, "dwLastXfrAttempt"),
18843 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrAttempt,
18844 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrAttempt,
18845 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18846 : },
18847 : {
18848 : .name = discard_const_p(char, "dwLastXfrResult"),
18849 : .get = py_DNS_RPC_ZONE_INFO_LONGHORN_get_dwLastXfrResult,
18850 : .set = py_DNS_RPC_ZONE_INFO_LONGHORN_set_dwLastXfrResult,
18851 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
18852 : },
18853 : { .name = NULL }
18854 : };
18855 :
18856 0 : static PyObject *py_DNS_RPC_ZONE_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
18857 : {
18858 0 : return pytalloc_new(struct DNS_RPC_ZONE_INFO_LONGHORN, type);
18859 : }
18860 :
18861 :
18862 : static PyTypeObject DNS_RPC_ZONE_INFO_LONGHORN_Type = {
18863 : PyVarObject_HEAD_INIT(NULL, 0)
18864 : .tp_name = "dnsserver.DNS_RPC_ZONE_INFO_LONGHORN",
18865 : .tp_getset = py_DNS_RPC_ZONE_INFO_LONGHORN_getsetters,
18866 : .tp_methods = NULL,
18867 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
18868 : .tp_new = py_DNS_RPC_ZONE_INFO_LONGHORN_new,
18869 : };
18870 :
18871 :
18872 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
18873 : {
18874 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(obj);
18875 0 : PyObject *py_fSecureSecondaries;
18876 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
18877 0 : return py_fSecureSecondaries;
18878 : }
18879 :
18880 0 : static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
18881 : {
18882 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(py_obj);
18883 0 : if (value == NULL) {
18884 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
18885 0 : return -1;
18886 : }
18887 : {
18888 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
18889 0 : if (PyLong_Check(value)) {
18890 0 : unsigned long long test_var;
18891 0 : test_var = PyLong_AsUnsignedLongLong(value);
18892 0 : if (PyErr_Occurred() != NULL) {
18893 0 : return -1;
18894 : }
18895 0 : if (test_var > uint_max) {
18896 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18897 : PyLong_Type.tp_name, uint_max, test_var);
18898 0 : return -1;
18899 : }
18900 0 : object->fSecureSecondaries = test_var;
18901 : } else {
18902 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18903 : PyLong_Type.tp_name);
18904 0 : return -1;
18905 : }
18906 : }
18907 0 : return 0;
18908 : }
18909 :
18910 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
18911 : {
18912 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(obj);
18913 0 : PyObject *py_fNotifyLevel;
18914 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
18915 0 : return py_fNotifyLevel;
18916 : }
18917 :
18918 0 : static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
18919 : {
18920 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(py_obj);
18921 0 : if (value == NULL) {
18922 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
18923 0 : return -1;
18924 : }
18925 : {
18926 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
18927 0 : if (PyLong_Check(value)) {
18928 0 : unsigned long long test_var;
18929 0 : test_var = PyLong_AsUnsignedLongLong(value);
18930 0 : if (PyErr_Occurred() != NULL) {
18931 0 : return -1;
18932 : }
18933 0 : if (test_var > uint_max) {
18934 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
18935 : PyLong_Type.tp_name, uint_max, test_var);
18936 0 : return -1;
18937 : }
18938 0 : object->fNotifyLevel = test_var;
18939 : } else {
18940 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
18941 : PyLong_Type.tp_name);
18942 0 : return -1;
18943 : }
18944 : }
18945 0 : return 0;
18946 : }
18947 :
18948 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipSecondaries(PyObject *obj, void *closure)
18949 : {
18950 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(obj);
18951 0 : PyObject *py_aipSecondaries;
18952 0 : if (object->aipSecondaries == NULL) {
18953 0 : Py_RETURN_NONE;
18954 : }
18955 0 : if (object->aipSecondaries == NULL) {
18956 0 : py_aipSecondaries = Py_None;
18957 0 : Py_INCREF(py_aipSecondaries);
18958 : } else {
18959 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
18960 : }
18961 0 : return py_aipSecondaries;
18962 : }
18963 :
18964 0 : static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
18965 : {
18966 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(py_obj);
18967 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
18968 0 : if (value == NULL) {
18969 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
18970 0 : return -1;
18971 : }
18972 0 : if (value == Py_None) {
18973 0 : object->aipSecondaries = NULL;
18974 : } else {
18975 0 : object->aipSecondaries = NULL;
18976 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
18977 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
18978 0 : PyErr_NoMemory();
18979 0 : return -1;
18980 : }
18981 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
18982 : }
18983 0 : return 0;
18984 : }
18985 :
18986 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipNotify(PyObject *obj, void *closure)
18987 : {
18988 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(obj);
18989 0 : PyObject *py_aipNotify;
18990 0 : if (object->aipNotify == NULL) {
18991 0 : Py_RETURN_NONE;
18992 : }
18993 0 : if (object->aipNotify == NULL) {
18994 0 : py_aipNotify = Py_None;
18995 0 : Py_INCREF(py_aipNotify);
18996 : } else {
18997 0 : py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
18998 : }
18999 0 : return py_aipNotify;
19000 : }
19001 :
19002 0 : static int py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
19003 : {
19004 0 : struct DNS_RPC_ZONE_SECONDARIES_W2K *object = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(py_obj);
19005 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
19006 0 : if (value == NULL) {
19007 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipNotify");
19008 0 : return -1;
19009 : }
19010 0 : if (value == Py_None) {
19011 0 : object->aipNotify = NULL;
19012 : } else {
19013 0 : object->aipNotify = NULL;
19014 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
19015 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19016 0 : PyErr_NoMemory();
19017 0 : return -1;
19018 : }
19019 0 : object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
19020 : }
19021 0 : return 0;
19022 : }
19023 :
19024 : static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_W2K_getsetters[] = {
19025 : {
19026 : .name = discard_const_p(char, "fSecureSecondaries"),
19027 : .get = py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fSecureSecondaries,
19028 : .set = py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fSecureSecondaries,
19029 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
19030 : },
19031 : {
19032 : .name = discard_const_p(char, "fNotifyLevel"),
19033 : .get = py_DNS_RPC_ZONE_SECONDARIES_W2K_get_fNotifyLevel,
19034 : .set = py_DNS_RPC_ZONE_SECONDARIES_W2K_set_fNotifyLevel,
19035 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
19036 : },
19037 : {
19038 : .name = discard_const_p(char, "aipSecondaries"),
19039 : .get = py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipSecondaries,
19040 : .set = py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipSecondaries,
19041 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
19042 : },
19043 : {
19044 : .name = discard_const_p(char, "aipNotify"),
19045 : .get = py_DNS_RPC_ZONE_SECONDARIES_W2K_get_aipNotify,
19046 : .set = py_DNS_RPC_ZONE_SECONDARIES_W2K_set_aipNotify,
19047 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
19048 : },
19049 : { .name = NULL }
19050 : };
19051 :
19052 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19053 : {
19054 0 : return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_W2K, type);
19055 : }
19056 :
19057 :
19058 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_W2K_Type = {
19059 : PyVarObject_HEAD_INIT(NULL, 0)
19060 : .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_W2K",
19061 : .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_W2K_getsetters,
19062 : .tp_methods = NULL,
19063 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19064 : .tp_new = py_DNS_RPC_ZONE_SECONDARIES_W2K_new,
19065 : };
19066 :
19067 :
19068 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
19069 : {
19070 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
19071 0 : PyObject *py_dwRpcStructureVersion;
19072 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
19073 0 : return py_dwRpcStructureVersion;
19074 : }
19075 :
19076 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
19077 : {
19078 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
19079 0 : if (value == NULL) {
19080 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
19081 0 : return -1;
19082 : }
19083 : {
19084 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
19085 0 : if (PyLong_Check(value)) {
19086 0 : unsigned long long test_var;
19087 0 : test_var = PyLong_AsUnsignedLongLong(value);
19088 0 : if (PyErr_Occurred() != NULL) {
19089 0 : return -1;
19090 : }
19091 0 : if (test_var > uint_max) {
19092 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19093 : PyLong_Type.tp_name, uint_max, test_var);
19094 0 : return -1;
19095 : }
19096 0 : object->dwRpcStructureVersion = test_var;
19097 : } else {
19098 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19099 : PyLong_Type.tp_name);
19100 0 : return -1;
19101 : }
19102 : }
19103 0 : return 0;
19104 : }
19105 :
19106 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
19107 : {
19108 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
19109 0 : PyObject *py_dwReserved0;
19110 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
19111 0 : return py_dwReserved0;
19112 : }
19113 :
19114 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
19115 : {
19116 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
19117 0 : if (value == NULL) {
19118 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
19119 0 : return -1;
19120 : }
19121 : {
19122 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
19123 0 : if (PyLong_Check(value)) {
19124 0 : unsigned long long test_var;
19125 0 : test_var = PyLong_AsUnsignedLongLong(value);
19126 0 : if (PyErr_Occurred() != NULL) {
19127 0 : return -1;
19128 : }
19129 0 : if (test_var > uint_max) {
19130 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19131 : PyLong_Type.tp_name, uint_max, test_var);
19132 0 : return -1;
19133 : }
19134 0 : object->dwReserved0 = test_var;
19135 : } else {
19136 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19137 : PyLong_Type.tp_name);
19138 0 : return -1;
19139 : }
19140 : }
19141 0 : return 0;
19142 : }
19143 :
19144 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
19145 : {
19146 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
19147 0 : PyObject *py_fSecureSecondaries;
19148 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
19149 0 : return py_fSecureSecondaries;
19150 : }
19151 :
19152 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
19153 : {
19154 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
19155 0 : if (value == NULL) {
19156 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
19157 0 : return -1;
19158 : }
19159 : {
19160 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
19161 0 : if (PyLong_Check(value)) {
19162 0 : unsigned long long test_var;
19163 0 : test_var = PyLong_AsUnsignedLongLong(value);
19164 0 : if (PyErr_Occurred() != NULL) {
19165 0 : return -1;
19166 : }
19167 0 : if (test_var > uint_max) {
19168 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19169 : PyLong_Type.tp_name, uint_max, test_var);
19170 0 : return -1;
19171 : }
19172 0 : object->fSecureSecondaries = test_var;
19173 : } else {
19174 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19175 : PyLong_Type.tp_name);
19176 0 : return -1;
19177 : }
19178 : }
19179 0 : return 0;
19180 : }
19181 :
19182 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
19183 : {
19184 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
19185 0 : PyObject *py_fNotifyLevel;
19186 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
19187 0 : return py_fNotifyLevel;
19188 : }
19189 :
19190 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
19191 : {
19192 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
19193 0 : if (value == NULL) {
19194 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
19195 0 : return -1;
19196 : }
19197 : {
19198 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
19199 0 : if (PyLong_Check(value)) {
19200 0 : unsigned long long test_var;
19201 0 : test_var = PyLong_AsUnsignedLongLong(value);
19202 0 : if (PyErr_Occurred() != NULL) {
19203 0 : return -1;
19204 : }
19205 0 : if (test_var > uint_max) {
19206 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19207 : PyLong_Type.tp_name, uint_max, test_var);
19208 0 : return -1;
19209 : }
19210 0 : object->fNotifyLevel = test_var;
19211 : } else {
19212 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19213 : PyLong_Type.tp_name);
19214 0 : return -1;
19215 : }
19216 : }
19217 0 : return 0;
19218 : }
19219 :
19220 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
19221 : {
19222 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
19223 0 : PyObject *py_aipSecondaries;
19224 0 : if (object->aipSecondaries == NULL) {
19225 0 : Py_RETURN_NONE;
19226 : }
19227 0 : if (object->aipSecondaries == NULL) {
19228 0 : py_aipSecondaries = Py_None;
19229 0 : Py_INCREF(py_aipSecondaries);
19230 : } else {
19231 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
19232 : }
19233 0 : return py_aipSecondaries;
19234 : }
19235 :
19236 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
19237 : {
19238 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
19239 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
19240 0 : if (value == NULL) {
19241 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
19242 0 : return -1;
19243 : }
19244 0 : if (value == Py_None) {
19245 0 : object->aipSecondaries = NULL;
19246 : } else {
19247 0 : object->aipSecondaries = NULL;
19248 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
19249 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19250 0 : PyErr_NoMemory();
19251 0 : return -1;
19252 : }
19253 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
19254 : }
19255 0 : return 0;
19256 : }
19257 :
19258 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipNotify(PyObject *obj, void *closure)
19259 : {
19260 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(obj);
19261 0 : PyObject *py_aipNotify;
19262 0 : if (object->aipNotify == NULL) {
19263 0 : Py_RETURN_NONE;
19264 : }
19265 0 : if (object->aipNotify == NULL) {
19266 0 : py_aipNotify = Py_None;
19267 0 : Py_INCREF(py_aipNotify);
19268 : } else {
19269 0 : py_aipNotify = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipNotify, object->aipNotify);
19270 : }
19271 0 : return py_aipNotify;
19272 : }
19273 :
19274 0 : static int py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
19275 : {
19276 0 : struct DNS_RPC_ZONE_SECONDARIES_DOTNET *object = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(py_obj);
19277 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
19278 0 : if (value == NULL) {
19279 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipNotify");
19280 0 : return -1;
19281 : }
19282 0 : if (value == Py_None) {
19283 0 : object->aipNotify = NULL;
19284 : } else {
19285 0 : object->aipNotify = NULL;
19286 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
19287 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19288 0 : PyErr_NoMemory();
19289 0 : return -1;
19290 : }
19291 0 : object->aipNotify = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
19292 : }
19293 0 : return 0;
19294 : }
19295 :
19296 : static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_DOTNET_getsetters[] = {
19297 : {
19298 : .name = discard_const_p(char, "dwRpcStructureVersion"),
19299 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwRpcStructureVersion,
19300 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwRpcStructureVersion,
19301 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19302 : },
19303 : {
19304 : .name = discard_const_p(char, "dwReserved0"),
19305 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_dwReserved0,
19306 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_dwReserved0,
19307 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19308 : },
19309 : {
19310 : .name = discard_const_p(char, "fSecureSecondaries"),
19311 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fSecureSecondaries,
19312 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fSecureSecondaries,
19313 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
19314 : },
19315 : {
19316 : .name = discard_const_p(char, "fNotifyLevel"),
19317 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_fNotifyLevel,
19318 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_fNotifyLevel,
19319 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
19320 : },
19321 : {
19322 : .name = discard_const_p(char, "aipSecondaries"),
19323 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipSecondaries,
19324 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipSecondaries,
19325 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
19326 : },
19327 : {
19328 : .name = discard_const_p(char, "aipNotify"),
19329 : .get = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_get_aipNotify,
19330 : .set = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_set_aipNotify,
19331 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
19332 : },
19333 : { .name = NULL }
19334 : };
19335 :
19336 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19337 : {
19338 0 : return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_DOTNET, type);
19339 : }
19340 :
19341 :
19342 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_DOTNET_Type = {
19343 : PyVarObject_HEAD_INIT(NULL, 0)
19344 : .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_DOTNET",
19345 : .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_getsetters,
19346 : .tp_methods = NULL,
19347 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19348 : .tp_new = py_DNS_RPC_ZONE_SECONDARIES_DOTNET_new,
19349 : };
19350 :
19351 :
19352 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
19353 : {
19354 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
19355 0 : PyObject *py_dwRpcStructureVersion;
19356 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
19357 0 : return py_dwRpcStructureVersion;
19358 : }
19359 :
19360 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
19361 : {
19362 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
19363 0 : if (value == NULL) {
19364 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
19365 0 : return -1;
19366 : }
19367 : {
19368 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
19369 0 : if (PyLong_Check(value)) {
19370 0 : unsigned long long test_var;
19371 0 : test_var = PyLong_AsUnsignedLongLong(value);
19372 0 : if (PyErr_Occurred() != NULL) {
19373 0 : return -1;
19374 : }
19375 0 : if (test_var > uint_max) {
19376 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19377 : PyLong_Type.tp_name, uint_max, test_var);
19378 0 : return -1;
19379 : }
19380 0 : object->dwRpcStructureVersion = test_var;
19381 : } else {
19382 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19383 : PyLong_Type.tp_name);
19384 0 : return -1;
19385 : }
19386 : }
19387 0 : return 0;
19388 : }
19389 :
19390 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
19391 : {
19392 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
19393 0 : PyObject *py_dwReserved0;
19394 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
19395 0 : return py_dwReserved0;
19396 : }
19397 :
19398 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
19399 : {
19400 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
19401 0 : if (value == NULL) {
19402 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
19403 0 : return -1;
19404 : }
19405 : {
19406 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
19407 0 : if (PyLong_Check(value)) {
19408 0 : unsigned long long test_var;
19409 0 : test_var = PyLong_AsUnsignedLongLong(value);
19410 0 : if (PyErr_Occurred() != NULL) {
19411 0 : return -1;
19412 : }
19413 0 : if (test_var > uint_max) {
19414 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19415 : PyLong_Type.tp_name, uint_max, test_var);
19416 0 : return -1;
19417 : }
19418 0 : object->dwReserved0 = test_var;
19419 : } else {
19420 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19421 : PyLong_Type.tp_name);
19422 0 : return -1;
19423 : }
19424 : }
19425 0 : return 0;
19426 : }
19427 :
19428 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
19429 : {
19430 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
19431 0 : PyObject *py_fSecureSecondaries;
19432 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
19433 0 : return py_fSecureSecondaries;
19434 : }
19435 :
19436 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
19437 : {
19438 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
19439 0 : if (value == NULL) {
19440 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
19441 0 : return -1;
19442 : }
19443 : {
19444 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
19445 0 : if (PyLong_Check(value)) {
19446 0 : unsigned long long test_var;
19447 0 : test_var = PyLong_AsUnsignedLongLong(value);
19448 0 : if (PyErr_Occurred() != NULL) {
19449 0 : return -1;
19450 : }
19451 0 : if (test_var > uint_max) {
19452 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19453 : PyLong_Type.tp_name, uint_max, test_var);
19454 0 : return -1;
19455 : }
19456 0 : object->fSecureSecondaries = test_var;
19457 : } else {
19458 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19459 : PyLong_Type.tp_name);
19460 0 : return -1;
19461 : }
19462 : }
19463 0 : return 0;
19464 : }
19465 :
19466 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
19467 : {
19468 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
19469 0 : PyObject *py_fNotifyLevel;
19470 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
19471 0 : return py_fNotifyLevel;
19472 : }
19473 :
19474 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
19475 : {
19476 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
19477 0 : if (value == NULL) {
19478 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
19479 0 : return -1;
19480 : }
19481 : {
19482 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
19483 0 : if (PyLong_Check(value)) {
19484 0 : unsigned long long test_var;
19485 0 : test_var = PyLong_AsUnsignedLongLong(value);
19486 0 : if (PyErr_Occurred() != NULL) {
19487 0 : return -1;
19488 : }
19489 0 : if (test_var > uint_max) {
19490 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19491 : PyLong_Type.tp_name, uint_max, test_var);
19492 0 : return -1;
19493 : }
19494 0 : object->fNotifyLevel = test_var;
19495 : } else {
19496 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19497 : PyLong_Type.tp_name);
19498 0 : return -1;
19499 : }
19500 : }
19501 0 : return 0;
19502 : }
19503 :
19504 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
19505 : {
19506 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
19507 0 : PyObject *py_aipSecondaries;
19508 0 : if (object->aipSecondaries == NULL) {
19509 0 : Py_RETURN_NONE;
19510 : }
19511 0 : if (object->aipSecondaries == NULL) {
19512 0 : py_aipSecondaries = Py_None;
19513 0 : Py_INCREF(py_aipSecondaries);
19514 : } else {
19515 0 : py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
19516 : }
19517 0 : return py_aipSecondaries;
19518 : }
19519 :
19520 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
19521 : {
19522 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
19523 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
19524 0 : if (value == NULL) {
19525 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
19526 0 : return -1;
19527 : }
19528 0 : if (value == Py_None) {
19529 0 : object->aipSecondaries = NULL;
19530 : } else {
19531 0 : object->aipSecondaries = NULL;
19532 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
19533 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19534 0 : PyErr_NoMemory();
19535 0 : return -1;
19536 : }
19537 0 : object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
19538 : }
19539 0 : return 0;
19540 : }
19541 :
19542 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipNotify(PyObject *obj, void *closure)
19543 : {
19544 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(obj);
19545 0 : PyObject *py_aipNotify;
19546 0 : if (object->aipNotify == NULL) {
19547 0 : Py_RETURN_NONE;
19548 : }
19549 0 : if (object->aipNotify == NULL) {
19550 0 : py_aipNotify = Py_None;
19551 0 : Py_INCREF(py_aipNotify);
19552 : } else {
19553 0 : py_aipNotify = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipNotify, object->aipNotify);
19554 : }
19555 0 : return py_aipNotify;
19556 : }
19557 :
19558 0 : static int py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipNotify(PyObject *py_obj, PyObject *value, void *closure)
19559 : {
19560 0 : struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *object = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(py_obj);
19561 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipNotify));
19562 0 : if (value == NULL) {
19563 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipNotify");
19564 0 : return -1;
19565 : }
19566 0 : if (value == Py_None) {
19567 0 : object->aipNotify = NULL;
19568 : } else {
19569 0 : object->aipNotify = NULL;
19570 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
19571 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
19572 0 : PyErr_NoMemory();
19573 0 : return -1;
19574 : }
19575 0 : object->aipNotify = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
19576 : }
19577 0 : return 0;
19578 : }
19579 :
19580 : static PyGetSetDef py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_getsetters[] = {
19581 : {
19582 : .name = discard_const_p(char, "dwRpcStructureVersion"),
19583 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwRpcStructureVersion,
19584 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwRpcStructureVersion,
19585 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19586 : },
19587 : {
19588 : .name = discard_const_p(char, "dwReserved0"),
19589 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_dwReserved0,
19590 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_dwReserved0,
19591 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19592 : },
19593 : {
19594 : .name = discard_const_p(char, "fSecureSecondaries"),
19595 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fSecureSecondaries,
19596 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fSecureSecondaries,
19597 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
19598 : },
19599 : {
19600 : .name = discard_const_p(char, "fNotifyLevel"),
19601 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_fNotifyLevel,
19602 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_fNotifyLevel,
19603 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
19604 : },
19605 : {
19606 : .name = discard_const_p(char, "aipSecondaries"),
19607 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipSecondaries,
19608 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipSecondaries,
19609 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
19610 : },
19611 : {
19612 : .name = discard_const_p(char, "aipNotify"),
19613 : .get = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_get_aipNotify,
19614 : .set = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_set_aipNotify,
19615 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
19616 : },
19617 : { .name = NULL }
19618 : };
19619 :
19620 0 : static PyObject *py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19621 : {
19622 0 : return pytalloc_new(struct DNS_RPC_ZONE_SECONDARIES_LONGHORN, type);
19623 : }
19624 :
19625 :
19626 : static PyTypeObject DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type = {
19627 : PyVarObject_HEAD_INIT(NULL, 0)
19628 : .tp_name = "dnsserver.DNS_RPC_ZONE_SECONDARIES_LONGHORN",
19629 : .tp_getset = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_getsetters,
19630 : .tp_methods = NULL,
19631 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19632 : .tp_new = py_DNS_RPC_ZONE_SECONDARIES_LONGHORN_new,
19633 : };
19634 :
19635 :
19636 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_get_fDsIntegrated(PyObject *obj, void *closure)
19637 : {
19638 0 : struct DNS_RPC_ZONE_DATABASE_W2K *object = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(obj);
19639 0 : PyObject *py_fDsIntegrated;
19640 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)object->fDsIntegrated);
19641 0 : return py_fDsIntegrated;
19642 : }
19643 :
19644 0 : static int py_DNS_RPC_ZONE_DATABASE_W2K_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
19645 : {
19646 0 : struct DNS_RPC_ZONE_DATABASE_W2K *object = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(py_obj);
19647 0 : if (value == NULL) {
19648 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDsIntegrated");
19649 0 : return -1;
19650 : }
19651 : {
19652 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
19653 0 : if (PyLong_Check(value)) {
19654 0 : unsigned long long test_var;
19655 0 : test_var = PyLong_AsUnsignedLongLong(value);
19656 0 : if (PyErr_Occurred() != NULL) {
19657 0 : return -1;
19658 : }
19659 0 : if (test_var > uint_max) {
19660 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19661 : PyLong_Type.tp_name, uint_max, test_var);
19662 0 : return -1;
19663 : }
19664 0 : object->fDsIntegrated = test_var;
19665 : } else {
19666 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19667 : PyLong_Type.tp_name);
19668 0 : return -1;
19669 : }
19670 : }
19671 0 : return 0;
19672 : }
19673 :
19674 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_get_pszFileName(PyObject *obj, void *closure)
19675 : {
19676 0 : struct DNS_RPC_ZONE_DATABASE_W2K *object = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(obj);
19677 0 : PyObject *py_pszFileName;
19678 0 : if (object->pszFileName == NULL) {
19679 0 : Py_RETURN_NONE;
19680 : }
19681 0 : if (object->pszFileName == NULL) {
19682 0 : py_pszFileName = Py_None;
19683 0 : Py_INCREF(py_pszFileName);
19684 : } else {
19685 0 : if (object->pszFileName == NULL) {
19686 0 : py_pszFileName = Py_None;
19687 0 : Py_INCREF(py_pszFileName);
19688 : } else {
19689 0 : py_pszFileName = PyUnicode_Decode(object->pszFileName, strlen(object->pszFileName), "utf-8", "ignore");
19690 : }
19691 : }
19692 0 : return py_pszFileName;
19693 : }
19694 :
19695 0 : static int py_DNS_RPC_ZONE_DATABASE_W2K_set_pszFileName(PyObject *py_obj, PyObject *value, void *closure)
19696 : {
19697 0 : struct DNS_RPC_ZONE_DATABASE_W2K *object = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(py_obj);
19698 0 : if (value == NULL) {
19699 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszFileName");
19700 0 : return -1;
19701 : }
19702 0 : if (value == Py_None) {
19703 0 : object->pszFileName = NULL;
19704 : } else {
19705 0 : object->pszFileName = NULL;
19706 : {
19707 0 : const char *test_str;
19708 0 : const char *talloc_str;
19709 0 : PyObject *unicode = NULL;
19710 0 : if (PyUnicode_Check(value)) {
19711 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19712 0 : if (unicode == NULL) {
19713 0 : PyErr_NoMemory();
19714 0 : return -1;
19715 : }
19716 0 : test_str = PyBytes_AS_STRING(unicode);
19717 0 : } else if (PyBytes_Check(value)) {
19718 0 : test_str = PyBytes_AS_STRING(value);
19719 : } else {
19720 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19721 0 : return -1;
19722 : }
19723 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19724 0 : if (unicode != NULL) {
19725 0 : Py_DECREF(unicode);
19726 : }
19727 0 : if (talloc_str == NULL) {
19728 0 : PyErr_NoMemory();
19729 0 : return -1;
19730 : }
19731 0 : object->pszFileName = talloc_str;
19732 : }
19733 : }
19734 0 : return 0;
19735 : }
19736 :
19737 : static PyGetSetDef py_DNS_RPC_ZONE_DATABASE_W2K_getsetters[] = {
19738 : {
19739 : .name = discard_const_p(char, "fDsIntegrated"),
19740 : .get = py_DNS_RPC_ZONE_DATABASE_W2K_get_fDsIntegrated,
19741 : .set = py_DNS_RPC_ZONE_DATABASE_W2K_set_fDsIntegrated,
19742 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19743 : },
19744 : {
19745 : .name = discard_const_p(char, "pszFileName"),
19746 : .get = py_DNS_RPC_ZONE_DATABASE_W2K_get_pszFileName,
19747 : .set = py_DNS_RPC_ZONE_DATABASE_W2K_set_pszFileName,
19748 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
19749 : },
19750 : { .name = NULL }
19751 : };
19752 :
19753 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19754 : {
19755 0 : return pytalloc_new(struct DNS_RPC_ZONE_DATABASE_W2K, type);
19756 : }
19757 :
19758 :
19759 : static PyTypeObject DNS_RPC_ZONE_DATABASE_W2K_Type = {
19760 : PyVarObject_HEAD_INIT(NULL, 0)
19761 : .tp_name = "dnsserver.DNS_RPC_ZONE_DATABASE_W2K",
19762 : .tp_getset = py_DNS_RPC_ZONE_DATABASE_W2K_getsetters,
19763 : .tp_methods = NULL,
19764 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19765 : .tp_new = py_DNS_RPC_ZONE_DATABASE_W2K_new,
19766 : };
19767 :
19768 :
19769 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
19770 : {
19771 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(obj);
19772 0 : PyObject *py_dwRpcStructureVersion;
19773 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
19774 0 : return py_dwRpcStructureVersion;
19775 : }
19776 :
19777 0 : static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
19778 : {
19779 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(py_obj);
19780 0 : if (value == NULL) {
19781 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
19782 0 : return -1;
19783 : }
19784 : {
19785 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
19786 0 : if (PyLong_Check(value)) {
19787 0 : unsigned long long test_var;
19788 0 : test_var = PyLong_AsUnsignedLongLong(value);
19789 0 : if (PyErr_Occurred() != NULL) {
19790 0 : return -1;
19791 : }
19792 0 : if (test_var > uint_max) {
19793 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19794 : PyLong_Type.tp_name, uint_max, test_var);
19795 0 : return -1;
19796 : }
19797 0 : object->dwRpcStructureVersion = test_var;
19798 : } else {
19799 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19800 : PyLong_Type.tp_name);
19801 0 : return -1;
19802 : }
19803 : }
19804 0 : return 0;
19805 : }
19806 :
19807 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
19808 : {
19809 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(obj);
19810 0 : PyObject *py_dwReserved0;
19811 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
19812 0 : return py_dwReserved0;
19813 : }
19814 :
19815 0 : static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
19816 : {
19817 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(py_obj);
19818 0 : if (value == NULL) {
19819 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
19820 0 : return -1;
19821 : }
19822 : {
19823 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
19824 0 : if (PyLong_Check(value)) {
19825 0 : unsigned long long test_var;
19826 0 : test_var = PyLong_AsUnsignedLongLong(value);
19827 0 : if (PyErr_Occurred() != NULL) {
19828 0 : return -1;
19829 : }
19830 0 : if (test_var > uint_max) {
19831 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19832 : PyLong_Type.tp_name, uint_max, test_var);
19833 0 : return -1;
19834 : }
19835 0 : object->dwReserved0 = test_var;
19836 : } else {
19837 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19838 : PyLong_Type.tp_name);
19839 0 : return -1;
19840 : }
19841 : }
19842 0 : return 0;
19843 : }
19844 :
19845 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_fDsIntegrated(PyObject *obj, void *closure)
19846 : {
19847 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(obj);
19848 0 : PyObject *py_fDsIntegrated;
19849 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)object->fDsIntegrated);
19850 0 : return py_fDsIntegrated;
19851 : }
19852 :
19853 0 : static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
19854 : {
19855 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(py_obj);
19856 0 : if (value == NULL) {
19857 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDsIntegrated");
19858 0 : return -1;
19859 : }
19860 : {
19861 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
19862 0 : if (PyLong_Check(value)) {
19863 0 : unsigned long long test_var;
19864 0 : test_var = PyLong_AsUnsignedLongLong(value);
19865 0 : if (PyErr_Occurred() != NULL) {
19866 0 : return -1;
19867 : }
19868 0 : if (test_var > uint_max) {
19869 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
19870 : PyLong_Type.tp_name, uint_max, test_var);
19871 0 : return -1;
19872 : }
19873 0 : object->fDsIntegrated = test_var;
19874 : } else {
19875 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
19876 : PyLong_Type.tp_name);
19877 0 : return -1;
19878 : }
19879 : }
19880 0 : return 0;
19881 : }
19882 :
19883 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_get_pszFileName(PyObject *obj, void *closure)
19884 : {
19885 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(obj);
19886 0 : PyObject *py_pszFileName;
19887 0 : if (object->pszFileName == NULL) {
19888 0 : Py_RETURN_NONE;
19889 : }
19890 0 : if (object->pszFileName == NULL) {
19891 0 : py_pszFileName = Py_None;
19892 0 : Py_INCREF(py_pszFileName);
19893 : } else {
19894 0 : if (object->pszFileName == NULL) {
19895 0 : py_pszFileName = Py_None;
19896 0 : Py_INCREF(py_pszFileName);
19897 : } else {
19898 0 : py_pszFileName = PyUnicode_Decode(object->pszFileName, strlen(object->pszFileName), "utf-8", "ignore");
19899 : }
19900 : }
19901 0 : return py_pszFileName;
19902 : }
19903 :
19904 0 : static int py_DNS_RPC_ZONE_DATABASE_DOTNET_set_pszFileName(PyObject *py_obj, PyObject *value, void *closure)
19905 : {
19906 0 : struct DNS_RPC_ZONE_DATABASE_DOTNET *object = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(py_obj);
19907 0 : if (value == NULL) {
19908 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszFileName");
19909 0 : return -1;
19910 : }
19911 0 : if (value == Py_None) {
19912 0 : object->pszFileName = NULL;
19913 : } else {
19914 0 : object->pszFileName = NULL;
19915 : {
19916 0 : const char *test_str;
19917 0 : const char *talloc_str;
19918 0 : PyObject *unicode = NULL;
19919 0 : if (PyUnicode_Check(value)) {
19920 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
19921 0 : if (unicode == NULL) {
19922 0 : PyErr_NoMemory();
19923 0 : return -1;
19924 : }
19925 0 : test_str = PyBytes_AS_STRING(unicode);
19926 0 : } else if (PyBytes_Check(value)) {
19927 0 : test_str = PyBytes_AS_STRING(value);
19928 : } else {
19929 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
19930 0 : return -1;
19931 : }
19932 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
19933 0 : if (unicode != NULL) {
19934 0 : Py_DECREF(unicode);
19935 : }
19936 0 : if (talloc_str == NULL) {
19937 0 : PyErr_NoMemory();
19938 0 : return -1;
19939 : }
19940 0 : object->pszFileName = talloc_str;
19941 : }
19942 : }
19943 0 : return 0;
19944 : }
19945 :
19946 : static PyGetSetDef py_DNS_RPC_ZONE_DATABASE_DOTNET_getsetters[] = {
19947 : {
19948 : .name = discard_const_p(char, "dwRpcStructureVersion"),
19949 : .get = py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwRpcStructureVersion,
19950 : .set = py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwRpcStructureVersion,
19951 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19952 : },
19953 : {
19954 : .name = discard_const_p(char, "dwReserved0"),
19955 : .get = py_DNS_RPC_ZONE_DATABASE_DOTNET_get_dwReserved0,
19956 : .set = py_DNS_RPC_ZONE_DATABASE_DOTNET_set_dwReserved0,
19957 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19958 : },
19959 : {
19960 : .name = discard_const_p(char, "fDsIntegrated"),
19961 : .get = py_DNS_RPC_ZONE_DATABASE_DOTNET_get_fDsIntegrated,
19962 : .set = py_DNS_RPC_ZONE_DATABASE_DOTNET_set_fDsIntegrated,
19963 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
19964 : },
19965 : {
19966 : .name = discard_const_p(char, "pszFileName"),
19967 : .get = py_DNS_RPC_ZONE_DATABASE_DOTNET_get_pszFileName,
19968 : .set = py_DNS_RPC_ZONE_DATABASE_DOTNET_set_pszFileName,
19969 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
19970 : },
19971 : { .name = NULL }
19972 : };
19973 :
19974 0 : static PyObject *py_DNS_RPC_ZONE_DATABASE_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
19975 : {
19976 0 : return pytalloc_new(struct DNS_RPC_ZONE_DATABASE_DOTNET, type);
19977 : }
19978 :
19979 :
19980 : static PyTypeObject DNS_RPC_ZONE_DATABASE_DOTNET_Type = {
19981 : PyVarObject_HEAD_INIT(NULL, 0)
19982 : .tp_name = "dnsserver.DNS_RPC_ZONE_DATABASE_DOTNET",
19983 : .tp_getset = py_DNS_RPC_ZONE_DATABASE_DOTNET_getsetters,
19984 : .tp_methods = NULL,
19985 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
19986 : .tp_new = py_DNS_RPC_ZONE_DATABASE_DOTNET_new,
19987 : };
19988 :
19989 :
19990 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszZoneName(PyObject *obj, void *closure)
19991 : {
19992 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
19993 0 : PyObject *py_pszZoneName;
19994 0 : if (object->pszZoneName == NULL) {
19995 0 : Py_RETURN_NONE;
19996 : }
19997 0 : if (object->pszZoneName == NULL) {
19998 0 : py_pszZoneName = Py_None;
19999 0 : Py_INCREF(py_pszZoneName);
20000 : } else {
20001 0 : if (object->pszZoneName == NULL) {
20002 0 : py_pszZoneName = Py_None;
20003 0 : Py_INCREF(py_pszZoneName);
20004 : } else {
20005 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
20006 : }
20007 : }
20008 0 : return py_pszZoneName;
20009 : }
20010 :
20011 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
20012 : {
20013 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20014 0 : if (value == NULL) {
20015 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneName");
20016 0 : return -1;
20017 : }
20018 0 : if (value == Py_None) {
20019 0 : object->pszZoneName = NULL;
20020 : } else {
20021 0 : object->pszZoneName = NULL;
20022 : {
20023 0 : const char *test_str;
20024 0 : const char *talloc_str;
20025 0 : PyObject *unicode = NULL;
20026 0 : if (PyUnicode_Check(value)) {
20027 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20028 0 : if (unicode == NULL) {
20029 0 : PyErr_NoMemory();
20030 0 : return -1;
20031 : }
20032 0 : test_str = PyBytes_AS_STRING(unicode);
20033 0 : } else if (PyBytes_Check(value)) {
20034 0 : test_str = PyBytes_AS_STRING(value);
20035 : } else {
20036 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20037 0 : return -1;
20038 : }
20039 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20040 0 : if (unicode != NULL) {
20041 0 : Py_DECREF(unicode);
20042 : }
20043 0 : if (talloc_str == NULL) {
20044 0 : PyErr_NoMemory();
20045 0 : return -1;
20046 : }
20047 0 : object->pszZoneName = talloc_str;
20048 : }
20049 : }
20050 0 : return 0;
20051 : }
20052 :
20053 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwZoneType(PyObject *obj, void *closure)
20054 : {
20055 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20056 0 : PyObject *py_dwZoneType;
20057 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneType);
20058 0 : return py_dwZoneType;
20059 : }
20060 :
20061 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
20062 : {
20063 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20064 0 : if (value == NULL) {
20065 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneType");
20066 0 : return -1;
20067 : }
20068 : {
20069 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
20070 0 : if (PyLong_Check(value)) {
20071 0 : unsigned long long test_var;
20072 0 : test_var = PyLong_AsUnsignedLongLong(value);
20073 0 : if (PyErr_Occurred() != NULL) {
20074 0 : return -1;
20075 : }
20076 0 : if (test_var > uint_max) {
20077 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20078 : PyLong_Type.tp_name, uint_max, test_var);
20079 0 : return -1;
20080 : }
20081 0 : object->dwZoneType = test_var;
20082 : } else {
20083 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20084 : PyLong_Type.tp_name);
20085 0 : return -1;
20086 : }
20087 : }
20088 0 : return 0;
20089 : }
20090 :
20091 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAllowUpdate(PyObject *obj, void *closure)
20092 : {
20093 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20094 0 : PyObject *py_fAllowUpdate;
20095 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
20096 0 : return py_fAllowUpdate;
20097 : }
20098 :
20099 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
20100 : {
20101 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20102 0 : if (value == NULL) {
20103 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
20104 0 : return -1;
20105 : }
20106 : {
20107 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
20108 0 : if (PyLong_Check(value)) {
20109 0 : unsigned long long test_var;
20110 0 : test_var = PyLong_AsUnsignedLongLong(value);
20111 0 : if (PyErr_Occurred() != NULL) {
20112 0 : return -1;
20113 : }
20114 0 : if (test_var > uint_max) {
20115 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20116 : PyLong_Type.tp_name, uint_max, test_var);
20117 0 : return -1;
20118 : }
20119 0 : object->fAllowUpdate = test_var;
20120 : } else {
20121 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20122 : PyLong_Type.tp_name);
20123 0 : return -1;
20124 : }
20125 : }
20126 0 : return 0;
20127 : }
20128 :
20129 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAging(PyObject *obj, void *closure)
20130 : {
20131 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20132 0 : PyObject *py_fAging;
20133 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)object->fAging);
20134 0 : return py_fAging;
20135 : }
20136 :
20137 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
20138 : {
20139 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20140 0 : if (value == NULL) {
20141 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAging");
20142 0 : return -1;
20143 : }
20144 : {
20145 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
20146 0 : if (PyLong_Check(value)) {
20147 0 : unsigned long long test_var;
20148 0 : test_var = PyLong_AsUnsignedLongLong(value);
20149 0 : if (PyErr_Occurred() != NULL) {
20150 0 : return -1;
20151 : }
20152 0 : if (test_var > uint_max) {
20153 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20154 : PyLong_Type.tp_name, uint_max, test_var);
20155 0 : return -1;
20156 : }
20157 0 : object->fAging = test_var;
20158 : } else {
20159 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20160 : PyLong_Type.tp_name);
20161 0 : return -1;
20162 : }
20163 : }
20164 0 : return 0;
20165 : }
20166 :
20167 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwFlags(PyObject *obj, void *closure)
20168 : {
20169 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20170 0 : PyObject *py_dwFlags;
20171 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwFlags);
20172 0 : return py_dwFlags;
20173 : }
20174 :
20175 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
20176 : {
20177 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20178 0 : if (value == NULL) {
20179 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFlags");
20180 0 : return -1;
20181 : }
20182 : {
20183 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
20184 0 : if (PyLong_Check(value)) {
20185 0 : unsigned long long test_var;
20186 0 : test_var = PyLong_AsUnsignedLongLong(value);
20187 0 : if (PyErr_Occurred() != NULL) {
20188 0 : return -1;
20189 : }
20190 0 : if (test_var > uint_max) {
20191 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20192 : PyLong_Type.tp_name, uint_max, test_var);
20193 0 : return -1;
20194 : }
20195 0 : object->dwFlags = test_var;
20196 : } else {
20197 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20198 : PyLong_Type.tp_name);
20199 0 : return -1;
20200 : }
20201 : }
20202 0 : return 0;
20203 : }
20204 :
20205 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszDataFile(PyObject *obj, void *closure)
20206 : {
20207 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20208 0 : PyObject *py_pszDataFile;
20209 0 : if (object->pszDataFile == NULL) {
20210 0 : Py_RETURN_NONE;
20211 : }
20212 0 : if (object->pszDataFile == NULL) {
20213 0 : py_pszDataFile = Py_None;
20214 0 : Py_INCREF(py_pszDataFile);
20215 : } else {
20216 0 : if (object->pszDataFile == NULL) {
20217 0 : py_pszDataFile = Py_None;
20218 0 : Py_INCREF(py_pszDataFile);
20219 : } else {
20220 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
20221 : }
20222 : }
20223 0 : return py_pszDataFile;
20224 : }
20225 :
20226 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
20227 : {
20228 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20229 0 : if (value == NULL) {
20230 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDataFile");
20231 0 : return -1;
20232 : }
20233 0 : if (value == Py_None) {
20234 0 : object->pszDataFile = NULL;
20235 : } else {
20236 0 : object->pszDataFile = NULL;
20237 : {
20238 0 : const char *test_str;
20239 0 : const char *talloc_str;
20240 0 : PyObject *unicode = NULL;
20241 0 : if (PyUnicode_Check(value)) {
20242 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20243 0 : if (unicode == NULL) {
20244 0 : PyErr_NoMemory();
20245 0 : return -1;
20246 : }
20247 0 : test_str = PyBytes_AS_STRING(unicode);
20248 0 : } else if (PyBytes_Check(value)) {
20249 0 : test_str = PyBytes_AS_STRING(value);
20250 : } else {
20251 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20252 0 : return -1;
20253 : }
20254 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20255 0 : if (unicode != NULL) {
20256 0 : Py_DECREF(unicode);
20257 : }
20258 0 : if (talloc_str == NULL) {
20259 0 : PyErr_NoMemory();
20260 0 : return -1;
20261 : }
20262 0 : object->pszDataFile = talloc_str;
20263 : }
20264 : }
20265 0 : return 0;
20266 : }
20267 :
20268 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fDsIntegrated(PyObject *obj, void *closure)
20269 : {
20270 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20271 0 : PyObject *py_fDsIntegrated;
20272 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)object->fDsIntegrated);
20273 0 : return py_fDsIntegrated;
20274 : }
20275 :
20276 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
20277 : {
20278 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20279 0 : if (value == NULL) {
20280 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDsIntegrated");
20281 0 : return -1;
20282 : }
20283 : {
20284 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
20285 0 : if (PyLong_Check(value)) {
20286 0 : unsigned long long test_var;
20287 0 : test_var = PyLong_AsUnsignedLongLong(value);
20288 0 : if (PyErr_Occurred() != NULL) {
20289 0 : return -1;
20290 : }
20291 0 : if (test_var > uint_max) {
20292 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20293 : PyLong_Type.tp_name, uint_max, test_var);
20294 0 : return -1;
20295 : }
20296 0 : object->fDsIntegrated = test_var;
20297 : } else {
20298 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20299 : PyLong_Type.tp_name);
20300 0 : return -1;
20301 : }
20302 : }
20303 0 : return 0;
20304 : }
20305 :
20306 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fLoadExisting(PyObject *obj, void *closure)
20307 : {
20308 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20309 0 : PyObject *py_fLoadExisting;
20310 0 : py_fLoadExisting = PyLong_FromUnsignedLongLong((uint32_t)object->fLoadExisting);
20311 0 : return py_fLoadExisting;
20312 : }
20313 :
20314 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
20315 : {
20316 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20317 0 : if (value == NULL) {
20318 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLoadExisting");
20319 0 : return -1;
20320 : }
20321 : {
20322 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLoadExisting));
20323 0 : if (PyLong_Check(value)) {
20324 0 : unsigned long long test_var;
20325 0 : test_var = PyLong_AsUnsignedLongLong(value);
20326 0 : if (PyErr_Occurred() != NULL) {
20327 0 : return -1;
20328 : }
20329 0 : if (test_var > uint_max) {
20330 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20331 : PyLong_Type.tp_name, uint_max, test_var);
20332 0 : return -1;
20333 : }
20334 0 : object->fLoadExisting = test_var;
20335 : } else {
20336 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20337 : PyLong_Type.tp_name);
20338 0 : return -1;
20339 : }
20340 : }
20341 0 : return 0;
20342 : }
20343 :
20344 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszAdmin(PyObject *obj, void *closure)
20345 : {
20346 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20347 0 : PyObject *py_pszAdmin;
20348 0 : if (object->pszAdmin == NULL) {
20349 0 : Py_RETURN_NONE;
20350 : }
20351 0 : if (object->pszAdmin == NULL) {
20352 0 : py_pszAdmin = Py_None;
20353 0 : Py_INCREF(py_pszAdmin);
20354 : } else {
20355 0 : if (object->pszAdmin == NULL) {
20356 0 : py_pszAdmin = Py_None;
20357 0 : Py_INCREF(py_pszAdmin);
20358 : } else {
20359 0 : py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
20360 : }
20361 : }
20362 0 : return py_pszAdmin;
20363 : }
20364 :
20365 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
20366 : {
20367 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20368 0 : if (value == NULL) {
20369 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszAdmin");
20370 0 : return -1;
20371 : }
20372 0 : if (value == Py_None) {
20373 0 : object->pszAdmin = NULL;
20374 : } else {
20375 0 : object->pszAdmin = NULL;
20376 : {
20377 0 : const char *test_str;
20378 0 : const char *talloc_str;
20379 0 : PyObject *unicode = NULL;
20380 0 : if (PyUnicode_Check(value)) {
20381 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20382 0 : if (unicode == NULL) {
20383 0 : PyErr_NoMemory();
20384 0 : return -1;
20385 : }
20386 0 : test_str = PyBytes_AS_STRING(unicode);
20387 0 : } else if (PyBytes_Check(value)) {
20388 0 : test_str = PyBytes_AS_STRING(value);
20389 : } else {
20390 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20391 0 : return -1;
20392 : }
20393 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20394 0 : if (unicode != NULL) {
20395 0 : Py_DECREF(unicode);
20396 : }
20397 0 : if (talloc_str == NULL) {
20398 0 : PyErr_NoMemory();
20399 0 : return -1;
20400 : }
20401 0 : object->pszAdmin = talloc_str;
20402 : }
20403 : }
20404 0 : return 0;
20405 : }
20406 :
20407 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipMasters(PyObject *obj, void *closure)
20408 : {
20409 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20410 0 : PyObject *py_aipMasters;
20411 0 : if (object->aipMasters == NULL) {
20412 0 : Py_RETURN_NONE;
20413 : }
20414 0 : if (object->aipMasters == NULL) {
20415 0 : py_aipMasters = Py_None;
20416 0 : Py_INCREF(py_aipMasters);
20417 : } else {
20418 0 : py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
20419 : }
20420 0 : return py_aipMasters;
20421 : }
20422 :
20423 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
20424 : {
20425 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20426 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
20427 0 : if (value == NULL) {
20428 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipMasters");
20429 0 : return -1;
20430 : }
20431 0 : if (value == Py_None) {
20432 0 : object->aipMasters = NULL;
20433 : } else {
20434 0 : object->aipMasters = NULL;
20435 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
20436 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
20437 0 : PyErr_NoMemory();
20438 0 : return -1;
20439 : }
20440 0 : object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
20441 : }
20442 0 : return 0;
20443 : }
20444 :
20445 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipSecondaries(PyObject *obj, void *closure)
20446 : {
20447 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20448 0 : PyObject *py_aipSecondaries;
20449 0 : if (object->aipSecondaries == NULL) {
20450 0 : Py_RETURN_NONE;
20451 : }
20452 0 : if (object->aipSecondaries == NULL) {
20453 0 : py_aipSecondaries = Py_None;
20454 0 : Py_INCREF(py_aipSecondaries);
20455 : } else {
20456 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
20457 : }
20458 0 : return py_aipSecondaries;
20459 : }
20460 :
20461 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
20462 : {
20463 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20464 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
20465 0 : if (value == NULL) {
20466 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
20467 0 : return -1;
20468 : }
20469 0 : if (value == Py_None) {
20470 0 : object->aipSecondaries = NULL;
20471 : } else {
20472 0 : object->aipSecondaries = NULL;
20473 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
20474 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
20475 0 : PyErr_NoMemory();
20476 0 : return -1;
20477 : }
20478 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
20479 : }
20480 0 : return 0;
20481 : }
20482 :
20483 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fSecureSecondaries(PyObject *obj, void *closure)
20484 : {
20485 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20486 0 : PyObject *py_fSecureSecondaries;
20487 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
20488 0 : return py_fSecureSecondaries;
20489 : }
20490 :
20491 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
20492 : {
20493 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20494 0 : if (value == NULL) {
20495 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
20496 0 : return -1;
20497 : }
20498 : {
20499 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
20500 0 : if (PyLong_Check(value)) {
20501 0 : unsigned long long test_var;
20502 0 : test_var = PyLong_AsUnsignedLongLong(value);
20503 0 : if (PyErr_Occurred() != NULL) {
20504 0 : return -1;
20505 : }
20506 0 : if (test_var > uint_max) {
20507 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20508 : PyLong_Type.tp_name, uint_max, test_var);
20509 0 : return -1;
20510 : }
20511 0 : object->fSecureSecondaries = test_var;
20512 : } else {
20513 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20514 : PyLong_Type.tp_name);
20515 0 : return -1;
20516 : }
20517 : }
20518 0 : return 0;
20519 : }
20520 :
20521 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fNotifyLevel(PyObject *obj, void *closure)
20522 : {
20523 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20524 0 : PyObject *py_fNotifyLevel;
20525 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
20526 0 : return py_fNotifyLevel;
20527 : }
20528 :
20529 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
20530 : {
20531 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20532 0 : if (value == NULL) {
20533 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
20534 0 : return -1;
20535 : }
20536 : {
20537 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
20538 0 : if (PyLong_Check(value)) {
20539 0 : unsigned long long test_var;
20540 0 : test_var = PyLong_AsUnsignedLongLong(value);
20541 0 : if (PyErr_Occurred() != NULL) {
20542 0 : return -1;
20543 : }
20544 0 : if (test_var > uint_max) {
20545 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
20546 : PyLong_Type.tp_name, uint_max, test_var);
20547 0 : return -1;
20548 : }
20549 0 : object->fNotifyLevel = test_var;
20550 : } else {
20551 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
20552 : PyLong_Type.tp_name);
20553 0 : return -1;
20554 : }
20555 : }
20556 0 : return 0;
20557 : }
20558 :
20559 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved1(PyObject *obj, void *closure)
20560 : {
20561 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20562 0 : PyObject *py_pvReserved1;
20563 0 : if (object->pvReserved1 == NULL) {
20564 0 : Py_RETURN_NONE;
20565 : }
20566 0 : if (object->pvReserved1 == NULL) {
20567 0 : py_pvReserved1 = Py_None;
20568 0 : Py_INCREF(py_pvReserved1);
20569 : } else {
20570 0 : if (object->pvReserved1 == NULL) {
20571 0 : py_pvReserved1 = Py_None;
20572 0 : Py_INCREF(py_pvReserved1);
20573 : } else {
20574 0 : py_pvReserved1 = PyUnicode_Decode(object->pvReserved1, strlen(object->pvReserved1), "utf-8", "ignore");
20575 : }
20576 : }
20577 0 : return py_pvReserved1;
20578 : }
20579 :
20580 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved1(PyObject *py_obj, PyObject *value, void *closure)
20581 : {
20582 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20583 0 : if (value == NULL) {
20584 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved1");
20585 0 : return -1;
20586 : }
20587 0 : if (value == Py_None) {
20588 0 : object->pvReserved1 = NULL;
20589 : } else {
20590 0 : object->pvReserved1 = NULL;
20591 : {
20592 0 : const char *test_str;
20593 0 : const char *talloc_str;
20594 0 : PyObject *unicode = NULL;
20595 0 : if (PyUnicode_Check(value)) {
20596 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20597 0 : if (unicode == NULL) {
20598 0 : PyErr_NoMemory();
20599 0 : return -1;
20600 : }
20601 0 : test_str = PyBytes_AS_STRING(unicode);
20602 0 : } else if (PyBytes_Check(value)) {
20603 0 : test_str = PyBytes_AS_STRING(value);
20604 : } else {
20605 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20606 0 : return -1;
20607 : }
20608 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20609 0 : if (unicode != NULL) {
20610 0 : Py_DECREF(unicode);
20611 : }
20612 0 : if (talloc_str == NULL) {
20613 0 : PyErr_NoMemory();
20614 0 : return -1;
20615 : }
20616 0 : object->pvReserved1 = talloc_str;
20617 : }
20618 : }
20619 0 : return 0;
20620 : }
20621 :
20622 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved2(PyObject *obj, void *closure)
20623 : {
20624 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20625 0 : PyObject *py_pvReserved2;
20626 0 : if (object->pvReserved2 == NULL) {
20627 0 : Py_RETURN_NONE;
20628 : }
20629 0 : if (object->pvReserved2 == NULL) {
20630 0 : py_pvReserved2 = Py_None;
20631 0 : Py_INCREF(py_pvReserved2);
20632 : } else {
20633 0 : if (object->pvReserved2 == NULL) {
20634 0 : py_pvReserved2 = Py_None;
20635 0 : Py_INCREF(py_pvReserved2);
20636 : } else {
20637 0 : py_pvReserved2 = PyUnicode_Decode(object->pvReserved2, strlen(object->pvReserved2), "utf-8", "ignore");
20638 : }
20639 : }
20640 0 : return py_pvReserved2;
20641 : }
20642 :
20643 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved2(PyObject *py_obj, PyObject *value, void *closure)
20644 : {
20645 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20646 0 : if (value == NULL) {
20647 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved2");
20648 0 : return -1;
20649 : }
20650 0 : if (value == Py_None) {
20651 0 : object->pvReserved2 = NULL;
20652 : } else {
20653 0 : object->pvReserved2 = NULL;
20654 : {
20655 0 : const char *test_str;
20656 0 : const char *talloc_str;
20657 0 : PyObject *unicode = NULL;
20658 0 : if (PyUnicode_Check(value)) {
20659 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20660 0 : if (unicode == NULL) {
20661 0 : PyErr_NoMemory();
20662 0 : return -1;
20663 : }
20664 0 : test_str = PyBytes_AS_STRING(unicode);
20665 0 : } else if (PyBytes_Check(value)) {
20666 0 : test_str = PyBytes_AS_STRING(value);
20667 : } else {
20668 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20669 0 : return -1;
20670 : }
20671 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20672 0 : if (unicode != NULL) {
20673 0 : Py_DECREF(unicode);
20674 : }
20675 0 : if (talloc_str == NULL) {
20676 0 : PyErr_NoMemory();
20677 0 : return -1;
20678 : }
20679 0 : object->pvReserved2 = talloc_str;
20680 : }
20681 : }
20682 0 : return 0;
20683 : }
20684 :
20685 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved3(PyObject *obj, void *closure)
20686 : {
20687 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20688 0 : PyObject *py_pvReserved3;
20689 0 : if (object->pvReserved3 == NULL) {
20690 0 : Py_RETURN_NONE;
20691 : }
20692 0 : if (object->pvReserved3 == NULL) {
20693 0 : py_pvReserved3 = Py_None;
20694 0 : Py_INCREF(py_pvReserved3);
20695 : } else {
20696 0 : if (object->pvReserved3 == NULL) {
20697 0 : py_pvReserved3 = Py_None;
20698 0 : Py_INCREF(py_pvReserved3);
20699 : } else {
20700 0 : py_pvReserved3 = PyUnicode_Decode(object->pvReserved3, strlen(object->pvReserved3), "utf-8", "ignore");
20701 : }
20702 : }
20703 0 : return py_pvReserved3;
20704 : }
20705 :
20706 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved3(PyObject *py_obj, PyObject *value, void *closure)
20707 : {
20708 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20709 0 : if (value == NULL) {
20710 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved3");
20711 0 : return -1;
20712 : }
20713 0 : if (value == Py_None) {
20714 0 : object->pvReserved3 = NULL;
20715 : } else {
20716 0 : object->pvReserved3 = NULL;
20717 : {
20718 0 : const char *test_str;
20719 0 : const char *talloc_str;
20720 0 : PyObject *unicode = NULL;
20721 0 : if (PyUnicode_Check(value)) {
20722 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20723 0 : if (unicode == NULL) {
20724 0 : PyErr_NoMemory();
20725 0 : return -1;
20726 : }
20727 0 : test_str = PyBytes_AS_STRING(unicode);
20728 0 : } else if (PyBytes_Check(value)) {
20729 0 : test_str = PyBytes_AS_STRING(value);
20730 : } else {
20731 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20732 0 : return -1;
20733 : }
20734 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20735 0 : if (unicode != NULL) {
20736 0 : Py_DECREF(unicode);
20737 : }
20738 0 : if (talloc_str == NULL) {
20739 0 : PyErr_NoMemory();
20740 0 : return -1;
20741 : }
20742 0 : object->pvReserved3 = talloc_str;
20743 : }
20744 : }
20745 0 : return 0;
20746 : }
20747 :
20748 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved4(PyObject *obj, void *closure)
20749 : {
20750 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20751 0 : PyObject *py_pvReserved4;
20752 0 : if (object->pvReserved4 == NULL) {
20753 0 : Py_RETURN_NONE;
20754 : }
20755 0 : if (object->pvReserved4 == NULL) {
20756 0 : py_pvReserved4 = Py_None;
20757 0 : Py_INCREF(py_pvReserved4);
20758 : } else {
20759 0 : if (object->pvReserved4 == NULL) {
20760 0 : py_pvReserved4 = Py_None;
20761 0 : Py_INCREF(py_pvReserved4);
20762 : } else {
20763 0 : py_pvReserved4 = PyUnicode_Decode(object->pvReserved4, strlen(object->pvReserved4), "utf-8", "ignore");
20764 : }
20765 : }
20766 0 : return py_pvReserved4;
20767 : }
20768 :
20769 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved4(PyObject *py_obj, PyObject *value, void *closure)
20770 : {
20771 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20772 0 : if (value == NULL) {
20773 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved4");
20774 0 : return -1;
20775 : }
20776 0 : if (value == Py_None) {
20777 0 : object->pvReserved4 = NULL;
20778 : } else {
20779 0 : object->pvReserved4 = NULL;
20780 : {
20781 0 : const char *test_str;
20782 0 : const char *talloc_str;
20783 0 : PyObject *unicode = NULL;
20784 0 : if (PyUnicode_Check(value)) {
20785 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20786 0 : if (unicode == NULL) {
20787 0 : PyErr_NoMemory();
20788 0 : return -1;
20789 : }
20790 0 : test_str = PyBytes_AS_STRING(unicode);
20791 0 : } else if (PyBytes_Check(value)) {
20792 0 : test_str = PyBytes_AS_STRING(value);
20793 : } else {
20794 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20795 0 : return -1;
20796 : }
20797 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20798 0 : if (unicode != NULL) {
20799 0 : Py_DECREF(unicode);
20800 : }
20801 0 : if (talloc_str == NULL) {
20802 0 : PyErr_NoMemory();
20803 0 : return -1;
20804 : }
20805 0 : object->pvReserved4 = talloc_str;
20806 : }
20807 : }
20808 0 : return 0;
20809 : }
20810 :
20811 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved5(PyObject *obj, void *closure)
20812 : {
20813 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20814 0 : PyObject *py_pvReserved5;
20815 0 : if (object->pvReserved5 == NULL) {
20816 0 : Py_RETURN_NONE;
20817 : }
20818 0 : if (object->pvReserved5 == NULL) {
20819 0 : py_pvReserved5 = Py_None;
20820 0 : Py_INCREF(py_pvReserved5);
20821 : } else {
20822 0 : if (object->pvReserved5 == NULL) {
20823 0 : py_pvReserved5 = Py_None;
20824 0 : Py_INCREF(py_pvReserved5);
20825 : } else {
20826 0 : py_pvReserved5 = PyUnicode_Decode(object->pvReserved5, strlen(object->pvReserved5), "utf-8", "ignore");
20827 : }
20828 : }
20829 0 : return py_pvReserved5;
20830 : }
20831 :
20832 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved5(PyObject *py_obj, PyObject *value, void *closure)
20833 : {
20834 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20835 0 : if (value == NULL) {
20836 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved5");
20837 0 : return -1;
20838 : }
20839 0 : if (value == Py_None) {
20840 0 : object->pvReserved5 = NULL;
20841 : } else {
20842 0 : object->pvReserved5 = NULL;
20843 : {
20844 0 : const char *test_str;
20845 0 : const char *talloc_str;
20846 0 : PyObject *unicode = NULL;
20847 0 : if (PyUnicode_Check(value)) {
20848 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20849 0 : if (unicode == NULL) {
20850 0 : PyErr_NoMemory();
20851 0 : return -1;
20852 : }
20853 0 : test_str = PyBytes_AS_STRING(unicode);
20854 0 : } else if (PyBytes_Check(value)) {
20855 0 : test_str = PyBytes_AS_STRING(value);
20856 : } else {
20857 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20858 0 : return -1;
20859 : }
20860 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20861 0 : if (unicode != NULL) {
20862 0 : Py_DECREF(unicode);
20863 : }
20864 0 : if (talloc_str == NULL) {
20865 0 : PyErr_NoMemory();
20866 0 : return -1;
20867 : }
20868 0 : object->pvReserved5 = talloc_str;
20869 : }
20870 : }
20871 0 : return 0;
20872 : }
20873 :
20874 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved6(PyObject *obj, void *closure)
20875 : {
20876 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20877 0 : PyObject *py_pvReserved6;
20878 0 : if (object->pvReserved6 == NULL) {
20879 0 : Py_RETURN_NONE;
20880 : }
20881 0 : if (object->pvReserved6 == NULL) {
20882 0 : py_pvReserved6 = Py_None;
20883 0 : Py_INCREF(py_pvReserved6);
20884 : } else {
20885 0 : if (object->pvReserved6 == NULL) {
20886 0 : py_pvReserved6 = Py_None;
20887 0 : Py_INCREF(py_pvReserved6);
20888 : } else {
20889 0 : py_pvReserved6 = PyUnicode_Decode(object->pvReserved6, strlen(object->pvReserved6), "utf-8", "ignore");
20890 : }
20891 : }
20892 0 : return py_pvReserved6;
20893 : }
20894 :
20895 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved6(PyObject *py_obj, PyObject *value, void *closure)
20896 : {
20897 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20898 0 : if (value == NULL) {
20899 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved6");
20900 0 : return -1;
20901 : }
20902 0 : if (value == Py_None) {
20903 0 : object->pvReserved6 = NULL;
20904 : } else {
20905 0 : object->pvReserved6 = NULL;
20906 : {
20907 0 : const char *test_str;
20908 0 : const char *talloc_str;
20909 0 : PyObject *unicode = NULL;
20910 0 : if (PyUnicode_Check(value)) {
20911 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20912 0 : if (unicode == NULL) {
20913 0 : PyErr_NoMemory();
20914 0 : return -1;
20915 : }
20916 0 : test_str = PyBytes_AS_STRING(unicode);
20917 0 : } else if (PyBytes_Check(value)) {
20918 0 : test_str = PyBytes_AS_STRING(value);
20919 : } else {
20920 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20921 0 : return -1;
20922 : }
20923 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20924 0 : if (unicode != NULL) {
20925 0 : Py_DECREF(unicode);
20926 : }
20927 0 : if (talloc_str == NULL) {
20928 0 : PyErr_NoMemory();
20929 0 : return -1;
20930 : }
20931 0 : object->pvReserved6 = talloc_str;
20932 : }
20933 : }
20934 0 : return 0;
20935 : }
20936 :
20937 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved7(PyObject *obj, void *closure)
20938 : {
20939 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
20940 0 : PyObject *py_pvReserved7;
20941 0 : if (object->pvReserved7 == NULL) {
20942 0 : Py_RETURN_NONE;
20943 : }
20944 0 : if (object->pvReserved7 == NULL) {
20945 0 : py_pvReserved7 = Py_None;
20946 0 : Py_INCREF(py_pvReserved7);
20947 : } else {
20948 0 : if (object->pvReserved7 == NULL) {
20949 0 : py_pvReserved7 = Py_None;
20950 0 : Py_INCREF(py_pvReserved7);
20951 : } else {
20952 0 : py_pvReserved7 = PyUnicode_Decode(object->pvReserved7, strlen(object->pvReserved7), "utf-8", "ignore");
20953 : }
20954 : }
20955 0 : return py_pvReserved7;
20956 : }
20957 :
20958 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved7(PyObject *py_obj, PyObject *value, void *closure)
20959 : {
20960 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
20961 0 : if (value == NULL) {
20962 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved7");
20963 0 : return -1;
20964 : }
20965 0 : if (value == Py_None) {
20966 0 : object->pvReserved7 = NULL;
20967 : } else {
20968 0 : object->pvReserved7 = NULL;
20969 : {
20970 0 : const char *test_str;
20971 0 : const char *talloc_str;
20972 0 : PyObject *unicode = NULL;
20973 0 : if (PyUnicode_Check(value)) {
20974 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
20975 0 : if (unicode == NULL) {
20976 0 : PyErr_NoMemory();
20977 0 : return -1;
20978 : }
20979 0 : test_str = PyBytes_AS_STRING(unicode);
20980 0 : } else if (PyBytes_Check(value)) {
20981 0 : test_str = PyBytes_AS_STRING(value);
20982 : } else {
20983 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
20984 0 : return -1;
20985 : }
20986 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
20987 0 : if (unicode != NULL) {
20988 0 : Py_DECREF(unicode);
20989 : }
20990 0 : if (talloc_str == NULL) {
20991 0 : PyErr_NoMemory();
20992 0 : return -1;
20993 : }
20994 0 : object->pvReserved7 = talloc_str;
20995 : }
20996 : }
20997 0 : return 0;
20998 : }
20999 :
21000 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved8(PyObject *obj, void *closure)
21001 : {
21002 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21003 0 : PyObject *py_pvReserved8;
21004 0 : if (object->pvReserved8 == NULL) {
21005 0 : Py_RETURN_NONE;
21006 : }
21007 0 : if (object->pvReserved8 == NULL) {
21008 0 : py_pvReserved8 = Py_None;
21009 0 : Py_INCREF(py_pvReserved8);
21010 : } else {
21011 0 : if (object->pvReserved8 == NULL) {
21012 0 : py_pvReserved8 = Py_None;
21013 0 : Py_INCREF(py_pvReserved8);
21014 : } else {
21015 0 : py_pvReserved8 = PyUnicode_Decode(object->pvReserved8, strlen(object->pvReserved8), "utf-8", "ignore");
21016 : }
21017 : }
21018 0 : return py_pvReserved8;
21019 : }
21020 :
21021 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved8(PyObject *py_obj, PyObject *value, void *closure)
21022 : {
21023 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21024 0 : if (value == NULL) {
21025 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pvReserved8");
21026 0 : return -1;
21027 : }
21028 0 : if (value == Py_None) {
21029 0 : object->pvReserved8 = NULL;
21030 : } else {
21031 0 : object->pvReserved8 = NULL;
21032 : {
21033 0 : const char *test_str;
21034 0 : const char *talloc_str;
21035 0 : PyObject *unicode = NULL;
21036 0 : if (PyUnicode_Check(value)) {
21037 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
21038 0 : if (unicode == NULL) {
21039 0 : PyErr_NoMemory();
21040 0 : return -1;
21041 : }
21042 0 : test_str = PyBytes_AS_STRING(unicode);
21043 0 : } else if (PyBytes_Check(value)) {
21044 0 : test_str = PyBytes_AS_STRING(value);
21045 : } else {
21046 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
21047 0 : return -1;
21048 : }
21049 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
21050 0 : if (unicode != NULL) {
21051 0 : Py_DECREF(unicode);
21052 : }
21053 0 : if (talloc_str == NULL) {
21054 0 : PyErr_NoMemory();
21055 0 : return -1;
21056 : }
21057 0 : object->pvReserved8 = talloc_str;
21058 : }
21059 : }
21060 0 : return 0;
21061 : }
21062 :
21063 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved1(PyObject *obj, void *closure)
21064 : {
21065 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21066 0 : PyObject *py_dwReserved1;
21067 0 : py_dwReserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved1);
21068 0 : return py_dwReserved1;
21069 : }
21070 :
21071 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
21072 : {
21073 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21074 0 : if (value == NULL) {
21075 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved1");
21076 0 : return -1;
21077 : }
21078 : {
21079 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved1));
21080 0 : if (PyLong_Check(value)) {
21081 0 : unsigned long long test_var;
21082 0 : test_var = PyLong_AsUnsignedLongLong(value);
21083 0 : if (PyErr_Occurred() != NULL) {
21084 0 : return -1;
21085 : }
21086 0 : if (test_var > uint_max) {
21087 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21088 : PyLong_Type.tp_name, uint_max, test_var);
21089 0 : return -1;
21090 : }
21091 0 : object->dwReserved1 = test_var;
21092 : } else {
21093 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21094 : PyLong_Type.tp_name);
21095 0 : return -1;
21096 : }
21097 : }
21098 0 : return 0;
21099 : }
21100 :
21101 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved2(PyObject *obj, void *closure)
21102 : {
21103 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21104 0 : PyObject *py_dwReserved2;
21105 0 : py_dwReserved2 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved2);
21106 0 : return py_dwReserved2;
21107 : }
21108 :
21109 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved2(PyObject *py_obj, PyObject *value, void *closure)
21110 : {
21111 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21112 0 : if (value == NULL) {
21113 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved2");
21114 0 : return -1;
21115 : }
21116 : {
21117 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved2));
21118 0 : if (PyLong_Check(value)) {
21119 0 : unsigned long long test_var;
21120 0 : test_var = PyLong_AsUnsignedLongLong(value);
21121 0 : if (PyErr_Occurred() != NULL) {
21122 0 : return -1;
21123 : }
21124 0 : if (test_var > uint_max) {
21125 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21126 : PyLong_Type.tp_name, uint_max, test_var);
21127 0 : return -1;
21128 : }
21129 0 : object->dwReserved2 = test_var;
21130 : } else {
21131 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21132 : PyLong_Type.tp_name);
21133 0 : return -1;
21134 : }
21135 : }
21136 0 : return 0;
21137 : }
21138 :
21139 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved3(PyObject *obj, void *closure)
21140 : {
21141 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21142 0 : PyObject *py_dwReserved3;
21143 0 : py_dwReserved3 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved3);
21144 0 : return py_dwReserved3;
21145 : }
21146 :
21147 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved3(PyObject *py_obj, PyObject *value, void *closure)
21148 : {
21149 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21150 0 : if (value == NULL) {
21151 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved3");
21152 0 : return -1;
21153 : }
21154 : {
21155 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved3));
21156 0 : if (PyLong_Check(value)) {
21157 0 : unsigned long long test_var;
21158 0 : test_var = PyLong_AsUnsignedLongLong(value);
21159 0 : if (PyErr_Occurred() != NULL) {
21160 0 : return -1;
21161 : }
21162 0 : if (test_var > uint_max) {
21163 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21164 : PyLong_Type.tp_name, uint_max, test_var);
21165 0 : return -1;
21166 : }
21167 0 : object->dwReserved3 = test_var;
21168 : } else {
21169 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21170 : PyLong_Type.tp_name);
21171 0 : return -1;
21172 : }
21173 : }
21174 0 : return 0;
21175 : }
21176 :
21177 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved4(PyObject *obj, void *closure)
21178 : {
21179 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21180 0 : PyObject *py_dwReserved4;
21181 0 : py_dwReserved4 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved4);
21182 0 : return py_dwReserved4;
21183 : }
21184 :
21185 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved4(PyObject *py_obj, PyObject *value, void *closure)
21186 : {
21187 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21188 0 : if (value == NULL) {
21189 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved4");
21190 0 : return -1;
21191 : }
21192 : {
21193 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved4));
21194 0 : if (PyLong_Check(value)) {
21195 0 : unsigned long long test_var;
21196 0 : test_var = PyLong_AsUnsignedLongLong(value);
21197 0 : if (PyErr_Occurred() != NULL) {
21198 0 : return -1;
21199 : }
21200 0 : if (test_var > uint_max) {
21201 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21202 : PyLong_Type.tp_name, uint_max, test_var);
21203 0 : return -1;
21204 : }
21205 0 : object->dwReserved4 = test_var;
21206 : } else {
21207 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21208 : PyLong_Type.tp_name);
21209 0 : return -1;
21210 : }
21211 : }
21212 0 : return 0;
21213 : }
21214 :
21215 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved5(PyObject *obj, void *closure)
21216 : {
21217 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21218 0 : PyObject *py_dwReserved5;
21219 0 : py_dwReserved5 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved5);
21220 0 : return py_dwReserved5;
21221 : }
21222 :
21223 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved5(PyObject *py_obj, PyObject *value, void *closure)
21224 : {
21225 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21226 0 : if (value == NULL) {
21227 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved5");
21228 0 : return -1;
21229 : }
21230 : {
21231 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved5));
21232 0 : if (PyLong_Check(value)) {
21233 0 : unsigned long long test_var;
21234 0 : test_var = PyLong_AsUnsignedLongLong(value);
21235 0 : if (PyErr_Occurred() != NULL) {
21236 0 : return -1;
21237 : }
21238 0 : if (test_var > uint_max) {
21239 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21240 : PyLong_Type.tp_name, uint_max, test_var);
21241 0 : return -1;
21242 : }
21243 0 : object->dwReserved5 = test_var;
21244 : } else {
21245 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21246 : PyLong_Type.tp_name);
21247 0 : return -1;
21248 : }
21249 : }
21250 0 : return 0;
21251 : }
21252 :
21253 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved6(PyObject *obj, void *closure)
21254 : {
21255 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21256 0 : PyObject *py_dwReserved6;
21257 0 : py_dwReserved6 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved6);
21258 0 : return py_dwReserved6;
21259 : }
21260 :
21261 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved6(PyObject *py_obj, PyObject *value, void *closure)
21262 : {
21263 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21264 0 : if (value == NULL) {
21265 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved6");
21266 0 : return -1;
21267 : }
21268 : {
21269 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved6));
21270 0 : if (PyLong_Check(value)) {
21271 0 : unsigned long long test_var;
21272 0 : test_var = PyLong_AsUnsignedLongLong(value);
21273 0 : if (PyErr_Occurred() != NULL) {
21274 0 : return -1;
21275 : }
21276 0 : if (test_var > uint_max) {
21277 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21278 : PyLong_Type.tp_name, uint_max, test_var);
21279 0 : return -1;
21280 : }
21281 0 : object->dwReserved6 = test_var;
21282 : } else {
21283 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21284 : PyLong_Type.tp_name);
21285 0 : return -1;
21286 : }
21287 : }
21288 0 : return 0;
21289 : }
21290 :
21291 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved7(PyObject *obj, void *closure)
21292 : {
21293 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21294 0 : PyObject *py_dwReserved7;
21295 0 : py_dwReserved7 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved7);
21296 0 : return py_dwReserved7;
21297 : }
21298 :
21299 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved7(PyObject *py_obj, PyObject *value, void *closure)
21300 : {
21301 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21302 0 : if (value == NULL) {
21303 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved7");
21304 0 : return -1;
21305 : }
21306 : {
21307 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved7));
21308 0 : if (PyLong_Check(value)) {
21309 0 : unsigned long long test_var;
21310 0 : test_var = PyLong_AsUnsignedLongLong(value);
21311 0 : if (PyErr_Occurred() != NULL) {
21312 0 : return -1;
21313 : }
21314 0 : if (test_var > uint_max) {
21315 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21316 : PyLong_Type.tp_name, uint_max, test_var);
21317 0 : return -1;
21318 : }
21319 0 : object->dwReserved7 = test_var;
21320 : } else {
21321 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21322 : PyLong_Type.tp_name);
21323 0 : return -1;
21324 : }
21325 : }
21326 0 : return 0;
21327 : }
21328 :
21329 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved8(PyObject *obj, void *closure)
21330 : {
21331 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(obj);
21332 0 : PyObject *py_dwReserved8;
21333 0 : py_dwReserved8 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved8);
21334 0 : return py_dwReserved8;
21335 : }
21336 :
21337 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved8(PyObject *py_obj, PyObject *value, void *closure)
21338 : {
21339 0 : struct DNS_RPC_ZONE_CREATE_INFO_W2K *object = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(py_obj);
21340 0 : if (value == NULL) {
21341 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved8");
21342 0 : return -1;
21343 : }
21344 : {
21345 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved8));
21346 0 : if (PyLong_Check(value)) {
21347 0 : unsigned long long test_var;
21348 0 : test_var = PyLong_AsUnsignedLongLong(value);
21349 0 : if (PyErr_Occurred() != NULL) {
21350 0 : return -1;
21351 : }
21352 0 : if (test_var > uint_max) {
21353 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21354 : PyLong_Type.tp_name, uint_max, test_var);
21355 0 : return -1;
21356 : }
21357 0 : object->dwReserved8 = test_var;
21358 : } else {
21359 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21360 : PyLong_Type.tp_name);
21361 0 : return -1;
21362 : }
21363 : }
21364 0 : return 0;
21365 : }
21366 :
21367 : static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_W2K_getsetters[] = {
21368 : {
21369 : .name = discard_const_p(char, "pszZoneName"),
21370 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszZoneName,
21371 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszZoneName,
21372 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21373 : },
21374 : {
21375 : .name = discard_const_p(char, "dwZoneType"),
21376 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwZoneType,
21377 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwZoneType,
21378 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21379 : },
21380 : {
21381 : .name = discard_const_p(char, "fAllowUpdate"),
21382 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAllowUpdate,
21383 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAllowUpdate,
21384 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
21385 : },
21386 : {
21387 : .name = discard_const_p(char, "fAging"),
21388 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fAging,
21389 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fAging,
21390 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21391 : },
21392 : {
21393 : .name = discard_const_p(char, "dwFlags"),
21394 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwFlags,
21395 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwFlags,
21396 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21397 : },
21398 : {
21399 : .name = discard_const_p(char, "pszDataFile"),
21400 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszDataFile,
21401 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszDataFile,
21402 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21403 : },
21404 : {
21405 : .name = discard_const_p(char, "fDsIntegrated"),
21406 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fDsIntegrated,
21407 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fDsIntegrated,
21408 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21409 : },
21410 : {
21411 : .name = discard_const_p(char, "fLoadExisting"),
21412 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fLoadExisting,
21413 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fLoadExisting,
21414 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21415 : },
21416 : {
21417 : .name = discard_const_p(char, "pszAdmin"),
21418 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pszAdmin,
21419 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pszAdmin,
21420 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21421 : },
21422 : {
21423 : .name = discard_const_p(char, "aipMasters"),
21424 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipMasters,
21425 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipMasters,
21426 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
21427 : },
21428 : {
21429 : .name = discard_const_p(char, "aipSecondaries"),
21430 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_aipSecondaries,
21431 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_aipSecondaries,
21432 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
21433 : },
21434 : {
21435 : .name = discard_const_p(char, "fSecureSecondaries"),
21436 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fSecureSecondaries,
21437 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fSecureSecondaries,
21438 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
21439 : },
21440 : {
21441 : .name = discard_const_p(char, "fNotifyLevel"),
21442 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_fNotifyLevel,
21443 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_fNotifyLevel,
21444 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
21445 : },
21446 : {
21447 : .name = discard_const_p(char, "pvReserved1"),
21448 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved1,
21449 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved1,
21450 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21451 : },
21452 : {
21453 : .name = discard_const_p(char, "pvReserved2"),
21454 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved2,
21455 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved2,
21456 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21457 : },
21458 : {
21459 : .name = discard_const_p(char, "pvReserved3"),
21460 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved3,
21461 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved3,
21462 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21463 : },
21464 : {
21465 : .name = discard_const_p(char, "pvReserved4"),
21466 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved4,
21467 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved4,
21468 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21469 : },
21470 : {
21471 : .name = discard_const_p(char, "pvReserved5"),
21472 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved5,
21473 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved5,
21474 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21475 : },
21476 : {
21477 : .name = discard_const_p(char, "pvReserved6"),
21478 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved6,
21479 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved6,
21480 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21481 : },
21482 : {
21483 : .name = discard_const_p(char, "pvReserved7"),
21484 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved7,
21485 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved7,
21486 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21487 : },
21488 : {
21489 : .name = discard_const_p(char, "pvReserved8"),
21490 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_pvReserved8,
21491 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_pvReserved8,
21492 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
21493 : },
21494 : {
21495 : .name = discard_const_p(char, "dwReserved1"),
21496 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved1,
21497 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved1,
21498 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21499 : },
21500 : {
21501 : .name = discard_const_p(char, "dwReserved2"),
21502 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved2,
21503 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved2,
21504 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21505 : },
21506 : {
21507 : .name = discard_const_p(char, "dwReserved3"),
21508 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved3,
21509 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved3,
21510 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21511 : },
21512 : {
21513 : .name = discard_const_p(char, "dwReserved4"),
21514 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved4,
21515 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved4,
21516 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21517 : },
21518 : {
21519 : .name = discard_const_p(char, "dwReserved5"),
21520 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved5,
21521 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved5,
21522 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21523 : },
21524 : {
21525 : .name = discard_const_p(char, "dwReserved6"),
21526 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved6,
21527 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved6,
21528 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21529 : },
21530 : {
21531 : .name = discard_const_p(char, "dwReserved7"),
21532 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved7,
21533 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved7,
21534 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21535 : },
21536 : {
21537 : .name = discard_const_p(char, "dwReserved8"),
21538 : .get = py_DNS_RPC_ZONE_CREATE_INFO_W2K_get_dwReserved8,
21539 : .set = py_DNS_RPC_ZONE_CREATE_INFO_W2K_set_dwReserved8,
21540 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
21541 : },
21542 : { .name = NULL }
21543 : };
21544 :
21545 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
21546 : {
21547 0 : return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_W2K, type);
21548 : }
21549 :
21550 :
21551 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_W2K_Type = {
21552 : PyVarObject_HEAD_INIT(NULL, 0)
21553 : .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_W2K",
21554 : .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_W2K_getsetters,
21555 : .tp_methods = NULL,
21556 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
21557 : .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_W2K_new,
21558 : };
21559 :
21560 :
21561 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
21562 : {
21563 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21564 0 : PyObject *py_dwRpcStructureVersion;
21565 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
21566 0 : return py_dwRpcStructureVersion;
21567 : }
21568 :
21569 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
21570 : {
21571 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21572 0 : if (value == NULL) {
21573 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
21574 0 : return -1;
21575 : }
21576 : {
21577 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
21578 0 : if (PyLong_Check(value)) {
21579 0 : unsigned long long test_var;
21580 0 : test_var = PyLong_AsUnsignedLongLong(value);
21581 0 : if (PyErr_Occurred() != NULL) {
21582 0 : return -1;
21583 : }
21584 0 : if (test_var > uint_max) {
21585 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21586 : PyLong_Type.tp_name, uint_max, test_var);
21587 0 : return -1;
21588 : }
21589 0 : object->dwRpcStructureVersion = test_var;
21590 : } else {
21591 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21592 : PyLong_Type.tp_name);
21593 0 : return -1;
21594 : }
21595 : }
21596 0 : return 0;
21597 : }
21598 :
21599 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
21600 : {
21601 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21602 0 : PyObject *py_dwReserved0;
21603 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
21604 0 : return py_dwReserved0;
21605 : }
21606 :
21607 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
21608 : {
21609 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21610 0 : if (value == NULL) {
21611 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
21612 0 : return -1;
21613 : }
21614 : {
21615 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
21616 0 : if (PyLong_Check(value)) {
21617 0 : unsigned long long test_var;
21618 0 : test_var = PyLong_AsUnsignedLongLong(value);
21619 0 : if (PyErr_Occurred() != NULL) {
21620 0 : return -1;
21621 : }
21622 0 : if (test_var > uint_max) {
21623 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21624 : PyLong_Type.tp_name, uint_max, test_var);
21625 0 : return -1;
21626 : }
21627 0 : object->dwReserved0 = test_var;
21628 : } else {
21629 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21630 : PyLong_Type.tp_name);
21631 0 : return -1;
21632 : }
21633 : }
21634 0 : return 0;
21635 : }
21636 :
21637 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszZoneName(PyObject *obj, void *closure)
21638 : {
21639 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21640 0 : PyObject *py_pszZoneName;
21641 0 : if (object->pszZoneName == NULL) {
21642 0 : Py_RETURN_NONE;
21643 : }
21644 0 : if (object->pszZoneName == NULL) {
21645 0 : py_pszZoneName = Py_None;
21646 0 : Py_INCREF(py_pszZoneName);
21647 : } else {
21648 0 : if (object->pszZoneName == NULL) {
21649 0 : py_pszZoneName = Py_None;
21650 0 : Py_INCREF(py_pszZoneName);
21651 : } else {
21652 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
21653 : }
21654 : }
21655 0 : return py_pszZoneName;
21656 : }
21657 :
21658 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
21659 : {
21660 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21661 0 : if (value == NULL) {
21662 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneName");
21663 0 : return -1;
21664 : }
21665 0 : if (value == Py_None) {
21666 0 : object->pszZoneName = NULL;
21667 : } else {
21668 0 : object->pszZoneName = NULL;
21669 : {
21670 0 : const char *test_str;
21671 0 : const char *talloc_str;
21672 0 : PyObject *unicode = NULL;
21673 0 : if (PyUnicode_Check(value)) {
21674 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
21675 0 : if (unicode == NULL) {
21676 0 : PyErr_NoMemory();
21677 0 : return -1;
21678 : }
21679 0 : test_str = PyBytes_AS_STRING(unicode);
21680 0 : } else if (PyBytes_Check(value)) {
21681 0 : test_str = PyBytes_AS_STRING(value);
21682 : } else {
21683 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
21684 0 : return -1;
21685 : }
21686 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
21687 0 : if (unicode != NULL) {
21688 0 : Py_DECREF(unicode);
21689 : }
21690 0 : if (talloc_str == NULL) {
21691 0 : PyErr_NoMemory();
21692 0 : return -1;
21693 : }
21694 0 : object->pszZoneName = talloc_str;
21695 : }
21696 : }
21697 0 : return 0;
21698 : }
21699 :
21700 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwZoneType(PyObject *obj, void *closure)
21701 : {
21702 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21703 0 : PyObject *py_dwZoneType;
21704 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneType);
21705 0 : return py_dwZoneType;
21706 : }
21707 :
21708 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
21709 : {
21710 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21711 0 : if (value == NULL) {
21712 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneType");
21713 0 : return -1;
21714 : }
21715 : {
21716 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
21717 0 : if (PyLong_Check(value)) {
21718 0 : unsigned long long test_var;
21719 0 : test_var = PyLong_AsUnsignedLongLong(value);
21720 0 : if (PyErr_Occurred() != NULL) {
21721 0 : return -1;
21722 : }
21723 0 : if (test_var > uint_max) {
21724 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21725 : PyLong_Type.tp_name, uint_max, test_var);
21726 0 : return -1;
21727 : }
21728 0 : object->dwZoneType = test_var;
21729 : } else {
21730 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21731 : PyLong_Type.tp_name);
21732 0 : return -1;
21733 : }
21734 : }
21735 0 : return 0;
21736 : }
21737 :
21738 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAllowUpdate(PyObject *obj, void *closure)
21739 : {
21740 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21741 0 : PyObject *py_fAllowUpdate;
21742 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
21743 0 : return py_fAllowUpdate;
21744 : }
21745 :
21746 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
21747 : {
21748 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21749 0 : if (value == NULL) {
21750 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
21751 0 : return -1;
21752 : }
21753 : {
21754 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
21755 0 : if (PyLong_Check(value)) {
21756 0 : unsigned long long test_var;
21757 0 : test_var = PyLong_AsUnsignedLongLong(value);
21758 0 : if (PyErr_Occurred() != NULL) {
21759 0 : return -1;
21760 : }
21761 0 : if (test_var > uint_max) {
21762 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21763 : PyLong_Type.tp_name, uint_max, test_var);
21764 0 : return -1;
21765 : }
21766 0 : object->fAllowUpdate = test_var;
21767 : } else {
21768 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21769 : PyLong_Type.tp_name);
21770 0 : return -1;
21771 : }
21772 : }
21773 0 : return 0;
21774 : }
21775 :
21776 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAging(PyObject *obj, void *closure)
21777 : {
21778 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21779 0 : PyObject *py_fAging;
21780 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)object->fAging);
21781 0 : return py_fAging;
21782 : }
21783 :
21784 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
21785 : {
21786 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21787 0 : if (value == NULL) {
21788 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAging");
21789 0 : return -1;
21790 : }
21791 : {
21792 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
21793 0 : if (PyLong_Check(value)) {
21794 0 : unsigned long long test_var;
21795 0 : test_var = PyLong_AsUnsignedLongLong(value);
21796 0 : if (PyErr_Occurred() != NULL) {
21797 0 : return -1;
21798 : }
21799 0 : if (test_var > uint_max) {
21800 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21801 : PyLong_Type.tp_name, uint_max, test_var);
21802 0 : return -1;
21803 : }
21804 0 : object->fAging = test_var;
21805 : } else {
21806 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21807 : PyLong_Type.tp_name);
21808 0 : return -1;
21809 : }
21810 : }
21811 0 : return 0;
21812 : }
21813 :
21814 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwFlags(PyObject *obj, void *closure)
21815 : {
21816 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21817 0 : PyObject *py_dwFlags;
21818 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwFlags);
21819 0 : return py_dwFlags;
21820 : }
21821 :
21822 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
21823 : {
21824 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21825 0 : if (value == NULL) {
21826 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFlags");
21827 0 : return -1;
21828 : }
21829 : {
21830 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
21831 0 : if (PyLong_Check(value)) {
21832 0 : unsigned long long test_var;
21833 0 : test_var = PyLong_AsUnsignedLongLong(value);
21834 0 : if (PyErr_Occurred() != NULL) {
21835 0 : return -1;
21836 : }
21837 0 : if (test_var > uint_max) {
21838 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21839 : PyLong_Type.tp_name, uint_max, test_var);
21840 0 : return -1;
21841 : }
21842 0 : object->dwFlags = test_var;
21843 : } else {
21844 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21845 : PyLong_Type.tp_name);
21846 0 : return -1;
21847 : }
21848 : }
21849 0 : return 0;
21850 : }
21851 :
21852 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDataFile(PyObject *obj, void *closure)
21853 : {
21854 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21855 0 : PyObject *py_pszDataFile;
21856 0 : if (object->pszDataFile == NULL) {
21857 0 : Py_RETURN_NONE;
21858 : }
21859 0 : if (object->pszDataFile == NULL) {
21860 0 : py_pszDataFile = Py_None;
21861 0 : Py_INCREF(py_pszDataFile);
21862 : } else {
21863 0 : if (object->pszDataFile == NULL) {
21864 0 : py_pszDataFile = Py_None;
21865 0 : Py_INCREF(py_pszDataFile);
21866 : } else {
21867 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
21868 : }
21869 : }
21870 0 : return py_pszDataFile;
21871 : }
21872 :
21873 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
21874 : {
21875 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21876 0 : if (value == NULL) {
21877 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDataFile");
21878 0 : return -1;
21879 : }
21880 0 : if (value == Py_None) {
21881 0 : object->pszDataFile = NULL;
21882 : } else {
21883 0 : object->pszDataFile = NULL;
21884 : {
21885 0 : const char *test_str;
21886 0 : const char *talloc_str;
21887 0 : PyObject *unicode = NULL;
21888 0 : if (PyUnicode_Check(value)) {
21889 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
21890 0 : if (unicode == NULL) {
21891 0 : PyErr_NoMemory();
21892 0 : return -1;
21893 : }
21894 0 : test_str = PyBytes_AS_STRING(unicode);
21895 0 : } else if (PyBytes_Check(value)) {
21896 0 : test_str = PyBytes_AS_STRING(value);
21897 : } else {
21898 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
21899 0 : return -1;
21900 : }
21901 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
21902 0 : if (unicode != NULL) {
21903 0 : Py_DECREF(unicode);
21904 : }
21905 0 : if (talloc_str == NULL) {
21906 0 : PyErr_NoMemory();
21907 0 : return -1;
21908 : }
21909 0 : object->pszDataFile = talloc_str;
21910 : }
21911 : }
21912 0 : return 0;
21913 : }
21914 :
21915 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fDsIntegrated(PyObject *obj, void *closure)
21916 : {
21917 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21918 0 : PyObject *py_fDsIntegrated;
21919 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)object->fDsIntegrated);
21920 0 : return py_fDsIntegrated;
21921 : }
21922 :
21923 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
21924 : {
21925 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21926 0 : if (value == NULL) {
21927 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDsIntegrated");
21928 0 : return -1;
21929 : }
21930 : {
21931 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
21932 0 : if (PyLong_Check(value)) {
21933 0 : unsigned long long test_var;
21934 0 : test_var = PyLong_AsUnsignedLongLong(value);
21935 0 : if (PyErr_Occurred() != NULL) {
21936 0 : return -1;
21937 : }
21938 0 : if (test_var > uint_max) {
21939 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21940 : PyLong_Type.tp_name, uint_max, test_var);
21941 0 : return -1;
21942 : }
21943 0 : object->fDsIntegrated = test_var;
21944 : } else {
21945 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21946 : PyLong_Type.tp_name);
21947 0 : return -1;
21948 : }
21949 : }
21950 0 : return 0;
21951 : }
21952 :
21953 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fLoadExisting(PyObject *obj, void *closure)
21954 : {
21955 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21956 0 : PyObject *py_fLoadExisting;
21957 0 : py_fLoadExisting = PyLong_FromUnsignedLongLong((uint32_t)object->fLoadExisting);
21958 0 : return py_fLoadExisting;
21959 : }
21960 :
21961 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
21962 : {
21963 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
21964 0 : if (value == NULL) {
21965 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLoadExisting");
21966 0 : return -1;
21967 : }
21968 : {
21969 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLoadExisting));
21970 0 : if (PyLong_Check(value)) {
21971 0 : unsigned long long test_var;
21972 0 : test_var = PyLong_AsUnsignedLongLong(value);
21973 0 : if (PyErr_Occurred() != NULL) {
21974 0 : return -1;
21975 : }
21976 0 : if (test_var > uint_max) {
21977 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
21978 : PyLong_Type.tp_name, uint_max, test_var);
21979 0 : return -1;
21980 : }
21981 0 : object->fLoadExisting = test_var;
21982 : } else {
21983 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
21984 : PyLong_Type.tp_name);
21985 0 : return -1;
21986 : }
21987 : }
21988 0 : return 0;
21989 : }
21990 :
21991 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszAdmin(PyObject *obj, void *closure)
21992 : {
21993 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
21994 0 : PyObject *py_pszAdmin;
21995 0 : if (object->pszAdmin == NULL) {
21996 0 : Py_RETURN_NONE;
21997 : }
21998 0 : if (object->pszAdmin == NULL) {
21999 0 : py_pszAdmin = Py_None;
22000 0 : Py_INCREF(py_pszAdmin);
22001 : } else {
22002 0 : if (object->pszAdmin == NULL) {
22003 0 : py_pszAdmin = Py_None;
22004 0 : Py_INCREF(py_pszAdmin);
22005 : } else {
22006 0 : py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
22007 : }
22008 : }
22009 0 : return py_pszAdmin;
22010 : }
22011 :
22012 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
22013 : {
22014 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22015 0 : if (value == NULL) {
22016 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszAdmin");
22017 0 : return -1;
22018 : }
22019 0 : if (value == Py_None) {
22020 0 : object->pszAdmin = NULL;
22021 : } else {
22022 0 : object->pszAdmin = NULL;
22023 : {
22024 0 : const char *test_str;
22025 0 : const char *talloc_str;
22026 0 : PyObject *unicode = NULL;
22027 0 : if (PyUnicode_Check(value)) {
22028 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22029 0 : if (unicode == NULL) {
22030 0 : PyErr_NoMemory();
22031 0 : return -1;
22032 : }
22033 0 : test_str = PyBytes_AS_STRING(unicode);
22034 0 : } else if (PyBytes_Check(value)) {
22035 0 : test_str = PyBytes_AS_STRING(value);
22036 : } else {
22037 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22038 0 : return -1;
22039 : }
22040 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22041 0 : if (unicode != NULL) {
22042 0 : Py_DECREF(unicode);
22043 : }
22044 0 : if (talloc_str == NULL) {
22045 0 : PyErr_NoMemory();
22046 0 : return -1;
22047 : }
22048 0 : object->pszAdmin = talloc_str;
22049 : }
22050 : }
22051 0 : return 0;
22052 : }
22053 :
22054 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipMasters(PyObject *obj, void *closure)
22055 : {
22056 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22057 0 : PyObject *py_aipMasters;
22058 0 : if (object->aipMasters == NULL) {
22059 0 : Py_RETURN_NONE;
22060 : }
22061 0 : if (object->aipMasters == NULL) {
22062 0 : py_aipMasters = Py_None;
22063 0 : Py_INCREF(py_aipMasters);
22064 : } else {
22065 0 : py_aipMasters = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipMasters, object->aipMasters);
22066 : }
22067 0 : return py_aipMasters;
22068 : }
22069 :
22070 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
22071 : {
22072 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22073 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
22074 0 : if (value == NULL) {
22075 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipMasters");
22076 0 : return -1;
22077 : }
22078 0 : if (value == Py_None) {
22079 0 : object->aipMasters = NULL;
22080 : } else {
22081 0 : object->aipMasters = NULL;
22082 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
22083 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22084 0 : PyErr_NoMemory();
22085 0 : return -1;
22086 : }
22087 0 : object->aipMasters = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
22088 : }
22089 0 : return 0;
22090 : }
22091 :
22092 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipSecondaries(PyObject *obj, void *closure)
22093 : {
22094 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22095 0 : PyObject *py_aipSecondaries;
22096 0 : if (object->aipSecondaries == NULL) {
22097 0 : Py_RETURN_NONE;
22098 : }
22099 0 : if (object->aipSecondaries == NULL) {
22100 0 : py_aipSecondaries = Py_None;
22101 0 : Py_INCREF(py_aipSecondaries);
22102 : } else {
22103 0 : py_aipSecondaries = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
22104 : }
22105 0 : return py_aipSecondaries;
22106 : }
22107 :
22108 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
22109 : {
22110 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22111 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
22112 0 : if (value == NULL) {
22113 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
22114 0 : return -1;
22115 : }
22116 0 : if (value == Py_None) {
22117 0 : object->aipSecondaries = NULL;
22118 : } else {
22119 0 : object->aipSecondaries = NULL;
22120 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
22121 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
22122 0 : PyErr_NoMemory();
22123 0 : return -1;
22124 : }
22125 0 : object->aipSecondaries = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
22126 : }
22127 0 : return 0;
22128 : }
22129 :
22130 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fSecureSecondaries(PyObject *obj, void *closure)
22131 : {
22132 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22133 0 : PyObject *py_fSecureSecondaries;
22134 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
22135 0 : return py_fSecureSecondaries;
22136 : }
22137 :
22138 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
22139 : {
22140 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22141 0 : if (value == NULL) {
22142 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
22143 0 : return -1;
22144 : }
22145 : {
22146 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
22147 0 : if (PyLong_Check(value)) {
22148 0 : unsigned long long test_var;
22149 0 : test_var = PyLong_AsUnsignedLongLong(value);
22150 0 : if (PyErr_Occurred() != NULL) {
22151 0 : return -1;
22152 : }
22153 0 : if (test_var > uint_max) {
22154 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22155 : PyLong_Type.tp_name, uint_max, test_var);
22156 0 : return -1;
22157 : }
22158 0 : object->fSecureSecondaries = test_var;
22159 : } else {
22160 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22161 : PyLong_Type.tp_name);
22162 0 : return -1;
22163 : }
22164 : }
22165 0 : return 0;
22166 : }
22167 :
22168 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fNotifyLevel(PyObject *obj, void *closure)
22169 : {
22170 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22171 0 : PyObject *py_fNotifyLevel;
22172 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
22173 0 : return py_fNotifyLevel;
22174 : }
22175 :
22176 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
22177 : {
22178 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22179 0 : if (value == NULL) {
22180 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
22181 0 : return -1;
22182 : }
22183 : {
22184 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
22185 0 : if (PyLong_Check(value)) {
22186 0 : unsigned long long test_var;
22187 0 : test_var = PyLong_AsUnsignedLongLong(value);
22188 0 : if (PyErr_Occurred() != NULL) {
22189 0 : return -1;
22190 : }
22191 0 : if (test_var > uint_max) {
22192 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22193 : PyLong_Type.tp_name, uint_max, test_var);
22194 0 : return -1;
22195 : }
22196 0 : object->fNotifyLevel = test_var;
22197 : } else {
22198 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22199 : PyLong_Type.tp_name);
22200 0 : return -1;
22201 : }
22202 : }
22203 0 : return 0;
22204 : }
22205 :
22206 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwTimeout(PyObject *obj, void *closure)
22207 : {
22208 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22209 0 : PyObject *py_dwTimeout;
22210 0 : py_dwTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwTimeout);
22211 0 : return py_dwTimeout;
22212 : }
22213 :
22214 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwTimeout(PyObject *py_obj, PyObject *value, void *closure)
22215 : {
22216 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22217 0 : if (value == NULL) {
22218 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwTimeout");
22219 0 : return -1;
22220 : }
22221 : {
22222 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwTimeout));
22223 0 : if (PyLong_Check(value)) {
22224 0 : unsigned long long test_var;
22225 0 : test_var = PyLong_AsUnsignedLongLong(value);
22226 0 : if (PyErr_Occurred() != NULL) {
22227 0 : return -1;
22228 : }
22229 0 : if (test_var > uint_max) {
22230 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22231 : PyLong_Type.tp_name, uint_max, test_var);
22232 0 : return -1;
22233 : }
22234 0 : object->dwTimeout = test_var;
22235 : } else {
22236 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22237 : PyLong_Type.tp_name);
22238 0 : return -1;
22239 : }
22240 : }
22241 0 : return 0;
22242 : }
22243 :
22244 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
22245 : {
22246 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22247 0 : PyObject *py_fRecurseAfterForwarding;
22248 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)object->fRecurseAfterForwarding);
22249 0 : return py_fRecurseAfterForwarding;
22250 : }
22251 :
22252 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
22253 : {
22254 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22255 0 : if (value == NULL) {
22256 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRecurseAfterForwarding");
22257 0 : return -1;
22258 : }
22259 : {
22260 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
22261 0 : if (PyLong_Check(value)) {
22262 0 : unsigned long long test_var;
22263 0 : test_var = PyLong_AsUnsignedLongLong(value);
22264 0 : if (PyErr_Occurred() != NULL) {
22265 0 : return -1;
22266 : }
22267 0 : if (test_var > uint_max) {
22268 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22269 : PyLong_Type.tp_name, uint_max, test_var);
22270 0 : return -1;
22271 : }
22272 0 : object->fRecurseAfterForwarding = test_var;
22273 : } else {
22274 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22275 : PyLong_Type.tp_name);
22276 0 : return -1;
22277 : }
22278 : }
22279 0 : return 0;
22280 : }
22281 :
22282 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwDpFlags(PyObject *obj, void *closure)
22283 : {
22284 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22285 0 : PyObject *py_dwDpFlags;
22286 0 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwDpFlags);
22287 0 : return py_dwDpFlags;
22288 : }
22289 :
22290 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
22291 : {
22292 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22293 0 : if (value == NULL) {
22294 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDpFlags");
22295 0 : return -1;
22296 : }
22297 : {
22298 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
22299 0 : if (PyLong_Check(value)) {
22300 0 : unsigned long long test_var;
22301 0 : test_var = PyLong_AsUnsignedLongLong(value);
22302 0 : if (PyErr_Occurred() != NULL) {
22303 0 : return -1;
22304 : }
22305 0 : if (test_var > uint_max) {
22306 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22307 : PyLong_Type.tp_name, uint_max, test_var);
22308 0 : return -1;
22309 : }
22310 0 : object->dwDpFlags = test_var;
22311 : } else {
22312 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22313 : PyLong_Type.tp_name);
22314 0 : return -1;
22315 : }
22316 : }
22317 0 : return 0;
22318 : }
22319 :
22320 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDpFqdn(PyObject *obj, void *closure)
22321 : {
22322 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22323 0 : PyObject *py_pszDpFqdn;
22324 0 : if (object->pszDpFqdn == NULL) {
22325 0 : Py_RETURN_NONE;
22326 : }
22327 0 : if (object->pszDpFqdn == NULL) {
22328 0 : py_pszDpFqdn = Py_None;
22329 0 : Py_INCREF(py_pszDpFqdn);
22330 : } else {
22331 0 : if (object->pszDpFqdn == NULL) {
22332 0 : py_pszDpFqdn = Py_None;
22333 0 : Py_INCREF(py_pszDpFqdn);
22334 : } else {
22335 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
22336 : }
22337 : }
22338 0 : return py_pszDpFqdn;
22339 : }
22340 :
22341 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
22342 : {
22343 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22344 0 : if (value == NULL) {
22345 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpFqdn");
22346 0 : return -1;
22347 : }
22348 0 : if (value == Py_None) {
22349 0 : object->pszDpFqdn = NULL;
22350 : } else {
22351 0 : object->pszDpFqdn = NULL;
22352 : {
22353 0 : const char *test_str;
22354 0 : const char *talloc_str;
22355 0 : PyObject *unicode = NULL;
22356 0 : if (PyUnicode_Check(value)) {
22357 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22358 0 : if (unicode == NULL) {
22359 0 : PyErr_NoMemory();
22360 0 : return -1;
22361 : }
22362 0 : test_str = PyBytes_AS_STRING(unicode);
22363 0 : } else if (PyBytes_Check(value)) {
22364 0 : test_str = PyBytes_AS_STRING(value);
22365 : } else {
22366 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22367 0 : return -1;
22368 : }
22369 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22370 0 : if (unicode != NULL) {
22371 0 : Py_DECREF(unicode);
22372 : }
22373 0 : if (talloc_str == NULL) {
22374 0 : PyErr_NoMemory();
22375 0 : return -1;
22376 : }
22377 0 : object->pszDpFqdn = talloc_str;
22378 : }
22379 : }
22380 0 : return 0;
22381 : }
22382 :
22383 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved(PyObject *obj, void *closure)
22384 : {
22385 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(obj);
22386 0 : PyObject *py_dwReserved;
22387 0 : py_dwReserved = PyList_New(32);
22388 0 : if (py_dwReserved == NULL) {
22389 0 : return NULL;
22390 : }
22391 : {
22392 : int dwReserved_cntr_0;
22393 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < (32); dwReserved_cntr_0++) {
22394 0 : PyObject *py_dwReserved_0;
22395 0 : py_dwReserved_0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved[dwReserved_cntr_0]);
22396 0 : PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
22397 : }
22398 : }
22399 0 : return py_dwReserved;
22400 : }
22401 :
22402 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
22403 : {
22404 0 : struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *object = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(py_obj);
22405 0 : if (value == NULL) {
22406 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved");
22407 0 : return -1;
22408 : }
22409 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
22410 : {
22411 0 : int dwReserved_cntr_0;
22412 0 : if (ARRAY_SIZE(object->dwReserved) != PyList_GET_SIZE(value)) {
22413 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->dwReserved), PyList_GET_SIZE(value));
22414 0 : return -1;
22415 : }
22416 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
22417 0 : if (PyList_GET_ITEM(value, dwReserved_cntr_0) == NULL) {
22418 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved[dwReserved_cntr_0]");
22419 0 : return -1;
22420 : }
22421 : {
22422 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved[dwReserved_cntr_0]));
22423 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserved_cntr_0))) {
22424 0 : unsigned long long test_var;
22425 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
22426 0 : if (PyErr_Occurred() != NULL) {
22427 0 : return -1;
22428 : }
22429 0 : if (test_var > uint_max) {
22430 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22431 : PyLong_Type.tp_name, uint_max, test_var);
22432 0 : return -1;
22433 : }
22434 0 : object->dwReserved[dwReserved_cntr_0] = test_var;
22435 : } else {
22436 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22437 : PyLong_Type.tp_name);
22438 0 : return -1;
22439 : }
22440 : }
22441 : }
22442 : }
22443 0 : return 0;
22444 : }
22445 :
22446 : static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_getsetters[] = {
22447 : {
22448 : .name = discard_const_p(char, "dwRpcStructureVersion"),
22449 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwRpcStructureVersion,
22450 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwRpcStructureVersion,
22451 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22452 : },
22453 : {
22454 : .name = discard_const_p(char, "dwReserved0"),
22455 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved0,
22456 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved0,
22457 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22458 : },
22459 : {
22460 : .name = discard_const_p(char, "pszZoneName"),
22461 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszZoneName,
22462 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszZoneName,
22463 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22464 : },
22465 : {
22466 : .name = discard_const_p(char, "dwZoneType"),
22467 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwZoneType,
22468 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwZoneType,
22469 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22470 : },
22471 : {
22472 : .name = discard_const_p(char, "fAllowUpdate"),
22473 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAllowUpdate,
22474 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAllowUpdate,
22475 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
22476 : },
22477 : {
22478 : .name = discard_const_p(char, "fAging"),
22479 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fAging,
22480 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fAging,
22481 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22482 : },
22483 : {
22484 : .name = discard_const_p(char, "dwFlags"),
22485 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwFlags,
22486 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwFlags,
22487 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22488 : },
22489 : {
22490 : .name = discard_const_p(char, "pszDataFile"),
22491 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDataFile,
22492 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDataFile,
22493 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22494 : },
22495 : {
22496 : .name = discard_const_p(char, "fDsIntegrated"),
22497 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fDsIntegrated,
22498 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fDsIntegrated,
22499 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22500 : },
22501 : {
22502 : .name = discard_const_p(char, "fLoadExisting"),
22503 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fLoadExisting,
22504 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fLoadExisting,
22505 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22506 : },
22507 : {
22508 : .name = discard_const_p(char, "pszAdmin"),
22509 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszAdmin,
22510 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszAdmin,
22511 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22512 : },
22513 : {
22514 : .name = discard_const_p(char, "aipMasters"),
22515 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipMasters,
22516 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipMasters,
22517 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
22518 : },
22519 : {
22520 : .name = discard_const_p(char, "aipSecondaries"),
22521 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_aipSecondaries,
22522 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_aipSecondaries,
22523 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
22524 : },
22525 : {
22526 : .name = discard_const_p(char, "fSecureSecondaries"),
22527 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fSecureSecondaries,
22528 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fSecureSecondaries,
22529 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
22530 : },
22531 : {
22532 : .name = discard_const_p(char, "fNotifyLevel"),
22533 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fNotifyLevel,
22534 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fNotifyLevel,
22535 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
22536 : },
22537 : {
22538 : .name = discard_const_p(char, "dwTimeout"),
22539 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwTimeout,
22540 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwTimeout,
22541 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22542 : },
22543 : {
22544 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
22545 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_fRecurseAfterForwarding,
22546 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_fRecurseAfterForwarding,
22547 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22548 : },
22549 : {
22550 : .name = discard_const_p(char, "dwDpFlags"),
22551 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwDpFlags,
22552 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwDpFlags,
22553 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22554 : },
22555 : {
22556 : .name = discard_const_p(char, "pszDpFqdn"),
22557 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_pszDpFqdn,
22558 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_pszDpFqdn,
22559 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
22560 : },
22561 : {
22562 : .name = discard_const_p(char, "dwReserved"),
22563 : .get = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_get_dwReserved,
22564 : .set = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_set_dwReserved,
22565 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
22566 : },
22567 : { .name = NULL }
22568 : };
22569 :
22570 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
22571 : {
22572 0 : return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_DOTNET, type);
22573 : }
22574 :
22575 :
22576 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type = {
22577 : PyVarObject_HEAD_INIT(NULL, 0)
22578 : .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_DOTNET",
22579 : .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_getsetters,
22580 : .tp_methods = NULL,
22581 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
22582 : .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_DOTNET_new,
22583 : };
22584 :
22585 :
22586 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
22587 : {
22588 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22589 0 : PyObject *py_dwRpcStructureVersion;
22590 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
22591 0 : return py_dwRpcStructureVersion;
22592 : }
22593 :
22594 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
22595 : {
22596 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22597 0 : if (value == NULL) {
22598 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
22599 0 : return -1;
22600 : }
22601 : {
22602 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
22603 0 : if (PyLong_Check(value)) {
22604 0 : unsigned long long test_var;
22605 0 : test_var = PyLong_AsUnsignedLongLong(value);
22606 0 : if (PyErr_Occurred() != NULL) {
22607 0 : return -1;
22608 : }
22609 0 : if (test_var > uint_max) {
22610 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22611 : PyLong_Type.tp_name, uint_max, test_var);
22612 0 : return -1;
22613 : }
22614 0 : object->dwRpcStructureVersion = test_var;
22615 : } else {
22616 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22617 : PyLong_Type.tp_name);
22618 0 : return -1;
22619 : }
22620 : }
22621 0 : return 0;
22622 : }
22623 :
22624 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
22625 : {
22626 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22627 0 : PyObject *py_dwReserved0;
22628 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
22629 0 : return py_dwReserved0;
22630 : }
22631 :
22632 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
22633 : {
22634 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22635 0 : if (value == NULL) {
22636 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
22637 0 : return -1;
22638 : }
22639 : {
22640 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
22641 0 : if (PyLong_Check(value)) {
22642 0 : unsigned long long test_var;
22643 0 : test_var = PyLong_AsUnsignedLongLong(value);
22644 0 : if (PyErr_Occurred() != NULL) {
22645 0 : return -1;
22646 : }
22647 0 : if (test_var > uint_max) {
22648 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22649 : PyLong_Type.tp_name, uint_max, test_var);
22650 0 : return -1;
22651 : }
22652 0 : object->dwReserved0 = test_var;
22653 : } else {
22654 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22655 : PyLong_Type.tp_name);
22656 0 : return -1;
22657 : }
22658 : }
22659 0 : return 0;
22660 : }
22661 :
22662 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszZoneName(PyObject *obj, void *closure)
22663 : {
22664 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22665 0 : PyObject *py_pszZoneName;
22666 0 : if (object->pszZoneName == NULL) {
22667 0 : Py_RETURN_NONE;
22668 : }
22669 0 : if (object->pszZoneName == NULL) {
22670 0 : py_pszZoneName = Py_None;
22671 0 : Py_INCREF(py_pszZoneName);
22672 : } else {
22673 0 : if (object->pszZoneName == NULL) {
22674 0 : py_pszZoneName = Py_None;
22675 0 : Py_INCREF(py_pszZoneName);
22676 : } else {
22677 0 : py_pszZoneName = PyUnicode_Decode(object->pszZoneName, strlen(object->pszZoneName), "utf-8", "ignore");
22678 : }
22679 : }
22680 0 : return py_pszZoneName;
22681 : }
22682 :
22683 427 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszZoneName(PyObject *py_obj, PyObject *value, void *closure)
22684 : {
22685 427 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22686 427 : if (value == NULL) {
22687 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneName");
22688 0 : return -1;
22689 : }
22690 427 : if (value == Py_None) {
22691 0 : object->pszZoneName = NULL;
22692 : } else {
22693 427 : object->pszZoneName = NULL;
22694 : {
22695 0 : const char *test_str;
22696 0 : const char *talloc_str;
22697 427 : PyObject *unicode = NULL;
22698 427 : if (PyUnicode_Check(value)) {
22699 427 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22700 427 : if (unicode == NULL) {
22701 0 : PyErr_NoMemory();
22702 0 : return -1;
22703 : }
22704 427 : test_str = PyBytes_AS_STRING(unicode);
22705 0 : } else if (PyBytes_Check(value)) {
22706 0 : test_str = PyBytes_AS_STRING(value);
22707 : } else {
22708 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22709 0 : return -1;
22710 : }
22711 427 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22712 427 : if (unicode != NULL) {
22713 427 : Py_DECREF(unicode);
22714 : }
22715 427 : if (talloc_str == NULL) {
22716 0 : PyErr_NoMemory();
22717 0 : return -1;
22718 : }
22719 427 : object->pszZoneName = talloc_str;
22720 : }
22721 : }
22722 427 : return 0;
22723 : }
22724 :
22725 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwZoneType(PyObject *obj, void *closure)
22726 : {
22727 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22728 0 : PyObject *py_dwZoneType;
22729 0 : py_dwZoneType = PyLong_FromUnsignedLongLong((uint32_t)object->dwZoneType);
22730 0 : return py_dwZoneType;
22731 : }
22732 :
22733 427 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwZoneType(PyObject *py_obj, PyObject *value, void *closure)
22734 : {
22735 427 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22736 427 : if (value == NULL) {
22737 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwZoneType");
22738 0 : return -1;
22739 : }
22740 : {
22741 427 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwZoneType));
22742 427 : if (PyLong_Check(value)) {
22743 0 : unsigned long long test_var;
22744 427 : test_var = PyLong_AsUnsignedLongLong(value);
22745 427 : if (PyErr_Occurred() != NULL) {
22746 0 : return -1;
22747 : }
22748 427 : if (test_var > uint_max) {
22749 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22750 : PyLong_Type.tp_name, uint_max, test_var);
22751 0 : return -1;
22752 : }
22753 427 : object->dwZoneType = test_var;
22754 : } else {
22755 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22756 : PyLong_Type.tp_name);
22757 0 : return -1;
22758 : }
22759 : }
22760 427 : return 0;
22761 : }
22762 :
22763 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAllowUpdate(PyObject *obj, void *closure)
22764 : {
22765 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22766 0 : PyObject *py_fAllowUpdate;
22767 0 : py_fAllowUpdate = PyLong_FromLong((uint16_t)object->fAllowUpdate);
22768 0 : return py_fAllowUpdate;
22769 : }
22770 :
22771 330 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAllowUpdate(PyObject *py_obj, PyObject *value, void *closure)
22772 : {
22773 330 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22774 330 : if (value == NULL) {
22775 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAllowUpdate");
22776 0 : return -1;
22777 : }
22778 : {
22779 330 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAllowUpdate));
22780 330 : if (PyLong_Check(value)) {
22781 0 : unsigned long long test_var;
22782 330 : test_var = PyLong_AsUnsignedLongLong(value);
22783 330 : if (PyErr_Occurred() != NULL) {
22784 0 : return -1;
22785 : }
22786 330 : if (test_var > uint_max) {
22787 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22788 : PyLong_Type.tp_name, uint_max, test_var);
22789 0 : return -1;
22790 : }
22791 330 : object->fAllowUpdate = test_var;
22792 : } else {
22793 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22794 : PyLong_Type.tp_name);
22795 0 : return -1;
22796 : }
22797 : }
22798 330 : return 0;
22799 : }
22800 :
22801 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAging(PyObject *obj, void *closure)
22802 : {
22803 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22804 0 : PyObject *py_fAging;
22805 0 : py_fAging = PyLong_FromUnsignedLongLong((uint32_t)object->fAging);
22806 0 : return py_fAging;
22807 : }
22808 :
22809 427 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAging(PyObject *py_obj, PyObject *value, void *closure)
22810 : {
22811 427 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22812 427 : if (value == NULL) {
22813 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fAging");
22814 0 : return -1;
22815 : }
22816 : {
22817 427 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fAging));
22818 427 : if (PyLong_Check(value)) {
22819 0 : unsigned long long test_var;
22820 427 : test_var = PyLong_AsUnsignedLongLong(value);
22821 427 : if (PyErr_Occurred() != NULL) {
22822 0 : return -1;
22823 : }
22824 427 : if (test_var > uint_max) {
22825 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22826 : PyLong_Type.tp_name, uint_max, test_var);
22827 0 : return -1;
22828 : }
22829 427 : object->fAging = test_var;
22830 : } else {
22831 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22832 : PyLong_Type.tp_name);
22833 0 : return -1;
22834 : }
22835 : }
22836 427 : return 0;
22837 : }
22838 :
22839 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwFlags(PyObject *obj, void *closure)
22840 : {
22841 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22842 0 : PyObject *py_dwFlags;
22843 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwFlags);
22844 0 : return py_dwFlags;
22845 : }
22846 :
22847 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
22848 : {
22849 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22850 0 : if (value == NULL) {
22851 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFlags");
22852 0 : return -1;
22853 : }
22854 : {
22855 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
22856 0 : if (PyLong_Check(value)) {
22857 0 : unsigned long long test_var;
22858 0 : test_var = PyLong_AsUnsignedLongLong(value);
22859 0 : if (PyErr_Occurred() != NULL) {
22860 0 : return -1;
22861 : }
22862 0 : if (test_var > uint_max) {
22863 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22864 : PyLong_Type.tp_name, uint_max, test_var);
22865 0 : return -1;
22866 : }
22867 0 : object->dwFlags = test_var;
22868 : } else {
22869 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22870 : PyLong_Type.tp_name);
22871 0 : return -1;
22872 : }
22873 : }
22874 0 : return 0;
22875 : }
22876 :
22877 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDataFile(PyObject *obj, void *closure)
22878 : {
22879 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22880 0 : PyObject *py_pszDataFile;
22881 0 : if (object->pszDataFile == NULL) {
22882 0 : Py_RETURN_NONE;
22883 : }
22884 0 : if (object->pszDataFile == NULL) {
22885 0 : py_pszDataFile = Py_None;
22886 0 : Py_INCREF(py_pszDataFile);
22887 : } else {
22888 0 : if (object->pszDataFile == NULL) {
22889 0 : py_pszDataFile = Py_None;
22890 0 : Py_INCREF(py_pszDataFile);
22891 : } else {
22892 0 : py_pszDataFile = PyUnicode_Decode(object->pszDataFile, strlen(object->pszDataFile), "utf-8", "ignore");
22893 : }
22894 : }
22895 0 : return py_pszDataFile;
22896 : }
22897 :
22898 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDataFile(PyObject *py_obj, PyObject *value, void *closure)
22899 : {
22900 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22901 0 : if (value == NULL) {
22902 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDataFile");
22903 0 : return -1;
22904 : }
22905 0 : if (value == Py_None) {
22906 0 : object->pszDataFile = NULL;
22907 : } else {
22908 0 : object->pszDataFile = NULL;
22909 : {
22910 0 : const char *test_str;
22911 0 : const char *talloc_str;
22912 0 : PyObject *unicode = NULL;
22913 0 : if (PyUnicode_Check(value)) {
22914 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
22915 0 : if (unicode == NULL) {
22916 0 : PyErr_NoMemory();
22917 0 : return -1;
22918 : }
22919 0 : test_str = PyBytes_AS_STRING(unicode);
22920 0 : } else if (PyBytes_Check(value)) {
22921 0 : test_str = PyBytes_AS_STRING(value);
22922 : } else {
22923 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
22924 0 : return -1;
22925 : }
22926 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
22927 0 : if (unicode != NULL) {
22928 0 : Py_DECREF(unicode);
22929 : }
22930 0 : if (talloc_str == NULL) {
22931 0 : PyErr_NoMemory();
22932 0 : return -1;
22933 : }
22934 0 : object->pszDataFile = talloc_str;
22935 : }
22936 : }
22937 0 : return 0;
22938 : }
22939 :
22940 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fDsIntegrated(PyObject *obj, void *closure)
22941 : {
22942 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22943 0 : PyObject *py_fDsIntegrated;
22944 0 : py_fDsIntegrated = PyLong_FromUnsignedLongLong((uint32_t)object->fDsIntegrated);
22945 0 : return py_fDsIntegrated;
22946 : }
22947 :
22948 424 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fDsIntegrated(PyObject *py_obj, PyObject *value, void *closure)
22949 : {
22950 424 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22951 424 : if (value == NULL) {
22952 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fDsIntegrated");
22953 0 : return -1;
22954 : }
22955 : {
22956 424 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fDsIntegrated));
22957 424 : if (PyLong_Check(value)) {
22958 0 : unsigned long long test_var;
22959 424 : test_var = PyLong_AsUnsignedLongLong(value);
22960 424 : if (PyErr_Occurred() != NULL) {
22961 0 : return -1;
22962 : }
22963 424 : if (test_var > uint_max) {
22964 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
22965 : PyLong_Type.tp_name, uint_max, test_var);
22966 0 : return -1;
22967 : }
22968 424 : object->fDsIntegrated = test_var;
22969 : } else {
22970 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
22971 : PyLong_Type.tp_name);
22972 0 : return -1;
22973 : }
22974 : }
22975 424 : return 0;
22976 : }
22977 :
22978 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fLoadExisting(PyObject *obj, void *closure)
22979 : {
22980 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
22981 0 : PyObject *py_fLoadExisting;
22982 0 : py_fLoadExisting = PyLong_FromUnsignedLongLong((uint32_t)object->fLoadExisting);
22983 0 : return py_fLoadExisting;
22984 : }
22985 :
22986 424 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fLoadExisting(PyObject *py_obj, PyObject *value, void *closure)
22987 : {
22988 424 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
22989 424 : if (value == NULL) {
22990 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fLoadExisting");
22991 0 : return -1;
22992 : }
22993 : {
22994 424 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fLoadExisting));
22995 424 : if (PyLong_Check(value)) {
22996 0 : unsigned long long test_var;
22997 424 : test_var = PyLong_AsUnsignedLongLong(value);
22998 424 : if (PyErr_Occurred() != NULL) {
22999 0 : return -1;
23000 : }
23001 424 : if (test_var > uint_max) {
23002 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23003 : PyLong_Type.tp_name, uint_max, test_var);
23004 0 : return -1;
23005 : }
23006 424 : object->fLoadExisting = test_var;
23007 : } else {
23008 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23009 : PyLong_Type.tp_name);
23010 0 : return -1;
23011 : }
23012 : }
23013 424 : return 0;
23014 : }
23015 :
23016 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszAdmin(PyObject *obj, void *closure)
23017 : {
23018 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23019 0 : PyObject *py_pszAdmin;
23020 0 : if (object->pszAdmin == NULL) {
23021 0 : Py_RETURN_NONE;
23022 : }
23023 0 : if (object->pszAdmin == NULL) {
23024 0 : py_pszAdmin = Py_None;
23025 0 : Py_INCREF(py_pszAdmin);
23026 : } else {
23027 0 : if (object->pszAdmin == NULL) {
23028 0 : py_pszAdmin = Py_None;
23029 0 : Py_INCREF(py_pszAdmin);
23030 : } else {
23031 0 : py_pszAdmin = PyUnicode_Decode(object->pszAdmin, strlen(object->pszAdmin), "utf-8", "ignore");
23032 : }
23033 : }
23034 0 : return py_pszAdmin;
23035 : }
23036 :
23037 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszAdmin(PyObject *py_obj, PyObject *value, void *closure)
23038 : {
23039 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23040 0 : if (value == NULL) {
23041 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszAdmin");
23042 0 : return -1;
23043 : }
23044 0 : if (value == Py_None) {
23045 0 : object->pszAdmin = NULL;
23046 : } else {
23047 0 : object->pszAdmin = NULL;
23048 : {
23049 0 : const char *test_str;
23050 0 : const char *talloc_str;
23051 0 : PyObject *unicode = NULL;
23052 0 : if (PyUnicode_Check(value)) {
23053 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
23054 0 : if (unicode == NULL) {
23055 0 : PyErr_NoMemory();
23056 0 : return -1;
23057 : }
23058 0 : test_str = PyBytes_AS_STRING(unicode);
23059 0 : } else if (PyBytes_Check(value)) {
23060 0 : test_str = PyBytes_AS_STRING(value);
23061 : } else {
23062 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
23063 0 : return -1;
23064 : }
23065 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
23066 0 : if (unicode != NULL) {
23067 0 : Py_DECREF(unicode);
23068 : }
23069 0 : if (talloc_str == NULL) {
23070 0 : PyErr_NoMemory();
23071 0 : return -1;
23072 : }
23073 0 : object->pszAdmin = talloc_str;
23074 : }
23075 : }
23076 0 : return 0;
23077 : }
23078 :
23079 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipMasters(PyObject *obj, void *closure)
23080 : {
23081 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23082 0 : PyObject *py_aipMasters;
23083 0 : if (object->aipMasters == NULL) {
23084 0 : Py_RETURN_NONE;
23085 : }
23086 0 : if (object->aipMasters == NULL) {
23087 0 : py_aipMasters = Py_None;
23088 0 : Py_INCREF(py_aipMasters);
23089 : } else {
23090 0 : py_aipMasters = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipMasters, object->aipMasters);
23091 : }
23092 0 : return py_aipMasters;
23093 : }
23094 :
23095 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipMasters(PyObject *py_obj, PyObject *value, void *closure)
23096 : {
23097 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23098 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipMasters));
23099 0 : if (value == NULL) {
23100 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipMasters");
23101 0 : return -1;
23102 : }
23103 0 : if (value == Py_None) {
23104 0 : object->aipMasters = NULL;
23105 : } else {
23106 0 : object->aipMasters = NULL;
23107 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
23108 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23109 0 : PyErr_NoMemory();
23110 0 : return -1;
23111 : }
23112 0 : object->aipMasters = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
23113 : }
23114 0 : return 0;
23115 : }
23116 :
23117 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipSecondaries(PyObject *obj, void *closure)
23118 : {
23119 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23120 0 : PyObject *py_aipSecondaries;
23121 0 : if (object->aipSecondaries == NULL) {
23122 0 : Py_RETURN_NONE;
23123 : }
23124 0 : if (object->aipSecondaries == NULL) {
23125 0 : py_aipSecondaries = Py_None;
23126 0 : Py_INCREF(py_aipSecondaries);
23127 : } else {
23128 0 : py_aipSecondaries = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipSecondaries, object->aipSecondaries);
23129 : }
23130 0 : return py_aipSecondaries;
23131 : }
23132 :
23133 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipSecondaries(PyObject *py_obj, PyObject *value, void *closure)
23134 : {
23135 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23136 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipSecondaries));
23137 0 : if (value == NULL) {
23138 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipSecondaries");
23139 0 : return -1;
23140 : }
23141 0 : if (value == Py_None) {
23142 0 : object->aipSecondaries = NULL;
23143 : } else {
23144 0 : object->aipSecondaries = NULL;
23145 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
23146 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
23147 0 : PyErr_NoMemory();
23148 0 : return -1;
23149 : }
23150 0 : object->aipSecondaries = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
23151 : }
23152 0 : return 0;
23153 : }
23154 :
23155 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fSecureSecondaries(PyObject *obj, void *closure)
23156 : {
23157 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23158 0 : PyObject *py_fSecureSecondaries;
23159 0 : py_fSecureSecondaries = PyLong_FromUnsignedLongLong((uint32_t)object->fSecureSecondaries);
23160 0 : return py_fSecureSecondaries;
23161 : }
23162 :
23163 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fSecureSecondaries(PyObject *py_obj, PyObject *value, void *closure)
23164 : {
23165 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23166 0 : if (value == NULL) {
23167 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fSecureSecondaries");
23168 0 : return -1;
23169 : }
23170 : {
23171 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fSecureSecondaries));
23172 0 : if (PyLong_Check(value)) {
23173 0 : unsigned long long test_var;
23174 0 : test_var = PyLong_AsUnsignedLongLong(value);
23175 0 : if (PyErr_Occurred() != NULL) {
23176 0 : return -1;
23177 : }
23178 0 : if (test_var > uint_max) {
23179 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23180 : PyLong_Type.tp_name, uint_max, test_var);
23181 0 : return -1;
23182 : }
23183 0 : object->fSecureSecondaries = test_var;
23184 : } else {
23185 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23186 : PyLong_Type.tp_name);
23187 0 : return -1;
23188 : }
23189 : }
23190 0 : return 0;
23191 : }
23192 :
23193 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fNotifyLevel(PyObject *obj, void *closure)
23194 : {
23195 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23196 0 : PyObject *py_fNotifyLevel;
23197 0 : py_fNotifyLevel = PyLong_FromUnsignedLongLong((uint32_t)object->fNotifyLevel);
23198 0 : return py_fNotifyLevel;
23199 : }
23200 :
23201 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fNotifyLevel(PyObject *py_obj, PyObject *value, void *closure)
23202 : {
23203 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23204 0 : if (value == NULL) {
23205 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fNotifyLevel");
23206 0 : return -1;
23207 : }
23208 : {
23209 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fNotifyLevel));
23210 0 : if (PyLong_Check(value)) {
23211 0 : unsigned long long test_var;
23212 0 : test_var = PyLong_AsUnsignedLongLong(value);
23213 0 : if (PyErr_Occurred() != NULL) {
23214 0 : return -1;
23215 : }
23216 0 : if (test_var > uint_max) {
23217 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23218 : PyLong_Type.tp_name, uint_max, test_var);
23219 0 : return -1;
23220 : }
23221 0 : object->fNotifyLevel = test_var;
23222 : } else {
23223 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23224 : PyLong_Type.tp_name);
23225 0 : return -1;
23226 : }
23227 : }
23228 0 : return 0;
23229 : }
23230 :
23231 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwTimeout(PyObject *obj, void *closure)
23232 : {
23233 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23234 0 : PyObject *py_dwTimeout;
23235 0 : py_dwTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwTimeout);
23236 0 : return py_dwTimeout;
23237 : }
23238 :
23239 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwTimeout(PyObject *py_obj, PyObject *value, void *closure)
23240 : {
23241 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23242 0 : if (value == NULL) {
23243 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwTimeout");
23244 0 : return -1;
23245 : }
23246 : {
23247 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwTimeout));
23248 0 : if (PyLong_Check(value)) {
23249 0 : unsigned long long test_var;
23250 0 : test_var = PyLong_AsUnsignedLongLong(value);
23251 0 : if (PyErr_Occurred() != NULL) {
23252 0 : return -1;
23253 : }
23254 0 : if (test_var > uint_max) {
23255 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23256 : PyLong_Type.tp_name, uint_max, test_var);
23257 0 : return -1;
23258 : }
23259 0 : object->dwTimeout = test_var;
23260 : } else {
23261 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23262 : PyLong_Type.tp_name);
23263 0 : return -1;
23264 : }
23265 : }
23266 0 : return 0;
23267 : }
23268 :
23269 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
23270 : {
23271 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23272 0 : PyObject *py_fRecurseAfterForwarding;
23273 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)object->fRecurseAfterForwarding);
23274 0 : return py_fRecurseAfterForwarding;
23275 : }
23276 :
23277 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
23278 : {
23279 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23280 0 : if (value == NULL) {
23281 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRecurseAfterForwarding");
23282 0 : return -1;
23283 : }
23284 : {
23285 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
23286 0 : if (PyLong_Check(value)) {
23287 0 : unsigned long long test_var;
23288 0 : test_var = PyLong_AsUnsignedLongLong(value);
23289 0 : if (PyErr_Occurred() != NULL) {
23290 0 : return -1;
23291 : }
23292 0 : if (test_var > uint_max) {
23293 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23294 : PyLong_Type.tp_name, uint_max, test_var);
23295 0 : return -1;
23296 : }
23297 0 : object->fRecurseAfterForwarding = test_var;
23298 : } else {
23299 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23300 : PyLong_Type.tp_name);
23301 0 : return -1;
23302 : }
23303 : }
23304 0 : return 0;
23305 : }
23306 :
23307 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwDpFlags(PyObject *obj, void *closure)
23308 : {
23309 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23310 0 : PyObject *py_dwDpFlags;
23311 0 : py_dwDpFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwDpFlags);
23312 0 : return py_dwDpFlags;
23313 : }
23314 :
23315 427 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwDpFlags(PyObject *py_obj, PyObject *value, void *closure)
23316 : {
23317 427 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23318 427 : if (value == NULL) {
23319 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwDpFlags");
23320 0 : return -1;
23321 : }
23322 : {
23323 427 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwDpFlags));
23324 427 : if (PyLong_Check(value)) {
23325 0 : unsigned long long test_var;
23326 427 : test_var = PyLong_AsUnsignedLongLong(value);
23327 427 : if (PyErr_Occurred() != NULL) {
23328 0 : return -1;
23329 : }
23330 427 : if (test_var > uint_max) {
23331 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23332 : PyLong_Type.tp_name, uint_max, test_var);
23333 0 : return -1;
23334 : }
23335 427 : object->dwDpFlags = test_var;
23336 : } else {
23337 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23338 : PyLong_Type.tp_name);
23339 0 : return -1;
23340 : }
23341 : }
23342 427 : return 0;
23343 : }
23344 :
23345 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDpFqdn(PyObject *obj, void *closure)
23346 : {
23347 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23348 0 : PyObject *py_pszDpFqdn;
23349 0 : if (object->pszDpFqdn == NULL) {
23350 0 : Py_RETURN_NONE;
23351 : }
23352 0 : if (object->pszDpFqdn == NULL) {
23353 0 : py_pszDpFqdn = Py_None;
23354 0 : Py_INCREF(py_pszDpFqdn);
23355 : } else {
23356 0 : if (object->pszDpFqdn == NULL) {
23357 0 : py_pszDpFqdn = Py_None;
23358 0 : Py_INCREF(py_pszDpFqdn);
23359 : } else {
23360 0 : py_pszDpFqdn = PyUnicode_Decode(object->pszDpFqdn, strlen(object->pszDpFqdn), "utf-8", "ignore");
23361 : }
23362 : }
23363 0 : return py_pszDpFqdn;
23364 : }
23365 :
23366 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDpFqdn(PyObject *py_obj, PyObject *value, void *closure)
23367 : {
23368 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23369 0 : if (value == NULL) {
23370 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszDpFqdn");
23371 0 : return -1;
23372 : }
23373 0 : if (value == Py_None) {
23374 0 : object->pszDpFqdn = NULL;
23375 : } else {
23376 0 : object->pszDpFqdn = NULL;
23377 : {
23378 0 : const char *test_str;
23379 0 : const char *talloc_str;
23380 0 : PyObject *unicode = NULL;
23381 0 : if (PyUnicode_Check(value)) {
23382 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
23383 0 : if (unicode == NULL) {
23384 0 : PyErr_NoMemory();
23385 0 : return -1;
23386 : }
23387 0 : test_str = PyBytes_AS_STRING(unicode);
23388 0 : } else if (PyBytes_Check(value)) {
23389 0 : test_str = PyBytes_AS_STRING(value);
23390 : } else {
23391 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
23392 0 : return -1;
23393 : }
23394 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
23395 0 : if (unicode != NULL) {
23396 0 : Py_DECREF(unicode);
23397 : }
23398 0 : if (talloc_str == NULL) {
23399 0 : PyErr_NoMemory();
23400 0 : return -1;
23401 : }
23402 0 : object->pszDpFqdn = talloc_str;
23403 : }
23404 : }
23405 0 : return 0;
23406 : }
23407 :
23408 0 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved(PyObject *obj, void *closure)
23409 : {
23410 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(obj);
23411 0 : PyObject *py_dwReserved;
23412 0 : py_dwReserved = PyList_New(32);
23413 0 : if (py_dwReserved == NULL) {
23414 0 : return NULL;
23415 : }
23416 : {
23417 : int dwReserved_cntr_0;
23418 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < (32); dwReserved_cntr_0++) {
23419 0 : PyObject *py_dwReserved_0;
23420 0 : py_dwReserved_0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved[dwReserved_cntr_0]);
23421 0 : PyList_SetItem(py_dwReserved, dwReserved_cntr_0, py_dwReserved_0);
23422 : }
23423 : }
23424 0 : return py_dwReserved;
23425 : }
23426 :
23427 0 : static int py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved(PyObject *py_obj, PyObject *value, void *closure)
23428 : {
23429 0 : struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *object = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(py_obj);
23430 0 : if (value == NULL) {
23431 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved");
23432 0 : return -1;
23433 : }
23434 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
23435 : {
23436 0 : int dwReserved_cntr_0;
23437 0 : if (ARRAY_SIZE(object->dwReserved) != PyList_GET_SIZE(value)) {
23438 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->dwReserved), PyList_GET_SIZE(value));
23439 0 : return -1;
23440 : }
23441 0 : for (dwReserved_cntr_0 = 0; dwReserved_cntr_0 < PyList_GET_SIZE(value); dwReserved_cntr_0++) {
23442 0 : if (PyList_GET_ITEM(value, dwReserved_cntr_0) == NULL) {
23443 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved[dwReserved_cntr_0]");
23444 0 : return -1;
23445 : }
23446 : {
23447 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved[dwReserved_cntr_0]));
23448 0 : if (PyLong_Check(PyList_GET_ITEM(value, dwReserved_cntr_0))) {
23449 0 : unsigned long long test_var;
23450 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, dwReserved_cntr_0));
23451 0 : if (PyErr_Occurred() != NULL) {
23452 0 : return -1;
23453 : }
23454 0 : if (test_var > uint_max) {
23455 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23456 : PyLong_Type.tp_name, uint_max, test_var);
23457 0 : return -1;
23458 : }
23459 0 : object->dwReserved[dwReserved_cntr_0] = test_var;
23460 : } else {
23461 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23462 : PyLong_Type.tp_name);
23463 0 : return -1;
23464 : }
23465 : }
23466 : }
23467 : }
23468 0 : return 0;
23469 : }
23470 :
23471 : static PyGetSetDef py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_getsetters[] = {
23472 : {
23473 : .name = discard_const_p(char, "dwRpcStructureVersion"),
23474 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwRpcStructureVersion,
23475 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwRpcStructureVersion,
23476 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23477 : },
23478 : {
23479 : .name = discard_const_p(char, "dwReserved0"),
23480 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved0,
23481 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved0,
23482 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23483 : },
23484 : {
23485 : .name = discard_const_p(char, "pszZoneName"),
23486 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszZoneName,
23487 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszZoneName,
23488 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23489 : },
23490 : {
23491 : .name = discard_const_p(char, "dwZoneType"),
23492 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwZoneType,
23493 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwZoneType,
23494 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23495 : },
23496 : {
23497 : .name = discard_const_p(char, "fAllowUpdate"),
23498 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAllowUpdate,
23499 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAllowUpdate,
23500 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_zone_update")
23501 : },
23502 : {
23503 : .name = discard_const_p(char, "fAging"),
23504 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fAging,
23505 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fAging,
23506 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23507 : },
23508 : {
23509 : .name = discard_const_p(char, "dwFlags"),
23510 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwFlags,
23511 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwFlags,
23512 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23513 : },
23514 : {
23515 : .name = discard_const_p(char, "pszDataFile"),
23516 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDataFile,
23517 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDataFile,
23518 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23519 : },
23520 : {
23521 : .name = discard_const_p(char, "fDsIntegrated"),
23522 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fDsIntegrated,
23523 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fDsIntegrated,
23524 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23525 : },
23526 : {
23527 : .name = discard_const_p(char, "fLoadExisting"),
23528 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fLoadExisting,
23529 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fLoadExisting,
23530 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23531 : },
23532 : {
23533 : .name = discard_const_p(char, "pszAdmin"),
23534 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszAdmin,
23535 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszAdmin,
23536 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23537 : },
23538 : {
23539 : .name = discard_const_p(char, "aipMasters"),
23540 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipMasters,
23541 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipMasters,
23542 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
23543 : },
23544 : {
23545 : .name = discard_const_p(char, "aipSecondaries"),
23546 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_aipSecondaries,
23547 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_aipSecondaries,
23548 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
23549 : },
23550 : {
23551 : .name = discard_const_p(char, "fSecureSecondaries"),
23552 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fSecureSecondaries,
23553 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fSecureSecondaries,
23554 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_SECONDARY_SECURITY")
23555 : },
23556 : {
23557 : .name = discard_const_p(char, "fNotifyLevel"),
23558 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fNotifyLevel,
23559 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fNotifyLevel,
23560 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ZONE_NOTIFY_LEVEL")
23561 : },
23562 : {
23563 : .name = discard_const_p(char, "dwTimeout"),
23564 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwTimeout,
23565 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwTimeout,
23566 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23567 : },
23568 : {
23569 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
23570 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_fRecurseAfterForwarding,
23571 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_fRecurseAfterForwarding,
23572 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23573 : },
23574 : {
23575 : .name = discard_const_p(char, "dwDpFlags"),
23576 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwDpFlags,
23577 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwDpFlags,
23578 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23579 : },
23580 : {
23581 : .name = discard_const_p(char, "pszDpFqdn"),
23582 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_pszDpFqdn,
23583 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_pszDpFqdn,
23584 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23585 : },
23586 : {
23587 : .name = discard_const_p(char, "dwReserved"),
23588 : .get = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_get_dwReserved,
23589 : .set = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_set_dwReserved,
23590 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23591 : },
23592 : { .name = NULL }
23593 : };
23594 :
23595 427 : static PyObject *py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23596 : {
23597 427 : return pytalloc_new(struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN, type);
23598 : }
23599 :
23600 :
23601 : static PyTypeObject DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type = {
23602 : PyVarObject_HEAD_INIT(NULL, 0)
23603 : .tp_name = "dnsserver.DNS_RPC_ZONE_CREATE_INFO_LONGHORN",
23604 : .tp_getset = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_getsetters,
23605 : .tp_methods = NULL,
23606 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23607 : .tp_new = py_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_new,
23608 : };
23609 :
23610 :
23611 0 : static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_dwRpcStructureVersion(PyObject *obj, void *closure)
23612 : {
23613 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(obj);
23614 0 : PyObject *py_dwRpcStructureVersion;
23615 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
23616 0 : return py_dwRpcStructureVersion;
23617 : }
23618 :
23619 0 : static int py_DNS_RPC_ZONE_EXPORT_INFO_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
23620 : {
23621 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(py_obj);
23622 0 : if (value == NULL) {
23623 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
23624 0 : return -1;
23625 : }
23626 : {
23627 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
23628 0 : if (PyLong_Check(value)) {
23629 0 : unsigned long long test_var;
23630 0 : test_var = PyLong_AsUnsignedLongLong(value);
23631 0 : if (PyErr_Occurred() != NULL) {
23632 0 : return -1;
23633 : }
23634 0 : if (test_var > uint_max) {
23635 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23636 : PyLong_Type.tp_name, uint_max, test_var);
23637 0 : return -1;
23638 : }
23639 0 : object->dwRpcStructureVersion = test_var;
23640 : } else {
23641 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23642 : PyLong_Type.tp_name);
23643 0 : return -1;
23644 : }
23645 : }
23646 0 : return 0;
23647 : }
23648 :
23649 0 : static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_dwReserved0(PyObject *obj, void *closure)
23650 : {
23651 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(obj);
23652 0 : PyObject *py_dwReserved0;
23653 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
23654 0 : return py_dwReserved0;
23655 : }
23656 :
23657 0 : static int py_DNS_RPC_ZONE_EXPORT_INFO_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
23658 : {
23659 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(py_obj);
23660 0 : if (value == NULL) {
23661 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
23662 0 : return -1;
23663 : }
23664 : {
23665 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
23666 0 : if (PyLong_Check(value)) {
23667 0 : unsigned long long test_var;
23668 0 : test_var = PyLong_AsUnsignedLongLong(value);
23669 0 : if (PyErr_Occurred() != NULL) {
23670 0 : return -1;
23671 : }
23672 0 : if (test_var > uint_max) {
23673 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23674 : PyLong_Type.tp_name, uint_max, test_var);
23675 0 : return -1;
23676 : }
23677 0 : object->dwReserved0 = test_var;
23678 : } else {
23679 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23680 : PyLong_Type.tp_name);
23681 0 : return -1;
23682 : }
23683 : }
23684 0 : return 0;
23685 : }
23686 :
23687 0 : static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_get_pszZoneExportFile(PyObject *obj, void *closure)
23688 : {
23689 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(obj);
23690 0 : PyObject *py_pszZoneExportFile;
23691 0 : if (object->pszZoneExportFile == NULL) {
23692 0 : Py_RETURN_NONE;
23693 : }
23694 0 : if (object->pszZoneExportFile == NULL) {
23695 0 : py_pszZoneExportFile = Py_None;
23696 0 : Py_INCREF(py_pszZoneExportFile);
23697 : } else {
23698 0 : if (object->pszZoneExportFile == NULL) {
23699 0 : py_pszZoneExportFile = Py_None;
23700 0 : Py_INCREF(py_pszZoneExportFile);
23701 : } else {
23702 0 : py_pszZoneExportFile = PyUnicode_Decode(object->pszZoneExportFile, strlen(object->pszZoneExportFile), "utf-8", "ignore");
23703 : }
23704 : }
23705 0 : return py_pszZoneExportFile;
23706 : }
23707 :
23708 0 : static int py_DNS_RPC_ZONE_EXPORT_INFO_set_pszZoneExportFile(PyObject *py_obj, PyObject *value, void *closure)
23709 : {
23710 0 : struct DNS_RPC_ZONE_EXPORT_INFO *object = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(py_obj);
23711 0 : if (value == NULL) {
23712 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszZoneExportFile");
23713 0 : return -1;
23714 : }
23715 0 : if (value == Py_None) {
23716 0 : object->pszZoneExportFile = NULL;
23717 : } else {
23718 0 : object->pszZoneExportFile = NULL;
23719 : {
23720 0 : const char *test_str;
23721 0 : const char *talloc_str;
23722 0 : PyObject *unicode = NULL;
23723 0 : if (PyUnicode_Check(value)) {
23724 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
23725 0 : if (unicode == NULL) {
23726 0 : PyErr_NoMemory();
23727 0 : return -1;
23728 : }
23729 0 : test_str = PyBytes_AS_STRING(unicode);
23730 0 : } else if (PyBytes_Check(value)) {
23731 0 : test_str = PyBytes_AS_STRING(value);
23732 : } else {
23733 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
23734 0 : return -1;
23735 : }
23736 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
23737 0 : if (unicode != NULL) {
23738 0 : Py_DECREF(unicode);
23739 : }
23740 0 : if (talloc_str == NULL) {
23741 0 : PyErr_NoMemory();
23742 0 : return -1;
23743 : }
23744 0 : object->pszZoneExportFile = talloc_str;
23745 : }
23746 : }
23747 0 : return 0;
23748 : }
23749 :
23750 : static PyGetSetDef py_DNS_RPC_ZONE_EXPORT_INFO_getsetters[] = {
23751 : {
23752 : .name = discard_const_p(char, "dwRpcStructureVersion"),
23753 : .get = py_DNS_RPC_ZONE_EXPORT_INFO_get_dwRpcStructureVersion,
23754 : .set = py_DNS_RPC_ZONE_EXPORT_INFO_set_dwRpcStructureVersion,
23755 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23756 : },
23757 : {
23758 : .name = discard_const_p(char, "dwReserved0"),
23759 : .get = py_DNS_RPC_ZONE_EXPORT_INFO_get_dwReserved0,
23760 : .set = py_DNS_RPC_ZONE_EXPORT_INFO_set_dwReserved0,
23761 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
23762 : },
23763 : {
23764 : .name = discard_const_p(char, "pszZoneExportFile"),
23765 : .get = py_DNS_RPC_ZONE_EXPORT_INFO_get_pszZoneExportFile,
23766 : .set = py_DNS_RPC_ZONE_EXPORT_INFO_set_pszZoneExportFile,
23767 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
23768 : },
23769 : { .name = NULL }
23770 : };
23771 :
23772 0 : static PyObject *py_DNS_RPC_ZONE_EXPORT_INFO_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
23773 : {
23774 0 : return pytalloc_new(struct DNS_RPC_ZONE_EXPORT_INFO, type);
23775 : }
23776 :
23777 :
23778 : static PyTypeObject DNS_RPC_ZONE_EXPORT_INFO_Type = {
23779 : PyVarObject_HEAD_INIT(NULL, 0)
23780 : .tp_name = "dnsserver.DNS_RPC_ZONE_EXPORT_INFO",
23781 : .tp_getset = py_DNS_RPC_ZONE_EXPORT_INFO_getsetters,
23782 : .tp_methods = NULL,
23783 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
23784 : .tp_new = py_DNS_RPC_ZONE_EXPORT_INFO_new,
23785 : };
23786 :
23787 :
23788 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwRpcStructureVersion(PyObject *obj, void *closure)
23789 : {
23790 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
23791 0 : PyObject *py_dwRpcStructureVersion;
23792 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
23793 0 : return py_dwRpcStructureVersion;
23794 : }
23795 :
23796 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
23797 : {
23798 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
23799 0 : if (value == NULL) {
23800 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
23801 0 : return -1;
23802 : }
23803 : {
23804 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
23805 0 : if (PyLong_Check(value)) {
23806 0 : unsigned long long test_var;
23807 0 : test_var = PyLong_AsUnsignedLongLong(value);
23808 0 : if (PyErr_Occurred() != NULL) {
23809 0 : return -1;
23810 : }
23811 0 : if (test_var > uint_max) {
23812 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23813 : PyLong_Type.tp_name, uint_max, test_var);
23814 0 : return -1;
23815 : }
23816 0 : object->dwRpcStructureVersion = test_var;
23817 : } else {
23818 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23819 : PyLong_Type.tp_name);
23820 0 : return -1;
23821 : }
23822 : }
23823 0 : return 0;
23824 : }
23825 :
23826 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwReserved0(PyObject *obj, void *closure)
23827 : {
23828 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
23829 0 : PyObject *py_dwReserved0;
23830 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
23831 0 : return py_dwReserved0;
23832 : }
23833 :
23834 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
23835 : {
23836 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
23837 0 : if (value == NULL) {
23838 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
23839 0 : return -1;
23840 : }
23841 : {
23842 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
23843 0 : if (PyLong_Check(value)) {
23844 0 : unsigned long long test_var;
23845 0 : test_var = PyLong_AsUnsignedLongLong(value);
23846 0 : if (PyErr_Occurred() != NULL) {
23847 0 : return -1;
23848 : }
23849 0 : if (test_var > uint_max) {
23850 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23851 : PyLong_Type.tp_name, uint_max, test_var);
23852 0 : return -1;
23853 : }
23854 0 : object->dwReserved0 = test_var;
23855 : } else {
23856 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23857 : PyLong_Type.tp_name);
23858 0 : return -1;
23859 : }
23860 : }
23861 0 : return 0;
23862 : }
23863 :
23864 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_dwFilter(PyObject *obj, void *closure)
23865 : {
23866 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
23867 0 : PyObject *py_dwFilter;
23868 0 : py_dwFilter = PyLong_FromUnsignedLongLong((uint32_t)object->dwFilter);
23869 0 : return py_dwFilter;
23870 : }
23871 :
23872 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_dwFilter(PyObject *py_obj, PyObject *value, void *closure)
23873 : {
23874 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
23875 0 : if (value == NULL) {
23876 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFilter");
23877 0 : return -1;
23878 : }
23879 : {
23880 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFilter));
23881 0 : if (PyLong_Check(value)) {
23882 0 : unsigned long long test_var;
23883 0 : test_var = PyLong_AsUnsignedLongLong(value);
23884 0 : if (PyErr_Occurred() != NULL) {
23885 0 : return -1;
23886 : }
23887 0 : if (test_var > uint_max) {
23888 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
23889 : PyLong_Type.tp_name, uint_max, test_var);
23890 0 : return -1;
23891 : }
23892 0 : object->dwFilter = test_var;
23893 : } else {
23894 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
23895 : PyLong_Type.tp_name);
23896 0 : return -1;
23897 : }
23898 : }
23899 0 : return 0;
23900 : }
23901 :
23902 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszPartitionFqdn(PyObject *obj, void *closure)
23903 : {
23904 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
23905 0 : PyObject *py_pszPartitionFqdn;
23906 0 : if (object->pszPartitionFqdn == NULL) {
23907 0 : Py_RETURN_NONE;
23908 : }
23909 0 : if (object->pszPartitionFqdn == NULL) {
23910 0 : py_pszPartitionFqdn = Py_None;
23911 0 : Py_INCREF(py_pszPartitionFqdn);
23912 : } else {
23913 0 : if (object->pszPartitionFqdn == NULL) {
23914 0 : py_pszPartitionFqdn = Py_None;
23915 0 : Py_INCREF(py_pszPartitionFqdn);
23916 : } else {
23917 0 : py_pszPartitionFqdn = PyUnicode_Decode(object->pszPartitionFqdn, strlen(object->pszPartitionFqdn), "utf-8", "ignore");
23918 : }
23919 : }
23920 0 : return py_pszPartitionFqdn;
23921 : }
23922 :
23923 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszPartitionFqdn(PyObject *py_obj, PyObject *value, void *closure)
23924 : {
23925 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
23926 0 : if (value == NULL) {
23927 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszPartitionFqdn");
23928 0 : return -1;
23929 : }
23930 0 : if (value == Py_None) {
23931 0 : object->pszPartitionFqdn = NULL;
23932 : } else {
23933 0 : object->pszPartitionFqdn = NULL;
23934 : {
23935 0 : const char *test_str;
23936 0 : const char *talloc_str;
23937 0 : PyObject *unicode = NULL;
23938 0 : if (PyUnicode_Check(value)) {
23939 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
23940 0 : if (unicode == NULL) {
23941 0 : PyErr_NoMemory();
23942 0 : return -1;
23943 : }
23944 0 : test_str = PyBytes_AS_STRING(unicode);
23945 0 : } else if (PyBytes_Check(value)) {
23946 0 : test_str = PyBytes_AS_STRING(value);
23947 : } else {
23948 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
23949 0 : return -1;
23950 : }
23951 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
23952 0 : if (unicode != NULL) {
23953 0 : Py_DECREF(unicode);
23954 : }
23955 0 : if (talloc_str == NULL) {
23956 0 : PyErr_NoMemory();
23957 0 : return -1;
23958 : }
23959 0 : object->pszPartitionFqdn = talloc_str;
23960 : }
23961 : }
23962 0 : return 0;
23963 : }
23964 :
23965 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszQueryString(PyObject *obj, void *closure)
23966 : {
23967 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
23968 0 : PyObject *py_pszQueryString;
23969 0 : if (object->pszQueryString == NULL) {
23970 0 : Py_RETURN_NONE;
23971 : }
23972 0 : if (object->pszQueryString == NULL) {
23973 0 : py_pszQueryString = Py_None;
23974 0 : Py_INCREF(py_pszQueryString);
23975 : } else {
23976 0 : if (object->pszQueryString == NULL) {
23977 0 : py_pszQueryString = Py_None;
23978 0 : Py_INCREF(py_pszQueryString);
23979 : } else {
23980 0 : py_pszQueryString = PyUnicode_Decode(object->pszQueryString, strlen(object->pszQueryString), "utf-8", "ignore");
23981 : }
23982 : }
23983 0 : return py_pszQueryString;
23984 : }
23985 :
23986 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszQueryString(PyObject *py_obj, PyObject *value, void *closure)
23987 : {
23988 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
23989 0 : if (value == NULL) {
23990 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszQueryString");
23991 0 : return -1;
23992 : }
23993 0 : if (value == Py_None) {
23994 0 : object->pszQueryString = NULL;
23995 : } else {
23996 0 : object->pszQueryString = NULL;
23997 : {
23998 0 : const char *test_str;
23999 0 : const char *talloc_str;
24000 0 : PyObject *unicode = NULL;
24001 0 : if (PyUnicode_Check(value)) {
24002 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
24003 0 : if (unicode == NULL) {
24004 0 : PyErr_NoMemory();
24005 0 : return -1;
24006 : }
24007 0 : test_str = PyBytes_AS_STRING(unicode);
24008 0 : } else if (PyBytes_Check(value)) {
24009 0 : test_str = PyBytes_AS_STRING(value);
24010 : } else {
24011 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
24012 0 : return -1;
24013 : }
24014 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
24015 0 : if (unicode != NULL) {
24016 0 : Py_DECREF(unicode);
24017 : }
24018 0 : if (talloc_str == NULL) {
24019 0 : PyErr_NoMemory();
24020 0 : return -1;
24021 : }
24022 0 : object->pszQueryString = talloc_str;
24023 : }
24024 : }
24025 0 : return 0;
24026 : }
24027 :
24028 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_get_pszReserved(PyObject *obj, void *closure)
24029 : {
24030 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(obj);
24031 0 : PyObject *py_pszReserved;
24032 0 : py_pszReserved = PyList_New(6);
24033 0 : if (py_pszReserved == NULL) {
24034 0 : return NULL;
24035 : }
24036 : {
24037 : int pszReserved_cntr_0;
24038 0 : for (pszReserved_cntr_0 = 0; pszReserved_cntr_0 < (6); pszReserved_cntr_0++) {
24039 0 : PyObject *py_pszReserved_0;
24040 0 : py_pszReserved_0 = pytalloc_reference_ex(&DNS_EXTENSION_Type, pytalloc_get_mem_ctx(obj), &object->pszReserved[pszReserved_cntr_0]);
24041 0 : PyList_SetItem(py_pszReserved, pszReserved_cntr_0, py_pszReserved_0);
24042 : }
24043 : }
24044 0 : return py_pszReserved;
24045 : }
24046 :
24047 0 : static int py_DNS_RPC_ENUM_ZONES_FILTER_set_pszReserved(PyObject *py_obj, PyObject *value, void *closure)
24048 : {
24049 0 : struct DNS_RPC_ENUM_ZONES_FILTER *object = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(py_obj);
24050 0 : if (value == NULL) {
24051 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszReserved");
24052 0 : return -1;
24053 : }
24054 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
24055 : {
24056 0 : int pszReserved_cntr_0;
24057 0 : if (ARRAY_SIZE(object->pszReserved) != PyList_GET_SIZE(value)) {
24058 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->pszReserved), PyList_GET_SIZE(value));
24059 0 : return -1;
24060 : }
24061 0 : for (pszReserved_cntr_0 = 0; pszReserved_cntr_0 < PyList_GET_SIZE(value); pszReserved_cntr_0++) {
24062 0 : if (PyList_GET_ITEM(value, pszReserved_cntr_0) == NULL) {
24063 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszReserved[pszReserved_cntr_0]");
24064 0 : return -1;
24065 : }
24066 0 : PY_CHECK_TYPE(&DNS_EXTENSION_Type, PyList_GET_ITEM(value, pszReserved_cntr_0), return -1;);
24067 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(PyList_GET_ITEM(value, pszReserved_cntr_0))) == NULL) {
24068 0 : PyErr_NoMemory();
24069 0 : return -1;
24070 : }
24071 0 : object->pszReserved[pszReserved_cntr_0] = *(struct DNS_EXTENSION *)pytalloc_get_ptr(PyList_GET_ITEM(value, pszReserved_cntr_0));
24072 : }
24073 : }
24074 0 : return 0;
24075 : }
24076 :
24077 : static PyGetSetDef py_DNS_RPC_ENUM_ZONES_FILTER_getsetters[] = {
24078 : {
24079 : .name = discard_const_p(char, "dwRpcStructureVersion"),
24080 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_dwRpcStructureVersion,
24081 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_dwRpcStructureVersion,
24082 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24083 : },
24084 : {
24085 : .name = discard_const_p(char, "dwReserved0"),
24086 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_dwReserved0,
24087 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_dwReserved0,
24088 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24089 : },
24090 : {
24091 : .name = discard_const_p(char, "dwFilter"),
24092 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_dwFilter,
24093 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_dwFilter,
24094 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24095 : },
24096 : {
24097 : .name = discard_const_p(char, "pszPartitionFqdn"),
24098 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_pszPartitionFqdn,
24099 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_pszPartitionFqdn,
24100 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
24101 : },
24102 : {
24103 : .name = discard_const_p(char, "pszQueryString"),
24104 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_pszQueryString,
24105 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_pszQueryString,
24106 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
24107 : },
24108 : {
24109 : .name = discard_const_p(char, "pszReserved"),
24110 : .get = py_DNS_RPC_ENUM_ZONES_FILTER_get_pszReserved,
24111 : .set = py_DNS_RPC_ENUM_ZONES_FILTER_set_pszReserved,
24112 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_EXTENSION")
24113 : },
24114 : { .name = NULL }
24115 : };
24116 :
24117 0 : static PyObject *py_DNS_RPC_ENUM_ZONES_FILTER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24118 : {
24119 0 : return pytalloc_new(struct DNS_RPC_ENUM_ZONES_FILTER, type);
24120 : }
24121 :
24122 :
24123 : static PyTypeObject DNS_RPC_ENUM_ZONES_FILTER_Type = {
24124 : PyVarObject_HEAD_INIT(NULL, 0)
24125 : .tp_name = "dnsserver.DNS_RPC_ENUM_ZONES_FILTER",
24126 : .tp_getset = py_DNS_RPC_ENUM_ZONES_FILTER_getsetters,
24127 : .tp_methods = NULL,
24128 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24129 : .tp_new = py_DNS_RPC_ENUM_ZONES_FILTER_new,
24130 : };
24131 :
24132 :
24133 0 : static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
24134 : {
24135 0 : struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(obj);
24136 0 : PyObject *py_fRecurseAfterForwarding;
24137 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)object->fRecurseAfterForwarding);
24138 0 : return py_fRecurseAfterForwarding;
24139 : }
24140 :
24141 0 : static int py_DNS_RPC_FORWARDERS_W2K_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
24142 : {
24143 0 : struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(py_obj);
24144 0 : if (value == NULL) {
24145 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRecurseAfterForwarding");
24146 0 : return -1;
24147 : }
24148 : {
24149 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
24150 0 : if (PyLong_Check(value)) {
24151 0 : unsigned long long test_var;
24152 0 : test_var = PyLong_AsUnsignedLongLong(value);
24153 0 : if (PyErr_Occurred() != NULL) {
24154 0 : return -1;
24155 : }
24156 0 : if (test_var > uint_max) {
24157 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24158 : PyLong_Type.tp_name, uint_max, test_var);
24159 0 : return -1;
24160 : }
24161 0 : object->fRecurseAfterForwarding = test_var;
24162 : } else {
24163 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24164 : PyLong_Type.tp_name);
24165 0 : return -1;
24166 : }
24167 : }
24168 0 : return 0;
24169 : }
24170 :
24171 0 : static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_dwForwardTimeout(PyObject *obj, void *closure)
24172 : {
24173 0 : struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(obj);
24174 0 : PyObject *py_dwForwardTimeout;
24175 0 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwForwardTimeout);
24176 0 : return py_dwForwardTimeout;
24177 : }
24178 :
24179 0 : static int py_DNS_RPC_FORWARDERS_W2K_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
24180 : {
24181 0 : struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(py_obj);
24182 0 : if (value == NULL) {
24183 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwForwardTimeout");
24184 0 : return -1;
24185 : }
24186 : {
24187 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
24188 0 : if (PyLong_Check(value)) {
24189 0 : unsigned long long test_var;
24190 0 : test_var = PyLong_AsUnsignedLongLong(value);
24191 0 : if (PyErr_Occurred() != NULL) {
24192 0 : return -1;
24193 : }
24194 0 : if (test_var > uint_max) {
24195 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24196 : PyLong_Type.tp_name, uint_max, test_var);
24197 0 : return -1;
24198 : }
24199 0 : object->dwForwardTimeout = test_var;
24200 : } else {
24201 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24202 : PyLong_Type.tp_name);
24203 0 : return -1;
24204 : }
24205 : }
24206 0 : return 0;
24207 : }
24208 :
24209 0 : static PyObject *py_DNS_RPC_FORWARDERS_W2K_get_aipForwarders(PyObject *obj, void *closure)
24210 : {
24211 0 : struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(obj);
24212 0 : PyObject *py_aipForwarders;
24213 0 : if (object->aipForwarders == NULL) {
24214 0 : Py_RETURN_NONE;
24215 : }
24216 0 : if (object->aipForwarders == NULL) {
24217 0 : py_aipForwarders = Py_None;
24218 0 : Py_INCREF(py_aipForwarders);
24219 : } else {
24220 0 : py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
24221 : }
24222 0 : return py_aipForwarders;
24223 : }
24224 :
24225 0 : static int py_DNS_RPC_FORWARDERS_W2K_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
24226 : {
24227 0 : struct DNS_RPC_FORWARDERS_W2K *object = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(py_obj);
24228 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
24229 0 : if (value == NULL) {
24230 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipForwarders");
24231 0 : return -1;
24232 : }
24233 0 : if (value == Py_None) {
24234 0 : object->aipForwarders = NULL;
24235 : } else {
24236 0 : object->aipForwarders = NULL;
24237 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
24238 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24239 0 : PyErr_NoMemory();
24240 0 : return -1;
24241 : }
24242 0 : object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
24243 : }
24244 0 : return 0;
24245 : }
24246 :
24247 : static PyGetSetDef py_DNS_RPC_FORWARDERS_W2K_getsetters[] = {
24248 : {
24249 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
24250 : .get = py_DNS_RPC_FORWARDERS_W2K_get_fRecurseAfterForwarding,
24251 : .set = py_DNS_RPC_FORWARDERS_W2K_set_fRecurseAfterForwarding,
24252 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24253 : },
24254 : {
24255 : .name = discard_const_p(char, "dwForwardTimeout"),
24256 : .get = py_DNS_RPC_FORWARDERS_W2K_get_dwForwardTimeout,
24257 : .set = py_DNS_RPC_FORWARDERS_W2K_set_dwForwardTimeout,
24258 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24259 : },
24260 : {
24261 : .name = discard_const_p(char, "aipForwarders"),
24262 : .get = py_DNS_RPC_FORWARDERS_W2K_get_aipForwarders,
24263 : .set = py_DNS_RPC_FORWARDERS_W2K_set_aipForwarders,
24264 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
24265 : },
24266 : { .name = NULL }
24267 : };
24268 :
24269 0 : static PyObject *py_DNS_RPC_FORWARDERS_W2K_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24270 : {
24271 0 : return pytalloc_new(struct DNS_RPC_FORWARDERS_W2K, type);
24272 : }
24273 :
24274 :
24275 : static PyTypeObject DNS_RPC_FORWARDERS_W2K_Type = {
24276 : PyVarObject_HEAD_INIT(NULL, 0)
24277 : .tp_name = "dnsserver.DNS_RPC_FORWARDERS_W2K",
24278 : .tp_getset = py_DNS_RPC_FORWARDERS_W2K_getsetters,
24279 : .tp_methods = NULL,
24280 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24281 : .tp_new = py_DNS_RPC_FORWARDERS_W2K_new,
24282 : };
24283 :
24284 :
24285 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwRpcStructureVersion(PyObject *obj, void *closure)
24286 : {
24287 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
24288 0 : PyObject *py_dwRpcStructureVersion;
24289 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
24290 0 : return py_dwRpcStructureVersion;
24291 : }
24292 :
24293 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
24294 : {
24295 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
24296 0 : if (value == NULL) {
24297 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
24298 0 : return -1;
24299 : }
24300 : {
24301 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
24302 0 : if (PyLong_Check(value)) {
24303 0 : unsigned long long test_var;
24304 0 : test_var = PyLong_AsUnsignedLongLong(value);
24305 0 : if (PyErr_Occurred() != NULL) {
24306 0 : return -1;
24307 : }
24308 0 : if (test_var > uint_max) {
24309 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24310 : PyLong_Type.tp_name, uint_max, test_var);
24311 0 : return -1;
24312 : }
24313 0 : object->dwRpcStructureVersion = test_var;
24314 : } else {
24315 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24316 : PyLong_Type.tp_name);
24317 0 : return -1;
24318 : }
24319 : }
24320 0 : return 0;
24321 : }
24322 :
24323 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwReserved0(PyObject *obj, void *closure)
24324 : {
24325 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
24326 0 : PyObject *py_dwReserved0;
24327 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
24328 0 : return py_dwReserved0;
24329 : }
24330 :
24331 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
24332 : {
24333 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
24334 0 : if (value == NULL) {
24335 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
24336 0 : return -1;
24337 : }
24338 : {
24339 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
24340 0 : if (PyLong_Check(value)) {
24341 0 : unsigned long long test_var;
24342 0 : test_var = PyLong_AsUnsignedLongLong(value);
24343 0 : if (PyErr_Occurred() != NULL) {
24344 0 : return -1;
24345 : }
24346 0 : if (test_var > uint_max) {
24347 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24348 : PyLong_Type.tp_name, uint_max, test_var);
24349 0 : return -1;
24350 : }
24351 0 : object->dwReserved0 = test_var;
24352 : } else {
24353 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24354 : PyLong_Type.tp_name);
24355 0 : return -1;
24356 : }
24357 : }
24358 0 : return 0;
24359 : }
24360 :
24361 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
24362 : {
24363 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
24364 0 : PyObject *py_fRecurseAfterForwarding;
24365 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)object->fRecurseAfterForwarding);
24366 0 : return py_fRecurseAfterForwarding;
24367 : }
24368 :
24369 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
24370 : {
24371 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
24372 0 : if (value == NULL) {
24373 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRecurseAfterForwarding");
24374 0 : return -1;
24375 : }
24376 : {
24377 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
24378 0 : if (PyLong_Check(value)) {
24379 0 : unsigned long long test_var;
24380 0 : test_var = PyLong_AsUnsignedLongLong(value);
24381 0 : if (PyErr_Occurred() != NULL) {
24382 0 : return -1;
24383 : }
24384 0 : if (test_var > uint_max) {
24385 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24386 : PyLong_Type.tp_name, uint_max, test_var);
24387 0 : return -1;
24388 : }
24389 0 : object->fRecurseAfterForwarding = test_var;
24390 : } else {
24391 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24392 : PyLong_Type.tp_name);
24393 0 : return -1;
24394 : }
24395 : }
24396 0 : return 0;
24397 : }
24398 :
24399 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_dwForwardTimeout(PyObject *obj, void *closure)
24400 : {
24401 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
24402 0 : PyObject *py_dwForwardTimeout;
24403 0 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwForwardTimeout);
24404 0 : return py_dwForwardTimeout;
24405 : }
24406 :
24407 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
24408 : {
24409 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
24410 0 : if (value == NULL) {
24411 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwForwardTimeout");
24412 0 : return -1;
24413 : }
24414 : {
24415 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
24416 0 : if (PyLong_Check(value)) {
24417 0 : unsigned long long test_var;
24418 0 : test_var = PyLong_AsUnsignedLongLong(value);
24419 0 : if (PyErr_Occurred() != NULL) {
24420 0 : return -1;
24421 : }
24422 0 : if (test_var > uint_max) {
24423 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24424 : PyLong_Type.tp_name, uint_max, test_var);
24425 0 : return -1;
24426 : }
24427 0 : object->dwForwardTimeout = test_var;
24428 : } else {
24429 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24430 : PyLong_Type.tp_name);
24431 0 : return -1;
24432 : }
24433 : }
24434 0 : return 0;
24435 : }
24436 :
24437 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_get_aipForwarders(PyObject *obj, void *closure)
24438 : {
24439 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(obj);
24440 0 : PyObject *py_aipForwarders;
24441 0 : if (object->aipForwarders == NULL) {
24442 0 : Py_RETURN_NONE;
24443 : }
24444 0 : if (object->aipForwarders == NULL) {
24445 0 : py_aipForwarders = Py_None;
24446 0 : Py_INCREF(py_aipForwarders);
24447 : } else {
24448 0 : py_aipForwarders = pytalloc_reference_ex(&IP4_ARRAY_Type, object->aipForwarders, object->aipForwarders);
24449 : }
24450 0 : return py_aipForwarders;
24451 : }
24452 :
24453 0 : static int py_DNS_RPC_FORWARDERS_DOTNET_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
24454 : {
24455 0 : struct DNS_RPC_FORWARDERS_DOTNET *object = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(py_obj);
24456 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
24457 0 : if (value == NULL) {
24458 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipForwarders");
24459 0 : return -1;
24460 : }
24461 0 : if (value == Py_None) {
24462 0 : object->aipForwarders = NULL;
24463 : } else {
24464 0 : object->aipForwarders = NULL;
24465 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, value, return -1;);
24466 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24467 0 : PyErr_NoMemory();
24468 0 : return -1;
24469 : }
24470 0 : object->aipForwarders = (struct IP4_ARRAY *)pytalloc_get_ptr(value);
24471 : }
24472 0 : return 0;
24473 : }
24474 :
24475 : static PyGetSetDef py_DNS_RPC_FORWARDERS_DOTNET_getsetters[] = {
24476 : {
24477 : .name = discard_const_p(char, "dwRpcStructureVersion"),
24478 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_dwRpcStructureVersion,
24479 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_dwRpcStructureVersion,
24480 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24481 : },
24482 : {
24483 : .name = discard_const_p(char, "dwReserved0"),
24484 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_dwReserved0,
24485 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_dwReserved0,
24486 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24487 : },
24488 : {
24489 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
24490 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_fRecurseAfterForwarding,
24491 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_fRecurseAfterForwarding,
24492 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24493 : },
24494 : {
24495 : .name = discard_const_p(char, "dwForwardTimeout"),
24496 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_dwForwardTimeout,
24497 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_dwForwardTimeout,
24498 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24499 : },
24500 : {
24501 : .name = discard_const_p(char, "aipForwarders"),
24502 : .get = py_DNS_RPC_FORWARDERS_DOTNET_get_aipForwarders,
24503 : .set = py_DNS_RPC_FORWARDERS_DOTNET_set_aipForwarders,
24504 : .doc = discard_const_p(char, "PIDL-generated element of base type IP4_ARRAY")
24505 : },
24506 : { .name = NULL }
24507 : };
24508 :
24509 0 : static PyObject *py_DNS_RPC_FORWARDERS_DOTNET_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24510 : {
24511 0 : return pytalloc_new(struct DNS_RPC_FORWARDERS_DOTNET, type);
24512 : }
24513 :
24514 :
24515 : static PyTypeObject DNS_RPC_FORWARDERS_DOTNET_Type = {
24516 : PyVarObject_HEAD_INIT(NULL, 0)
24517 : .tp_name = "dnsserver.DNS_RPC_FORWARDERS_DOTNET",
24518 : .tp_getset = py_DNS_RPC_FORWARDERS_DOTNET_getsetters,
24519 : .tp_methods = NULL,
24520 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24521 : .tp_new = py_DNS_RPC_FORWARDERS_DOTNET_new,
24522 : };
24523 :
24524 :
24525 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwRpcStructureVersion(PyObject *obj, void *closure)
24526 : {
24527 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
24528 0 : PyObject *py_dwRpcStructureVersion;
24529 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
24530 0 : return py_dwRpcStructureVersion;
24531 : }
24532 :
24533 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
24534 : {
24535 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
24536 0 : if (value == NULL) {
24537 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
24538 0 : return -1;
24539 : }
24540 : {
24541 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
24542 0 : if (PyLong_Check(value)) {
24543 0 : unsigned long long test_var;
24544 0 : test_var = PyLong_AsUnsignedLongLong(value);
24545 0 : if (PyErr_Occurred() != NULL) {
24546 0 : return -1;
24547 : }
24548 0 : if (test_var > uint_max) {
24549 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24550 : PyLong_Type.tp_name, uint_max, test_var);
24551 0 : return -1;
24552 : }
24553 0 : object->dwRpcStructureVersion = test_var;
24554 : } else {
24555 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24556 : PyLong_Type.tp_name);
24557 0 : return -1;
24558 : }
24559 : }
24560 0 : return 0;
24561 : }
24562 :
24563 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwReserved0(PyObject *obj, void *closure)
24564 : {
24565 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
24566 0 : PyObject *py_dwReserved0;
24567 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
24568 0 : return py_dwReserved0;
24569 : }
24570 :
24571 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
24572 : {
24573 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
24574 0 : if (value == NULL) {
24575 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
24576 0 : return -1;
24577 : }
24578 : {
24579 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
24580 0 : if (PyLong_Check(value)) {
24581 0 : unsigned long long test_var;
24582 0 : test_var = PyLong_AsUnsignedLongLong(value);
24583 0 : if (PyErr_Occurred() != NULL) {
24584 0 : return -1;
24585 : }
24586 0 : if (test_var > uint_max) {
24587 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24588 : PyLong_Type.tp_name, uint_max, test_var);
24589 0 : return -1;
24590 : }
24591 0 : object->dwReserved0 = test_var;
24592 : } else {
24593 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24594 : PyLong_Type.tp_name);
24595 0 : return -1;
24596 : }
24597 : }
24598 0 : return 0;
24599 : }
24600 :
24601 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_fRecurseAfterForwarding(PyObject *obj, void *closure)
24602 : {
24603 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
24604 0 : PyObject *py_fRecurseAfterForwarding;
24605 0 : py_fRecurseAfterForwarding = PyLong_FromUnsignedLongLong((uint32_t)object->fRecurseAfterForwarding);
24606 0 : return py_fRecurseAfterForwarding;
24607 : }
24608 :
24609 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_fRecurseAfterForwarding(PyObject *py_obj, PyObject *value, void *closure)
24610 : {
24611 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
24612 0 : if (value == NULL) {
24613 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fRecurseAfterForwarding");
24614 0 : return -1;
24615 : }
24616 : {
24617 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fRecurseAfterForwarding));
24618 0 : if (PyLong_Check(value)) {
24619 0 : unsigned long long test_var;
24620 0 : test_var = PyLong_AsUnsignedLongLong(value);
24621 0 : if (PyErr_Occurred() != NULL) {
24622 0 : return -1;
24623 : }
24624 0 : if (test_var > uint_max) {
24625 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24626 : PyLong_Type.tp_name, uint_max, test_var);
24627 0 : return -1;
24628 : }
24629 0 : object->fRecurseAfterForwarding = test_var;
24630 : } else {
24631 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24632 : PyLong_Type.tp_name);
24633 0 : return -1;
24634 : }
24635 : }
24636 0 : return 0;
24637 : }
24638 :
24639 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_dwForwardTimeout(PyObject *obj, void *closure)
24640 : {
24641 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
24642 0 : PyObject *py_dwForwardTimeout;
24643 0 : py_dwForwardTimeout = PyLong_FromUnsignedLongLong((uint32_t)object->dwForwardTimeout);
24644 0 : return py_dwForwardTimeout;
24645 : }
24646 :
24647 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_dwForwardTimeout(PyObject *py_obj, PyObject *value, void *closure)
24648 : {
24649 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
24650 0 : if (value == NULL) {
24651 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwForwardTimeout");
24652 0 : return -1;
24653 : }
24654 : {
24655 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwForwardTimeout));
24656 0 : if (PyLong_Check(value)) {
24657 0 : unsigned long long test_var;
24658 0 : test_var = PyLong_AsUnsignedLongLong(value);
24659 0 : if (PyErr_Occurred() != NULL) {
24660 0 : return -1;
24661 : }
24662 0 : if (test_var > uint_max) {
24663 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24664 : PyLong_Type.tp_name, uint_max, test_var);
24665 0 : return -1;
24666 : }
24667 0 : object->dwForwardTimeout = test_var;
24668 : } else {
24669 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24670 : PyLong_Type.tp_name);
24671 0 : return -1;
24672 : }
24673 : }
24674 0 : return 0;
24675 : }
24676 :
24677 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_get_aipForwarders(PyObject *obj, void *closure)
24678 : {
24679 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(obj);
24680 0 : PyObject *py_aipForwarders;
24681 0 : if (object->aipForwarders == NULL) {
24682 0 : Py_RETURN_NONE;
24683 : }
24684 0 : if (object->aipForwarders == NULL) {
24685 0 : py_aipForwarders = Py_None;
24686 0 : Py_INCREF(py_aipForwarders);
24687 : } else {
24688 0 : py_aipForwarders = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, object->aipForwarders, object->aipForwarders);
24689 : }
24690 0 : return py_aipForwarders;
24691 : }
24692 :
24693 0 : static int py_DNS_RPC_FORWARDERS_LONGHORN_set_aipForwarders(PyObject *py_obj, PyObject *value, void *closure)
24694 : {
24695 0 : struct DNS_RPC_FORWARDERS_LONGHORN *object = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(py_obj);
24696 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->aipForwarders));
24697 0 : if (value == NULL) {
24698 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->aipForwarders");
24699 0 : return -1;
24700 : }
24701 0 : if (value == Py_None) {
24702 0 : object->aipForwarders = NULL;
24703 : } else {
24704 0 : object->aipForwarders = NULL;
24705 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, value, return -1;);
24706 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
24707 0 : PyErr_NoMemory();
24708 0 : return -1;
24709 : }
24710 0 : object->aipForwarders = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(value);
24711 : }
24712 0 : return 0;
24713 : }
24714 :
24715 : static PyGetSetDef py_DNS_RPC_FORWARDERS_LONGHORN_getsetters[] = {
24716 : {
24717 : .name = discard_const_p(char, "dwRpcStructureVersion"),
24718 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_dwRpcStructureVersion,
24719 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_dwRpcStructureVersion,
24720 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24721 : },
24722 : {
24723 : .name = discard_const_p(char, "dwReserved0"),
24724 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_dwReserved0,
24725 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_dwReserved0,
24726 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24727 : },
24728 : {
24729 : .name = discard_const_p(char, "fRecurseAfterForwarding"),
24730 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_fRecurseAfterForwarding,
24731 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_fRecurseAfterForwarding,
24732 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24733 : },
24734 : {
24735 : .name = discard_const_p(char, "dwForwardTimeout"),
24736 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_dwForwardTimeout,
24737 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_dwForwardTimeout,
24738 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24739 : },
24740 : {
24741 : .name = discard_const_p(char, "aipForwarders"),
24742 : .get = py_DNS_RPC_FORWARDERS_LONGHORN_get_aipForwarders,
24743 : .set = py_DNS_RPC_FORWARDERS_LONGHORN_set_aipForwarders,
24744 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_ADDR_ARRAY")
24745 : },
24746 : { .name = NULL }
24747 : };
24748 :
24749 0 : static PyObject *py_DNS_RPC_FORWARDERS_LONGHORN_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
24750 : {
24751 0 : return pytalloc_new(struct DNS_RPC_FORWARDERS_LONGHORN, type);
24752 : }
24753 :
24754 :
24755 : static PyTypeObject DNS_RPC_FORWARDERS_LONGHORN_Type = {
24756 : PyVarObject_HEAD_INIT(NULL, 0)
24757 : .tp_name = "dnsserver.DNS_RPC_FORWARDERS_LONGHORN",
24758 : .tp_getset = py_DNS_RPC_FORWARDERS_LONGHORN_getsetters,
24759 : .tp_methods = NULL,
24760 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
24761 : .tp_new = py_DNS_RPC_FORWARDERS_LONGHORN_new,
24762 : };
24763 :
24764 :
24765 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwRpcStructureVersion(PyObject *obj, void *closure)
24766 : {
24767 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
24768 0 : PyObject *py_dwRpcStructureVersion;
24769 0 : py_dwRpcStructureVersion = PyLong_FromUnsignedLongLong((uint32_t)object->dwRpcStructureVersion);
24770 0 : return py_dwRpcStructureVersion;
24771 : }
24772 :
24773 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_dwRpcStructureVersion(PyObject *py_obj, PyObject *value, void *closure)
24774 : {
24775 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
24776 0 : if (value == NULL) {
24777 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwRpcStructureVersion");
24778 0 : return -1;
24779 : }
24780 : {
24781 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwRpcStructureVersion));
24782 0 : if (PyLong_Check(value)) {
24783 0 : unsigned long long test_var;
24784 0 : test_var = PyLong_AsUnsignedLongLong(value);
24785 0 : if (PyErr_Occurred() != NULL) {
24786 0 : return -1;
24787 : }
24788 0 : if (test_var > uint_max) {
24789 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24790 : PyLong_Type.tp_name, uint_max, test_var);
24791 0 : return -1;
24792 : }
24793 0 : object->dwRpcStructureVersion = test_var;
24794 : } else {
24795 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24796 : PyLong_Type.tp_name);
24797 0 : return -1;
24798 : }
24799 : }
24800 0 : return 0;
24801 : }
24802 :
24803 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwReserved0(PyObject *obj, void *closure)
24804 : {
24805 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
24806 0 : PyObject *py_dwReserved0;
24807 0 : py_dwReserved0 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved0);
24808 0 : return py_dwReserved0;
24809 : }
24810 :
24811 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_dwReserved0(PyObject *py_obj, PyObject *value, void *closure)
24812 : {
24813 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
24814 0 : if (value == NULL) {
24815 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved0");
24816 0 : return -1;
24817 : }
24818 : {
24819 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved0));
24820 0 : if (PyLong_Check(value)) {
24821 0 : unsigned long long test_var;
24822 0 : test_var = PyLong_AsUnsignedLongLong(value);
24823 0 : if (PyErr_Occurred() != NULL) {
24824 0 : return -1;
24825 : }
24826 0 : if (test_var > uint_max) {
24827 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24828 : PyLong_Type.tp_name, uint_max, test_var);
24829 0 : return -1;
24830 : }
24831 0 : object->dwReserved0 = test_var;
24832 : } else {
24833 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24834 : PyLong_Type.tp_name);
24835 0 : return -1;
24836 : }
24837 : }
24838 0 : return 0;
24839 : }
24840 :
24841 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwAutoConfigFlags(PyObject *obj, void *closure)
24842 : {
24843 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
24844 0 : PyObject *py_dwAutoConfigFlags;
24845 0 : py_dwAutoConfigFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwAutoConfigFlags);
24846 0 : return py_dwAutoConfigFlags;
24847 : }
24848 :
24849 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_dwAutoConfigFlags(PyObject *py_obj, PyObject *value, void *closure)
24850 : {
24851 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
24852 0 : if (value == NULL) {
24853 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwAutoConfigFlags");
24854 0 : return -1;
24855 : }
24856 : {
24857 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwAutoConfigFlags));
24858 0 : if (PyLong_Check(value)) {
24859 0 : unsigned long long test_var;
24860 0 : test_var = PyLong_AsUnsignedLongLong(value);
24861 0 : if (PyErr_Occurred() != NULL) {
24862 0 : return -1;
24863 : }
24864 0 : if (test_var > uint_max) {
24865 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24866 : PyLong_Type.tp_name, uint_max, test_var);
24867 0 : return -1;
24868 : }
24869 0 : object->dwAutoConfigFlags = test_var;
24870 : } else {
24871 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24872 : PyLong_Type.tp_name);
24873 0 : return -1;
24874 : }
24875 : }
24876 0 : return 0;
24877 : }
24878 :
24879 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_dwReserved1(PyObject *obj, void *closure)
24880 : {
24881 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
24882 0 : PyObject *py_dwReserved1;
24883 0 : py_dwReserved1 = PyLong_FromUnsignedLongLong((uint32_t)object->dwReserved1);
24884 0 : return py_dwReserved1;
24885 : }
24886 :
24887 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_dwReserved1(PyObject *py_obj, PyObject *value, void *closure)
24888 : {
24889 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
24890 0 : if (value == NULL) {
24891 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwReserved1");
24892 0 : return -1;
24893 : }
24894 : {
24895 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwReserved1));
24896 0 : if (PyLong_Check(value)) {
24897 0 : unsigned long long test_var;
24898 0 : test_var = PyLong_AsUnsignedLongLong(value);
24899 0 : if (PyErr_Occurred() != NULL) {
24900 0 : return -1;
24901 : }
24902 0 : if (test_var > uint_max) {
24903 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
24904 : PyLong_Type.tp_name, uint_max, test_var);
24905 0 : return -1;
24906 : }
24907 0 : object->dwReserved1 = test_var;
24908 : } else {
24909 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
24910 : PyLong_Type.tp_name);
24911 0 : return -1;
24912 : }
24913 : }
24914 0 : return 0;
24915 : }
24916 :
24917 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_get_pszNewDomainName(PyObject *obj, void *closure)
24918 : {
24919 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(obj);
24920 0 : PyObject *py_pszNewDomainName;
24921 0 : if (object->pszNewDomainName == NULL) {
24922 0 : Py_RETURN_NONE;
24923 : }
24924 0 : if (object->pszNewDomainName == NULL) {
24925 0 : py_pszNewDomainName = Py_None;
24926 0 : Py_INCREF(py_pszNewDomainName);
24927 : } else {
24928 0 : if (object->pszNewDomainName == NULL) {
24929 0 : py_pszNewDomainName = Py_None;
24930 0 : Py_INCREF(py_pszNewDomainName);
24931 : } else {
24932 0 : py_pszNewDomainName = PyUnicode_Decode(object->pszNewDomainName, strlen(object->pszNewDomainName), "utf-8", "ignore");
24933 : }
24934 : }
24935 0 : return py_pszNewDomainName;
24936 : }
24937 :
24938 0 : static int py_DNS_RPC_AUTOCONFIGURE_set_pszNewDomainName(PyObject *py_obj, PyObject *value, void *closure)
24939 : {
24940 0 : struct DNS_RPC_AUTOCONFIGURE *object = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(py_obj);
24941 0 : if (value == NULL) {
24942 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->pszNewDomainName");
24943 0 : return -1;
24944 : }
24945 0 : if (value == Py_None) {
24946 0 : object->pszNewDomainName = NULL;
24947 : } else {
24948 0 : object->pszNewDomainName = NULL;
24949 : {
24950 0 : const char *test_str;
24951 0 : const char *talloc_str;
24952 0 : PyObject *unicode = NULL;
24953 0 : if (PyUnicode_Check(value)) {
24954 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
24955 0 : if (unicode == NULL) {
24956 0 : PyErr_NoMemory();
24957 0 : return -1;
24958 : }
24959 0 : test_str = PyBytes_AS_STRING(unicode);
24960 0 : } else if (PyBytes_Check(value)) {
24961 0 : test_str = PyBytes_AS_STRING(value);
24962 : } else {
24963 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
24964 0 : return -1;
24965 : }
24966 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
24967 0 : if (unicode != NULL) {
24968 0 : Py_DECREF(unicode);
24969 : }
24970 0 : if (talloc_str == NULL) {
24971 0 : PyErr_NoMemory();
24972 0 : return -1;
24973 : }
24974 0 : object->pszNewDomainName = talloc_str;
24975 : }
24976 : }
24977 0 : return 0;
24978 : }
24979 :
24980 : static PyGetSetDef py_DNS_RPC_AUTOCONFIGURE_getsetters[] = {
24981 : {
24982 : .name = discard_const_p(char, "dwRpcStructureVersion"),
24983 : .get = py_DNS_RPC_AUTOCONFIGURE_get_dwRpcStructureVersion,
24984 : .set = py_DNS_RPC_AUTOCONFIGURE_set_dwRpcStructureVersion,
24985 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24986 : },
24987 : {
24988 : .name = discard_const_p(char, "dwReserved0"),
24989 : .get = py_DNS_RPC_AUTOCONFIGURE_get_dwReserved0,
24990 : .set = py_DNS_RPC_AUTOCONFIGURE_set_dwReserved0,
24991 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
24992 : },
24993 : {
24994 : .name = discard_const_p(char, "dwAutoConfigFlags"),
24995 : .get = py_DNS_RPC_AUTOCONFIGURE_get_dwAutoConfigFlags,
24996 : .set = py_DNS_RPC_AUTOCONFIGURE_set_dwAutoConfigFlags,
24997 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_AUTOCONFIG")
24998 : },
24999 : {
25000 : .name = discard_const_p(char, "dwReserved1"),
25001 : .get = py_DNS_RPC_AUTOCONFIGURE_get_dwReserved1,
25002 : .set = py_DNS_RPC_AUTOCONFIGURE_set_dwReserved1,
25003 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
25004 : },
25005 : {
25006 : .name = discard_const_p(char, "pszNewDomainName"),
25007 : .get = py_DNS_RPC_AUTOCONFIGURE_get_pszNewDomainName,
25008 : .set = py_DNS_RPC_AUTOCONFIGURE_set_pszNewDomainName,
25009 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
25010 : },
25011 : { .name = NULL }
25012 : };
25013 :
25014 0 : static PyObject *py_DNS_RPC_AUTOCONFIGURE_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25015 : {
25016 0 : return pytalloc_new(struct DNS_RPC_AUTOCONFIGURE, type);
25017 : }
25018 :
25019 :
25020 : static PyTypeObject DNS_RPC_AUTOCONFIGURE_Type = {
25021 : PyVarObject_HEAD_INIT(NULL, 0)
25022 : .tp_name = "dnsserver.DNS_RPC_AUTOCONFIGURE",
25023 : .tp_getset = py_DNS_RPC_AUTOCONFIGURE_getsetters,
25024 : .tp_methods = NULL,
25025 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25026 : .tp_new = py_DNS_RPC_AUTOCONFIGURE_new,
25027 : };
25028 :
25029 :
25030 0 : static PyObject *py_DNSSRV_STAT_HEADER_get_StatId(PyObject *obj, void *closure)
25031 : {
25032 0 : struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(obj);
25033 0 : PyObject *py_StatId;
25034 0 : py_StatId = PyLong_FromUnsignedLongLong((uint32_t)object->StatId);
25035 0 : return py_StatId;
25036 : }
25037 :
25038 0 : static int py_DNSSRV_STAT_HEADER_set_StatId(PyObject *py_obj, PyObject *value, void *closure)
25039 : {
25040 0 : struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(py_obj);
25041 0 : if (value == NULL) {
25042 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->StatId");
25043 0 : return -1;
25044 : }
25045 : {
25046 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->StatId));
25047 0 : if (PyLong_Check(value)) {
25048 0 : unsigned long long test_var;
25049 0 : test_var = PyLong_AsUnsignedLongLong(value);
25050 0 : if (PyErr_Occurred() != NULL) {
25051 0 : return -1;
25052 : }
25053 0 : if (test_var > uint_max) {
25054 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25055 : PyLong_Type.tp_name, uint_max, test_var);
25056 0 : return -1;
25057 : }
25058 0 : object->StatId = test_var;
25059 : } else {
25060 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25061 : PyLong_Type.tp_name);
25062 0 : return -1;
25063 : }
25064 : }
25065 0 : return 0;
25066 : }
25067 :
25068 0 : static PyObject *py_DNSSRV_STAT_HEADER_get_wLength(PyObject *obj, void *closure)
25069 : {
25070 0 : struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(obj);
25071 0 : PyObject *py_wLength;
25072 0 : py_wLength = PyLong_FromLong((uint16_t)object->wLength);
25073 0 : return py_wLength;
25074 : }
25075 :
25076 0 : static int py_DNSSRV_STAT_HEADER_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
25077 : {
25078 0 : struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(py_obj);
25079 0 : if (value == NULL) {
25080 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wLength");
25081 0 : return -1;
25082 : }
25083 : {
25084 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wLength));
25085 0 : if (PyLong_Check(value)) {
25086 0 : unsigned long long test_var;
25087 0 : test_var = PyLong_AsUnsignedLongLong(value);
25088 0 : if (PyErr_Occurred() != NULL) {
25089 0 : return -1;
25090 : }
25091 0 : if (test_var > uint_max) {
25092 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25093 : PyLong_Type.tp_name, uint_max, test_var);
25094 0 : return -1;
25095 : }
25096 0 : object->wLength = test_var;
25097 : } else {
25098 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25099 : PyLong_Type.tp_name);
25100 0 : return -1;
25101 : }
25102 : }
25103 0 : return 0;
25104 : }
25105 :
25106 0 : static PyObject *py_DNSSRV_STAT_HEADER_get_fClear(PyObject *obj, void *closure)
25107 : {
25108 0 : struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(obj);
25109 0 : PyObject *py_fClear;
25110 0 : py_fClear = PyLong_FromLong((uint16_t)object->fClear);
25111 0 : return py_fClear;
25112 : }
25113 :
25114 0 : static int py_DNSSRV_STAT_HEADER_set_fClear(PyObject *py_obj, PyObject *value, void *closure)
25115 : {
25116 0 : struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(py_obj);
25117 0 : if (value == NULL) {
25118 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fClear");
25119 0 : return -1;
25120 : }
25121 : {
25122 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fClear));
25123 0 : if (PyLong_Check(value)) {
25124 0 : unsigned long long test_var;
25125 0 : test_var = PyLong_AsUnsignedLongLong(value);
25126 0 : if (PyErr_Occurred() != NULL) {
25127 0 : return -1;
25128 : }
25129 0 : if (test_var > uint_max) {
25130 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25131 : PyLong_Type.tp_name, uint_max, test_var);
25132 0 : return -1;
25133 : }
25134 0 : object->fClear = test_var;
25135 : } else {
25136 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25137 : PyLong_Type.tp_name);
25138 0 : return -1;
25139 : }
25140 : }
25141 0 : return 0;
25142 : }
25143 :
25144 0 : static PyObject *py_DNSSRV_STAT_HEADER_get_fReserved(PyObject *obj, void *closure)
25145 : {
25146 0 : struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(obj);
25147 0 : PyObject *py_fReserved;
25148 0 : py_fReserved = PyLong_FromLong((uint16_t)object->fReserved);
25149 0 : return py_fReserved;
25150 : }
25151 :
25152 0 : static int py_DNSSRV_STAT_HEADER_set_fReserved(PyObject *py_obj, PyObject *value, void *closure)
25153 : {
25154 0 : struct DNSSRV_STAT_HEADER *object = (struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(py_obj);
25155 0 : if (value == NULL) {
25156 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->fReserved");
25157 0 : return -1;
25158 : }
25159 : {
25160 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->fReserved));
25161 0 : if (PyLong_Check(value)) {
25162 0 : unsigned long long test_var;
25163 0 : test_var = PyLong_AsUnsignedLongLong(value);
25164 0 : if (PyErr_Occurred() != NULL) {
25165 0 : return -1;
25166 : }
25167 0 : if (test_var > uint_max) {
25168 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25169 : PyLong_Type.tp_name, uint_max, test_var);
25170 0 : return -1;
25171 : }
25172 0 : object->fReserved = test_var;
25173 : } else {
25174 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25175 : PyLong_Type.tp_name);
25176 0 : return -1;
25177 : }
25178 : }
25179 0 : return 0;
25180 : }
25181 :
25182 : static PyGetSetDef py_DNSSRV_STAT_HEADER_getsetters[] = {
25183 : {
25184 : .name = discard_const_p(char, "StatId"),
25185 : .get = py_DNSSRV_STAT_HEADER_get_StatId,
25186 : .set = py_DNSSRV_STAT_HEADER_set_StatId,
25187 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
25188 : },
25189 : {
25190 : .name = discard_const_p(char, "wLength"),
25191 : .get = py_DNSSRV_STAT_HEADER_get_wLength,
25192 : .set = py_DNSSRV_STAT_HEADER_set_wLength,
25193 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
25194 : },
25195 : {
25196 : .name = discard_const_p(char, "fClear"),
25197 : .get = py_DNSSRV_STAT_HEADER_get_fClear,
25198 : .set = py_DNSSRV_STAT_HEADER_set_fClear,
25199 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
25200 : },
25201 : {
25202 : .name = discard_const_p(char, "fReserved"),
25203 : .get = py_DNSSRV_STAT_HEADER_get_fReserved,
25204 : .set = py_DNSSRV_STAT_HEADER_set_fReserved,
25205 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
25206 : },
25207 : { .name = NULL }
25208 : };
25209 :
25210 0 : static PyObject *py_DNSSRV_STAT_HEADER_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25211 : {
25212 0 : return pytalloc_new(struct DNSSRV_STAT_HEADER, type);
25213 : }
25214 :
25215 :
25216 : static PyTypeObject DNSSRV_STAT_HEADER_Type = {
25217 : PyVarObject_HEAD_INIT(NULL, 0)
25218 : .tp_name = "dnsserver.DNSSRV_STAT_HEADER",
25219 : .tp_getset = py_DNSSRV_STAT_HEADER_getsetters,
25220 : .tp_methods = NULL,
25221 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25222 : .tp_new = py_DNSSRV_STAT_HEADER_new,
25223 : };
25224 :
25225 :
25226 0 : static PyObject *py_DNSSRV_STAT_get_Header(PyObject *obj, void *closure)
25227 : {
25228 0 : struct DNSSRV_STAT *object = (struct DNSSRV_STAT *)pytalloc_get_ptr(obj);
25229 0 : PyObject *py_Header;
25230 0 : py_Header = pytalloc_reference_ex(&DNSSRV_STAT_HEADER_Type, pytalloc_get_mem_ctx(obj), &object->Header);
25231 0 : return py_Header;
25232 : }
25233 :
25234 0 : static int py_DNSSRV_STAT_set_Header(PyObject *py_obj, PyObject *value, void *closure)
25235 : {
25236 0 : struct DNSSRV_STAT *object = (struct DNSSRV_STAT *)pytalloc_get_ptr(py_obj);
25237 0 : if (value == NULL) {
25238 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Header");
25239 0 : return -1;
25240 : }
25241 0 : PY_CHECK_TYPE(&DNSSRV_STAT_HEADER_Type, value, return -1;);
25242 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
25243 0 : PyErr_NoMemory();
25244 0 : return -1;
25245 : }
25246 0 : object->Header = *(struct DNSSRV_STAT_HEADER *)pytalloc_get_ptr(value);
25247 0 : return 0;
25248 : }
25249 :
25250 0 : static PyObject *py_DNSSRV_STAT_get_Buffer(PyObject *obj, void *closure)
25251 : {
25252 0 : struct DNSSRV_STAT *object = (struct DNSSRV_STAT *)pytalloc_get_ptr(obj);
25253 0 : PyObject *py_Buffer;
25254 0 : py_Buffer = PyList_New(1);
25255 0 : if (py_Buffer == NULL) {
25256 0 : return NULL;
25257 : }
25258 : {
25259 : int Buffer_cntr_0;
25260 0 : for (Buffer_cntr_0 = 0; Buffer_cntr_0 < (1); Buffer_cntr_0++) {
25261 0 : PyObject *py_Buffer_0;
25262 0 : py_Buffer_0 = PyLong_FromLong((uint16_t)object->Buffer[Buffer_cntr_0]);
25263 0 : PyList_SetItem(py_Buffer, Buffer_cntr_0, py_Buffer_0);
25264 : }
25265 : }
25266 0 : return py_Buffer;
25267 : }
25268 :
25269 0 : static int py_DNSSRV_STAT_set_Buffer(PyObject *py_obj, PyObject *value, void *closure)
25270 : {
25271 0 : struct DNSSRV_STAT *object = (struct DNSSRV_STAT *)pytalloc_get_ptr(py_obj);
25272 0 : if (value == NULL) {
25273 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Buffer");
25274 0 : return -1;
25275 : }
25276 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
25277 : {
25278 0 : int Buffer_cntr_0;
25279 0 : if (ARRAY_SIZE(object->Buffer) != PyList_GET_SIZE(value)) {
25280 0 : PyErr_Format(PyExc_TypeError, "Expected list of type %s, length %zu, got %zd", Py_TYPE(value)->tp_name, ARRAY_SIZE(object->Buffer), PyList_GET_SIZE(value));
25281 0 : return -1;
25282 : }
25283 0 : for (Buffer_cntr_0 = 0; Buffer_cntr_0 < PyList_GET_SIZE(value); Buffer_cntr_0++) {
25284 0 : if (PyList_GET_ITEM(value, Buffer_cntr_0) == NULL) {
25285 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->Buffer[Buffer_cntr_0]");
25286 0 : return -1;
25287 : }
25288 : {
25289 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->Buffer[Buffer_cntr_0]));
25290 0 : if (PyLong_Check(PyList_GET_ITEM(value, Buffer_cntr_0))) {
25291 0 : unsigned long long test_var;
25292 0 : test_var = PyLong_AsUnsignedLongLong(PyList_GET_ITEM(value, Buffer_cntr_0));
25293 0 : if (PyErr_Occurred() != NULL) {
25294 0 : return -1;
25295 : }
25296 0 : if (test_var > uint_max) {
25297 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25298 : PyLong_Type.tp_name, uint_max, test_var);
25299 0 : return -1;
25300 : }
25301 0 : object->Buffer[Buffer_cntr_0] = test_var;
25302 : } else {
25303 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25304 : PyLong_Type.tp_name);
25305 0 : return -1;
25306 : }
25307 : }
25308 : }
25309 : }
25310 0 : return 0;
25311 : }
25312 :
25313 : static PyGetSetDef py_DNSSRV_STAT_getsetters[] = {
25314 : {
25315 : .name = discard_const_p(char, "Header"),
25316 : .get = py_DNSSRV_STAT_get_Header,
25317 : .set = py_DNSSRV_STAT_set_Header,
25318 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_STAT_HEADER")
25319 : },
25320 : {
25321 : .name = discard_const_p(char, "Buffer"),
25322 : .get = py_DNSSRV_STAT_get_Buffer,
25323 : .set = py_DNSSRV_STAT_set_Buffer,
25324 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
25325 : },
25326 : { .name = NULL }
25327 : };
25328 :
25329 0 : static PyObject *py_DNSSRV_STAT_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
25330 : {
25331 0 : return pytalloc_new(struct DNSSRV_STAT, type);
25332 : }
25333 :
25334 :
25335 : static PyTypeObject DNSSRV_STAT_Type = {
25336 : PyVarObject_HEAD_INIT(NULL, 0)
25337 : .tp_name = "dnsserver.DNSSRV_STAT",
25338 : .tp_getset = py_DNSSRV_STAT_getsetters,
25339 : .tp_methods = NULL,
25340 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
25341 : .tp_new = py_DNSSRV_STAT_new,
25342 : };
25343 :
25344 49 : static PyObject *py_import_DNSSRV_RPC_UNION(TALLOC_CTX *mem_ctx, int level, union DNSSRV_RPC_UNION *in)
25345 : {
25346 0 : PyObject *ret;
25347 :
25348 49 : switch (level) {
25349 0 : case DNSSRV_TYPEID_NULL:
25350 0 : if (in->Null == NULL) {
25351 0 : ret = Py_None;
25352 0 : Py_INCREF(ret);
25353 : } else {
25354 0 : ret = PyLong_FromLong((uint16_t)*in->Null);
25355 : }
25356 0 : return ret;
25357 :
25358 0 : case DNSSRV_TYPEID_DWORD:
25359 0 : ret = PyLong_FromUnsignedLongLong((uint32_t)in->Dword);
25360 0 : return ret;
25361 :
25362 0 : case DNSSRV_TYPEID_LPSTR:
25363 0 : if (in->String == NULL) {
25364 0 : ret = Py_None;
25365 0 : Py_INCREF(ret);
25366 : } else {
25367 0 : if (in->String == NULL) {
25368 0 : ret = Py_None;
25369 0 : Py_INCREF(ret);
25370 : } else {
25371 0 : ret = PyUnicode_Decode(in->String, strlen(in->String), "utf-8", "ignore");
25372 : }
25373 : }
25374 0 : return ret;
25375 :
25376 0 : case DNSSRV_TYPEID_LPWSTR:
25377 0 : if (in->WideString == NULL) {
25378 0 : ret = Py_None;
25379 0 : Py_INCREF(ret);
25380 : } else {
25381 0 : if (in->WideString == NULL) {
25382 0 : ret = Py_None;
25383 0 : Py_INCREF(ret);
25384 : } else {
25385 0 : ret = PyUnicode_Decode(in->WideString, strlen(in->WideString), "utf-8", "ignore");
25386 : }
25387 : }
25388 0 : return ret;
25389 :
25390 0 : case DNSSRV_TYPEID_IPARRAY:
25391 0 : if (in->IpArray == NULL) {
25392 0 : ret = Py_None;
25393 0 : Py_INCREF(ret);
25394 : } else {
25395 0 : ret = pytalloc_reference_ex(&IP4_ARRAY_Type, in->IpArray, in->IpArray);
25396 : }
25397 0 : return ret;
25398 :
25399 0 : case DNSSRV_TYPEID_BUFFER:
25400 0 : if (in->Buffer == NULL) {
25401 0 : ret = Py_None;
25402 0 : Py_INCREF(ret);
25403 : } else {
25404 0 : ret = pytalloc_reference_ex(&DNS_RPC_BUFFER_Type, in->Buffer, in->Buffer);
25405 : }
25406 0 : return ret;
25407 :
25408 4 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
25409 4 : if (in->ServerInfoW2K == NULL) {
25410 0 : ret = Py_None;
25411 0 : Py_INCREF(ret);
25412 : } else {
25413 4 : ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_W2K_Type, in->ServerInfoW2K, in->ServerInfoW2K);
25414 : }
25415 4 : return ret;
25416 :
25417 0 : case DNSSRV_TYPEID_STATS:
25418 0 : if (in->Stats == NULL) {
25419 0 : ret = Py_None;
25420 0 : Py_INCREF(ret);
25421 : } else {
25422 0 : ret = pytalloc_reference_ex(&DNSSRV_STAT_Type, in->Stats, in->Stats);
25423 : }
25424 0 : return ret;
25425 :
25426 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
25427 0 : if (in->ForwardersW2K == NULL) {
25428 0 : ret = Py_None;
25429 0 : Py_INCREF(ret);
25430 : } else {
25431 0 : ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_W2K_Type, in->ForwardersW2K, in->ForwardersW2K);
25432 : }
25433 0 : return ret;
25434 :
25435 0 : case DNSSRV_TYPEID_ZONE_W2K:
25436 0 : if (in->ZoneW2K == NULL) {
25437 0 : ret = Py_None;
25438 0 : Py_INCREF(ret);
25439 : } else {
25440 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_W2K_Type, in->ZoneW2K, in->ZoneW2K);
25441 : }
25442 0 : return ret;
25443 :
25444 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
25445 0 : if (in->ZoneInfoW2K == NULL) {
25446 0 : ret = Py_None;
25447 0 : Py_INCREF(ret);
25448 : } else {
25449 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_W2K_Type, in->ZoneInfoW2K, in->ZoneInfoW2K);
25450 : }
25451 0 : return ret;
25452 :
25453 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
25454 0 : if (in->SecondariesW2K == NULL) {
25455 0 : ret = Py_None;
25456 0 : Py_INCREF(ret);
25457 : } else {
25458 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_W2K_Type, in->SecondariesW2K, in->SecondariesW2K);
25459 : }
25460 0 : return ret;
25461 :
25462 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
25463 0 : if (in->DatabaseW2K == NULL) {
25464 0 : ret = Py_None;
25465 0 : Py_INCREF(ret);
25466 : } else {
25467 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DATABASE_W2K_Type, in->DatabaseW2K, in->DatabaseW2K);
25468 : }
25469 0 : return ret;
25470 :
25471 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
25472 0 : if (in->ZoneCreateW2K == NULL) {
25473 0 : ret = Py_None;
25474 0 : Py_INCREF(ret);
25475 : } else {
25476 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type, in->ZoneCreateW2K, in->ZoneCreateW2K);
25477 : }
25478 0 : return ret;
25479 :
25480 0 : case DNSSRV_TYPEID_NAME_AND_PARAM:
25481 0 : if (in->NameAndParam == NULL) {
25482 0 : ret = Py_None;
25483 0 : Py_INCREF(ret);
25484 : } else {
25485 0 : ret = pytalloc_reference_ex(&DNS_RPC_NAME_AND_PARAM_Type, in->NameAndParam, in->NameAndParam);
25486 : }
25487 0 : return ret;
25488 :
25489 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
25490 0 : if (in->ZoneListW2K == NULL) {
25491 0 : ret = Py_None;
25492 0 : Py_INCREF(ret);
25493 : } else {
25494 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_LIST_W2K_Type, in->ZoneListW2K, in->ZoneListW2K);
25495 : }
25496 0 : return ret;
25497 :
25498 4 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
25499 4 : if (in->ServerInfoDotNet == NULL) {
25500 0 : ret = Py_None;
25501 0 : Py_INCREF(ret);
25502 : } else {
25503 4 : ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_DOTNET_Type, in->ServerInfoDotNet, in->ServerInfoDotNet);
25504 : }
25505 4 : return ret;
25506 :
25507 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
25508 0 : if (in->ForwardersDotNet == NULL) {
25509 0 : ret = Py_None;
25510 0 : Py_INCREF(ret);
25511 : } else {
25512 0 : ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_DOTNET_Type, in->ForwardersDotNet, in->ForwardersDotNet);
25513 : }
25514 0 : return ret;
25515 :
25516 0 : case DNSSRV_TYPEID_ZONE:
25517 0 : if (in->Zone == NULL) {
25518 0 : ret = Py_None;
25519 0 : Py_INCREF(ret);
25520 : } else {
25521 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DOTNET_Type, in->Zone, in->Zone);
25522 : }
25523 0 : return ret;
25524 :
25525 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
25526 0 : if (in->ZoneInfoDotNet == NULL) {
25527 0 : ret = Py_None;
25528 0 : Py_INCREF(ret);
25529 : } else {
25530 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_DOTNET_Type, in->ZoneInfoDotNet, in->ZoneInfoDotNet);
25531 : }
25532 0 : return ret;
25533 :
25534 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
25535 0 : if (in->SecondariesDotNet == NULL) {
25536 0 : ret = Py_None;
25537 0 : Py_INCREF(ret);
25538 : } else {
25539 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type, in->SecondariesDotNet, in->SecondariesDotNet);
25540 : }
25541 0 : return ret;
25542 :
25543 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
25544 0 : if (in->Database == NULL) {
25545 0 : ret = Py_None;
25546 0 : Py_INCREF(ret);
25547 : } else {
25548 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_DATABASE_DOTNET_Type, in->Database, in->Database);
25549 : }
25550 0 : return ret;
25551 :
25552 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
25553 0 : if (in->ZoneCreateDotNet == NULL) {
25554 0 : ret = Py_None;
25555 0 : Py_INCREF(ret);
25556 : } else {
25557 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type, in->ZoneCreateDotNet, in->ZoneCreateDotNet);
25558 : }
25559 0 : return ret;
25560 :
25561 20 : case DNSSRV_TYPEID_ZONE_LIST:
25562 20 : if (in->ZoneList == NULL) {
25563 0 : ret = Py_None;
25564 0 : Py_INCREF(ret);
25565 : } else {
25566 20 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_LIST_DOTNET_Type, in->ZoneList, in->ZoneList);
25567 : }
25568 20 : return ret;
25569 :
25570 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
25571 0 : if (in->ZoneExport == NULL) {
25572 0 : ret = Py_None;
25573 0 : Py_INCREF(ret);
25574 : } else {
25575 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_EXPORT_INFO_Type, in->ZoneExport, in->ZoneExport);
25576 : }
25577 0 : return ret;
25578 :
25579 0 : case DNSSRV_TYPEID_DP_INFO:
25580 0 : if (in->DirectoryPartition == NULL) {
25581 0 : ret = Py_None;
25582 0 : Py_INCREF(ret);
25583 : } else {
25584 0 : ret = pytalloc_reference_ex(&DNS_RPC_DP_INFO_Type, in->DirectoryPartition, in->DirectoryPartition);
25585 : }
25586 0 : return ret;
25587 :
25588 0 : case DNSSRV_TYPEID_DP_ENUM:
25589 0 : if (in->DirectoryPartitionEnum == NULL) {
25590 0 : ret = Py_None;
25591 0 : Py_INCREF(ret);
25592 : } else {
25593 0 : ret = pytalloc_reference_ex(&DNS_RPC_DP_ENUM_Type, in->DirectoryPartitionEnum, in->DirectoryPartitionEnum);
25594 : }
25595 0 : return ret;
25596 :
25597 0 : case DNSSRV_TYPEID_DP_LIST:
25598 0 : if (in->DirectoryPartitionList == NULL) {
25599 0 : ret = Py_None;
25600 0 : Py_INCREF(ret);
25601 : } else {
25602 0 : ret = pytalloc_reference_ex(&DNS_RPC_DP_LIST_Type, in->DirectoryPartitionList, in->DirectoryPartitionList);
25603 : }
25604 0 : return ret;
25605 :
25606 0 : case DNSSRV_TYPEID_ENLIST_DP:
25607 0 : if (in->EnlistDirectoryPartition == NULL) {
25608 0 : ret = Py_None;
25609 0 : Py_INCREF(ret);
25610 : } else {
25611 0 : ret = pytalloc_reference_ex(&DNS_RPC_ENLIST_DP_Type, in->EnlistDirectoryPartition, in->EnlistDirectoryPartition);
25612 : }
25613 0 : return ret;
25614 :
25615 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
25616 0 : if (in->ZoneChangeDirectoryPartition == NULL) {
25617 0 : ret = Py_None;
25618 0 : Py_INCREF(ret);
25619 : } else {
25620 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CHANGE_DP_Type, in->ZoneChangeDirectoryPartition, in->ZoneChangeDirectoryPartition);
25621 : }
25622 0 : return ret;
25623 :
25624 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
25625 0 : if (in->EnumZonesFilter == NULL) {
25626 0 : ret = Py_None;
25627 0 : Py_INCREF(ret);
25628 : } else {
25629 0 : ret = pytalloc_reference_ex(&DNS_RPC_ENUM_ZONES_FILTER_Type, in->EnumZonesFilter, in->EnumZonesFilter);
25630 : }
25631 0 : return ret;
25632 :
25633 0 : case DNSSRV_TYPEID_ADDRARRAY:
25634 0 : if (in->AddrArray == NULL) {
25635 0 : ret = Py_None;
25636 0 : Py_INCREF(ret);
25637 : } else {
25638 0 : ret = pytalloc_reference_ex(&DNS_ADDR_ARRAY_Type, in->AddrArray, in->AddrArray);
25639 : }
25640 0 : return ret;
25641 :
25642 4 : case DNSSRV_TYPEID_SERVER_INFO:
25643 4 : if (in->ServerInfo == NULL) {
25644 0 : ret = Py_None;
25645 0 : Py_INCREF(ret);
25646 : } else {
25647 4 : ret = pytalloc_reference_ex(&DNS_RPC_SERVER_INFO_LONGHORN_Type, in->ServerInfo, in->ServerInfo);
25648 : }
25649 4 : return ret;
25650 :
25651 0 : case DNSSRV_TYPEID_ZONE_CREATE:
25652 0 : if (in->ZoneCreate == NULL) {
25653 0 : ret = Py_None;
25654 0 : Py_INCREF(ret);
25655 : } else {
25656 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type, in->ZoneCreate, in->ZoneCreate);
25657 : }
25658 0 : return ret;
25659 :
25660 0 : case DNSSRV_TYPEID_FORWARDERS:
25661 0 : if (in->Forwarders == NULL) {
25662 0 : ret = Py_None;
25663 0 : Py_INCREF(ret);
25664 : } else {
25665 0 : ret = pytalloc_reference_ex(&DNS_RPC_FORWARDERS_LONGHORN_Type, in->Forwarders, in->Forwarders);
25666 : }
25667 0 : return ret;
25668 :
25669 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
25670 0 : if (in->Secondaries == NULL) {
25671 0 : ret = Py_None;
25672 0 : Py_INCREF(ret);
25673 : } else {
25674 0 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type, in->Secondaries, in->Secondaries);
25675 : }
25676 0 : return ret;
25677 :
25678 0 : case DNSSRV_TYPEID_IP_VALIDATE:
25679 0 : if (in->IpValidate == NULL) {
25680 0 : ret = Py_None;
25681 0 : Py_INCREF(ret);
25682 : } else {
25683 0 : ret = pytalloc_reference_ex(&DNS_RPC_IP_VALIDATE_Type, in->IpValidate, in->IpValidate);
25684 : }
25685 0 : return ret;
25686 :
25687 17 : case DNSSRV_TYPEID_ZONE_INFO:
25688 17 : if (in->ZoneInfo == NULL) {
25689 0 : ret = Py_None;
25690 0 : Py_INCREF(ret);
25691 : } else {
25692 17 : ret = pytalloc_reference_ex(&DNS_RPC_ZONE_INFO_LONGHORN_Type, in->ZoneInfo, in->ZoneInfo);
25693 : }
25694 17 : return ret;
25695 :
25696 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
25697 0 : if (in->AutoConfigure == NULL) {
25698 0 : ret = Py_None;
25699 0 : Py_INCREF(ret);
25700 : } else {
25701 0 : ret = pytalloc_reference_ex(&DNS_RPC_AUTOCONFIGURE_Type, in->AutoConfigure, in->AutoConfigure);
25702 : }
25703 0 : return ret;
25704 :
25705 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
25706 0 : if (in->Utf8StringList == NULL) {
25707 0 : ret = Py_None;
25708 0 : Py_INCREF(ret);
25709 : } else {
25710 0 : ret = pytalloc_reference_ex(&DNS_RPC_UTF8_STRING_LIST_Type, in->Utf8StringList, in->Utf8StringList);
25711 : }
25712 0 : return ret;
25713 :
25714 : }
25715 0 : PyErr_SetString(PyExc_TypeError, "unknown union level");
25716 0 : return NULL;
25717 : }
25718 :
25719 1675 : static union DNSSRV_RPC_UNION *py_export_DNSSRV_RPC_UNION(TALLOC_CTX *mem_ctx, int level, PyObject *in)
25720 : {
25721 1675 : union DNSSRV_RPC_UNION *ret = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
25722 1675 : switch (level) {
25723 429 : case DNSSRV_TYPEID_NULL:
25724 429 : if (in == NULL) {
25725 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Null");
25726 0 : talloc_free(ret); return NULL;
25727 : }
25728 429 : if (in == Py_None) {
25729 429 : ret->Null = NULL;
25730 : } else {
25731 0 : ret->Null = talloc_ptrtype(mem_ctx, ret->Null);
25732 0 : if (ret->Null == NULL) {
25733 0 : PyErr_NoMemory();
25734 0 : talloc_free(ret); return NULL;
25735 : }
25736 : {
25737 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*ret->Null));
25738 0 : if (PyLong_Check(in)) {
25739 0 : unsigned long long test_var;
25740 0 : test_var = PyLong_AsUnsignedLongLong(in);
25741 0 : if (PyErr_Occurred() != NULL) {
25742 0 : talloc_free(ret); return NULL;
25743 : }
25744 0 : if (test_var > uint_max) {
25745 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25746 : PyLong_Type.tp_name, uint_max, test_var);
25747 0 : talloc_free(ret); return NULL;
25748 : }
25749 0 : *ret->Null = test_var;
25750 : } else {
25751 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25752 : PyLong_Type.tp_name);
25753 0 : talloc_free(ret); return NULL;
25754 : }
25755 : }
25756 : }
25757 429 : break;
25758 :
25759 20 : case DNSSRV_TYPEID_DWORD:
25760 20 : if (in == NULL) {
25761 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Dword");
25762 0 : talloc_free(ret); return NULL;
25763 : }
25764 : {
25765 20 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(ret->Dword));
25766 20 : if (PyLong_Check(in)) {
25767 0 : unsigned long long test_var;
25768 20 : test_var = PyLong_AsUnsignedLongLong(in);
25769 20 : if (PyErr_Occurred() != NULL) {
25770 0 : talloc_free(ret); return NULL;
25771 : }
25772 20 : if (test_var > uint_max) {
25773 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
25774 : PyLong_Type.tp_name, uint_max, test_var);
25775 0 : talloc_free(ret); return NULL;
25776 : }
25777 20 : ret->Dword = test_var;
25778 : } else {
25779 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
25780 : PyLong_Type.tp_name);
25781 0 : talloc_free(ret); return NULL;
25782 : }
25783 : }
25784 20 : break;
25785 :
25786 0 : case DNSSRV_TYPEID_LPSTR:
25787 0 : if (in == NULL) {
25788 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->String");
25789 0 : talloc_free(ret); return NULL;
25790 : }
25791 0 : if (in == Py_None) {
25792 0 : ret->String = NULL;
25793 : } else {
25794 0 : ret->String = NULL;
25795 : {
25796 0 : const char *test_str;
25797 0 : const char *talloc_str;
25798 0 : PyObject *unicode = NULL;
25799 0 : if (PyUnicode_Check(in)) {
25800 0 : unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
25801 0 : if (unicode == NULL) {
25802 0 : PyErr_NoMemory();
25803 0 : talloc_free(ret); return NULL;
25804 : }
25805 0 : test_str = PyBytes_AS_STRING(unicode);
25806 0 : } else if (PyBytes_Check(in)) {
25807 0 : test_str = PyBytes_AS_STRING(in);
25808 : } else {
25809 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
25810 0 : talloc_free(ret); return NULL;
25811 : }
25812 0 : talloc_str = talloc_strdup(mem_ctx, test_str);
25813 0 : if (unicode != NULL) {
25814 0 : Py_DECREF(unicode);
25815 : }
25816 0 : if (talloc_str == NULL) {
25817 0 : PyErr_NoMemory();
25818 0 : talloc_free(ret); return NULL;
25819 : }
25820 0 : ret->String = talloc_str;
25821 : }
25822 : }
25823 0 : break;
25824 :
25825 0 : case DNSSRV_TYPEID_LPWSTR:
25826 0 : if (in == NULL) {
25827 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->WideString");
25828 0 : talloc_free(ret); return NULL;
25829 : }
25830 0 : if (in == Py_None) {
25831 0 : ret->WideString = NULL;
25832 : } else {
25833 0 : ret->WideString = NULL;
25834 : {
25835 0 : const char *test_str;
25836 0 : const char *talloc_str;
25837 0 : PyObject *unicode = NULL;
25838 0 : if (PyUnicode_Check(in)) {
25839 0 : unicode = PyUnicode_AsEncodedString(in, "utf-8", "ignore");
25840 0 : if (unicode == NULL) {
25841 0 : PyErr_NoMemory();
25842 0 : talloc_free(ret); return NULL;
25843 : }
25844 0 : test_str = PyBytes_AS_STRING(unicode);
25845 0 : } else if (PyBytes_Check(in)) {
25846 0 : test_str = PyBytes_AS_STRING(in);
25847 : } else {
25848 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(in)->tp_name);
25849 0 : talloc_free(ret); return NULL;
25850 : }
25851 0 : talloc_str = talloc_strdup(mem_ctx, test_str);
25852 0 : if (unicode != NULL) {
25853 0 : Py_DECREF(unicode);
25854 : }
25855 0 : if (talloc_str == NULL) {
25856 0 : PyErr_NoMemory();
25857 0 : talloc_free(ret); return NULL;
25858 : }
25859 0 : ret->WideString = talloc_str;
25860 : }
25861 : }
25862 0 : break;
25863 :
25864 0 : case DNSSRV_TYPEID_IPARRAY:
25865 0 : if (in == NULL) {
25866 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->IpArray");
25867 0 : talloc_free(ret); return NULL;
25868 : }
25869 0 : if (in == Py_None) {
25870 0 : ret->IpArray = NULL;
25871 : } else {
25872 0 : ret->IpArray = NULL;
25873 0 : PY_CHECK_TYPE(&IP4_ARRAY_Type, in, talloc_free(ret); return NULL;);
25874 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25875 0 : PyErr_NoMemory();
25876 0 : talloc_free(ret); return NULL;
25877 : }
25878 0 : ret->IpArray = (struct IP4_ARRAY *)pytalloc_get_ptr(in);
25879 : }
25880 0 : break;
25881 :
25882 0 : case DNSSRV_TYPEID_BUFFER:
25883 0 : if (in == NULL) {
25884 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Buffer");
25885 0 : talloc_free(ret); return NULL;
25886 : }
25887 0 : if (in == Py_None) {
25888 0 : ret->Buffer = NULL;
25889 : } else {
25890 0 : ret->Buffer = NULL;
25891 0 : PY_CHECK_TYPE(&DNS_RPC_BUFFER_Type, in, talloc_free(ret); return NULL;);
25892 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25893 0 : PyErr_NoMemory();
25894 0 : talloc_free(ret); return NULL;
25895 : }
25896 0 : ret->Buffer = (struct DNS_RPC_BUFFER *)pytalloc_get_ptr(in);
25897 : }
25898 0 : break;
25899 :
25900 0 : case DNSSRV_TYPEID_SERVER_INFO_W2K:
25901 0 : if (in == NULL) {
25902 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ServerInfoW2K");
25903 0 : talloc_free(ret); return NULL;
25904 : }
25905 0 : if (in == Py_None) {
25906 0 : ret->ServerInfoW2K = NULL;
25907 : } else {
25908 0 : ret->ServerInfoW2K = NULL;
25909 0 : PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
25910 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25911 0 : PyErr_NoMemory();
25912 0 : talloc_free(ret); return NULL;
25913 : }
25914 0 : ret->ServerInfoW2K = (struct DNS_RPC_SERVER_INFO_W2K *)pytalloc_get_ptr(in);
25915 : }
25916 0 : break;
25917 :
25918 0 : case DNSSRV_TYPEID_STATS:
25919 0 : if (in == NULL) {
25920 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Stats");
25921 0 : talloc_free(ret); return NULL;
25922 : }
25923 0 : if (in == Py_None) {
25924 0 : ret->Stats = NULL;
25925 : } else {
25926 0 : ret->Stats = NULL;
25927 0 : PY_CHECK_TYPE(&DNSSRV_STAT_Type, in, talloc_free(ret); return NULL;);
25928 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25929 0 : PyErr_NoMemory();
25930 0 : talloc_free(ret); return NULL;
25931 : }
25932 0 : ret->Stats = (struct DNSSRV_STAT *)pytalloc_get_ptr(in);
25933 : }
25934 0 : break;
25935 :
25936 0 : case DNSSRV_TYPEID_FORWARDERS_W2K:
25937 0 : if (in == NULL) {
25938 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ForwardersW2K");
25939 0 : talloc_free(ret); return NULL;
25940 : }
25941 0 : if (in == Py_None) {
25942 0 : ret->ForwardersW2K = NULL;
25943 : } else {
25944 0 : ret->ForwardersW2K = NULL;
25945 0 : PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_W2K_Type, in, talloc_free(ret); return NULL;);
25946 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25947 0 : PyErr_NoMemory();
25948 0 : talloc_free(ret); return NULL;
25949 : }
25950 0 : ret->ForwardersW2K = (struct DNS_RPC_FORWARDERS_W2K *)pytalloc_get_ptr(in);
25951 : }
25952 0 : break;
25953 :
25954 0 : case DNSSRV_TYPEID_ZONE_W2K:
25955 0 : if (in == NULL) {
25956 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneW2K");
25957 0 : talloc_free(ret); return NULL;
25958 : }
25959 0 : if (in == Py_None) {
25960 0 : ret->ZoneW2K = NULL;
25961 : } else {
25962 0 : ret->ZoneW2K = NULL;
25963 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_W2K_Type, in, talloc_free(ret); return NULL;);
25964 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25965 0 : PyErr_NoMemory();
25966 0 : talloc_free(ret); return NULL;
25967 : }
25968 0 : ret->ZoneW2K = (struct DNS_RPC_ZONE_W2K *)pytalloc_get_ptr(in);
25969 : }
25970 0 : break;
25971 :
25972 0 : case DNSSRV_TYPEID_ZONE_INFO_W2K:
25973 0 : if (in == NULL) {
25974 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneInfoW2K");
25975 0 : talloc_free(ret); return NULL;
25976 : }
25977 0 : if (in == Py_None) {
25978 0 : ret->ZoneInfoW2K = NULL;
25979 : } else {
25980 0 : ret->ZoneInfoW2K = NULL;
25981 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
25982 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
25983 0 : PyErr_NoMemory();
25984 0 : talloc_free(ret); return NULL;
25985 : }
25986 0 : ret->ZoneInfoW2K = (struct DNS_RPC_ZONE_INFO_W2K *)pytalloc_get_ptr(in);
25987 : }
25988 0 : break;
25989 :
25990 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_W2K:
25991 0 : if (in == NULL) {
25992 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->SecondariesW2K");
25993 0 : talloc_free(ret); return NULL;
25994 : }
25995 0 : if (in == Py_None) {
25996 0 : ret->SecondariesW2K = NULL;
25997 : } else {
25998 0 : ret->SecondariesW2K = NULL;
25999 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_W2K_Type, in, talloc_free(ret); return NULL;);
26000 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26001 0 : PyErr_NoMemory();
26002 0 : talloc_free(ret); return NULL;
26003 : }
26004 0 : ret->SecondariesW2K = (struct DNS_RPC_ZONE_SECONDARIES_W2K *)pytalloc_get_ptr(in);
26005 : }
26006 0 : break;
26007 :
26008 0 : case DNSSRV_TYPEID_ZONE_DATABASE_W2K:
26009 0 : if (in == NULL) {
26010 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->DatabaseW2K");
26011 0 : talloc_free(ret); return NULL;
26012 : }
26013 0 : if (in == Py_None) {
26014 0 : ret->DatabaseW2K = NULL;
26015 : } else {
26016 0 : ret->DatabaseW2K = NULL;
26017 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_DATABASE_W2K_Type, in, talloc_free(ret); return NULL;);
26018 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26019 0 : PyErr_NoMemory();
26020 0 : talloc_free(ret); return NULL;
26021 : }
26022 0 : ret->DatabaseW2K = (struct DNS_RPC_ZONE_DATABASE_W2K *)pytalloc_get_ptr(in);
26023 : }
26024 0 : break;
26025 :
26026 0 : case DNSSRV_TYPEID_ZONE_CREATE_W2K:
26027 0 : if (in == NULL) {
26028 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneCreateW2K");
26029 0 : talloc_free(ret); return NULL;
26030 : }
26031 0 : if (in == Py_None) {
26032 0 : ret->ZoneCreateW2K = NULL;
26033 : } else {
26034 0 : ret->ZoneCreateW2K = NULL;
26035 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type, in, talloc_free(ret); return NULL;);
26036 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26037 0 : PyErr_NoMemory();
26038 0 : talloc_free(ret); return NULL;
26039 : }
26040 0 : ret->ZoneCreateW2K = (struct DNS_RPC_ZONE_CREATE_INFO_W2K *)pytalloc_get_ptr(in);
26041 : }
26042 0 : break;
26043 :
26044 799 : case DNSSRV_TYPEID_NAME_AND_PARAM:
26045 799 : if (in == NULL) {
26046 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->NameAndParam");
26047 0 : talloc_free(ret); return NULL;
26048 : }
26049 799 : if (in == Py_None) {
26050 0 : ret->NameAndParam = NULL;
26051 : } else {
26052 799 : ret->NameAndParam = NULL;
26053 799 : PY_CHECK_TYPE(&DNS_RPC_NAME_AND_PARAM_Type, in, talloc_free(ret); return NULL;);
26054 799 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26055 0 : PyErr_NoMemory();
26056 0 : talloc_free(ret); return NULL;
26057 : }
26058 799 : ret->NameAndParam = (struct DNS_RPC_NAME_AND_PARAM *)pytalloc_get_ptr(in);
26059 : }
26060 799 : break;
26061 :
26062 0 : case DNSSRV_TYPEID_ZONE_LIST_W2K:
26063 0 : if (in == NULL) {
26064 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneListW2K");
26065 0 : talloc_free(ret); return NULL;
26066 : }
26067 0 : if (in == Py_None) {
26068 0 : ret->ZoneListW2K = NULL;
26069 : } else {
26070 0 : ret->ZoneListW2K = NULL;
26071 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_LIST_W2K_Type, in, talloc_free(ret); return NULL;);
26072 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26073 0 : PyErr_NoMemory();
26074 0 : talloc_free(ret); return NULL;
26075 : }
26076 0 : ret->ZoneListW2K = (struct DNS_RPC_ZONE_LIST_W2K *)pytalloc_get_ptr(in);
26077 : }
26078 0 : break;
26079 :
26080 0 : case DNSSRV_TYPEID_SERVER_INFO_DOTNET:
26081 0 : if (in == NULL) {
26082 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ServerInfoDotNet");
26083 0 : talloc_free(ret); return NULL;
26084 : }
26085 0 : if (in == Py_None) {
26086 0 : ret->ServerInfoDotNet = NULL;
26087 : } else {
26088 0 : ret->ServerInfoDotNet = NULL;
26089 0 : PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
26090 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26091 0 : PyErr_NoMemory();
26092 0 : talloc_free(ret); return NULL;
26093 : }
26094 0 : ret->ServerInfoDotNet = (struct DNS_RPC_SERVER_INFO_DOTNET *)pytalloc_get_ptr(in);
26095 : }
26096 0 : break;
26097 :
26098 0 : case DNSSRV_TYPEID_FORWARDERS_DOTNET:
26099 0 : if (in == NULL) {
26100 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ForwardersDotNet");
26101 0 : talloc_free(ret); return NULL;
26102 : }
26103 0 : if (in == Py_None) {
26104 0 : ret->ForwardersDotNet = NULL;
26105 : } else {
26106 0 : ret->ForwardersDotNet = NULL;
26107 0 : PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_DOTNET_Type, in, talloc_free(ret); return NULL;);
26108 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26109 0 : PyErr_NoMemory();
26110 0 : talloc_free(ret); return NULL;
26111 : }
26112 0 : ret->ForwardersDotNet = (struct DNS_RPC_FORWARDERS_DOTNET *)pytalloc_get_ptr(in);
26113 : }
26114 0 : break;
26115 :
26116 0 : case DNSSRV_TYPEID_ZONE:
26117 0 : if (in == NULL) {
26118 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Zone");
26119 0 : talloc_free(ret); return NULL;
26120 : }
26121 0 : if (in == Py_None) {
26122 0 : ret->Zone = NULL;
26123 : } else {
26124 0 : ret->Zone = NULL;
26125 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_DOTNET_Type, in, talloc_free(ret); return NULL;);
26126 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26127 0 : PyErr_NoMemory();
26128 0 : talloc_free(ret); return NULL;
26129 : }
26130 0 : ret->Zone = (struct DNS_RPC_ZONE_DOTNET *)pytalloc_get_ptr(in);
26131 : }
26132 0 : break;
26133 :
26134 0 : case DNSSRV_TYPEID_ZONE_INFO_DOTNET:
26135 0 : if (in == NULL) {
26136 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneInfoDotNet");
26137 0 : talloc_free(ret); return NULL;
26138 : }
26139 0 : if (in == Py_None) {
26140 0 : ret->ZoneInfoDotNet = NULL;
26141 : } else {
26142 0 : ret->ZoneInfoDotNet = NULL;
26143 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
26144 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26145 0 : PyErr_NoMemory();
26146 0 : talloc_free(ret); return NULL;
26147 : }
26148 0 : ret->ZoneInfoDotNet = (struct DNS_RPC_ZONE_INFO_DOTNET *)pytalloc_get_ptr(in);
26149 : }
26150 0 : break;
26151 :
26152 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET:
26153 0 : if (in == NULL) {
26154 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->SecondariesDotNet");
26155 0 : talloc_free(ret); return NULL;
26156 : }
26157 0 : if (in == Py_None) {
26158 0 : ret->SecondariesDotNet = NULL;
26159 : } else {
26160 0 : ret->SecondariesDotNet = NULL;
26161 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type, in, talloc_free(ret); return NULL;);
26162 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26163 0 : PyErr_NoMemory();
26164 0 : talloc_free(ret); return NULL;
26165 : }
26166 0 : ret->SecondariesDotNet = (struct DNS_RPC_ZONE_SECONDARIES_DOTNET *)pytalloc_get_ptr(in);
26167 : }
26168 0 : break;
26169 :
26170 0 : case DNSSRV_TYPEID_ZONE_DATABASE:
26171 0 : if (in == NULL) {
26172 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Database");
26173 0 : talloc_free(ret); return NULL;
26174 : }
26175 0 : if (in == Py_None) {
26176 0 : ret->Database = NULL;
26177 : } else {
26178 0 : ret->Database = NULL;
26179 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_DATABASE_DOTNET_Type, in, talloc_free(ret); return NULL;);
26180 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26181 0 : PyErr_NoMemory();
26182 0 : talloc_free(ret); return NULL;
26183 : }
26184 0 : ret->Database = (struct DNS_RPC_ZONE_DATABASE_DOTNET *)pytalloc_get_ptr(in);
26185 : }
26186 0 : break;
26187 :
26188 0 : case DNSSRV_TYPEID_ZONE_CREATE_DOTNET:
26189 0 : if (in == NULL) {
26190 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneCreateDotNet");
26191 0 : talloc_free(ret); return NULL;
26192 : }
26193 0 : if (in == Py_None) {
26194 0 : ret->ZoneCreateDotNet = NULL;
26195 : } else {
26196 0 : ret->ZoneCreateDotNet = NULL;
26197 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type, in, talloc_free(ret); return NULL;);
26198 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26199 0 : PyErr_NoMemory();
26200 0 : talloc_free(ret); return NULL;
26201 : }
26202 0 : ret->ZoneCreateDotNet = (struct DNS_RPC_ZONE_CREATE_INFO_DOTNET *)pytalloc_get_ptr(in);
26203 : }
26204 0 : break;
26205 :
26206 0 : case DNSSRV_TYPEID_ZONE_LIST:
26207 0 : if (in == NULL) {
26208 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneList");
26209 0 : talloc_free(ret); return NULL;
26210 : }
26211 0 : if (in == Py_None) {
26212 0 : ret->ZoneList = NULL;
26213 : } else {
26214 0 : ret->ZoneList = NULL;
26215 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_LIST_DOTNET_Type, in, talloc_free(ret); return NULL;);
26216 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26217 0 : PyErr_NoMemory();
26218 0 : talloc_free(ret); return NULL;
26219 : }
26220 0 : ret->ZoneList = (struct DNS_RPC_ZONE_LIST_DOTNET *)pytalloc_get_ptr(in);
26221 : }
26222 0 : break;
26223 :
26224 0 : case DNSSRV_TYPEID_ZONE_EXPORT:
26225 0 : if (in == NULL) {
26226 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneExport");
26227 0 : talloc_free(ret); return NULL;
26228 : }
26229 0 : if (in == Py_None) {
26230 0 : ret->ZoneExport = NULL;
26231 : } else {
26232 0 : ret->ZoneExport = NULL;
26233 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_EXPORT_INFO_Type, in, talloc_free(ret); return NULL;);
26234 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26235 0 : PyErr_NoMemory();
26236 0 : talloc_free(ret); return NULL;
26237 : }
26238 0 : ret->ZoneExport = (struct DNS_RPC_ZONE_EXPORT_INFO *)pytalloc_get_ptr(in);
26239 : }
26240 0 : break;
26241 :
26242 0 : case DNSSRV_TYPEID_DP_INFO:
26243 0 : if (in == NULL) {
26244 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->DirectoryPartition");
26245 0 : talloc_free(ret); return NULL;
26246 : }
26247 0 : if (in == Py_None) {
26248 0 : ret->DirectoryPartition = NULL;
26249 : } else {
26250 0 : ret->DirectoryPartition = NULL;
26251 0 : PY_CHECK_TYPE(&DNS_RPC_DP_INFO_Type, in, talloc_free(ret); return NULL;);
26252 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26253 0 : PyErr_NoMemory();
26254 0 : talloc_free(ret); return NULL;
26255 : }
26256 0 : ret->DirectoryPartition = (struct DNS_RPC_DP_INFO *)pytalloc_get_ptr(in);
26257 : }
26258 0 : break;
26259 :
26260 0 : case DNSSRV_TYPEID_DP_ENUM:
26261 0 : if (in == NULL) {
26262 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->DirectoryPartitionEnum");
26263 0 : talloc_free(ret); return NULL;
26264 : }
26265 0 : if (in == Py_None) {
26266 0 : ret->DirectoryPartitionEnum = NULL;
26267 : } else {
26268 0 : ret->DirectoryPartitionEnum = NULL;
26269 0 : PY_CHECK_TYPE(&DNS_RPC_DP_ENUM_Type, in, talloc_free(ret); return NULL;);
26270 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26271 0 : PyErr_NoMemory();
26272 0 : talloc_free(ret); return NULL;
26273 : }
26274 0 : ret->DirectoryPartitionEnum = (struct DNS_RPC_DP_ENUM *)pytalloc_get_ptr(in);
26275 : }
26276 0 : break;
26277 :
26278 0 : case DNSSRV_TYPEID_DP_LIST:
26279 0 : if (in == NULL) {
26280 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->DirectoryPartitionList");
26281 0 : talloc_free(ret); return NULL;
26282 : }
26283 0 : if (in == Py_None) {
26284 0 : ret->DirectoryPartitionList = NULL;
26285 : } else {
26286 0 : ret->DirectoryPartitionList = NULL;
26287 0 : PY_CHECK_TYPE(&DNS_RPC_DP_LIST_Type, in, talloc_free(ret); return NULL;);
26288 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26289 0 : PyErr_NoMemory();
26290 0 : talloc_free(ret); return NULL;
26291 : }
26292 0 : ret->DirectoryPartitionList = (struct DNS_RPC_DP_LIST *)pytalloc_get_ptr(in);
26293 : }
26294 0 : break;
26295 :
26296 0 : case DNSSRV_TYPEID_ENLIST_DP:
26297 0 : if (in == NULL) {
26298 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->EnlistDirectoryPartition");
26299 0 : talloc_free(ret); return NULL;
26300 : }
26301 0 : if (in == Py_None) {
26302 0 : ret->EnlistDirectoryPartition = NULL;
26303 : } else {
26304 0 : ret->EnlistDirectoryPartition = NULL;
26305 0 : PY_CHECK_TYPE(&DNS_RPC_ENLIST_DP_Type, in, talloc_free(ret); return NULL;);
26306 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26307 0 : PyErr_NoMemory();
26308 0 : talloc_free(ret); return NULL;
26309 : }
26310 0 : ret->EnlistDirectoryPartition = (struct DNS_RPC_ENLIST_DP *)pytalloc_get_ptr(in);
26311 : }
26312 0 : break;
26313 :
26314 0 : case DNSSRV_TYPEID_ZONE_CHANGE_DP:
26315 0 : if (in == NULL) {
26316 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneChangeDirectoryPartition");
26317 0 : talloc_free(ret); return NULL;
26318 : }
26319 0 : if (in == Py_None) {
26320 0 : ret->ZoneChangeDirectoryPartition = NULL;
26321 : } else {
26322 0 : ret->ZoneChangeDirectoryPartition = NULL;
26323 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_CHANGE_DP_Type, in, talloc_free(ret); return NULL;);
26324 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26325 0 : PyErr_NoMemory();
26326 0 : talloc_free(ret); return NULL;
26327 : }
26328 0 : ret->ZoneChangeDirectoryPartition = (struct DNS_RPC_ZONE_CHANGE_DP *)pytalloc_get_ptr(in);
26329 : }
26330 0 : break;
26331 :
26332 0 : case DNSSRV_TYPEID_ENUM_ZONES_FILTER:
26333 0 : if (in == NULL) {
26334 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->EnumZonesFilter");
26335 0 : talloc_free(ret); return NULL;
26336 : }
26337 0 : if (in == Py_None) {
26338 0 : ret->EnumZonesFilter = NULL;
26339 : } else {
26340 0 : ret->EnumZonesFilter = NULL;
26341 0 : PY_CHECK_TYPE(&DNS_RPC_ENUM_ZONES_FILTER_Type, in, talloc_free(ret); return NULL;);
26342 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26343 0 : PyErr_NoMemory();
26344 0 : talloc_free(ret); return NULL;
26345 : }
26346 0 : ret->EnumZonesFilter = (struct DNS_RPC_ENUM_ZONES_FILTER *)pytalloc_get_ptr(in);
26347 : }
26348 0 : break;
26349 :
26350 0 : case DNSSRV_TYPEID_ADDRARRAY:
26351 0 : if (in == NULL) {
26352 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->AddrArray");
26353 0 : talloc_free(ret); return NULL;
26354 : }
26355 0 : if (in == Py_None) {
26356 0 : ret->AddrArray = NULL;
26357 : } else {
26358 0 : ret->AddrArray = NULL;
26359 0 : PY_CHECK_TYPE(&DNS_ADDR_ARRAY_Type, in, talloc_free(ret); return NULL;);
26360 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26361 0 : PyErr_NoMemory();
26362 0 : talloc_free(ret); return NULL;
26363 : }
26364 0 : ret->AddrArray = (struct DNS_ADDR_ARRAY *)pytalloc_get_ptr(in);
26365 : }
26366 0 : break;
26367 :
26368 0 : case DNSSRV_TYPEID_SERVER_INFO:
26369 0 : if (in == NULL) {
26370 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ServerInfo");
26371 0 : talloc_free(ret); return NULL;
26372 : }
26373 0 : if (in == Py_None) {
26374 0 : ret->ServerInfo = NULL;
26375 : } else {
26376 0 : ret->ServerInfo = NULL;
26377 0 : PY_CHECK_TYPE(&DNS_RPC_SERVER_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26378 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26379 0 : PyErr_NoMemory();
26380 0 : talloc_free(ret); return NULL;
26381 : }
26382 0 : ret->ServerInfo = (struct DNS_RPC_SERVER_INFO_LONGHORN *)pytalloc_get_ptr(in);
26383 : }
26384 0 : break;
26385 :
26386 427 : case DNSSRV_TYPEID_ZONE_CREATE:
26387 427 : if (in == NULL) {
26388 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneCreate");
26389 0 : talloc_free(ret); return NULL;
26390 : }
26391 427 : if (in == Py_None) {
26392 0 : ret->ZoneCreate = NULL;
26393 : } else {
26394 427 : ret->ZoneCreate = NULL;
26395 427 : PY_CHECK_TYPE(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26396 427 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26397 0 : PyErr_NoMemory();
26398 0 : talloc_free(ret); return NULL;
26399 : }
26400 427 : ret->ZoneCreate = (struct DNS_RPC_ZONE_CREATE_INFO_LONGHORN *)pytalloc_get_ptr(in);
26401 : }
26402 427 : break;
26403 :
26404 0 : case DNSSRV_TYPEID_FORWARDERS:
26405 0 : if (in == NULL) {
26406 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Forwarders");
26407 0 : talloc_free(ret); return NULL;
26408 : }
26409 0 : if (in == Py_None) {
26410 0 : ret->Forwarders = NULL;
26411 : } else {
26412 0 : ret->Forwarders = NULL;
26413 0 : PY_CHECK_TYPE(&DNS_RPC_FORWARDERS_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26414 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26415 0 : PyErr_NoMemory();
26416 0 : talloc_free(ret); return NULL;
26417 : }
26418 0 : ret->Forwarders = (struct DNS_RPC_FORWARDERS_LONGHORN *)pytalloc_get_ptr(in);
26419 : }
26420 0 : break;
26421 :
26422 0 : case DNSSRV_TYPEID_ZONE_SECONDARIES:
26423 0 : if (in == NULL) {
26424 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Secondaries");
26425 0 : talloc_free(ret); return NULL;
26426 : }
26427 0 : if (in == Py_None) {
26428 0 : ret->Secondaries = NULL;
26429 : } else {
26430 0 : ret->Secondaries = NULL;
26431 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26432 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26433 0 : PyErr_NoMemory();
26434 0 : talloc_free(ret); return NULL;
26435 : }
26436 0 : ret->Secondaries = (struct DNS_RPC_ZONE_SECONDARIES_LONGHORN *)pytalloc_get_ptr(in);
26437 : }
26438 0 : break;
26439 :
26440 0 : case DNSSRV_TYPEID_IP_VALIDATE:
26441 0 : if (in == NULL) {
26442 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->IpValidate");
26443 0 : talloc_free(ret); return NULL;
26444 : }
26445 0 : if (in == Py_None) {
26446 0 : ret->IpValidate = NULL;
26447 : } else {
26448 0 : ret->IpValidate = NULL;
26449 0 : PY_CHECK_TYPE(&DNS_RPC_IP_VALIDATE_Type, in, talloc_free(ret); return NULL;);
26450 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26451 0 : PyErr_NoMemory();
26452 0 : talloc_free(ret); return NULL;
26453 : }
26454 0 : ret->IpValidate = (struct DNS_RPC_IP_VALIDATE *)pytalloc_get_ptr(in);
26455 : }
26456 0 : break;
26457 :
26458 0 : case DNSSRV_TYPEID_ZONE_INFO:
26459 0 : if (in == NULL) {
26460 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->ZoneInfo");
26461 0 : talloc_free(ret); return NULL;
26462 : }
26463 0 : if (in == Py_None) {
26464 0 : ret->ZoneInfo = NULL;
26465 : } else {
26466 0 : ret->ZoneInfo = NULL;
26467 0 : PY_CHECK_TYPE(&DNS_RPC_ZONE_INFO_LONGHORN_Type, in, talloc_free(ret); return NULL;);
26468 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26469 0 : PyErr_NoMemory();
26470 0 : talloc_free(ret); return NULL;
26471 : }
26472 0 : ret->ZoneInfo = (struct DNS_RPC_ZONE_INFO_LONGHORN *)pytalloc_get_ptr(in);
26473 : }
26474 0 : break;
26475 :
26476 0 : case DNSSRV_TYPEID_AUTOCONFIGURE:
26477 0 : if (in == NULL) {
26478 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->AutoConfigure");
26479 0 : talloc_free(ret); return NULL;
26480 : }
26481 0 : if (in == Py_None) {
26482 0 : ret->AutoConfigure = NULL;
26483 : } else {
26484 0 : ret->AutoConfigure = NULL;
26485 0 : PY_CHECK_TYPE(&DNS_RPC_AUTOCONFIGURE_Type, in, talloc_free(ret); return NULL;);
26486 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26487 0 : PyErr_NoMemory();
26488 0 : talloc_free(ret); return NULL;
26489 : }
26490 0 : ret->AutoConfigure = (struct DNS_RPC_AUTOCONFIGURE *)pytalloc_get_ptr(in);
26491 : }
26492 0 : break;
26493 :
26494 0 : case DNSSRV_TYPEID_UTF8_STRING_LIST:
26495 0 : if (in == NULL) {
26496 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct ret->Utf8StringList");
26497 0 : talloc_free(ret); return NULL;
26498 : }
26499 0 : if (in == Py_None) {
26500 0 : ret->Utf8StringList = NULL;
26501 : } else {
26502 0 : ret->Utf8StringList = NULL;
26503 0 : PY_CHECK_TYPE(&DNS_RPC_UTF8_STRING_LIST_Type, in, talloc_free(ret); return NULL;);
26504 0 : if (talloc_reference(mem_ctx, pytalloc_get_mem_ctx(in)) == NULL) {
26505 0 : PyErr_NoMemory();
26506 0 : talloc_free(ret); return NULL;
26507 : }
26508 0 : ret->Utf8StringList = (struct DNS_RPC_UTF8_STRING_LIST *)pytalloc_get_ptr(in);
26509 : }
26510 0 : break;
26511 :
26512 0 : default:
26513 0 : PyErr_SetString(PyExc_TypeError, "invalid union level value");
26514 0 : talloc_free(ret);
26515 0 : ret = NULL;
26516 : }
26517 :
26518 1675 : return ret;
26519 : }
26520 :
26521 49 : static PyObject *py_DNSSRV_RPC_UNION_import(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26522 : {
26523 49 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
26524 49 : PyObject *mem_ctx_obj = NULL;
26525 49 : TALLOC_CTX *mem_ctx = NULL;
26526 49 : int level = 0;
26527 49 : PyObject *in_obj = NULL;
26528 49 : union DNSSRV_RPC_UNION *in = NULL;
26529 :
26530 49 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:import",
26531 : discard_const_p(char *, kwnames),
26532 : &mem_ctx_obj,
26533 : &level,
26534 : &in_obj)) {
26535 0 : return NULL;
26536 : }
26537 49 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
26538 49 : if (mem_ctx == NULL) {
26539 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
26540 0 : return NULL;
26541 : }
26542 49 : in = (union DNSSRV_RPC_UNION *)pytalloc_get_ptr(in_obj);
26543 49 : if (in == NULL) {
26544 0 : PyErr_Format(PyExc_TypeError, "in needs to be a pointer to union DNSSRV_RPC_UNION!");
26545 0 : return NULL;
26546 : }
26547 :
26548 49 : return py_import_DNSSRV_RPC_UNION(mem_ctx, level, in);
26549 : }
26550 :
26551 1675 : static PyObject *py_DNSSRV_RPC_UNION_export(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26552 : {
26553 1675 : const char * const kwnames[] = { "mem_ctx", "level", "in", NULL };
26554 1675 : PyObject *mem_ctx_obj = NULL;
26555 1675 : TALLOC_CTX *mem_ctx = NULL;
26556 1675 : int level = 0;
26557 1675 : PyObject *in = NULL;
26558 1675 : union DNSSRV_RPC_UNION *out = NULL;
26559 :
26560 1675 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:export",
26561 : discard_const_p(char *, kwnames),
26562 : &mem_ctx_obj,
26563 : &level,
26564 : &in)) {
26565 0 : return NULL;
26566 : }
26567 1675 : mem_ctx = pytalloc_get_ptr(mem_ctx_obj);
26568 1675 : if (mem_ctx == NULL) {
26569 0 : PyErr_SetString(PyExc_TypeError, "mem_ctx is NULL)!");
26570 0 : return NULL;
26571 : }
26572 :
26573 1675 : out = py_export_DNSSRV_RPC_UNION(mem_ctx, level, in);
26574 1675 : if (out == NULL) {
26575 0 : return NULL;
26576 : }
26577 :
26578 1675 : return pytalloc_GenericObject_reference(out);
26579 : }
26580 :
26581 : static PyMethodDef py_DNSSRV_RPC_UNION_methods[] = {
26582 : { "__import__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNSSRV_RPC_UNION_import),
26583 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
26584 : "T.__import__(mem_ctx, level, in) => ret." },
26585 : { "__export__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNSSRV_RPC_UNION_export),
26586 : METH_VARARGS|METH_KEYWORDS|METH_CLASS,
26587 : "T.__export__(mem_ctx, level, in) => ret." },
26588 : { NULL, NULL, 0, NULL }
26589 : };
26590 :
26591 0 : static PyObject *py_DNSSRV_RPC_UNION_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26592 : {
26593 0 : PyErr_Format(PyExc_TypeError, "New %s Objects are not supported", type->tp_name);
26594 0 : return NULL;
26595 : }
26596 :
26597 :
26598 : static PyTypeObject DNSSRV_RPC_UNION_Type = {
26599 : PyVarObject_HEAD_INIT(NULL, 0)
26600 : .tp_name = "dnsserver.DNSSRV_RPC_UNION",
26601 : .tp_getset = NULL,
26602 : .tp_methods = py_DNSSRV_RPC_UNION_methods,
26603 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
26604 : .tp_new = py_DNSSRV_RPC_UNION_new,
26605 : };
26606 :
26607 :
26608 0 : static PyObject *py_DNS_RPC_RECORDS_get_wLength(PyObject *obj, void *closure)
26609 : {
26610 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
26611 0 : PyObject *py_wLength;
26612 0 : py_wLength = PyLong_FromLong((uint16_t)object->wLength);
26613 0 : return py_wLength;
26614 : }
26615 :
26616 0 : static int py_DNS_RPC_RECORDS_set_wLength(PyObject *py_obj, PyObject *value, void *closure)
26617 : {
26618 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26619 0 : if (value == NULL) {
26620 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wLength");
26621 0 : return -1;
26622 : }
26623 : {
26624 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wLength));
26625 0 : if (PyLong_Check(value)) {
26626 0 : unsigned long long test_var;
26627 0 : test_var = PyLong_AsUnsignedLongLong(value);
26628 0 : if (PyErr_Occurred() != NULL) {
26629 0 : return -1;
26630 : }
26631 0 : if (test_var > uint_max) {
26632 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26633 : PyLong_Type.tp_name, uint_max, test_var);
26634 0 : return -1;
26635 : }
26636 0 : object->wLength = test_var;
26637 : } else {
26638 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26639 : PyLong_Type.tp_name);
26640 0 : return -1;
26641 : }
26642 : }
26643 0 : return 0;
26644 : }
26645 :
26646 134 : static PyObject *py_DNS_RPC_RECORDS_get_wRecordCount(PyObject *obj, void *closure)
26647 : {
26648 134 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
26649 0 : PyObject *py_wRecordCount;
26650 134 : py_wRecordCount = PyLong_FromLong((uint16_t)object->wRecordCount);
26651 134 : return py_wRecordCount;
26652 : }
26653 :
26654 0 : static int py_DNS_RPC_RECORDS_set_wRecordCount(PyObject *py_obj, PyObject *value, void *closure)
26655 : {
26656 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26657 0 : if (value == NULL) {
26658 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->wRecordCount");
26659 0 : return -1;
26660 : }
26661 : {
26662 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->wRecordCount));
26663 0 : if (PyLong_Check(value)) {
26664 0 : unsigned long long test_var;
26665 0 : test_var = PyLong_AsUnsignedLongLong(value);
26666 0 : if (PyErr_Occurred() != NULL) {
26667 0 : return -1;
26668 : }
26669 0 : if (test_var > uint_max) {
26670 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26671 : PyLong_Type.tp_name, uint_max, test_var);
26672 0 : return -1;
26673 : }
26674 0 : object->wRecordCount = test_var;
26675 : } else {
26676 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26677 : PyLong_Type.tp_name);
26678 0 : return -1;
26679 : }
26680 : }
26681 0 : return 0;
26682 : }
26683 :
26684 0 : static PyObject *py_DNS_RPC_RECORDS_get_dwFlags(PyObject *obj, void *closure)
26685 : {
26686 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
26687 0 : PyObject *py_dwFlags;
26688 0 : py_dwFlags = PyLong_FromUnsignedLongLong((uint32_t)object->dwFlags);
26689 0 : return py_dwFlags;
26690 : }
26691 :
26692 0 : static int py_DNS_RPC_RECORDS_set_dwFlags(PyObject *py_obj, PyObject *value, void *closure)
26693 : {
26694 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26695 0 : if (value == NULL) {
26696 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwFlags");
26697 0 : return -1;
26698 : }
26699 : {
26700 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwFlags));
26701 0 : if (PyLong_Check(value)) {
26702 0 : 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->dwFlags = 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 128 : static PyObject *py_DNS_RPC_RECORDS_get_dwChildCount(PyObject *obj, void *closure)
26723 : {
26724 128 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
26725 0 : PyObject *py_dwChildCount;
26726 128 : py_dwChildCount = PyLong_FromUnsignedLongLong((uint32_t)object->dwChildCount);
26727 128 : return py_dwChildCount;
26728 : }
26729 :
26730 0 : static int py_DNS_RPC_RECORDS_set_dwChildCount(PyObject *py_obj, PyObject *value, void *closure)
26731 : {
26732 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26733 0 : if (value == NULL) {
26734 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dwChildCount");
26735 0 : return -1;
26736 : }
26737 : {
26738 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->dwChildCount));
26739 0 : if (PyLong_Check(value)) {
26740 0 : 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->dwChildCount = 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 180 : static PyObject *py_DNS_RPC_RECORDS_get_dnsNodeName(PyObject *obj, void *closure)
26761 : {
26762 180 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
26763 0 : PyObject *py_dnsNodeName;
26764 180 : py_dnsNodeName = pytalloc_reference_ex(&DNS_RPC_NAME_Type, pytalloc_get_mem_ctx(obj), &object->dnsNodeName);
26765 180 : return py_dnsNodeName;
26766 : }
26767 :
26768 0 : static int py_DNS_RPC_RECORDS_set_dnsNodeName(PyObject *py_obj, PyObject *value, void *closure)
26769 : {
26770 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26771 0 : if (value == NULL) {
26772 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->dnsNodeName");
26773 0 : return -1;
26774 : }
26775 0 : PY_CHECK_TYPE(&DNS_RPC_NAME_Type, value, return -1;);
26776 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
26777 0 : PyErr_NoMemory();
26778 0 : return -1;
26779 : }
26780 0 : object->dnsNodeName = *(struct DNS_RPC_NAME *)pytalloc_get_ptr(value);
26781 0 : return 0;
26782 : }
26783 :
26784 1071 : static PyObject *py_DNS_RPC_RECORDS_get_records(PyObject *obj, void *closure)
26785 : {
26786 1071 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(obj);
26787 0 : PyObject *py_records;
26788 1071 : py_records = PyList_New(object->wRecordCount);
26789 1071 : if (py_records == NULL) {
26790 0 : return NULL;
26791 : }
26792 : {
26793 : int records_cntr_0;
26794 2445 : for (records_cntr_0 = 0; records_cntr_0 < (object->wRecordCount); records_cntr_0++) {
26795 0 : PyObject *py_records_0;
26796 1374 : py_records_0 = pytalloc_reference_ex(&DNS_RPC_RECORD_Type, object->records, &object->records[records_cntr_0]);
26797 1374 : PyList_SetItem(py_records, records_cntr_0, py_records_0);
26798 : }
26799 : }
26800 1071 : return py_records;
26801 : }
26802 :
26803 0 : static int py_DNS_RPC_RECORDS_set_records(PyObject *py_obj, PyObject *value, void *closure)
26804 : {
26805 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26806 0 : if (value == NULL) {
26807 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->records");
26808 0 : return -1;
26809 : }
26810 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
26811 : {
26812 0 : int records_cntr_0;
26813 0 : object->records = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->records, PyList_GET_SIZE(value));
26814 0 : if (!object->records) { return -1; }
26815 0 : talloc_set_name_const(object->records, "ARRAY: object->records");
26816 0 : for (records_cntr_0 = 0; records_cntr_0 < PyList_GET_SIZE(value); records_cntr_0++) {
26817 0 : if (PyList_GET_ITEM(value, records_cntr_0) == NULL) {
26818 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->records[records_cntr_0]");
26819 0 : return -1;
26820 : }
26821 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_Type, PyList_GET_ITEM(value, records_cntr_0), return -1;);
26822 0 : if (talloc_reference(object->records, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, records_cntr_0))) == NULL) {
26823 0 : PyErr_NoMemory();
26824 0 : return -1;
26825 : }
26826 0 : object->records[records_cntr_0] = *(struct DNS_RPC_RECORD *)pytalloc_get_ptr(PyList_GET_ITEM(value, records_cntr_0));
26827 : }
26828 : }
26829 0 : return 0;
26830 : }
26831 :
26832 : static PyGetSetDef py_DNS_RPC_RECORDS_getsetters[] = {
26833 : {
26834 : .name = discard_const_p(char, "wLength"),
26835 : .get = py_DNS_RPC_RECORDS_get_wLength,
26836 : .set = py_DNS_RPC_RECORDS_set_wLength,
26837 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
26838 : },
26839 : {
26840 : .name = discard_const_p(char, "wRecordCount"),
26841 : .get = py_DNS_RPC_RECORDS_get_wRecordCount,
26842 : .set = py_DNS_RPC_RECORDS_set_wRecordCount,
26843 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
26844 : },
26845 : {
26846 : .name = discard_const_p(char, "dwFlags"),
26847 : .get = py_DNS_RPC_RECORDS_get_dwFlags,
26848 : .set = py_DNS_RPC_RECORDS_set_dwFlags,
26849 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26850 : },
26851 : {
26852 : .name = discard_const_p(char, "dwChildCount"),
26853 : .get = py_DNS_RPC_RECORDS_get_dwChildCount,
26854 : .set = py_DNS_RPC_RECORDS_set_dwChildCount,
26855 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
26856 : },
26857 : {
26858 : .name = discard_const_p(char, "dnsNodeName"),
26859 : .get = py_DNS_RPC_RECORDS_get_dnsNodeName,
26860 : .set = py_DNS_RPC_RECORDS_set_dnsNodeName,
26861 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_NAME")
26862 : },
26863 : {
26864 : .name = discard_const_p(char, "records"),
26865 : .get = py_DNS_RPC_RECORDS_get_records,
26866 : .set = py_DNS_RPC_RECORDS_set_records,
26867 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD")
26868 : },
26869 : { .name = NULL }
26870 : };
26871 :
26872 0 : static PyObject *py_DNS_RPC_RECORDS_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
26873 : {
26874 0 : return pytalloc_new(struct DNS_RPC_RECORDS, type);
26875 : }
26876 :
26877 0 : static PyObject *py_DNS_RPC_RECORDS_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
26878 : {
26879 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26880 0 : PyObject *ret = NULL;
26881 0 : DATA_BLOB blob;
26882 0 : enum ndr_err_code err;
26883 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
26884 0 : if (tmp_ctx == NULL) {
26885 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
26886 0 : return NULL;
26887 : }
26888 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS);
26889 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
26890 0 : TALLOC_FREE(tmp_ctx);
26891 0 : PyErr_SetNdrError(err);
26892 0 : return NULL;
26893 : }
26894 :
26895 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
26896 0 : TALLOC_FREE(tmp_ctx);
26897 0 : return ret;
26898 : }
26899 :
26900 0 : static PyObject *py_DNS_RPC_RECORDS_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
26901 : {
26902 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26903 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
26904 0 : Py_ssize_t blob_length = 0;
26905 0 : enum ndr_err_code err;
26906 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
26907 0 : PyObject *allow_remaining_obj = NULL;
26908 0 : bool allow_remaining = false;
26909 :
26910 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
26911 : discard_const_p(char *, kwnames),
26912 : &blob.data, &blob_length,
26913 : &allow_remaining_obj)) {
26914 0 : return NULL;
26915 : }
26916 0 : blob.length = blob_length;
26917 :
26918 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
26919 0 : allow_remaining = true;
26920 : }
26921 :
26922 0 : if (allow_remaining) {
26923 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORDS);
26924 : } else {
26925 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORDS);
26926 : }
26927 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
26928 0 : PyErr_SetNdrError(err);
26929 0 : return NULL;
26930 : }
26931 :
26932 0 : Py_RETURN_NONE;
26933 : }
26934 :
26935 0 : static PyObject *py_DNS_RPC_RECORDS_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
26936 : {
26937 0 : struct DNS_RPC_RECORDS *object = (struct DNS_RPC_RECORDS *)pytalloc_get_ptr(py_obj);
26938 0 : PyObject *ret;
26939 0 : char *retstr;
26940 :
26941 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_RECORDS, "DNS_RPC_RECORDS", object);
26942 0 : ret = PyUnicode_FromString(retstr);
26943 0 : talloc_free(retstr);
26944 :
26945 0 : return ret;
26946 : }
26947 :
26948 : static PyMethodDef py_DNS_RPC_RECORDS_methods[] = {
26949 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORDS_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
26950 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_RECORDS_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
26951 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORDS_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
26952 : { NULL, NULL, 0, NULL }
26953 : };
26954 :
26955 :
26956 : static PyTypeObject DNS_RPC_RECORDS_Type = {
26957 : PyVarObject_HEAD_INIT(NULL, 0)
26958 : .tp_name = "dnsserver.DNS_RPC_RECORDS",
26959 : .tp_getset = py_DNS_RPC_RECORDS_getsetters,
26960 : .tp_methods = py_DNS_RPC_RECORDS_methods,
26961 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
26962 : .tp_new = py_DNS_RPC_RECORDS_new,
26963 : };
26964 :
26965 :
26966 130 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_get_count(PyObject *obj, void *closure)
26967 : {
26968 130 : struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(obj);
26969 0 : PyObject *py_count;
26970 130 : py_count = PyLong_FromUnsignedLongLong((uint32_t)object->count);
26971 130 : return py_count;
26972 : }
26973 :
26974 0 : static int py_DNS_RPC_RECORDS_ARRAY_set_count(PyObject *py_obj, PyObject *value, void *closure)
26975 : {
26976 0 : struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
26977 0 : if (value == NULL) {
26978 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->count");
26979 0 : return -1;
26980 : }
26981 : {
26982 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->count));
26983 0 : if (PyLong_Check(value)) {
26984 0 : unsigned long long test_var;
26985 0 : test_var = PyLong_AsUnsignedLongLong(value);
26986 0 : if (PyErr_Occurred() != NULL) {
26987 0 : return -1;
26988 : }
26989 0 : if (test_var > uint_max) {
26990 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
26991 : PyLong_Type.tp_name, uint_max, test_var);
26992 0 : return -1;
26993 : }
26994 0 : object->count = test_var;
26995 : } else {
26996 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
26997 : PyLong_Type.tp_name);
26998 0 : return -1;
26999 : }
27000 : }
27001 0 : return 0;
27002 : }
27003 :
27004 1141 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_get_rec(PyObject *obj, void *closure)
27005 : {
27006 1141 : struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(obj);
27007 0 : PyObject *py_rec;
27008 1141 : py_rec = PyList_New(object->count);
27009 1141 : if (py_rec == NULL) {
27010 0 : return NULL;
27011 : }
27012 : {
27013 : int rec_cntr_0;
27014 2629 : for (rec_cntr_0 = 0; rec_cntr_0 < (object->count); rec_cntr_0++) {
27015 0 : PyObject *py_rec_0;
27016 1488 : py_rec_0 = pytalloc_reference_ex(&DNS_RPC_RECORDS_Type, object->rec, &object->rec[rec_cntr_0]);
27017 1488 : PyList_SetItem(py_rec, rec_cntr_0, py_rec_0);
27018 : }
27019 : }
27020 1141 : return py_rec;
27021 : }
27022 :
27023 0 : static int py_DNS_RPC_RECORDS_ARRAY_set_rec(PyObject *py_obj, PyObject *value, void *closure)
27024 : {
27025 0 : struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
27026 0 : if (value == NULL) {
27027 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rec");
27028 0 : return -1;
27029 : }
27030 0 : PY_CHECK_TYPE(&PyList_Type, value, return -1;);
27031 : {
27032 0 : int rec_cntr_0;
27033 0 : object->rec = talloc_array_ptrtype(pytalloc_get_mem_ctx(py_obj), object->rec, PyList_GET_SIZE(value));
27034 0 : if (!object->rec) { return -1; }
27035 0 : talloc_set_name_const(object->rec, "ARRAY: object->rec");
27036 0 : for (rec_cntr_0 = 0; rec_cntr_0 < PyList_GET_SIZE(value); rec_cntr_0++) {
27037 0 : if (PyList_GET_ITEM(value, rec_cntr_0) == NULL) {
27038 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->rec[rec_cntr_0]");
27039 0 : return -1;
27040 : }
27041 0 : PY_CHECK_TYPE(&DNS_RPC_RECORDS_Type, PyList_GET_ITEM(value, rec_cntr_0), return -1;);
27042 0 : if (talloc_reference(object->rec, pytalloc_get_mem_ctx(PyList_GET_ITEM(value, rec_cntr_0))) == NULL) {
27043 0 : PyErr_NoMemory();
27044 0 : return -1;
27045 : }
27046 0 : object->rec[rec_cntr_0] = *(struct DNS_RPC_RECORDS *)pytalloc_get_ptr(PyList_GET_ITEM(value, rec_cntr_0));
27047 : }
27048 : }
27049 0 : return 0;
27050 : }
27051 :
27052 : static PyGetSetDef py_DNS_RPC_RECORDS_ARRAY_getsetters[] = {
27053 : {
27054 : .name = discard_const_p(char, "count"),
27055 : .get = py_DNS_RPC_RECORDS_ARRAY_get_count,
27056 : .set = py_DNS_RPC_RECORDS_ARRAY_set_count,
27057 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27058 : },
27059 : {
27060 : .name = discard_const_p(char, "rec"),
27061 : .get = py_DNS_RPC_RECORDS_ARRAY_get_rec,
27062 : .set = py_DNS_RPC_RECORDS_ARRAY_set_rec,
27063 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORDS")
27064 : },
27065 : { .name = NULL }
27066 : };
27067 :
27068 0 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
27069 : {
27070 0 : return pytalloc_new(struct DNS_RPC_RECORDS_ARRAY, type);
27071 : }
27072 :
27073 0 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_pack(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
27074 : {
27075 0 : struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
27076 0 : PyObject *ret = NULL;
27077 0 : DATA_BLOB blob;
27078 0 : enum ndr_err_code err;
27079 0 : TALLOC_CTX *tmp_ctx = talloc_new(pytalloc_get_mem_ctx(py_obj));
27080 0 : if (tmp_ctx == NULL) {
27081 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
27082 0 : return NULL;
27083 : }
27084 0 : err = ndr_push_struct_blob(&blob, tmp_ctx, object, (ndr_push_flags_fn_t)ndr_push_DNS_RPC_RECORDS_ARRAY);
27085 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
27086 0 : TALLOC_FREE(tmp_ctx);
27087 0 : PyErr_SetNdrError(err);
27088 0 : return NULL;
27089 : }
27090 :
27091 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
27092 0 : TALLOC_FREE(tmp_ctx);
27093 0 : return ret;
27094 : }
27095 :
27096 0 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_unpack(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27097 : {
27098 0 : struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
27099 0 : DATA_BLOB blob = {.data = NULL, .length = 0};
27100 0 : Py_ssize_t blob_length = 0;
27101 0 : enum ndr_err_code err;
27102 0 : const char * const kwnames[] = { "data_blob", "allow_remaining", NULL };
27103 0 : PyObject *allow_remaining_obj = NULL;
27104 0 : bool allow_remaining = false;
27105 :
27106 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|O:__ndr_unpack__",
27107 : discard_const_p(char *, kwnames),
27108 : &blob.data, &blob_length,
27109 : &allow_remaining_obj)) {
27110 0 : return NULL;
27111 : }
27112 0 : blob.length = blob_length;
27113 :
27114 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
27115 0 : allow_remaining = true;
27116 : }
27117 :
27118 0 : if (allow_remaining) {
27119 0 : err = ndr_pull_struct_blob(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORDS_ARRAY);
27120 : } else {
27121 0 : err = ndr_pull_struct_blob_all(&blob, pytalloc_get_mem_ctx(py_obj), object, (ndr_pull_flags_fn_t)ndr_pull_DNS_RPC_RECORDS_ARRAY);
27122 : }
27123 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
27124 0 : PyErr_SetNdrError(err);
27125 0 : return NULL;
27126 : }
27127 :
27128 0 : Py_RETURN_NONE;
27129 : }
27130 :
27131 0 : static PyObject *py_DNS_RPC_RECORDS_ARRAY_ndr_print(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
27132 : {
27133 0 : struct DNS_RPC_RECORDS_ARRAY *object = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(py_obj);
27134 0 : PyObject *ret;
27135 0 : char *retstr;
27136 :
27137 0 : retstr = ndr_print_struct_string(pytalloc_get_mem_ctx(py_obj), (ndr_print_fn_t)ndr_print_DNS_RPC_RECORDS_ARRAY, "DNS_RPC_RECORDS_ARRAY", object);
27138 0 : ret = PyUnicode_FromString(retstr);
27139 0 : talloc_free(retstr);
27140 :
27141 0 : return ret;
27142 : }
27143 :
27144 : static PyMethodDef py_DNS_RPC_RECORDS_ARRAY_methods[] = {
27145 : { "__ndr_pack__", (PyCFunction)py_DNS_RPC_RECORDS_ARRAY_ndr_pack, METH_NOARGS, "S.ndr_pack(object) -> blob\nNDR pack" },
27146 : { "__ndr_unpack__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DNS_RPC_RECORDS_ARRAY_ndr_unpack), METH_VARARGS|METH_KEYWORDS, "S.ndr_unpack(class, blob, allow_remaining=False) -> None\nNDR unpack" },
27147 : { "__ndr_print__", (PyCFunction)py_DNS_RPC_RECORDS_ARRAY_ndr_print, METH_NOARGS, "S.ndr_print(object) -> None\nNDR print" },
27148 : { NULL, NULL, 0, NULL }
27149 : };
27150 :
27151 :
27152 : static PyTypeObject DNS_RPC_RECORDS_ARRAY_Type = {
27153 : PyVarObject_HEAD_INIT(NULL, 0)
27154 : .tp_name = "dnsserver.DNS_RPC_RECORDS_ARRAY",
27155 : .tp_getset = py_DNS_RPC_RECORDS_ARRAY_getsetters,
27156 : .tp_methods = py_DNS_RPC_RECORDS_ARRAY_methods,
27157 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27158 : .tp_new = py_DNS_RPC_RECORDS_ARRAY_new,
27159 : };
27160 :
27161 :
27162 :
27163 0 : static PyObject *py_DnssrvOperation_in_get_pwszServerName(PyObject *obj, void *closure)
27164 : {
27165 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(obj);
27166 0 : PyObject *py_pwszServerName;
27167 0 : if (object->in.pwszServerName == NULL) {
27168 0 : Py_RETURN_NONE;
27169 : }
27170 0 : if (object->in.pwszServerName == NULL) {
27171 0 : py_pwszServerName = Py_None;
27172 0 : Py_INCREF(py_pwszServerName);
27173 : } else {
27174 0 : if (object->in.pwszServerName == NULL) {
27175 0 : py_pwszServerName = Py_None;
27176 0 : Py_INCREF(py_pwszServerName);
27177 : } else {
27178 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
27179 : }
27180 : }
27181 0 : return py_pwszServerName;
27182 : }
27183 :
27184 0 : static int py_DnssrvOperation_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
27185 : {
27186 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27187 0 : if (value == NULL) {
27188 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
27189 0 : return -1;
27190 : }
27191 0 : if (value == Py_None) {
27192 0 : object->in.pwszServerName = NULL;
27193 : } else {
27194 0 : object->in.pwszServerName = NULL;
27195 : {
27196 0 : const char *test_str;
27197 0 : const char *talloc_str;
27198 0 : PyObject *unicode = NULL;
27199 0 : if (PyUnicode_Check(value)) {
27200 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27201 0 : if (unicode == NULL) {
27202 0 : PyErr_NoMemory();
27203 0 : return -1;
27204 : }
27205 0 : test_str = PyBytes_AS_STRING(unicode);
27206 0 : } else if (PyBytes_Check(value)) {
27207 0 : test_str = PyBytes_AS_STRING(value);
27208 : } else {
27209 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27210 0 : return -1;
27211 : }
27212 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27213 0 : if (unicode != NULL) {
27214 0 : Py_DECREF(unicode);
27215 : }
27216 0 : if (talloc_str == NULL) {
27217 0 : PyErr_NoMemory();
27218 0 : return -1;
27219 : }
27220 0 : object->in.pwszServerName = talloc_str;
27221 : }
27222 : }
27223 0 : return 0;
27224 : }
27225 :
27226 0 : static PyObject *py_DnssrvOperation_in_get_pszZone(PyObject *obj, void *closure)
27227 : {
27228 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(obj);
27229 0 : PyObject *py_pszZone;
27230 0 : if (object->in.pszZone == NULL) {
27231 0 : Py_RETURN_NONE;
27232 : }
27233 0 : if (object->in.pszZone == NULL) {
27234 0 : py_pszZone = Py_None;
27235 0 : Py_INCREF(py_pszZone);
27236 : } else {
27237 0 : if (object->in.pszZone == NULL) {
27238 0 : py_pszZone = Py_None;
27239 0 : Py_INCREF(py_pszZone);
27240 : } else {
27241 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
27242 : }
27243 : }
27244 0 : return py_pszZone;
27245 : }
27246 :
27247 0 : static int py_DnssrvOperation_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
27248 : {
27249 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27250 0 : if (value == NULL) {
27251 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
27252 0 : return -1;
27253 : }
27254 0 : if (value == Py_None) {
27255 0 : object->in.pszZone = NULL;
27256 : } else {
27257 0 : object->in.pszZone = NULL;
27258 : {
27259 0 : const char *test_str;
27260 0 : const char *talloc_str;
27261 0 : PyObject *unicode = NULL;
27262 0 : if (PyUnicode_Check(value)) {
27263 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27264 0 : if (unicode == NULL) {
27265 0 : PyErr_NoMemory();
27266 0 : return -1;
27267 : }
27268 0 : test_str = PyBytes_AS_STRING(unicode);
27269 0 : } else if (PyBytes_Check(value)) {
27270 0 : test_str = PyBytes_AS_STRING(value);
27271 : } else {
27272 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27273 0 : return -1;
27274 : }
27275 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27276 0 : if (unicode != NULL) {
27277 0 : Py_DECREF(unicode);
27278 : }
27279 0 : if (talloc_str == NULL) {
27280 0 : PyErr_NoMemory();
27281 0 : return -1;
27282 : }
27283 0 : object->in.pszZone = talloc_str;
27284 : }
27285 : }
27286 0 : return 0;
27287 : }
27288 :
27289 0 : static PyObject *py_DnssrvOperation_in_get_dwContext(PyObject *obj, void *closure)
27290 : {
27291 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(obj);
27292 0 : PyObject *py_dwContext;
27293 0 : py_dwContext = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwContext);
27294 0 : return py_dwContext;
27295 : }
27296 :
27297 0 : static int py_DnssrvOperation_in_set_dwContext(PyObject *py_obj, PyObject *value, void *closure)
27298 : {
27299 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27300 0 : if (value == NULL) {
27301 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwContext");
27302 0 : return -1;
27303 : }
27304 : {
27305 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwContext));
27306 0 : if (PyLong_Check(value)) {
27307 0 : unsigned long long test_var;
27308 0 : test_var = PyLong_AsUnsignedLongLong(value);
27309 0 : if (PyErr_Occurred() != NULL) {
27310 0 : return -1;
27311 : }
27312 0 : if (test_var > uint_max) {
27313 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27314 : PyLong_Type.tp_name, uint_max, test_var);
27315 0 : return -1;
27316 : }
27317 0 : object->in.dwContext = test_var;
27318 : } else {
27319 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27320 : PyLong_Type.tp_name);
27321 0 : return -1;
27322 : }
27323 : }
27324 0 : return 0;
27325 : }
27326 :
27327 0 : static PyObject *py_DnssrvOperation_in_get_pszOperation(PyObject *obj, void *closure)
27328 : {
27329 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(obj);
27330 0 : PyObject *py_pszOperation;
27331 0 : if (object->in.pszOperation == NULL) {
27332 0 : Py_RETURN_NONE;
27333 : }
27334 0 : if (object->in.pszOperation == NULL) {
27335 0 : py_pszOperation = Py_None;
27336 0 : Py_INCREF(py_pszOperation);
27337 : } else {
27338 0 : if (object->in.pszOperation == NULL) {
27339 0 : py_pszOperation = Py_None;
27340 0 : Py_INCREF(py_pszOperation);
27341 : } else {
27342 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
27343 : }
27344 : }
27345 0 : return py_pszOperation;
27346 : }
27347 :
27348 0 : static int py_DnssrvOperation_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
27349 : {
27350 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27351 0 : if (value == NULL) {
27352 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszOperation");
27353 0 : return -1;
27354 : }
27355 0 : if (value == Py_None) {
27356 0 : object->in.pszOperation = NULL;
27357 : } else {
27358 0 : object->in.pszOperation = NULL;
27359 : {
27360 0 : const char *test_str;
27361 0 : const char *talloc_str;
27362 0 : PyObject *unicode = NULL;
27363 0 : if (PyUnicode_Check(value)) {
27364 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
27365 0 : if (unicode == NULL) {
27366 0 : PyErr_NoMemory();
27367 0 : return -1;
27368 : }
27369 0 : test_str = PyBytes_AS_STRING(unicode);
27370 0 : } else if (PyBytes_Check(value)) {
27371 0 : test_str = PyBytes_AS_STRING(value);
27372 : } else {
27373 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
27374 0 : return -1;
27375 : }
27376 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
27377 0 : if (unicode != NULL) {
27378 0 : Py_DECREF(unicode);
27379 : }
27380 0 : if (talloc_str == NULL) {
27381 0 : PyErr_NoMemory();
27382 0 : return -1;
27383 : }
27384 0 : object->in.pszOperation = talloc_str;
27385 : }
27386 : }
27387 0 : return 0;
27388 : }
27389 :
27390 0 : static PyObject *py_DnssrvOperation_in_get_dwTypeId(PyObject *obj, void *closure)
27391 : {
27392 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(obj);
27393 0 : PyObject *py_dwTypeId;
27394 0 : py_dwTypeId = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwTypeId);
27395 0 : return py_dwTypeId;
27396 : }
27397 :
27398 0 : static int py_DnssrvOperation_in_set_dwTypeId(PyObject *py_obj, PyObject *value, void *closure)
27399 : {
27400 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27401 0 : if (value == NULL) {
27402 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwTypeId");
27403 0 : return -1;
27404 : }
27405 : {
27406 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwTypeId));
27407 0 : if (PyLong_Check(value)) {
27408 0 : unsigned long long test_var;
27409 0 : test_var = PyLong_AsUnsignedLongLong(value);
27410 0 : if (PyErr_Occurred() != NULL) {
27411 0 : return -1;
27412 : }
27413 0 : if (test_var > uint_max) {
27414 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27415 : PyLong_Type.tp_name, uint_max, test_var);
27416 0 : return -1;
27417 : }
27418 0 : object->in.dwTypeId = test_var;
27419 : } else {
27420 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27421 : PyLong_Type.tp_name);
27422 0 : return -1;
27423 : }
27424 : }
27425 0 : return 0;
27426 : }
27427 :
27428 0 : static PyObject *py_DnssrvOperation_in_get_pData(PyObject *obj, void *closure)
27429 : {
27430 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(obj);
27431 0 : PyObject *py_pData;
27432 0 : py_pData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(obj), object->in.dwTypeId, &object->in.pData, "union DNSSRV_RPC_UNION");
27433 0 : if (py_pData == NULL) {
27434 0 : return NULL;
27435 : }
27436 0 : return py_pData;
27437 : }
27438 :
27439 0 : static int py_DnssrvOperation_in_set_pData(PyObject *py_obj, PyObject *value, void *closure)
27440 : {
27441 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27442 0 : if (value == NULL) {
27443 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pData");
27444 0 : return -1;
27445 : }
27446 : {
27447 0 : union DNSSRV_RPC_UNION *pData_switch_0;
27448 0 : pData_switch_0 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(py_obj), object->in.dwTypeId, value, "union DNSSRV_RPC_UNION");
27449 0 : if (pData_switch_0 == NULL) {
27450 0 : return -1;
27451 : }
27452 0 : object->in.pData = *pData_switch_0;
27453 : }
27454 0 : return 0;
27455 : }
27456 :
27457 0 : static PyObject *py_DnssrvOperation_get_result(PyObject *obj, void *closure)
27458 : {
27459 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(obj);
27460 0 : PyObject *py_result;
27461 0 : py_result = PyErr_FromWERROR(object->out.result);
27462 0 : return py_result;
27463 : }
27464 :
27465 0 : static int py_DnssrvOperation_set_result(PyObject *py_obj, PyObject *value, void *closure)
27466 : {
27467 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27468 0 : if (value == NULL) {
27469 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
27470 0 : return -1;
27471 : }
27472 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
27473 0 : return 0;
27474 : }
27475 :
27476 : static PyGetSetDef py_DnssrvOperation_getsetters[] = {
27477 : {
27478 : .name = discard_const_p(char, "in_pwszServerName"),
27479 : .get = py_DnssrvOperation_in_get_pwszServerName,
27480 : .set = py_DnssrvOperation_in_set_pwszServerName,
27481 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
27482 : },
27483 : {
27484 : .name = discard_const_p(char, "in_pszZone"),
27485 : .get = py_DnssrvOperation_in_get_pszZone,
27486 : .set = py_DnssrvOperation_in_set_pszZone,
27487 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
27488 : },
27489 : {
27490 : .name = discard_const_p(char, "in_dwContext"),
27491 : .get = py_DnssrvOperation_in_get_dwContext,
27492 : .set = py_DnssrvOperation_in_set_dwContext,
27493 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
27494 : },
27495 : {
27496 : .name = discard_const_p(char, "in_pszOperation"),
27497 : .get = py_DnssrvOperation_in_get_pszOperation,
27498 : .set = py_DnssrvOperation_in_set_pszOperation,
27499 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
27500 : },
27501 : {
27502 : .name = discard_const_p(char, "in_dwTypeId"),
27503 : .get = py_DnssrvOperation_in_get_dwTypeId,
27504 : .set = py_DnssrvOperation_in_set_dwTypeId,
27505 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
27506 : },
27507 : {
27508 : .name = discard_const_p(char, "in_pData"),
27509 : .get = py_DnssrvOperation_in_get_pData,
27510 : .set = py_DnssrvOperation_in_set_pData,
27511 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
27512 : },
27513 : {
27514 : .name = discard_const_p(char, "result"),
27515 : .get = py_DnssrvOperation_get_result,
27516 : .set = py_DnssrvOperation_set_result,
27517 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
27518 : },
27519 : { .name = NULL }
27520 : };
27521 :
27522 0 : static PyObject *py_DnssrvOperation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
27523 : {
27524 0 : PyObject *self = pytalloc_new(struct DnssrvOperation, type);
27525 0 : return self;
27526 : }
27527 :
27528 0 : static PyObject *py_DnssrvOperation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
27529 : {
27530 :
27531 :
27532 0 : return PyLong_FromLong(0);
27533 : }
27534 :
27535 0 : static PyObject *py_DnssrvOperation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
27536 : {
27537 0 : const struct ndr_interface_call *call = NULL;
27538 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27539 0 : PyObject *ret = NULL;
27540 0 : struct ndr_push *push = NULL;
27541 0 : DATA_BLOB blob;
27542 0 : enum ndr_err_code err;
27543 :
27544 0 : if (ndr_table_dnsserver.num_calls < 1) {
27545 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation_ndr_pack");
27546 0 : return NULL;
27547 : }
27548 0 : call = &ndr_table_dnsserver.calls[0];
27549 :
27550 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
27551 0 : if (push == NULL) {
27552 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
27553 0 : return NULL;
27554 : }
27555 :
27556 0 : push->flags |= ndr_push_flags;
27557 :
27558 0 : err = call->ndr_push(push, ndr_inout_flags, object);
27559 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
27560 0 : TALLOC_FREE(push);
27561 0 : PyErr_SetNdrError(err);
27562 0 : return NULL;
27563 : }
27564 0 : blob = ndr_push_blob(push);
27565 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
27566 0 : TALLOC_FREE(push);
27567 0 : return ret;
27568 : }
27569 :
27570 0 : static PyObject *py_DnssrvOperation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27571 : {
27572 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
27573 0 : PyObject *bigendian_obj = NULL;
27574 0 : PyObject *ndr64_obj = NULL;
27575 0 : libndr_flags ndr_push_flags = 0;
27576 :
27577 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
27578 : discard_const_p(char *, kwnames),
27579 : &bigendian_obj,
27580 : &ndr64_obj)) {
27581 0 : return NULL;
27582 : }
27583 :
27584 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
27585 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
27586 : }
27587 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
27588 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
27589 : }
27590 :
27591 0 : return py_DnssrvOperation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
27592 : }
27593 :
27594 0 : static PyObject *py_DnssrvOperation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27595 : {
27596 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
27597 0 : PyObject *bigendian_obj = NULL;
27598 0 : PyObject *ndr64_obj = NULL;
27599 0 : libndr_flags ndr_push_flags = 0;
27600 :
27601 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
27602 : discard_const_p(char *, kwnames),
27603 : &bigendian_obj,
27604 : &ndr64_obj)) {
27605 0 : return NULL;
27606 : }
27607 :
27608 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
27609 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
27610 : }
27611 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
27612 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
27613 : }
27614 :
27615 0 : return py_DnssrvOperation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
27616 : }
27617 :
27618 0 : static PyObject *py_DnssrvOperation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
27619 : {
27620 0 : const struct ndr_interface_call *call = NULL;
27621 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27622 0 : struct ndr_pull *pull = NULL;
27623 0 : enum ndr_err_code err;
27624 :
27625 0 : if (ndr_table_dnsserver.num_calls < 1) {
27626 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation_ndr_unpack");
27627 0 : return NULL;
27628 : }
27629 0 : call = &ndr_table_dnsserver.calls[0];
27630 :
27631 0 : pull = ndr_pull_init_blob(blob, object);
27632 0 : if (pull == NULL) {
27633 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
27634 0 : return NULL;
27635 : }
27636 :
27637 0 : pull->flags |= ndr_pull_flags;
27638 :
27639 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
27640 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
27641 0 : TALLOC_FREE(pull);
27642 0 : PyErr_SetNdrError(err);
27643 0 : return NULL;
27644 : }
27645 0 : if (!allow_remaining) {
27646 0 : uint32_t highest_ofs;
27647 :
27648 0 : if (pull->offset > pull->relative_highest_offset) {
27649 0 : highest_ofs = pull->offset;
27650 : } else {
27651 0 : highest_ofs = pull->relative_highest_offset;
27652 : }
27653 0 : if (highest_ofs < pull->data_size) {
27654 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
27655 : "not all bytes consumed ofs[%u] size[%u]",
27656 : highest_ofs, pull->data_size);
27657 0 : TALLOC_FREE(pull);
27658 0 : PyErr_SetNdrError(err);
27659 0 : return NULL;
27660 : }
27661 : }
27662 :
27663 0 : TALLOC_FREE(pull);
27664 0 : Py_RETURN_NONE;
27665 : }
27666 :
27667 0 : static PyObject *py_DnssrvOperation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27668 : {
27669 0 : DATA_BLOB blob;
27670 0 : Py_ssize_t blob_length = 0;
27671 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
27672 0 : PyObject *bigendian_obj = NULL;
27673 0 : PyObject *ndr64_obj = NULL;
27674 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
27675 0 : PyObject *allow_remaining_obj = NULL;
27676 0 : bool allow_remaining = false;
27677 :
27678 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
27679 : discard_const_p(char *, kwnames),
27680 : &blob.data, &blob_length,
27681 : &bigendian_obj,
27682 : &ndr64_obj,
27683 : &allow_remaining_obj)) {
27684 0 : return NULL;
27685 : }
27686 0 : blob.length = blob_length;
27687 :
27688 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
27689 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
27690 : }
27691 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
27692 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
27693 : }
27694 :
27695 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
27696 0 : allow_remaining = true;
27697 : }
27698 :
27699 0 : return py_DnssrvOperation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
27700 : }
27701 :
27702 0 : static PyObject *py_DnssrvOperation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
27703 : {
27704 0 : DATA_BLOB blob;
27705 0 : Py_ssize_t blob_length = 0;
27706 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
27707 0 : PyObject *bigendian_obj = NULL;
27708 0 : PyObject *ndr64_obj = NULL;
27709 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
27710 0 : PyObject *allow_remaining_obj = NULL;
27711 0 : bool allow_remaining = false;
27712 :
27713 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
27714 : discard_const_p(char *, kwnames),
27715 : &blob.data, &blob_length,
27716 : &bigendian_obj,
27717 : &ndr64_obj,
27718 : &allow_remaining_obj)) {
27719 0 : return NULL;
27720 : }
27721 0 : blob.length = blob_length;
27722 :
27723 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
27724 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
27725 : }
27726 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
27727 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
27728 : }
27729 :
27730 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
27731 0 : allow_remaining = true;
27732 : }
27733 :
27734 0 : return py_DnssrvOperation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
27735 : }
27736 :
27737 0 : static PyObject *py_DnssrvOperation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
27738 : {
27739 0 : const struct ndr_interface_call *call = NULL;
27740 0 : struct DnssrvOperation *object = (struct DnssrvOperation *)pytalloc_get_ptr(py_obj);
27741 0 : PyObject *ret;
27742 0 : char *retstr;
27743 :
27744 0 : if (ndr_table_dnsserver.num_calls < 1) {
27745 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation_ndr_print");
27746 0 : return NULL;
27747 : }
27748 0 : call = &ndr_table_dnsserver.calls[0];
27749 :
27750 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
27751 0 : ret = PyUnicode_FromString(retstr);
27752 0 : TALLOC_FREE(retstr);
27753 :
27754 0 : return ret;
27755 : }
27756 :
27757 0 : static PyObject *py_DnssrvOperation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
27758 : {
27759 0 : return py_DnssrvOperation_ndr_print(py_obj, "DnssrvOperation_in", NDR_IN);
27760 : }
27761 :
27762 0 : static PyObject *py_DnssrvOperation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
27763 : {
27764 0 : return py_DnssrvOperation_ndr_print(py_obj, "DnssrvOperation_out", NDR_OUT);
27765 : }
27766 :
27767 : static PyMethodDef py_DnssrvOperation_methods[] = {
27768 : { "opnum", (PyCFunction)py_DnssrvOperation_ndr_opnum, METH_NOARGS|METH_CLASS,
27769 : "dnsserver.DnssrvOperation.opnum() -> 0 (0x00) " },
27770 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
27771 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
27772 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
27773 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
27774 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
27775 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
27776 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
27777 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
27778 : { "__ndr_print_in__", (PyCFunction)py_DnssrvOperation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
27779 : { "__ndr_print_out__", (PyCFunction)py_DnssrvOperation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
27780 : { NULL, NULL, 0, NULL }
27781 : };
27782 :
27783 :
27784 : static PyTypeObject DnssrvOperation_Type = {
27785 : PyVarObject_HEAD_INIT(NULL, 0)
27786 : .tp_name = "dnsserver.DnssrvOperation",
27787 : .tp_getset = py_DnssrvOperation_getsetters,
27788 : .tp_methods = py_DnssrvOperation_methods,
27789 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
27790 : .tp_new = py_DnssrvOperation_new,
27791 : };
27792 :
27793 3 : static bool pack_py_DnssrvOperation_args_in(PyObject *args, PyObject *kwargs, struct DnssrvOperation *r)
27794 : {
27795 0 : PyObject *py_pwszServerName;
27796 0 : PyObject *py_pszZone;
27797 0 : PyObject *py_dwContext;
27798 0 : PyObject *py_pszOperation;
27799 0 : PyObject *py_dwTypeId;
27800 0 : PyObject *py_pData;
27801 3 : const char *kwnames[] = {
27802 : "pwszServerName", "pszZone", "dwContext", "pszOperation", "dwTypeId", "pData", NULL
27803 : };
27804 :
27805 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:DnssrvOperation", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_dwContext, &py_pszOperation, &py_dwTypeId, &py_pData)) {
27806 0 : return false;
27807 : }
27808 :
27809 3 : if (py_pwszServerName == NULL) {
27810 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
27811 0 : return false;
27812 : }
27813 3 : if (py_pwszServerName == Py_None) {
27814 0 : r->in.pwszServerName = NULL;
27815 : } else {
27816 3 : r->in.pwszServerName = NULL;
27817 : {
27818 0 : const char *test_str;
27819 0 : const char *talloc_str;
27820 3 : PyObject *unicode = NULL;
27821 3 : if (PyUnicode_Check(py_pwszServerName)) {
27822 3 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
27823 3 : if (unicode == NULL) {
27824 0 : PyErr_NoMemory();
27825 0 : return false;
27826 : }
27827 3 : test_str = PyBytes_AS_STRING(unicode);
27828 0 : } else if (PyBytes_Check(py_pwszServerName)) {
27829 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
27830 : } else {
27831 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
27832 0 : return false;
27833 : }
27834 3 : talloc_str = talloc_strdup(r, test_str);
27835 3 : if (unicode != NULL) {
27836 3 : Py_DECREF(unicode);
27837 : }
27838 3 : if (talloc_str == NULL) {
27839 0 : PyErr_NoMemory();
27840 0 : return false;
27841 : }
27842 3 : r->in.pwszServerName = talloc_str;
27843 : }
27844 : }
27845 3 : if (py_pszZone == NULL) {
27846 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
27847 0 : return false;
27848 : }
27849 3 : if (py_pszZone == Py_None) {
27850 0 : r->in.pszZone = NULL;
27851 : } else {
27852 3 : r->in.pszZone = NULL;
27853 : {
27854 0 : const char *test_str;
27855 0 : const char *talloc_str;
27856 3 : PyObject *unicode = NULL;
27857 3 : if (PyUnicode_Check(py_pszZone)) {
27858 3 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
27859 3 : if (unicode == NULL) {
27860 0 : PyErr_NoMemory();
27861 0 : return false;
27862 : }
27863 3 : test_str = PyBytes_AS_STRING(unicode);
27864 0 : } else if (PyBytes_Check(py_pszZone)) {
27865 0 : test_str = PyBytes_AS_STRING(py_pszZone);
27866 : } else {
27867 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
27868 0 : return false;
27869 : }
27870 3 : talloc_str = talloc_strdup(r, test_str);
27871 3 : if (unicode != NULL) {
27872 3 : Py_DECREF(unicode);
27873 : }
27874 3 : if (talloc_str == NULL) {
27875 0 : PyErr_NoMemory();
27876 0 : return false;
27877 : }
27878 3 : r->in.pszZone = talloc_str;
27879 : }
27880 : }
27881 3 : if (py_dwContext == NULL) {
27882 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwContext");
27883 0 : return false;
27884 : }
27885 : {
27886 3 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwContext));
27887 3 : if (PyLong_Check(py_dwContext)) {
27888 0 : unsigned long long test_var;
27889 3 : test_var = PyLong_AsUnsignedLongLong(py_dwContext);
27890 3 : if (PyErr_Occurred() != NULL) {
27891 0 : return false;
27892 : }
27893 3 : if (test_var > uint_max) {
27894 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27895 : PyLong_Type.tp_name, uint_max, test_var);
27896 0 : return false;
27897 : }
27898 3 : r->in.dwContext = test_var;
27899 : } else {
27900 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27901 : PyLong_Type.tp_name);
27902 0 : return false;
27903 : }
27904 : }
27905 3 : if (py_pszOperation == NULL) {
27906 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszOperation");
27907 0 : return false;
27908 : }
27909 3 : if (py_pszOperation == Py_None) {
27910 0 : r->in.pszOperation = NULL;
27911 : } else {
27912 3 : r->in.pszOperation = NULL;
27913 : {
27914 0 : const char *test_str;
27915 0 : const char *talloc_str;
27916 3 : PyObject *unicode = NULL;
27917 3 : if (PyUnicode_Check(py_pszOperation)) {
27918 3 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
27919 3 : if (unicode == NULL) {
27920 0 : PyErr_NoMemory();
27921 0 : return false;
27922 : }
27923 3 : test_str = PyBytes_AS_STRING(unicode);
27924 0 : } else if (PyBytes_Check(py_pszOperation)) {
27925 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
27926 : } else {
27927 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
27928 0 : return false;
27929 : }
27930 3 : talloc_str = talloc_strdup(r, test_str);
27931 3 : if (unicode != NULL) {
27932 3 : Py_DECREF(unicode);
27933 : }
27934 3 : if (talloc_str == NULL) {
27935 0 : PyErr_NoMemory();
27936 0 : return false;
27937 : }
27938 3 : r->in.pszOperation = talloc_str;
27939 : }
27940 : }
27941 3 : if (py_dwTypeId == NULL) {
27942 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwTypeId");
27943 0 : return false;
27944 : }
27945 : {
27946 3 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwTypeId));
27947 3 : if (PyLong_Check(py_dwTypeId)) {
27948 0 : unsigned long long test_var;
27949 3 : test_var = PyLong_AsUnsignedLongLong(py_dwTypeId);
27950 3 : if (PyErr_Occurred() != NULL) {
27951 0 : return false;
27952 : }
27953 3 : if (test_var > uint_max) {
27954 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
27955 : PyLong_Type.tp_name, uint_max, test_var);
27956 0 : return false;
27957 : }
27958 3 : r->in.dwTypeId = test_var;
27959 : } else {
27960 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
27961 : PyLong_Type.tp_name);
27962 0 : return false;
27963 : }
27964 : }
27965 3 : if (py_pData == NULL) {
27966 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pData");
27967 0 : return false;
27968 : }
27969 : {
27970 0 : union DNSSRV_RPC_UNION *pData_switch_0;
27971 3 : pData_switch_0 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, r, r->in.dwTypeId, py_pData, "union DNSSRV_RPC_UNION");
27972 3 : if (pData_switch_0 == NULL) {
27973 0 : return false;
27974 : }
27975 3 : r->in.pData = *pData_switch_0;
27976 : }
27977 3 : return true;
27978 : }
27979 :
27980 3 : static PyObject *unpack_py_DnssrvOperation_args_out(struct DnssrvOperation *r)
27981 : {
27982 0 : PyObject *result;
27983 3 : result = Py_None;
27984 3 : Py_INCREF(result);
27985 3 : if (!W_ERROR_IS_OK(r->out.result)) {
27986 3 : PyErr_SetWERROR(r->out.result);
27987 3 : return NULL;
27988 : }
27989 :
27990 0 : return result;
27991 : }
27992 :
27993 :
27994 0 : static PyObject *py_DnssrvQuery_in_get_pwszServerName(PyObject *obj, void *closure)
27995 : {
27996 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(obj);
27997 0 : PyObject *py_pwszServerName;
27998 0 : if (object->in.pwszServerName == NULL) {
27999 0 : Py_RETURN_NONE;
28000 : }
28001 0 : if (object->in.pwszServerName == NULL) {
28002 0 : py_pwszServerName = Py_None;
28003 0 : Py_INCREF(py_pwszServerName);
28004 : } else {
28005 0 : if (object->in.pwszServerName == NULL) {
28006 0 : py_pwszServerName = Py_None;
28007 0 : Py_INCREF(py_pwszServerName);
28008 : } else {
28009 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
28010 : }
28011 : }
28012 0 : return py_pwszServerName;
28013 : }
28014 :
28015 0 : static int py_DnssrvQuery_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
28016 : {
28017 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28018 0 : if (value == NULL) {
28019 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
28020 0 : return -1;
28021 : }
28022 0 : if (value == Py_None) {
28023 0 : object->in.pwszServerName = NULL;
28024 : } else {
28025 0 : object->in.pwszServerName = NULL;
28026 : {
28027 0 : const char *test_str;
28028 0 : const char *talloc_str;
28029 0 : PyObject *unicode = NULL;
28030 0 : if (PyUnicode_Check(value)) {
28031 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28032 0 : if (unicode == NULL) {
28033 0 : PyErr_NoMemory();
28034 0 : return -1;
28035 : }
28036 0 : test_str = PyBytes_AS_STRING(unicode);
28037 0 : } else if (PyBytes_Check(value)) {
28038 0 : test_str = PyBytes_AS_STRING(value);
28039 : } else {
28040 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28041 0 : return -1;
28042 : }
28043 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28044 0 : if (unicode != NULL) {
28045 0 : Py_DECREF(unicode);
28046 : }
28047 0 : if (talloc_str == NULL) {
28048 0 : PyErr_NoMemory();
28049 0 : return -1;
28050 : }
28051 0 : object->in.pwszServerName = talloc_str;
28052 : }
28053 : }
28054 0 : return 0;
28055 : }
28056 :
28057 0 : static PyObject *py_DnssrvQuery_in_get_pszZone(PyObject *obj, void *closure)
28058 : {
28059 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(obj);
28060 0 : PyObject *py_pszZone;
28061 0 : if (object->in.pszZone == NULL) {
28062 0 : Py_RETURN_NONE;
28063 : }
28064 0 : if (object->in.pszZone == NULL) {
28065 0 : py_pszZone = Py_None;
28066 0 : Py_INCREF(py_pszZone);
28067 : } else {
28068 0 : if (object->in.pszZone == NULL) {
28069 0 : py_pszZone = Py_None;
28070 0 : Py_INCREF(py_pszZone);
28071 : } else {
28072 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
28073 : }
28074 : }
28075 0 : return py_pszZone;
28076 : }
28077 :
28078 0 : static int py_DnssrvQuery_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
28079 : {
28080 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28081 0 : if (value == NULL) {
28082 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
28083 0 : return -1;
28084 : }
28085 0 : if (value == Py_None) {
28086 0 : object->in.pszZone = NULL;
28087 : } else {
28088 0 : object->in.pszZone = NULL;
28089 : {
28090 0 : const char *test_str;
28091 0 : const char *talloc_str;
28092 0 : PyObject *unicode = NULL;
28093 0 : if (PyUnicode_Check(value)) {
28094 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28095 0 : if (unicode == NULL) {
28096 0 : PyErr_NoMemory();
28097 0 : return -1;
28098 : }
28099 0 : test_str = PyBytes_AS_STRING(unicode);
28100 0 : } else if (PyBytes_Check(value)) {
28101 0 : test_str = PyBytes_AS_STRING(value);
28102 : } else {
28103 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28104 0 : return -1;
28105 : }
28106 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28107 0 : if (unicode != NULL) {
28108 0 : Py_DECREF(unicode);
28109 : }
28110 0 : if (talloc_str == NULL) {
28111 0 : PyErr_NoMemory();
28112 0 : return -1;
28113 : }
28114 0 : object->in.pszZone = talloc_str;
28115 : }
28116 : }
28117 0 : return 0;
28118 : }
28119 :
28120 0 : static PyObject *py_DnssrvQuery_in_get_pszOperation(PyObject *obj, void *closure)
28121 : {
28122 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(obj);
28123 0 : PyObject *py_pszOperation;
28124 0 : if (object->in.pszOperation == NULL) {
28125 0 : Py_RETURN_NONE;
28126 : }
28127 0 : if (object->in.pszOperation == NULL) {
28128 0 : py_pszOperation = Py_None;
28129 0 : Py_INCREF(py_pszOperation);
28130 : } else {
28131 0 : if (object->in.pszOperation == NULL) {
28132 0 : py_pszOperation = Py_None;
28133 0 : Py_INCREF(py_pszOperation);
28134 : } else {
28135 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
28136 : }
28137 : }
28138 0 : return py_pszOperation;
28139 : }
28140 :
28141 0 : static int py_DnssrvQuery_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
28142 : {
28143 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28144 0 : if (value == NULL) {
28145 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszOperation");
28146 0 : return -1;
28147 : }
28148 0 : if (value == Py_None) {
28149 0 : object->in.pszOperation = NULL;
28150 : } else {
28151 0 : object->in.pszOperation = NULL;
28152 : {
28153 0 : const char *test_str;
28154 0 : const char *talloc_str;
28155 0 : PyObject *unicode = NULL;
28156 0 : if (PyUnicode_Check(value)) {
28157 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28158 0 : if (unicode == NULL) {
28159 0 : PyErr_NoMemory();
28160 0 : return -1;
28161 : }
28162 0 : test_str = PyBytes_AS_STRING(unicode);
28163 0 : } else if (PyBytes_Check(value)) {
28164 0 : test_str = PyBytes_AS_STRING(value);
28165 : } else {
28166 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28167 0 : return -1;
28168 : }
28169 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28170 0 : if (unicode != NULL) {
28171 0 : Py_DECREF(unicode);
28172 : }
28173 0 : if (talloc_str == NULL) {
28174 0 : PyErr_NoMemory();
28175 0 : return -1;
28176 : }
28177 0 : object->in.pszOperation = talloc_str;
28178 : }
28179 : }
28180 0 : return 0;
28181 : }
28182 :
28183 0 : static PyObject *py_DnssrvQuery_out_get_pdwTypeId(PyObject *obj, void *closure)
28184 : {
28185 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(obj);
28186 0 : PyObject *py_pdwTypeId;
28187 0 : if (object->out.pdwTypeId == NULL) {
28188 0 : Py_RETURN_NONE;
28189 : }
28190 0 : py_pdwTypeId = PyLong_FromUnsignedLongLong((uint32_t)*object->out.pdwTypeId);
28191 0 : return py_pdwTypeId;
28192 : }
28193 :
28194 0 : static int py_DnssrvQuery_out_set_pdwTypeId(PyObject *py_obj, PyObject *value, void *closure)
28195 : {
28196 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28197 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwTypeId));
28198 0 : if (value == NULL) {
28199 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pdwTypeId");
28200 0 : return -1;
28201 : }
28202 0 : object->out.pdwTypeId = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwTypeId);
28203 0 : if (object->out.pdwTypeId == NULL) {
28204 0 : PyErr_NoMemory();
28205 0 : return -1;
28206 : }
28207 : {
28208 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwTypeId));
28209 0 : if (PyLong_Check(value)) {
28210 0 : unsigned long long test_var;
28211 0 : test_var = PyLong_AsUnsignedLongLong(value);
28212 0 : if (PyErr_Occurred() != NULL) {
28213 0 : return -1;
28214 : }
28215 0 : if (test_var > uint_max) {
28216 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28217 : PyLong_Type.tp_name, uint_max, test_var);
28218 0 : return -1;
28219 : }
28220 0 : *object->out.pdwTypeId = test_var;
28221 : } else {
28222 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28223 : PyLong_Type.tp_name);
28224 0 : return -1;
28225 : }
28226 : }
28227 0 : return 0;
28228 : }
28229 :
28230 0 : static PyObject *py_DnssrvQuery_out_get_ppData(PyObject *obj, void *closure)
28231 : {
28232 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(obj);
28233 0 : PyObject *py_ppData;
28234 0 : if (object->out.ppData == NULL) {
28235 0 : Py_RETURN_NONE;
28236 : }
28237 0 : py_ppData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, object->out.ppData, *object->out.pdwTypeId, object->out.ppData, "union DNSSRV_RPC_UNION");
28238 0 : if (py_ppData == NULL) {
28239 0 : return NULL;
28240 : }
28241 0 : return py_ppData;
28242 : }
28243 :
28244 0 : static int py_DnssrvQuery_out_set_ppData(PyObject *py_obj, PyObject *value, void *closure)
28245 : {
28246 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28247 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ppData));
28248 0 : if (value == NULL) {
28249 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ppData");
28250 0 : return -1;
28251 : }
28252 0 : object->out.ppData = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ppData);
28253 0 : if (object->out.ppData == NULL) {
28254 0 : PyErr_NoMemory();
28255 0 : return -1;
28256 : }
28257 : {
28258 0 : union DNSSRV_RPC_UNION *ppData_switch_1;
28259 0 : ppData_switch_1 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(py_obj), *object->out.pdwTypeId, value, "union DNSSRV_RPC_UNION");
28260 0 : if (ppData_switch_1 == NULL) {
28261 0 : return -1;
28262 : }
28263 0 : object->out.ppData = ppData_switch_1;
28264 : }
28265 0 : return 0;
28266 : }
28267 :
28268 0 : static PyObject *py_DnssrvQuery_get_result(PyObject *obj, void *closure)
28269 : {
28270 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(obj);
28271 0 : PyObject *py_result;
28272 0 : py_result = PyErr_FromWERROR(object->out.result);
28273 0 : return py_result;
28274 : }
28275 :
28276 0 : static int py_DnssrvQuery_set_result(PyObject *py_obj, PyObject *value, void *closure)
28277 : {
28278 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28279 0 : if (value == NULL) {
28280 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
28281 0 : return -1;
28282 : }
28283 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
28284 0 : return 0;
28285 : }
28286 :
28287 : static PyGetSetDef py_DnssrvQuery_getsetters[] = {
28288 : {
28289 : .name = discard_const_p(char, "in_pwszServerName"),
28290 : .get = py_DnssrvQuery_in_get_pwszServerName,
28291 : .set = py_DnssrvQuery_in_set_pwszServerName,
28292 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
28293 : },
28294 : {
28295 : .name = discard_const_p(char, "in_pszZone"),
28296 : .get = py_DnssrvQuery_in_get_pszZone,
28297 : .set = py_DnssrvQuery_in_set_pszZone,
28298 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
28299 : },
28300 : {
28301 : .name = discard_const_p(char, "in_pszOperation"),
28302 : .get = py_DnssrvQuery_in_get_pszOperation,
28303 : .set = py_DnssrvQuery_in_set_pszOperation,
28304 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
28305 : },
28306 : {
28307 : .name = discard_const_p(char, "out_pdwTypeId"),
28308 : .get = py_DnssrvQuery_out_get_pdwTypeId,
28309 : .set = py_DnssrvQuery_out_set_pdwTypeId,
28310 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
28311 : },
28312 : {
28313 : .name = discard_const_p(char, "out_ppData"),
28314 : .get = py_DnssrvQuery_out_get_ppData,
28315 : .set = py_DnssrvQuery_out_set_ppData,
28316 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
28317 : },
28318 : {
28319 : .name = discard_const_p(char, "result"),
28320 : .get = py_DnssrvQuery_get_result,
28321 : .set = py_DnssrvQuery_set_result,
28322 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
28323 : },
28324 : { .name = NULL }
28325 : };
28326 :
28327 0 : static PyObject *py_DnssrvQuery_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
28328 : {
28329 0 : PyObject *self = pytalloc_new(struct DnssrvQuery, type);
28330 0 : struct DnssrvQuery *_self = (struct DnssrvQuery *)pytalloc_get_ptr(self);
28331 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
28332 0 : _self->out.pdwTypeId = talloc_zero(mem_ctx, enum DNS_RPC_TYPEID);
28333 0 : _self->out.ppData = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
28334 0 : return self;
28335 : }
28336 :
28337 0 : static PyObject *py_DnssrvQuery_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
28338 : {
28339 :
28340 :
28341 0 : return PyLong_FromLong(1);
28342 : }
28343 :
28344 0 : static PyObject *py_DnssrvQuery_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
28345 : {
28346 0 : const struct ndr_interface_call *call = NULL;
28347 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28348 0 : PyObject *ret = NULL;
28349 0 : struct ndr_push *push = NULL;
28350 0 : DATA_BLOB blob;
28351 0 : enum ndr_err_code err;
28352 :
28353 0 : if (ndr_table_dnsserver.num_calls < 2) {
28354 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery_ndr_pack");
28355 0 : return NULL;
28356 : }
28357 0 : call = &ndr_table_dnsserver.calls[1];
28358 :
28359 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
28360 0 : if (push == NULL) {
28361 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
28362 0 : return NULL;
28363 : }
28364 :
28365 0 : push->flags |= ndr_push_flags;
28366 :
28367 0 : err = call->ndr_push(push, ndr_inout_flags, object);
28368 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
28369 0 : TALLOC_FREE(push);
28370 0 : PyErr_SetNdrError(err);
28371 0 : return NULL;
28372 : }
28373 0 : blob = ndr_push_blob(push);
28374 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
28375 0 : TALLOC_FREE(push);
28376 0 : return ret;
28377 : }
28378 :
28379 0 : static PyObject *py_DnssrvQuery_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
28380 : {
28381 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
28382 0 : PyObject *bigendian_obj = NULL;
28383 0 : PyObject *ndr64_obj = NULL;
28384 0 : libndr_flags ndr_push_flags = 0;
28385 :
28386 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
28387 : discard_const_p(char *, kwnames),
28388 : &bigendian_obj,
28389 : &ndr64_obj)) {
28390 0 : return NULL;
28391 : }
28392 :
28393 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
28394 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
28395 : }
28396 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
28397 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
28398 : }
28399 :
28400 0 : return py_DnssrvQuery_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
28401 : }
28402 :
28403 0 : static PyObject *py_DnssrvQuery_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
28404 : {
28405 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
28406 0 : PyObject *bigendian_obj = NULL;
28407 0 : PyObject *ndr64_obj = NULL;
28408 0 : libndr_flags ndr_push_flags = 0;
28409 :
28410 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
28411 : discard_const_p(char *, kwnames),
28412 : &bigendian_obj,
28413 : &ndr64_obj)) {
28414 0 : return NULL;
28415 : }
28416 :
28417 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
28418 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
28419 : }
28420 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
28421 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
28422 : }
28423 :
28424 0 : return py_DnssrvQuery_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
28425 : }
28426 :
28427 0 : static PyObject *py_DnssrvQuery_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
28428 : {
28429 0 : const struct ndr_interface_call *call = NULL;
28430 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28431 0 : struct ndr_pull *pull = NULL;
28432 0 : enum ndr_err_code err;
28433 :
28434 0 : if (ndr_table_dnsserver.num_calls < 2) {
28435 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery_ndr_unpack");
28436 0 : return NULL;
28437 : }
28438 0 : call = &ndr_table_dnsserver.calls[1];
28439 :
28440 0 : pull = ndr_pull_init_blob(blob, object);
28441 0 : if (pull == NULL) {
28442 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
28443 0 : return NULL;
28444 : }
28445 :
28446 0 : pull->flags |= ndr_pull_flags;
28447 :
28448 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
28449 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
28450 0 : TALLOC_FREE(pull);
28451 0 : PyErr_SetNdrError(err);
28452 0 : return NULL;
28453 : }
28454 0 : if (!allow_remaining) {
28455 0 : uint32_t highest_ofs;
28456 :
28457 0 : if (pull->offset > pull->relative_highest_offset) {
28458 0 : highest_ofs = pull->offset;
28459 : } else {
28460 0 : highest_ofs = pull->relative_highest_offset;
28461 : }
28462 0 : if (highest_ofs < pull->data_size) {
28463 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
28464 : "not all bytes consumed ofs[%u] size[%u]",
28465 : highest_ofs, pull->data_size);
28466 0 : TALLOC_FREE(pull);
28467 0 : PyErr_SetNdrError(err);
28468 0 : return NULL;
28469 : }
28470 : }
28471 :
28472 0 : TALLOC_FREE(pull);
28473 0 : Py_RETURN_NONE;
28474 : }
28475 :
28476 0 : static PyObject *py_DnssrvQuery_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
28477 : {
28478 0 : DATA_BLOB blob;
28479 0 : Py_ssize_t blob_length = 0;
28480 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
28481 0 : PyObject *bigendian_obj = NULL;
28482 0 : PyObject *ndr64_obj = NULL;
28483 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
28484 0 : PyObject *allow_remaining_obj = NULL;
28485 0 : bool allow_remaining = false;
28486 :
28487 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
28488 : discard_const_p(char *, kwnames),
28489 : &blob.data, &blob_length,
28490 : &bigendian_obj,
28491 : &ndr64_obj,
28492 : &allow_remaining_obj)) {
28493 0 : return NULL;
28494 : }
28495 0 : blob.length = blob_length;
28496 :
28497 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
28498 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
28499 : }
28500 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
28501 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
28502 : }
28503 :
28504 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
28505 0 : allow_remaining = true;
28506 : }
28507 :
28508 0 : return py_DnssrvQuery_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
28509 : }
28510 :
28511 0 : static PyObject *py_DnssrvQuery_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
28512 : {
28513 0 : DATA_BLOB blob;
28514 0 : Py_ssize_t blob_length = 0;
28515 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
28516 0 : PyObject *bigendian_obj = NULL;
28517 0 : PyObject *ndr64_obj = NULL;
28518 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
28519 0 : PyObject *allow_remaining_obj = NULL;
28520 0 : bool allow_remaining = false;
28521 :
28522 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
28523 : discard_const_p(char *, kwnames),
28524 : &blob.data, &blob_length,
28525 : &bigendian_obj,
28526 : &ndr64_obj,
28527 : &allow_remaining_obj)) {
28528 0 : return NULL;
28529 : }
28530 0 : blob.length = blob_length;
28531 :
28532 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
28533 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
28534 : }
28535 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
28536 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
28537 : }
28538 :
28539 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
28540 0 : allow_remaining = true;
28541 : }
28542 :
28543 0 : return py_DnssrvQuery_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
28544 : }
28545 :
28546 0 : static PyObject *py_DnssrvQuery_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
28547 : {
28548 0 : const struct ndr_interface_call *call = NULL;
28549 0 : struct DnssrvQuery *object = (struct DnssrvQuery *)pytalloc_get_ptr(py_obj);
28550 0 : PyObject *ret;
28551 0 : char *retstr;
28552 :
28553 0 : if (ndr_table_dnsserver.num_calls < 2) {
28554 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery_ndr_print");
28555 0 : return NULL;
28556 : }
28557 0 : call = &ndr_table_dnsserver.calls[1];
28558 :
28559 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
28560 0 : ret = PyUnicode_FromString(retstr);
28561 0 : TALLOC_FREE(retstr);
28562 :
28563 0 : return ret;
28564 : }
28565 :
28566 0 : static PyObject *py_DnssrvQuery_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
28567 : {
28568 0 : return py_DnssrvQuery_ndr_print(py_obj, "DnssrvQuery_in", NDR_IN);
28569 : }
28570 :
28571 0 : static PyObject *py_DnssrvQuery_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
28572 : {
28573 0 : return py_DnssrvQuery_ndr_print(py_obj, "DnssrvQuery_out", NDR_OUT);
28574 : }
28575 :
28576 : static PyMethodDef py_DnssrvQuery_methods[] = {
28577 : { "opnum", (PyCFunction)py_DnssrvQuery_ndr_opnum, METH_NOARGS|METH_CLASS,
28578 : "dnsserver.DnssrvQuery.opnum() -> 1 (0x01) " },
28579 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
28580 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
28581 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
28582 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
28583 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
28584 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
28585 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
28586 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
28587 : { "__ndr_print_in__", (PyCFunction)py_DnssrvQuery_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
28588 : { "__ndr_print_out__", (PyCFunction)py_DnssrvQuery_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
28589 : { NULL, NULL, 0, NULL }
28590 : };
28591 :
28592 :
28593 : static PyTypeObject DnssrvQuery_Type = {
28594 : PyVarObject_HEAD_INIT(NULL, 0)
28595 : .tp_name = "dnsserver.DnssrvQuery",
28596 : .tp_getset = py_DnssrvQuery_getsetters,
28597 : .tp_methods = py_DnssrvQuery_methods,
28598 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
28599 : .tp_new = py_DnssrvQuery_new,
28600 : };
28601 :
28602 0 : static bool pack_py_DnssrvQuery_args_in(PyObject *args, PyObject *kwargs, struct DnssrvQuery *r)
28603 : {
28604 0 : PyObject *py_pwszServerName;
28605 0 : PyObject *py_pszZone;
28606 0 : PyObject *py_pszOperation;
28607 0 : const char *kwnames[] = {
28608 : "pwszServerName", "pszZone", "pszOperation", NULL
28609 : };
28610 :
28611 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO:DnssrvQuery", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszOperation)) {
28612 0 : return false;
28613 : }
28614 :
28615 0 : if (py_pwszServerName == NULL) {
28616 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
28617 0 : return false;
28618 : }
28619 0 : if (py_pwszServerName == Py_None) {
28620 0 : r->in.pwszServerName = NULL;
28621 : } else {
28622 0 : r->in.pwszServerName = NULL;
28623 : {
28624 0 : const char *test_str;
28625 0 : const char *talloc_str;
28626 0 : PyObject *unicode = NULL;
28627 0 : if (PyUnicode_Check(py_pwszServerName)) {
28628 0 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
28629 0 : if (unicode == NULL) {
28630 0 : PyErr_NoMemory();
28631 0 : return false;
28632 : }
28633 0 : test_str = PyBytes_AS_STRING(unicode);
28634 0 : } else if (PyBytes_Check(py_pwszServerName)) {
28635 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
28636 : } else {
28637 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
28638 0 : return false;
28639 : }
28640 0 : talloc_str = talloc_strdup(r, 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 false;
28647 : }
28648 0 : r->in.pwszServerName = talloc_str;
28649 : }
28650 : }
28651 0 : if (py_pszZone == NULL) {
28652 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
28653 0 : return false;
28654 : }
28655 0 : if (py_pszZone == Py_None) {
28656 0 : r->in.pszZone = NULL;
28657 : } else {
28658 0 : r->in.pszZone = NULL;
28659 : {
28660 0 : const char *test_str;
28661 0 : const char *talloc_str;
28662 0 : PyObject *unicode = NULL;
28663 0 : if (PyUnicode_Check(py_pszZone)) {
28664 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
28665 0 : if (unicode == NULL) {
28666 0 : PyErr_NoMemory();
28667 0 : return false;
28668 : }
28669 0 : test_str = PyBytes_AS_STRING(unicode);
28670 0 : } else if (PyBytes_Check(py_pszZone)) {
28671 0 : test_str = PyBytes_AS_STRING(py_pszZone);
28672 : } else {
28673 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
28674 0 : return false;
28675 : }
28676 0 : talloc_str = talloc_strdup(r, test_str);
28677 0 : if (unicode != NULL) {
28678 0 : Py_DECREF(unicode);
28679 : }
28680 0 : if (talloc_str == NULL) {
28681 0 : PyErr_NoMemory();
28682 0 : return false;
28683 : }
28684 0 : r->in.pszZone = talloc_str;
28685 : }
28686 : }
28687 0 : if (py_pszOperation == NULL) {
28688 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszOperation");
28689 0 : return false;
28690 : }
28691 0 : if (py_pszOperation == Py_None) {
28692 0 : r->in.pszOperation = NULL;
28693 : } else {
28694 0 : r->in.pszOperation = NULL;
28695 : {
28696 0 : const char *test_str;
28697 0 : const char *talloc_str;
28698 0 : PyObject *unicode = NULL;
28699 0 : if (PyUnicode_Check(py_pszOperation)) {
28700 0 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
28701 0 : if (unicode == NULL) {
28702 0 : PyErr_NoMemory();
28703 0 : return false;
28704 : }
28705 0 : test_str = PyBytes_AS_STRING(unicode);
28706 0 : } else if (PyBytes_Check(py_pszOperation)) {
28707 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
28708 : } else {
28709 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
28710 0 : return false;
28711 : }
28712 0 : talloc_str = talloc_strdup(r, test_str);
28713 0 : if (unicode != NULL) {
28714 0 : Py_DECREF(unicode);
28715 : }
28716 0 : if (talloc_str == NULL) {
28717 0 : PyErr_NoMemory();
28718 0 : return false;
28719 : }
28720 0 : r->in.pszOperation = talloc_str;
28721 : }
28722 : }
28723 0 : return true;
28724 : }
28725 :
28726 0 : static PyObject *unpack_py_DnssrvQuery_args_out(struct DnssrvQuery *r)
28727 : {
28728 0 : PyObject *result;
28729 0 : PyObject *py_pdwTypeId;
28730 0 : PyObject *py_ppData;
28731 0 : result = PyTuple_New(2);
28732 0 : py_pdwTypeId = PyLong_FromUnsignedLongLong((uint32_t)*r->out.pdwTypeId);
28733 0 : PyTuple_SetItem(result, 0, py_pdwTypeId);
28734 0 : py_ppData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, r->out.ppData, *r->out.pdwTypeId, r->out.ppData, "union DNSSRV_RPC_UNION");
28735 0 : if (py_ppData == NULL) {
28736 0 : return NULL;
28737 : }
28738 0 : PyTuple_SetItem(result, 1, py_ppData);
28739 0 : if (!W_ERROR_IS_OK(r->out.result)) {
28740 0 : PyErr_SetWERROR(r->out.result);
28741 0 : return NULL;
28742 : }
28743 :
28744 0 : return result;
28745 : }
28746 :
28747 :
28748 0 : static PyObject *py_DnssrvComplexOperation_in_get_pwszServerName(PyObject *obj, void *closure)
28749 : {
28750 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(obj);
28751 0 : PyObject *py_pwszServerName;
28752 0 : if (object->in.pwszServerName == NULL) {
28753 0 : Py_RETURN_NONE;
28754 : }
28755 0 : if (object->in.pwszServerName == NULL) {
28756 0 : py_pwszServerName = Py_None;
28757 0 : Py_INCREF(py_pwszServerName);
28758 : } else {
28759 0 : if (object->in.pwszServerName == NULL) {
28760 0 : py_pwszServerName = Py_None;
28761 0 : Py_INCREF(py_pwszServerName);
28762 : } else {
28763 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
28764 : }
28765 : }
28766 0 : return py_pwszServerName;
28767 : }
28768 :
28769 0 : static int py_DnssrvComplexOperation_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
28770 : {
28771 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
28772 0 : if (value == NULL) {
28773 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
28774 0 : return -1;
28775 : }
28776 0 : if (value == Py_None) {
28777 0 : object->in.pwszServerName = NULL;
28778 : } else {
28779 0 : object->in.pwszServerName = NULL;
28780 : {
28781 0 : const char *test_str;
28782 0 : const char *talloc_str;
28783 0 : PyObject *unicode = NULL;
28784 0 : if (PyUnicode_Check(value)) {
28785 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28786 0 : if (unicode == NULL) {
28787 0 : PyErr_NoMemory();
28788 0 : return -1;
28789 : }
28790 0 : test_str = PyBytes_AS_STRING(unicode);
28791 0 : } else if (PyBytes_Check(value)) {
28792 0 : test_str = PyBytes_AS_STRING(value);
28793 : } else {
28794 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28795 0 : return -1;
28796 : }
28797 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28798 0 : if (unicode != NULL) {
28799 0 : Py_DECREF(unicode);
28800 : }
28801 0 : if (talloc_str == NULL) {
28802 0 : PyErr_NoMemory();
28803 0 : return -1;
28804 : }
28805 0 : object->in.pwszServerName = talloc_str;
28806 : }
28807 : }
28808 0 : return 0;
28809 : }
28810 :
28811 0 : static PyObject *py_DnssrvComplexOperation_in_get_pszZone(PyObject *obj, void *closure)
28812 : {
28813 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(obj);
28814 0 : PyObject *py_pszZone;
28815 0 : if (object->in.pszZone == NULL) {
28816 0 : Py_RETURN_NONE;
28817 : }
28818 0 : if (object->in.pszZone == NULL) {
28819 0 : py_pszZone = Py_None;
28820 0 : Py_INCREF(py_pszZone);
28821 : } else {
28822 0 : if (object->in.pszZone == NULL) {
28823 0 : py_pszZone = Py_None;
28824 0 : Py_INCREF(py_pszZone);
28825 : } else {
28826 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
28827 : }
28828 : }
28829 0 : return py_pszZone;
28830 : }
28831 :
28832 0 : static int py_DnssrvComplexOperation_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
28833 : {
28834 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
28835 0 : if (value == NULL) {
28836 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
28837 0 : return -1;
28838 : }
28839 0 : if (value == Py_None) {
28840 0 : object->in.pszZone = NULL;
28841 : } else {
28842 0 : object->in.pszZone = NULL;
28843 : {
28844 0 : const char *test_str;
28845 0 : const char *talloc_str;
28846 0 : PyObject *unicode = NULL;
28847 0 : if (PyUnicode_Check(value)) {
28848 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28849 0 : if (unicode == NULL) {
28850 0 : PyErr_NoMemory();
28851 0 : return -1;
28852 : }
28853 0 : test_str = PyBytes_AS_STRING(unicode);
28854 0 : } else if (PyBytes_Check(value)) {
28855 0 : test_str = PyBytes_AS_STRING(value);
28856 : } else {
28857 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28858 0 : return -1;
28859 : }
28860 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28861 0 : if (unicode != NULL) {
28862 0 : Py_DECREF(unicode);
28863 : }
28864 0 : if (talloc_str == NULL) {
28865 0 : PyErr_NoMemory();
28866 0 : return -1;
28867 : }
28868 0 : object->in.pszZone = talloc_str;
28869 : }
28870 : }
28871 0 : return 0;
28872 : }
28873 :
28874 0 : static PyObject *py_DnssrvComplexOperation_in_get_pszOperation(PyObject *obj, void *closure)
28875 : {
28876 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(obj);
28877 0 : PyObject *py_pszOperation;
28878 0 : if (object->in.pszOperation == NULL) {
28879 0 : Py_RETURN_NONE;
28880 : }
28881 0 : if (object->in.pszOperation == NULL) {
28882 0 : py_pszOperation = Py_None;
28883 0 : Py_INCREF(py_pszOperation);
28884 : } else {
28885 0 : if (object->in.pszOperation == NULL) {
28886 0 : py_pszOperation = Py_None;
28887 0 : Py_INCREF(py_pszOperation);
28888 : } else {
28889 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
28890 : }
28891 : }
28892 0 : return py_pszOperation;
28893 : }
28894 :
28895 0 : static int py_DnssrvComplexOperation_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
28896 : {
28897 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
28898 0 : if (value == NULL) {
28899 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszOperation");
28900 0 : return -1;
28901 : }
28902 0 : if (value == Py_None) {
28903 0 : object->in.pszOperation = NULL;
28904 : } else {
28905 0 : object->in.pszOperation = NULL;
28906 : {
28907 0 : const char *test_str;
28908 0 : const char *talloc_str;
28909 0 : PyObject *unicode = NULL;
28910 0 : if (PyUnicode_Check(value)) {
28911 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
28912 0 : if (unicode == NULL) {
28913 0 : PyErr_NoMemory();
28914 0 : return -1;
28915 : }
28916 0 : test_str = PyBytes_AS_STRING(unicode);
28917 0 : } else if (PyBytes_Check(value)) {
28918 0 : test_str = PyBytes_AS_STRING(value);
28919 : } else {
28920 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
28921 0 : return -1;
28922 : }
28923 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
28924 0 : if (unicode != NULL) {
28925 0 : Py_DECREF(unicode);
28926 : }
28927 0 : if (talloc_str == NULL) {
28928 0 : PyErr_NoMemory();
28929 0 : return -1;
28930 : }
28931 0 : object->in.pszOperation = talloc_str;
28932 : }
28933 : }
28934 0 : return 0;
28935 : }
28936 :
28937 0 : static PyObject *py_DnssrvComplexOperation_in_get_dwTypeIn(PyObject *obj, void *closure)
28938 : {
28939 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(obj);
28940 0 : PyObject *py_dwTypeIn;
28941 0 : py_dwTypeIn = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwTypeIn);
28942 0 : return py_dwTypeIn;
28943 : }
28944 :
28945 0 : static int py_DnssrvComplexOperation_in_set_dwTypeIn(PyObject *py_obj, PyObject *value, void *closure)
28946 : {
28947 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
28948 0 : if (value == NULL) {
28949 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwTypeIn");
28950 0 : return -1;
28951 : }
28952 : {
28953 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwTypeIn));
28954 0 : if (PyLong_Check(value)) {
28955 0 : unsigned long long test_var;
28956 0 : test_var = PyLong_AsUnsignedLongLong(value);
28957 0 : if (PyErr_Occurred() != NULL) {
28958 0 : return -1;
28959 : }
28960 0 : if (test_var > uint_max) {
28961 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
28962 : PyLong_Type.tp_name, uint_max, test_var);
28963 0 : return -1;
28964 : }
28965 0 : object->in.dwTypeIn = test_var;
28966 : } else {
28967 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
28968 : PyLong_Type.tp_name);
28969 0 : return -1;
28970 : }
28971 : }
28972 0 : return 0;
28973 : }
28974 :
28975 0 : static PyObject *py_DnssrvComplexOperation_in_get_pDataIn(PyObject *obj, void *closure)
28976 : {
28977 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(obj);
28978 0 : PyObject *py_pDataIn;
28979 0 : py_pDataIn = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(obj), object->in.dwTypeIn, &object->in.pDataIn, "union DNSSRV_RPC_UNION");
28980 0 : if (py_pDataIn == NULL) {
28981 0 : return NULL;
28982 : }
28983 0 : return py_pDataIn;
28984 : }
28985 :
28986 0 : static int py_DnssrvComplexOperation_in_set_pDataIn(PyObject *py_obj, PyObject *value, void *closure)
28987 : {
28988 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
28989 0 : if (value == NULL) {
28990 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pDataIn");
28991 0 : return -1;
28992 : }
28993 : {
28994 0 : union DNSSRV_RPC_UNION *pDataIn_switch_0;
28995 0 : pDataIn_switch_0 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(py_obj), object->in.dwTypeIn, value, "union DNSSRV_RPC_UNION");
28996 0 : if (pDataIn_switch_0 == NULL) {
28997 0 : return -1;
28998 : }
28999 0 : object->in.pDataIn = *pDataIn_switch_0;
29000 : }
29001 0 : return 0;
29002 : }
29003 :
29004 0 : static PyObject *py_DnssrvComplexOperation_out_get_pdwTypeOut(PyObject *obj, void *closure)
29005 : {
29006 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(obj);
29007 0 : PyObject *py_pdwTypeOut;
29008 0 : if (object->out.pdwTypeOut == NULL) {
29009 0 : Py_RETURN_NONE;
29010 : }
29011 0 : py_pdwTypeOut = PyLong_FromUnsignedLongLong((uint32_t)*object->out.pdwTypeOut);
29012 0 : return py_pdwTypeOut;
29013 : }
29014 :
29015 0 : static int py_DnssrvComplexOperation_out_set_pdwTypeOut(PyObject *py_obj, PyObject *value, void *closure)
29016 : {
29017 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
29018 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwTypeOut));
29019 0 : if (value == NULL) {
29020 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pdwTypeOut");
29021 0 : return -1;
29022 : }
29023 0 : object->out.pdwTypeOut = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwTypeOut);
29024 0 : if (object->out.pdwTypeOut == NULL) {
29025 0 : PyErr_NoMemory();
29026 0 : return -1;
29027 : }
29028 : {
29029 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwTypeOut));
29030 0 : if (PyLong_Check(value)) {
29031 0 : unsigned long long test_var;
29032 0 : test_var = PyLong_AsUnsignedLongLong(value);
29033 0 : if (PyErr_Occurred() != NULL) {
29034 0 : return -1;
29035 : }
29036 0 : if (test_var > uint_max) {
29037 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29038 : PyLong_Type.tp_name, uint_max, test_var);
29039 0 : return -1;
29040 : }
29041 0 : *object->out.pdwTypeOut = test_var;
29042 : } else {
29043 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29044 : PyLong_Type.tp_name);
29045 0 : return -1;
29046 : }
29047 : }
29048 0 : return 0;
29049 : }
29050 :
29051 0 : static PyObject *py_DnssrvComplexOperation_out_get_ppDataOut(PyObject *obj, void *closure)
29052 : {
29053 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(obj);
29054 0 : PyObject *py_ppDataOut;
29055 0 : if (object->out.ppDataOut == NULL) {
29056 0 : Py_RETURN_NONE;
29057 : }
29058 0 : py_ppDataOut = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, object->out.ppDataOut, *object->out.pdwTypeOut, object->out.ppDataOut, "union DNSSRV_RPC_UNION");
29059 0 : if (py_ppDataOut == NULL) {
29060 0 : return NULL;
29061 : }
29062 0 : return py_ppDataOut;
29063 : }
29064 :
29065 0 : static int py_DnssrvComplexOperation_out_set_ppDataOut(PyObject *py_obj, PyObject *value, void *closure)
29066 : {
29067 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
29068 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ppDataOut));
29069 0 : if (value == NULL) {
29070 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ppDataOut");
29071 0 : return -1;
29072 : }
29073 0 : object->out.ppDataOut = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ppDataOut);
29074 0 : if (object->out.ppDataOut == NULL) {
29075 0 : PyErr_NoMemory();
29076 0 : return -1;
29077 : }
29078 : {
29079 0 : union DNSSRV_RPC_UNION *ppDataOut_switch_1;
29080 0 : ppDataOut_switch_1 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(py_obj), *object->out.pdwTypeOut, value, "union DNSSRV_RPC_UNION");
29081 0 : if (ppDataOut_switch_1 == NULL) {
29082 0 : return -1;
29083 : }
29084 0 : object->out.ppDataOut = ppDataOut_switch_1;
29085 : }
29086 0 : return 0;
29087 : }
29088 :
29089 0 : static PyObject *py_DnssrvComplexOperation_get_result(PyObject *obj, void *closure)
29090 : {
29091 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(obj);
29092 0 : PyObject *py_result;
29093 0 : py_result = PyErr_FromWERROR(object->out.result);
29094 0 : return py_result;
29095 : }
29096 :
29097 0 : static int py_DnssrvComplexOperation_set_result(PyObject *py_obj, PyObject *value, void *closure)
29098 : {
29099 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
29100 0 : if (value == NULL) {
29101 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
29102 0 : return -1;
29103 : }
29104 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
29105 0 : return 0;
29106 : }
29107 :
29108 : static PyGetSetDef py_DnssrvComplexOperation_getsetters[] = {
29109 : {
29110 : .name = discard_const_p(char, "in_pwszServerName"),
29111 : .get = py_DnssrvComplexOperation_in_get_pwszServerName,
29112 : .set = py_DnssrvComplexOperation_in_set_pwszServerName,
29113 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
29114 : },
29115 : {
29116 : .name = discard_const_p(char, "in_pszZone"),
29117 : .get = py_DnssrvComplexOperation_in_get_pszZone,
29118 : .set = py_DnssrvComplexOperation_in_set_pszZone,
29119 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
29120 : },
29121 : {
29122 : .name = discard_const_p(char, "in_pszOperation"),
29123 : .get = py_DnssrvComplexOperation_in_get_pszOperation,
29124 : .set = py_DnssrvComplexOperation_in_set_pszOperation,
29125 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
29126 : },
29127 : {
29128 : .name = discard_const_p(char, "in_dwTypeIn"),
29129 : .get = py_DnssrvComplexOperation_in_get_dwTypeIn,
29130 : .set = py_DnssrvComplexOperation_in_set_dwTypeIn,
29131 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
29132 : },
29133 : {
29134 : .name = discard_const_p(char, "in_pDataIn"),
29135 : .get = py_DnssrvComplexOperation_in_get_pDataIn,
29136 : .set = py_DnssrvComplexOperation_in_set_pDataIn,
29137 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
29138 : },
29139 : {
29140 : .name = discard_const_p(char, "out_pdwTypeOut"),
29141 : .get = py_DnssrvComplexOperation_out_get_pdwTypeOut,
29142 : .set = py_DnssrvComplexOperation_out_set_pdwTypeOut,
29143 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
29144 : },
29145 : {
29146 : .name = discard_const_p(char, "out_ppDataOut"),
29147 : .get = py_DnssrvComplexOperation_out_get_ppDataOut,
29148 : .set = py_DnssrvComplexOperation_out_set_ppDataOut,
29149 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
29150 : },
29151 : {
29152 : .name = discard_const_p(char, "result"),
29153 : .get = py_DnssrvComplexOperation_get_result,
29154 : .set = py_DnssrvComplexOperation_set_result,
29155 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
29156 : },
29157 : { .name = NULL }
29158 : };
29159 :
29160 0 : static PyObject *py_DnssrvComplexOperation_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
29161 : {
29162 0 : PyObject *self = pytalloc_new(struct DnssrvComplexOperation, type);
29163 0 : struct DnssrvComplexOperation *_self = (struct DnssrvComplexOperation *)pytalloc_get_ptr(self);
29164 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
29165 0 : _self->out.pdwTypeOut = talloc_zero(mem_ctx, enum DNS_RPC_TYPEID);
29166 0 : _self->out.ppDataOut = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
29167 0 : return self;
29168 : }
29169 :
29170 0 : static PyObject *py_DnssrvComplexOperation_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
29171 : {
29172 :
29173 :
29174 0 : return PyLong_FromLong(2);
29175 : }
29176 :
29177 0 : static PyObject *py_DnssrvComplexOperation_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
29178 : {
29179 0 : const struct ndr_interface_call *call = NULL;
29180 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
29181 0 : PyObject *ret = NULL;
29182 0 : struct ndr_push *push = NULL;
29183 0 : DATA_BLOB blob;
29184 0 : enum ndr_err_code err;
29185 :
29186 0 : if (ndr_table_dnsserver.num_calls < 3) {
29187 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation_ndr_pack");
29188 0 : return NULL;
29189 : }
29190 0 : call = &ndr_table_dnsserver.calls[2];
29191 :
29192 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
29193 0 : if (push == NULL) {
29194 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
29195 0 : return NULL;
29196 : }
29197 :
29198 0 : push->flags |= ndr_push_flags;
29199 :
29200 0 : err = call->ndr_push(push, ndr_inout_flags, object);
29201 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
29202 0 : TALLOC_FREE(push);
29203 0 : PyErr_SetNdrError(err);
29204 0 : return NULL;
29205 : }
29206 0 : blob = ndr_push_blob(push);
29207 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
29208 0 : TALLOC_FREE(push);
29209 0 : return ret;
29210 : }
29211 :
29212 0 : static PyObject *py_DnssrvComplexOperation_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
29213 : {
29214 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
29215 0 : PyObject *bigendian_obj = NULL;
29216 0 : PyObject *ndr64_obj = NULL;
29217 0 : libndr_flags ndr_push_flags = 0;
29218 :
29219 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
29220 : discard_const_p(char *, kwnames),
29221 : &bigendian_obj,
29222 : &ndr64_obj)) {
29223 0 : return NULL;
29224 : }
29225 :
29226 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
29227 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
29228 : }
29229 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
29230 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
29231 : }
29232 :
29233 0 : return py_DnssrvComplexOperation_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
29234 : }
29235 :
29236 0 : static PyObject *py_DnssrvComplexOperation_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
29237 : {
29238 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
29239 0 : PyObject *bigendian_obj = NULL;
29240 0 : PyObject *ndr64_obj = NULL;
29241 0 : libndr_flags ndr_push_flags = 0;
29242 :
29243 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
29244 : discard_const_p(char *, kwnames),
29245 : &bigendian_obj,
29246 : &ndr64_obj)) {
29247 0 : return NULL;
29248 : }
29249 :
29250 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
29251 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
29252 : }
29253 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
29254 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
29255 : }
29256 :
29257 0 : return py_DnssrvComplexOperation_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
29258 : }
29259 :
29260 0 : static PyObject *py_DnssrvComplexOperation_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
29261 : {
29262 0 : const struct ndr_interface_call *call = NULL;
29263 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
29264 0 : struct ndr_pull *pull = NULL;
29265 0 : enum ndr_err_code err;
29266 :
29267 0 : if (ndr_table_dnsserver.num_calls < 3) {
29268 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation_ndr_unpack");
29269 0 : return NULL;
29270 : }
29271 0 : call = &ndr_table_dnsserver.calls[2];
29272 :
29273 0 : pull = ndr_pull_init_blob(blob, object);
29274 0 : if (pull == NULL) {
29275 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
29276 0 : return NULL;
29277 : }
29278 :
29279 0 : pull->flags |= ndr_pull_flags;
29280 :
29281 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
29282 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
29283 0 : TALLOC_FREE(pull);
29284 0 : PyErr_SetNdrError(err);
29285 0 : return NULL;
29286 : }
29287 0 : if (!allow_remaining) {
29288 0 : uint32_t highest_ofs;
29289 :
29290 0 : if (pull->offset > pull->relative_highest_offset) {
29291 0 : highest_ofs = pull->offset;
29292 : } else {
29293 0 : highest_ofs = pull->relative_highest_offset;
29294 : }
29295 0 : if (highest_ofs < pull->data_size) {
29296 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
29297 : "not all bytes consumed ofs[%u] size[%u]",
29298 : highest_ofs, pull->data_size);
29299 0 : TALLOC_FREE(pull);
29300 0 : PyErr_SetNdrError(err);
29301 0 : return NULL;
29302 : }
29303 : }
29304 :
29305 0 : TALLOC_FREE(pull);
29306 0 : Py_RETURN_NONE;
29307 : }
29308 :
29309 0 : static PyObject *py_DnssrvComplexOperation_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
29310 : {
29311 0 : DATA_BLOB blob;
29312 0 : Py_ssize_t blob_length = 0;
29313 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
29314 0 : PyObject *bigendian_obj = NULL;
29315 0 : PyObject *ndr64_obj = NULL;
29316 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
29317 0 : PyObject *allow_remaining_obj = NULL;
29318 0 : bool allow_remaining = false;
29319 :
29320 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
29321 : discard_const_p(char *, kwnames),
29322 : &blob.data, &blob_length,
29323 : &bigendian_obj,
29324 : &ndr64_obj,
29325 : &allow_remaining_obj)) {
29326 0 : return NULL;
29327 : }
29328 0 : blob.length = blob_length;
29329 :
29330 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
29331 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
29332 : }
29333 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
29334 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
29335 : }
29336 :
29337 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
29338 0 : allow_remaining = true;
29339 : }
29340 :
29341 0 : return py_DnssrvComplexOperation_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
29342 : }
29343 :
29344 0 : static PyObject *py_DnssrvComplexOperation_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
29345 : {
29346 0 : DATA_BLOB blob;
29347 0 : Py_ssize_t blob_length = 0;
29348 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
29349 0 : PyObject *bigendian_obj = NULL;
29350 0 : PyObject *ndr64_obj = NULL;
29351 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
29352 0 : PyObject *allow_remaining_obj = NULL;
29353 0 : bool allow_remaining = false;
29354 :
29355 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
29356 : discard_const_p(char *, kwnames),
29357 : &blob.data, &blob_length,
29358 : &bigendian_obj,
29359 : &ndr64_obj,
29360 : &allow_remaining_obj)) {
29361 0 : return NULL;
29362 : }
29363 0 : blob.length = blob_length;
29364 :
29365 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
29366 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
29367 : }
29368 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
29369 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
29370 : }
29371 :
29372 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
29373 0 : allow_remaining = true;
29374 : }
29375 :
29376 0 : return py_DnssrvComplexOperation_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
29377 : }
29378 :
29379 0 : static PyObject *py_DnssrvComplexOperation_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
29380 : {
29381 0 : const struct ndr_interface_call *call = NULL;
29382 0 : struct DnssrvComplexOperation *object = (struct DnssrvComplexOperation *)pytalloc_get_ptr(py_obj);
29383 0 : PyObject *ret;
29384 0 : char *retstr;
29385 :
29386 0 : if (ndr_table_dnsserver.num_calls < 3) {
29387 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation_ndr_print");
29388 0 : return NULL;
29389 : }
29390 0 : call = &ndr_table_dnsserver.calls[2];
29391 :
29392 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
29393 0 : ret = PyUnicode_FromString(retstr);
29394 0 : TALLOC_FREE(retstr);
29395 :
29396 0 : return ret;
29397 : }
29398 :
29399 0 : static PyObject *py_DnssrvComplexOperation_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
29400 : {
29401 0 : return py_DnssrvComplexOperation_ndr_print(py_obj, "DnssrvComplexOperation_in", NDR_IN);
29402 : }
29403 :
29404 0 : static PyObject *py_DnssrvComplexOperation_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
29405 : {
29406 0 : return py_DnssrvComplexOperation_ndr_print(py_obj, "DnssrvComplexOperation_out", NDR_OUT);
29407 : }
29408 :
29409 : static PyMethodDef py_DnssrvComplexOperation_methods[] = {
29410 : { "opnum", (PyCFunction)py_DnssrvComplexOperation_ndr_opnum, METH_NOARGS|METH_CLASS,
29411 : "dnsserver.DnssrvComplexOperation.opnum() -> 2 (0x02) " },
29412 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
29413 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
29414 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
29415 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
29416 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
29417 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
29418 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
29419 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
29420 : { "__ndr_print_in__", (PyCFunction)py_DnssrvComplexOperation_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
29421 : { "__ndr_print_out__", (PyCFunction)py_DnssrvComplexOperation_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
29422 : { NULL, NULL, 0, NULL }
29423 : };
29424 :
29425 :
29426 : static PyTypeObject DnssrvComplexOperation_Type = {
29427 : PyVarObject_HEAD_INIT(NULL, 0)
29428 : .tp_name = "dnsserver.DnssrvComplexOperation",
29429 : .tp_getset = py_DnssrvComplexOperation_getsetters,
29430 : .tp_methods = py_DnssrvComplexOperation_methods,
29431 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
29432 : .tp_new = py_DnssrvComplexOperation_new,
29433 : };
29434 :
29435 0 : static bool pack_py_DnssrvComplexOperation_args_in(PyObject *args, PyObject *kwargs, struct DnssrvComplexOperation *r)
29436 : {
29437 0 : PyObject *py_pwszServerName;
29438 0 : PyObject *py_pszZone;
29439 0 : PyObject *py_pszOperation;
29440 0 : PyObject *py_dwTypeIn;
29441 0 : PyObject *py_pDataIn;
29442 0 : const char *kwnames[] = {
29443 : "pwszServerName", "pszZone", "pszOperation", "dwTypeIn", "pDataIn", NULL
29444 : };
29445 :
29446 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvComplexOperation", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszOperation, &py_dwTypeIn, &py_pDataIn)) {
29447 0 : return false;
29448 : }
29449 :
29450 0 : if (py_pwszServerName == NULL) {
29451 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
29452 0 : return false;
29453 : }
29454 0 : if (py_pwszServerName == Py_None) {
29455 0 : r->in.pwszServerName = NULL;
29456 : } else {
29457 0 : r->in.pwszServerName = NULL;
29458 : {
29459 0 : const char *test_str;
29460 0 : const char *talloc_str;
29461 0 : PyObject *unicode = NULL;
29462 0 : if (PyUnicode_Check(py_pwszServerName)) {
29463 0 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
29464 0 : if (unicode == NULL) {
29465 0 : PyErr_NoMemory();
29466 0 : return false;
29467 : }
29468 0 : test_str = PyBytes_AS_STRING(unicode);
29469 0 : } else if (PyBytes_Check(py_pwszServerName)) {
29470 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
29471 : } else {
29472 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
29473 0 : return false;
29474 : }
29475 0 : talloc_str = talloc_strdup(r, test_str);
29476 0 : if (unicode != NULL) {
29477 0 : Py_DECREF(unicode);
29478 : }
29479 0 : if (talloc_str == NULL) {
29480 0 : PyErr_NoMemory();
29481 0 : return false;
29482 : }
29483 0 : r->in.pwszServerName = talloc_str;
29484 : }
29485 : }
29486 0 : if (py_pszZone == NULL) {
29487 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
29488 0 : return false;
29489 : }
29490 0 : if (py_pszZone == Py_None) {
29491 0 : r->in.pszZone = NULL;
29492 : } else {
29493 0 : r->in.pszZone = NULL;
29494 : {
29495 0 : const char *test_str;
29496 0 : const char *talloc_str;
29497 0 : PyObject *unicode = NULL;
29498 0 : if (PyUnicode_Check(py_pszZone)) {
29499 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
29500 0 : if (unicode == NULL) {
29501 0 : PyErr_NoMemory();
29502 0 : return false;
29503 : }
29504 0 : test_str = PyBytes_AS_STRING(unicode);
29505 0 : } else if (PyBytes_Check(py_pszZone)) {
29506 0 : test_str = PyBytes_AS_STRING(py_pszZone);
29507 : } else {
29508 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
29509 0 : return false;
29510 : }
29511 0 : talloc_str = talloc_strdup(r, test_str);
29512 0 : if (unicode != NULL) {
29513 0 : Py_DECREF(unicode);
29514 : }
29515 0 : if (talloc_str == NULL) {
29516 0 : PyErr_NoMemory();
29517 0 : return false;
29518 : }
29519 0 : r->in.pszZone = talloc_str;
29520 : }
29521 : }
29522 0 : if (py_pszOperation == NULL) {
29523 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszOperation");
29524 0 : return false;
29525 : }
29526 0 : if (py_pszOperation == Py_None) {
29527 0 : r->in.pszOperation = NULL;
29528 : } else {
29529 0 : r->in.pszOperation = NULL;
29530 : {
29531 0 : const char *test_str;
29532 0 : const char *talloc_str;
29533 0 : PyObject *unicode = NULL;
29534 0 : if (PyUnicode_Check(py_pszOperation)) {
29535 0 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
29536 0 : if (unicode == NULL) {
29537 0 : PyErr_NoMemory();
29538 0 : return false;
29539 : }
29540 0 : test_str = PyBytes_AS_STRING(unicode);
29541 0 : } else if (PyBytes_Check(py_pszOperation)) {
29542 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
29543 : } else {
29544 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
29545 0 : return false;
29546 : }
29547 0 : talloc_str = talloc_strdup(r, test_str);
29548 0 : if (unicode != NULL) {
29549 0 : Py_DECREF(unicode);
29550 : }
29551 0 : if (talloc_str == NULL) {
29552 0 : PyErr_NoMemory();
29553 0 : return false;
29554 : }
29555 0 : r->in.pszOperation = talloc_str;
29556 : }
29557 : }
29558 0 : if (py_dwTypeIn == NULL) {
29559 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwTypeIn");
29560 0 : return false;
29561 : }
29562 : {
29563 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwTypeIn));
29564 0 : if (PyLong_Check(py_dwTypeIn)) {
29565 0 : unsigned long long test_var;
29566 0 : test_var = PyLong_AsUnsignedLongLong(py_dwTypeIn);
29567 0 : if (PyErr_Occurred() != NULL) {
29568 0 : return false;
29569 : }
29570 0 : if (test_var > uint_max) {
29571 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29572 : PyLong_Type.tp_name, uint_max, test_var);
29573 0 : return false;
29574 : }
29575 0 : r->in.dwTypeIn = test_var;
29576 : } else {
29577 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29578 : PyLong_Type.tp_name);
29579 0 : return false;
29580 : }
29581 : }
29582 0 : if (py_pDataIn == NULL) {
29583 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pDataIn");
29584 0 : return false;
29585 : }
29586 : {
29587 0 : union DNSSRV_RPC_UNION *pDataIn_switch_0;
29588 0 : pDataIn_switch_0 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, r, r->in.dwTypeIn, py_pDataIn, "union DNSSRV_RPC_UNION");
29589 0 : if (pDataIn_switch_0 == NULL) {
29590 0 : return false;
29591 : }
29592 0 : r->in.pDataIn = *pDataIn_switch_0;
29593 : }
29594 0 : return true;
29595 : }
29596 :
29597 0 : static PyObject *unpack_py_DnssrvComplexOperation_args_out(struct DnssrvComplexOperation *r)
29598 : {
29599 0 : PyObject *result;
29600 0 : PyObject *py_pdwTypeOut;
29601 0 : PyObject *py_ppDataOut;
29602 0 : result = PyTuple_New(2);
29603 0 : py_pdwTypeOut = PyLong_FromUnsignedLongLong((uint32_t)*r->out.pdwTypeOut);
29604 0 : PyTuple_SetItem(result, 0, py_pdwTypeOut);
29605 0 : py_ppDataOut = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, r->out.ppDataOut, *r->out.pdwTypeOut, r->out.ppDataOut, "union DNSSRV_RPC_UNION");
29606 0 : if (py_ppDataOut == NULL) {
29607 0 : return NULL;
29608 : }
29609 0 : PyTuple_SetItem(result, 1, py_ppDataOut);
29610 0 : if (!W_ERROR_IS_OK(r->out.result)) {
29611 0 : PyErr_SetWERROR(r->out.result);
29612 0 : return NULL;
29613 : }
29614 :
29615 0 : return result;
29616 : }
29617 :
29618 :
29619 0 : static PyObject *py_DnssrvEnumRecords_in_get_pwszServerName(PyObject *obj, void *closure)
29620 : {
29621 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
29622 0 : PyObject *py_pwszServerName;
29623 0 : if (object->in.pwszServerName == NULL) {
29624 0 : Py_RETURN_NONE;
29625 : }
29626 0 : if (object->in.pwszServerName == NULL) {
29627 0 : py_pwszServerName = Py_None;
29628 0 : Py_INCREF(py_pwszServerName);
29629 : } else {
29630 0 : if (object->in.pwszServerName == NULL) {
29631 0 : py_pwszServerName = Py_None;
29632 0 : Py_INCREF(py_pwszServerName);
29633 : } else {
29634 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
29635 : }
29636 : }
29637 0 : return py_pwszServerName;
29638 : }
29639 :
29640 0 : static int py_DnssrvEnumRecords_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
29641 : {
29642 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
29643 0 : if (value == NULL) {
29644 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
29645 0 : return -1;
29646 : }
29647 0 : if (value == Py_None) {
29648 0 : object->in.pwszServerName = NULL;
29649 : } else {
29650 0 : object->in.pwszServerName = NULL;
29651 : {
29652 0 : const char *test_str;
29653 0 : const char *talloc_str;
29654 0 : PyObject *unicode = NULL;
29655 0 : if (PyUnicode_Check(value)) {
29656 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29657 0 : if (unicode == NULL) {
29658 0 : PyErr_NoMemory();
29659 0 : return -1;
29660 : }
29661 0 : test_str = PyBytes_AS_STRING(unicode);
29662 0 : } else if (PyBytes_Check(value)) {
29663 0 : test_str = PyBytes_AS_STRING(value);
29664 : } else {
29665 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29666 0 : return -1;
29667 : }
29668 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29669 0 : if (unicode != NULL) {
29670 0 : Py_DECREF(unicode);
29671 : }
29672 0 : if (talloc_str == NULL) {
29673 0 : PyErr_NoMemory();
29674 0 : return -1;
29675 : }
29676 0 : object->in.pwszServerName = talloc_str;
29677 : }
29678 : }
29679 0 : return 0;
29680 : }
29681 :
29682 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszZone(PyObject *obj, void *closure)
29683 : {
29684 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
29685 0 : PyObject *py_pszZone;
29686 0 : if (object->in.pszZone == NULL) {
29687 0 : Py_RETURN_NONE;
29688 : }
29689 0 : if (object->in.pszZone == NULL) {
29690 0 : py_pszZone = Py_None;
29691 0 : Py_INCREF(py_pszZone);
29692 : } else {
29693 0 : if (object->in.pszZone == NULL) {
29694 0 : py_pszZone = Py_None;
29695 0 : Py_INCREF(py_pszZone);
29696 : } else {
29697 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
29698 : }
29699 : }
29700 0 : return py_pszZone;
29701 : }
29702 :
29703 0 : static int py_DnssrvEnumRecords_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
29704 : {
29705 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
29706 0 : if (value == NULL) {
29707 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
29708 0 : return -1;
29709 : }
29710 0 : if (value == Py_None) {
29711 0 : object->in.pszZone = NULL;
29712 : } else {
29713 0 : object->in.pszZone = NULL;
29714 : {
29715 0 : const char *test_str;
29716 0 : const char *talloc_str;
29717 0 : PyObject *unicode = NULL;
29718 0 : if (PyUnicode_Check(value)) {
29719 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29720 0 : if (unicode == NULL) {
29721 0 : PyErr_NoMemory();
29722 0 : return -1;
29723 : }
29724 0 : test_str = PyBytes_AS_STRING(unicode);
29725 0 : } else if (PyBytes_Check(value)) {
29726 0 : test_str = PyBytes_AS_STRING(value);
29727 : } else {
29728 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29729 0 : return -1;
29730 : }
29731 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29732 0 : if (unicode != NULL) {
29733 0 : Py_DECREF(unicode);
29734 : }
29735 0 : if (talloc_str == NULL) {
29736 0 : PyErr_NoMemory();
29737 0 : return -1;
29738 : }
29739 0 : object->in.pszZone = talloc_str;
29740 : }
29741 : }
29742 0 : return 0;
29743 : }
29744 :
29745 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszNodeName(PyObject *obj, void *closure)
29746 : {
29747 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
29748 0 : PyObject *py_pszNodeName;
29749 0 : if (object->in.pszNodeName == NULL) {
29750 0 : Py_RETURN_NONE;
29751 : }
29752 0 : if (object->in.pszNodeName == NULL) {
29753 0 : py_pszNodeName = Py_None;
29754 0 : Py_INCREF(py_pszNodeName);
29755 : } else {
29756 0 : if (object->in.pszNodeName == NULL) {
29757 0 : py_pszNodeName = Py_None;
29758 0 : Py_INCREF(py_pszNodeName);
29759 : } else {
29760 0 : py_pszNodeName = PyUnicode_Decode(object->in.pszNodeName, strlen(object->in.pszNodeName), "utf-8", "ignore");
29761 : }
29762 : }
29763 0 : return py_pszNodeName;
29764 : }
29765 :
29766 0 : static int py_DnssrvEnumRecords_in_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
29767 : {
29768 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
29769 0 : if (value == NULL) {
29770 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszNodeName");
29771 0 : return -1;
29772 : }
29773 0 : if (value == Py_None) {
29774 0 : object->in.pszNodeName = NULL;
29775 : } else {
29776 0 : object->in.pszNodeName = NULL;
29777 : {
29778 0 : const char *test_str;
29779 0 : const char *talloc_str;
29780 0 : PyObject *unicode = NULL;
29781 0 : if (PyUnicode_Check(value)) {
29782 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29783 0 : if (unicode == NULL) {
29784 0 : PyErr_NoMemory();
29785 0 : return -1;
29786 : }
29787 0 : test_str = PyBytes_AS_STRING(unicode);
29788 0 : } else if (PyBytes_Check(value)) {
29789 0 : test_str = PyBytes_AS_STRING(value);
29790 : } else {
29791 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29792 0 : return -1;
29793 : }
29794 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29795 0 : if (unicode != NULL) {
29796 0 : Py_DECREF(unicode);
29797 : }
29798 0 : if (talloc_str == NULL) {
29799 0 : PyErr_NoMemory();
29800 0 : return -1;
29801 : }
29802 0 : object->in.pszNodeName = talloc_str;
29803 : }
29804 : }
29805 0 : return 0;
29806 : }
29807 :
29808 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszStartChild(PyObject *obj, void *closure)
29809 : {
29810 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
29811 0 : PyObject *py_pszStartChild;
29812 0 : if (object->in.pszStartChild == NULL) {
29813 0 : Py_RETURN_NONE;
29814 : }
29815 0 : if (object->in.pszStartChild == NULL) {
29816 0 : py_pszStartChild = Py_None;
29817 0 : Py_INCREF(py_pszStartChild);
29818 : } else {
29819 0 : if (object->in.pszStartChild == NULL) {
29820 0 : py_pszStartChild = Py_None;
29821 0 : Py_INCREF(py_pszStartChild);
29822 : } else {
29823 0 : py_pszStartChild = PyUnicode_Decode(object->in.pszStartChild, strlen(object->in.pszStartChild), "utf-8", "ignore");
29824 : }
29825 : }
29826 0 : return py_pszStartChild;
29827 : }
29828 :
29829 0 : static int py_DnssrvEnumRecords_in_set_pszStartChild(PyObject *py_obj, PyObject *value, void *closure)
29830 : {
29831 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
29832 0 : if (value == NULL) {
29833 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszStartChild");
29834 0 : return -1;
29835 : }
29836 0 : if (value == Py_None) {
29837 0 : object->in.pszStartChild = NULL;
29838 : } else {
29839 0 : object->in.pszStartChild = NULL;
29840 : {
29841 0 : const char *test_str;
29842 0 : const char *talloc_str;
29843 0 : PyObject *unicode = NULL;
29844 0 : if (PyUnicode_Check(value)) {
29845 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29846 0 : if (unicode == NULL) {
29847 0 : PyErr_NoMemory();
29848 0 : return -1;
29849 : }
29850 0 : test_str = PyBytes_AS_STRING(unicode);
29851 0 : } else if (PyBytes_Check(value)) {
29852 0 : test_str = PyBytes_AS_STRING(value);
29853 : } else {
29854 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29855 0 : return -1;
29856 : }
29857 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29858 0 : if (unicode != NULL) {
29859 0 : Py_DECREF(unicode);
29860 : }
29861 0 : if (talloc_str == NULL) {
29862 0 : PyErr_NoMemory();
29863 0 : return -1;
29864 : }
29865 0 : object->in.pszStartChild = talloc_str;
29866 : }
29867 : }
29868 0 : return 0;
29869 : }
29870 :
29871 0 : static PyObject *py_DnssrvEnumRecords_in_get_wRecordType(PyObject *obj, void *closure)
29872 : {
29873 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
29874 0 : PyObject *py_wRecordType;
29875 0 : py_wRecordType = PyLong_FromLong((uint16_t)object->in.wRecordType);
29876 0 : return py_wRecordType;
29877 : }
29878 :
29879 0 : static int py_DnssrvEnumRecords_in_set_wRecordType(PyObject *py_obj, PyObject *value, void *closure)
29880 : {
29881 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
29882 0 : if (value == NULL) {
29883 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.wRecordType");
29884 0 : return -1;
29885 : }
29886 : {
29887 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.wRecordType));
29888 0 : if (PyLong_Check(value)) {
29889 0 : unsigned long long test_var;
29890 0 : test_var = PyLong_AsUnsignedLongLong(value);
29891 0 : if (PyErr_Occurred() != NULL) {
29892 0 : return -1;
29893 : }
29894 0 : if (test_var > uint_max) {
29895 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29896 : PyLong_Type.tp_name, uint_max, test_var);
29897 0 : return -1;
29898 : }
29899 0 : object->in.wRecordType = test_var;
29900 : } else {
29901 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29902 : PyLong_Type.tp_name);
29903 0 : return -1;
29904 : }
29905 : }
29906 0 : return 0;
29907 : }
29908 :
29909 0 : static PyObject *py_DnssrvEnumRecords_in_get_fSelectFlag(PyObject *obj, void *closure)
29910 : {
29911 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
29912 0 : PyObject *py_fSelectFlag;
29913 0 : py_fSelectFlag = PyLong_FromUnsignedLongLong((uint32_t)object->in.fSelectFlag);
29914 0 : return py_fSelectFlag;
29915 : }
29916 :
29917 0 : static int py_DnssrvEnumRecords_in_set_fSelectFlag(PyObject *py_obj, PyObject *value, void *closure)
29918 : {
29919 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
29920 0 : if (value == NULL) {
29921 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.fSelectFlag");
29922 0 : return -1;
29923 : }
29924 : {
29925 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.fSelectFlag));
29926 0 : if (PyLong_Check(value)) {
29927 0 : unsigned long long test_var;
29928 0 : test_var = PyLong_AsUnsignedLongLong(value);
29929 0 : if (PyErr_Occurred() != NULL) {
29930 0 : return -1;
29931 : }
29932 0 : if (test_var > uint_max) {
29933 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
29934 : PyLong_Type.tp_name, uint_max, test_var);
29935 0 : return -1;
29936 : }
29937 0 : object->in.fSelectFlag = test_var;
29938 : } else {
29939 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
29940 : PyLong_Type.tp_name);
29941 0 : return -1;
29942 : }
29943 : }
29944 0 : return 0;
29945 : }
29946 :
29947 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszFilterStart(PyObject *obj, void *closure)
29948 : {
29949 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
29950 0 : PyObject *py_pszFilterStart;
29951 0 : if (object->in.pszFilterStart == NULL) {
29952 0 : Py_RETURN_NONE;
29953 : }
29954 0 : if (object->in.pszFilterStart == NULL) {
29955 0 : py_pszFilterStart = Py_None;
29956 0 : Py_INCREF(py_pszFilterStart);
29957 : } else {
29958 0 : if (object->in.pszFilterStart == NULL) {
29959 0 : py_pszFilterStart = Py_None;
29960 0 : Py_INCREF(py_pszFilterStart);
29961 : } else {
29962 0 : py_pszFilterStart = PyUnicode_Decode(object->in.pszFilterStart, strlen(object->in.pszFilterStart), "utf-8", "ignore");
29963 : }
29964 : }
29965 0 : return py_pszFilterStart;
29966 : }
29967 :
29968 0 : static int py_DnssrvEnumRecords_in_set_pszFilterStart(PyObject *py_obj, PyObject *value, void *closure)
29969 : {
29970 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
29971 0 : if (value == NULL) {
29972 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszFilterStart");
29973 0 : return -1;
29974 : }
29975 0 : if (value == Py_None) {
29976 0 : object->in.pszFilterStart = NULL;
29977 : } else {
29978 0 : object->in.pszFilterStart = NULL;
29979 : {
29980 0 : const char *test_str;
29981 0 : const char *talloc_str;
29982 0 : PyObject *unicode = NULL;
29983 0 : if (PyUnicode_Check(value)) {
29984 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
29985 0 : if (unicode == NULL) {
29986 0 : PyErr_NoMemory();
29987 0 : return -1;
29988 : }
29989 0 : test_str = PyBytes_AS_STRING(unicode);
29990 0 : } else if (PyBytes_Check(value)) {
29991 0 : test_str = PyBytes_AS_STRING(value);
29992 : } else {
29993 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
29994 0 : return -1;
29995 : }
29996 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
29997 0 : if (unicode != NULL) {
29998 0 : Py_DECREF(unicode);
29999 : }
30000 0 : if (talloc_str == NULL) {
30001 0 : PyErr_NoMemory();
30002 0 : return -1;
30003 : }
30004 0 : object->in.pszFilterStart = talloc_str;
30005 : }
30006 : }
30007 0 : return 0;
30008 : }
30009 :
30010 0 : static PyObject *py_DnssrvEnumRecords_in_get_pszFilterStop(PyObject *obj, void *closure)
30011 : {
30012 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
30013 0 : PyObject *py_pszFilterStop;
30014 0 : if (object->in.pszFilterStop == NULL) {
30015 0 : Py_RETURN_NONE;
30016 : }
30017 0 : if (object->in.pszFilterStop == NULL) {
30018 0 : py_pszFilterStop = Py_None;
30019 0 : Py_INCREF(py_pszFilterStop);
30020 : } else {
30021 0 : if (object->in.pszFilterStop == NULL) {
30022 0 : py_pszFilterStop = Py_None;
30023 0 : Py_INCREF(py_pszFilterStop);
30024 : } else {
30025 0 : py_pszFilterStop = PyUnicode_Decode(object->in.pszFilterStop, strlen(object->in.pszFilterStop), "utf-8", "ignore");
30026 : }
30027 : }
30028 0 : return py_pszFilterStop;
30029 : }
30030 :
30031 0 : static int py_DnssrvEnumRecords_in_set_pszFilterStop(PyObject *py_obj, PyObject *value, void *closure)
30032 : {
30033 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
30034 0 : if (value == NULL) {
30035 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszFilterStop");
30036 0 : return -1;
30037 : }
30038 0 : if (value == Py_None) {
30039 0 : object->in.pszFilterStop = NULL;
30040 : } else {
30041 0 : object->in.pszFilterStop = NULL;
30042 : {
30043 0 : const char *test_str;
30044 0 : const char *talloc_str;
30045 0 : PyObject *unicode = NULL;
30046 0 : if (PyUnicode_Check(value)) {
30047 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30048 0 : if (unicode == NULL) {
30049 0 : PyErr_NoMemory();
30050 0 : return -1;
30051 : }
30052 0 : test_str = PyBytes_AS_STRING(unicode);
30053 0 : } else if (PyBytes_Check(value)) {
30054 0 : test_str = PyBytes_AS_STRING(value);
30055 : } else {
30056 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30057 0 : return -1;
30058 : }
30059 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30060 0 : if (unicode != NULL) {
30061 0 : Py_DECREF(unicode);
30062 : }
30063 0 : if (talloc_str == NULL) {
30064 0 : PyErr_NoMemory();
30065 0 : return -1;
30066 : }
30067 0 : object->in.pszFilterStop = talloc_str;
30068 : }
30069 : }
30070 0 : return 0;
30071 : }
30072 :
30073 0 : static PyObject *py_DnssrvEnumRecords_out_get_pdwBufferLength(PyObject *obj, void *closure)
30074 : {
30075 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
30076 0 : PyObject *py_pdwBufferLength;
30077 0 : if (object->out.pdwBufferLength == NULL) {
30078 0 : Py_RETURN_NONE;
30079 : }
30080 0 : py_pdwBufferLength = PyLong_FromUnsignedLongLong((uint32_t)*object->out.pdwBufferLength);
30081 0 : return py_pdwBufferLength;
30082 : }
30083 :
30084 0 : static int py_DnssrvEnumRecords_out_set_pdwBufferLength(PyObject *py_obj, PyObject *value, void *closure)
30085 : {
30086 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
30087 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwBufferLength));
30088 0 : if (value == NULL) {
30089 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pdwBufferLength");
30090 0 : return -1;
30091 : }
30092 0 : object->out.pdwBufferLength = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwBufferLength);
30093 0 : if (object->out.pdwBufferLength == NULL) {
30094 0 : PyErr_NoMemory();
30095 0 : return -1;
30096 : }
30097 : {
30098 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwBufferLength));
30099 0 : if (PyLong_Check(value)) {
30100 0 : unsigned long long test_var;
30101 0 : test_var = PyLong_AsUnsignedLongLong(value);
30102 0 : if (PyErr_Occurred() != NULL) {
30103 0 : return -1;
30104 : }
30105 0 : if (test_var > uint_max) {
30106 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30107 : PyLong_Type.tp_name, uint_max, test_var);
30108 0 : return -1;
30109 : }
30110 0 : *object->out.pdwBufferLength = test_var;
30111 : } else {
30112 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30113 : PyLong_Type.tp_name);
30114 0 : return -1;
30115 : }
30116 : }
30117 0 : return 0;
30118 : }
30119 :
30120 0 : static PyObject *py_DnssrvEnumRecords_out_get_pBuffer(PyObject *obj, void *closure)
30121 : {
30122 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
30123 0 : PyObject *py_pBuffer;
30124 0 : if (object->out.pBuffer == NULL) {
30125 0 : Py_RETURN_NONE;
30126 : }
30127 0 : if (*object->out.pBuffer == NULL) {
30128 0 : py_pBuffer = Py_None;
30129 0 : Py_INCREF(py_pBuffer);
30130 : } else {
30131 0 : py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *object->out.pBuffer, *object->out.pBuffer);
30132 : }
30133 0 : return py_pBuffer;
30134 : }
30135 :
30136 0 : static int py_DnssrvEnumRecords_out_set_pBuffer(PyObject *py_obj, PyObject *value, void *closure)
30137 : {
30138 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
30139 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pBuffer));
30140 0 : if (value == NULL) {
30141 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pBuffer");
30142 0 : return -1;
30143 : }
30144 0 : object->out.pBuffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pBuffer);
30145 0 : if (object->out.pBuffer == NULL) {
30146 0 : PyErr_NoMemory();
30147 0 : return -1;
30148 : }
30149 0 : if (value == Py_None) {
30150 0 : *object->out.pBuffer = NULL;
30151 : } else {
30152 0 : *object->out.pBuffer = NULL;
30153 0 : PY_CHECK_TYPE(&DNS_RPC_RECORDS_ARRAY_Type, value, return -1;);
30154 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
30155 0 : PyErr_NoMemory();
30156 0 : return -1;
30157 : }
30158 0 : *object->out.pBuffer = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(value);
30159 : }
30160 0 : return 0;
30161 : }
30162 :
30163 0 : static PyObject *py_DnssrvEnumRecords_get_result(PyObject *obj, void *closure)
30164 : {
30165 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(obj);
30166 0 : PyObject *py_result;
30167 0 : py_result = PyErr_FromWERROR(object->out.result);
30168 0 : return py_result;
30169 : }
30170 :
30171 0 : static int py_DnssrvEnumRecords_set_result(PyObject *py_obj, PyObject *value, void *closure)
30172 : {
30173 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
30174 0 : if (value == NULL) {
30175 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
30176 0 : return -1;
30177 : }
30178 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
30179 0 : return 0;
30180 : }
30181 :
30182 : static PyGetSetDef py_DnssrvEnumRecords_getsetters[] = {
30183 : {
30184 : .name = discard_const_p(char, "in_pwszServerName"),
30185 : .get = py_DnssrvEnumRecords_in_get_pwszServerName,
30186 : .set = py_DnssrvEnumRecords_in_set_pwszServerName,
30187 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
30188 : },
30189 : {
30190 : .name = discard_const_p(char, "in_pszZone"),
30191 : .get = py_DnssrvEnumRecords_in_get_pszZone,
30192 : .set = py_DnssrvEnumRecords_in_set_pszZone,
30193 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30194 : },
30195 : {
30196 : .name = discard_const_p(char, "in_pszNodeName"),
30197 : .get = py_DnssrvEnumRecords_in_get_pszNodeName,
30198 : .set = py_DnssrvEnumRecords_in_set_pszNodeName,
30199 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30200 : },
30201 : {
30202 : .name = discard_const_p(char, "in_pszStartChild"),
30203 : .get = py_DnssrvEnumRecords_in_get_pszStartChild,
30204 : .set = py_DnssrvEnumRecords_in_set_pszStartChild,
30205 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30206 : },
30207 : {
30208 : .name = discard_const_p(char, "in_wRecordType"),
30209 : .get = py_DnssrvEnumRecords_in_get_wRecordType,
30210 : .set = py_DnssrvEnumRecords_in_set_wRecordType,
30211 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_record_type")
30212 : },
30213 : {
30214 : .name = discard_const_p(char, "in_fSelectFlag"),
30215 : .get = py_DnssrvEnumRecords_in_get_fSelectFlag,
30216 : .set = py_DnssrvEnumRecords_in_set_fSelectFlag,
30217 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_SELECT_FLAGS")
30218 : },
30219 : {
30220 : .name = discard_const_p(char, "in_pszFilterStart"),
30221 : .get = py_DnssrvEnumRecords_in_get_pszFilterStart,
30222 : .set = py_DnssrvEnumRecords_in_set_pszFilterStart,
30223 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30224 : },
30225 : {
30226 : .name = discard_const_p(char, "in_pszFilterStop"),
30227 : .get = py_DnssrvEnumRecords_in_get_pszFilterStop,
30228 : .set = py_DnssrvEnumRecords_in_set_pszFilterStop,
30229 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
30230 : },
30231 : {
30232 : .name = discard_const_p(char, "out_pdwBufferLength"),
30233 : .get = py_DnssrvEnumRecords_out_get_pdwBufferLength,
30234 : .set = py_DnssrvEnumRecords_out_set_pdwBufferLength,
30235 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
30236 : },
30237 : {
30238 : .name = discard_const_p(char, "out_pBuffer"),
30239 : .get = py_DnssrvEnumRecords_out_get_pBuffer,
30240 : .set = py_DnssrvEnumRecords_out_set_pBuffer,
30241 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORDS_ARRAY")
30242 : },
30243 : {
30244 : .name = discard_const_p(char, "result"),
30245 : .get = py_DnssrvEnumRecords_get_result,
30246 : .set = py_DnssrvEnumRecords_set_result,
30247 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
30248 : },
30249 : { .name = NULL }
30250 : };
30251 :
30252 0 : static PyObject *py_DnssrvEnumRecords_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
30253 : {
30254 0 : PyObject *self = pytalloc_new(struct DnssrvEnumRecords, type);
30255 0 : struct DnssrvEnumRecords *_self = (struct DnssrvEnumRecords *)pytalloc_get_ptr(self);
30256 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
30257 0 : _self->out.pdwBufferLength = talloc_zero(mem_ctx, uint32_t);
30258 : /* a pointer to a NULL pointer */
30259 0 : _self->out.pBuffer = talloc_zero(mem_ctx, struct DNS_RPC_RECORDS_ARRAY *);
30260 0 : return self;
30261 : }
30262 :
30263 0 : static PyObject *py_DnssrvEnumRecords_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
30264 : {
30265 :
30266 :
30267 0 : return PyLong_FromLong(3);
30268 : }
30269 :
30270 0 : static PyObject *py_DnssrvEnumRecords_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
30271 : {
30272 0 : const struct ndr_interface_call *call = NULL;
30273 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
30274 0 : PyObject *ret = NULL;
30275 0 : struct ndr_push *push = NULL;
30276 0 : DATA_BLOB blob;
30277 0 : enum ndr_err_code err;
30278 :
30279 0 : if (ndr_table_dnsserver.num_calls < 4) {
30280 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords_ndr_pack");
30281 0 : return NULL;
30282 : }
30283 0 : call = &ndr_table_dnsserver.calls[3];
30284 :
30285 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
30286 0 : if (push == NULL) {
30287 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
30288 0 : return NULL;
30289 : }
30290 :
30291 0 : push->flags |= ndr_push_flags;
30292 :
30293 0 : err = call->ndr_push(push, ndr_inout_flags, object);
30294 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
30295 0 : TALLOC_FREE(push);
30296 0 : PyErr_SetNdrError(err);
30297 0 : return NULL;
30298 : }
30299 0 : blob = ndr_push_blob(push);
30300 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
30301 0 : TALLOC_FREE(push);
30302 0 : return ret;
30303 : }
30304 :
30305 0 : static PyObject *py_DnssrvEnumRecords_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
30306 : {
30307 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
30308 0 : PyObject *bigendian_obj = NULL;
30309 0 : PyObject *ndr64_obj = NULL;
30310 0 : libndr_flags ndr_push_flags = 0;
30311 :
30312 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
30313 : discard_const_p(char *, kwnames),
30314 : &bigendian_obj,
30315 : &ndr64_obj)) {
30316 0 : return NULL;
30317 : }
30318 :
30319 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
30320 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
30321 : }
30322 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
30323 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
30324 : }
30325 :
30326 0 : return py_DnssrvEnumRecords_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
30327 : }
30328 :
30329 0 : static PyObject *py_DnssrvEnumRecords_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
30330 : {
30331 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
30332 0 : PyObject *bigendian_obj = NULL;
30333 0 : PyObject *ndr64_obj = NULL;
30334 0 : libndr_flags ndr_push_flags = 0;
30335 :
30336 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
30337 : discard_const_p(char *, kwnames),
30338 : &bigendian_obj,
30339 : &ndr64_obj)) {
30340 0 : return NULL;
30341 : }
30342 :
30343 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
30344 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
30345 : }
30346 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
30347 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
30348 : }
30349 :
30350 0 : return py_DnssrvEnumRecords_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
30351 : }
30352 :
30353 0 : static PyObject *py_DnssrvEnumRecords_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
30354 : {
30355 0 : const struct ndr_interface_call *call = NULL;
30356 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
30357 0 : struct ndr_pull *pull = NULL;
30358 0 : enum ndr_err_code err;
30359 :
30360 0 : if (ndr_table_dnsserver.num_calls < 4) {
30361 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords_ndr_unpack");
30362 0 : return NULL;
30363 : }
30364 0 : call = &ndr_table_dnsserver.calls[3];
30365 :
30366 0 : pull = ndr_pull_init_blob(blob, object);
30367 0 : if (pull == NULL) {
30368 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
30369 0 : return NULL;
30370 : }
30371 :
30372 0 : pull->flags |= ndr_pull_flags;
30373 :
30374 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
30375 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
30376 0 : TALLOC_FREE(pull);
30377 0 : PyErr_SetNdrError(err);
30378 0 : return NULL;
30379 : }
30380 0 : if (!allow_remaining) {
30381 0 : uint32_t highest_ofs;
30382 :
30383 0 : if (pull->offset > pull->relative_highest_offset) {
30384 0 : highest_ofs = pull->offset;
30385 : } else {
30386 0 : highest_ofs = pull->relative_highest_offset;
30387 : }
30388 0 : if (highest_ofs < pull->data_size) {
30389 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
30390 : "not all bytes consumed ofs[%u] size[%u]",
30391 : highest_ofs, pull->data_size);
30392 0 : TALLOC_FREE(pull);
30393 0 : PyErr_SetNdrError(err);
30394 0 : return NULL;
30395 : }
30396 : }
30397 :
30398 0 : TALLOC_FREE(pull);
30399 0 : Py_RETURN_NONE;
30400 : }
30401 :
30402 0 : static PyObject *py_DnssrvEnumRecords_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
30403 : {
30404 0 : DATA_BLOB blob;
30405 0 : Py_ssize_t blob_length = 0;
30406 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
30407 0 : PyObject *bigendian_obj = NULL;
30408 0 : PyObject *ndr64_obj = NULL;
30409 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
30410 0 : PyObject *allow_remaining_obj = NULL;
30411 0 : bool allow_remaining = false;
30412 :
30413 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
30414 : discard_const_p(char *, kwnames),
30415 : &blob.data, &blob_length,
30416 : &bigendian_obj,
30417 : &ndr64_obj,
30418 : &allow_remaining_obj)) {
30419 0 : return NULL;
30420 : }
30421 0 : blob.length = blob_length;
30422 :
30423 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
30424 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
30425 : }
30426 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
30427 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
30428 : }
30429 :
30430 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
30431 0 : allow_remaining = true;
30432 : }
30433 :
30434 0 : return py_DnssrvEnumRecords_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
30435 : }
30436 :
30437 0 : static PyObject *py_DnssrvEnumRecords_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
30438 : {
30439 0 : DATA_BLOB blob;
30440 0 : Py_ssize_t blob_length = 0;
30441 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
30442 0 : PyObject *bigendian_obj = NULL;
30443 0 : PyObject *ndr64_obj = NULL;
30444 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
30445 0 : PyObject *allow_remaining_obj = NULL;
30446 0 : bool allow_remaining = false;
30447 :
30448 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
30449 : discard_const_p(char *, kwnames),
30450 : &blob.data, &blob_length,
30451 : &bigendian_obj,
30452 : &ndr64_obj,
30453 : &allow_remaining_obj)) {
30454 0 : return NULL;
30455 : }
30456 0 : blob.length = blob_length;
30457 :
30458 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
30459 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
30460 : }
30461 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
30462 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
30463 : }
30464 :
30465 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
30466 0 : allow_remaining = true;
30467 : }
30468 :
30469 0 : return py_DnssrvEnumRecords_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
30470 : }
30471 :
30472 0 : static PyObject *py_DnssrvEnumRecords_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
30473 : {
30474 0 : const struct ndr_interface_call *call = NULL;
30475 0 : struct DnssrvEnumRecords *object = (struct DnssrvEnumRecords *)pytalloc_get_ptr(py_obj);
30476 0 : PyObject *ret;
30477 0 : char *retstr;
30478 :
30479 0 : if (ndr_table_dnsserver.num_calls < 4) {
30480 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords_ndr_print");
30481 0 : return NULL;
30482 : }
30483 0 : call = &ndr_table_dnsserver.calls[3];
30484 :
30485 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
30486 0 : ret = PyUnicode_FromString(retstr);
30487 0 : TALLOC_FREE(retstr);
30488 :
30489 0 : return ret;
30490 : }
30491 :
30492 0 : static PyObject *py_DnssrvEnumRecords_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
30493 : {
30494 0 : return py_DnssrvEnumRecords_ndr_print(py_obj, "DnssrvEnumRecords_in", NDR_IN);
30495 : }
30496 :
30497 0 : static PyObject *py_DnssrvEnumRecords_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
30498 : {
30499 0 : return py_DnssrvEnumRecords_ndr_print(py_obj, "DnssrvEnumRecords_out", NDR_OUT);
30500 : }
30501 :
30502 : static PyMethodDef py_DnssrvEnumRecords_methods[] = {
30503 : { "opnum", (PyCFunction)py_DnssrvEnumRecords_ndr_opnum, METH_NOARGS|METH_CLASS,
30504 : "dnsserver.DnssrvEnumRecords.opnum() -> 3 (0x03) " },
30505 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
30506 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
30507 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
30508 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
30509 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
30510 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
30511 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
30512 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
30513 : { "__ndr_print_in__", (PyCFunction)py_DnssrvEnumRecords_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
30514 : { "__ndr_print_out__", (PyCFunction)py_DnssrvEnumRecords_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
30515 : { NULL, NULL, 0, NULL }
30516 : };
30517 :
30518 :
30519 : static PyTypeObject DnssrvEnumRecords_Type = {
30520 : PyVarObject_HEAD_INIT(NULL, 0)
30521 : .tp_name = "dnsserver.DnssrvEnumRecords",
30522 : .tp_getset = py_DnssrvEnumRecords_getsetters,
30523 : .tp_methods = py_DnssrvEnumRecords_methods,
30524 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
30525 : .tp_new = py_DnssrvEnumRecords_new,
30526 : };
30527 :
30528 0 : static bool pack_py_DnssrvEnumRecords_args_in(PyObject *args, PyObject *kwargs, struct DnssrvEnumRecords *r)
30529 : {
30530 0 : PyObject *py_pwszServerName;
30531 0 : PyObject *py_pszZone;
30532 0 : PyObject *py_pszNodeName;
30533 0 : PyObject *py_pszStartChild;
30534 0 : PyObject *py_wRecordType;
30535 0 : PyObject *py_fSelectFlag;
30536 0 : PyObject *py_pszFilterStart;
30537 0 : PyObject *py_pszFilterStop;
30538 0 : const char *kwnames[] = {
30539 : "pwszServerName", "pszZone", "pszNodeName", "pszStartChild", "wRecordType", "fSelectFlag", "pszFilterStart", "pszFilterStop", NULL
30540 : };
30541 :
30542 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:DnssrvEnumRecords", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszNodeName, &py_pszStartChild, &py_wRecordType, &py_fSelectFlag, &py_pszFilterStart, &py_pszFilterStop)) {
30543 0 : return false;
30544 : }
30545 :
30546 0 : if (py_pwszServerName == NULL) {
30547 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
30548 0 : return false;
30549 : }
30550 0 : if (py_pwszServerName == Py_None) {
30551 0 : r->in.pwszServerName = NULL;
30552 : } else {
30553 0 : r->in.pwszServerName = NULL;
30554 : {
30555 0 : const char *test_str;
30556 0 : const char *talloc_str;
30557 0 : PyObject *unicode = NULL;
30558 0 : if (PyUnicode_Check(py_pwszServerName)) {
30559 0 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
30560 0 : if (unicode == NULL) {
30561 0 : PyErr_NoMemory();
30562 0 : return false;
30563 : }
30564 0 : test_str = PyBytes_AS_STRING(unicode);
30565 0 : } else if (PyBytes_Check(py_pwszServerName)) {
30566 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
30567 : } else {
30568 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
30569 0 : return false;
30570 : }
30571 0 : talloc_str = talloc_strdup(r, test_str);
30572 0 : if (unicode != NULL) {
30573 0 : Py_DECREF(unicode);
30574 : }
30575 0 : if (talloc_str == NULL) {
30576 0 : PyErr_NoMemory();
30577 0 : return false;
30578 : }
30579 0 : r->in.pwszServerName = talloc_str;
30580 : }
30581 : }
30582 0 : if (py_pszZone == NULL) {
30583 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
30584 0 : return false;
30585 : }
30586 0 : if (py_pszZone == Py_None) {
30587 0 : r->in.pszZone = NULL;
30588 : } else {
30589 0 : r->in.pszZone = NULL;
30590 : {
30591 0 : const char *test_str;
30592 0 : const char *talloc_str;
30593 0 : PyObject *unicode = NULL;
30594 0 : if (PyUnicode_Check(py_pszZone)) {
30595 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
30596 0 : if (unicode == NULL) {
30597 0 : PyErr_NoMemory();
30598 0 : return false;
30599 : }
30600 0 : test_str = PyBytes_AS_STRING(unicode);
30601 0 : } else if (PyBytes_Check(py_pszZone)) {
30602 0 : test_str = PyBytes_AS_STRING(py_pszZone);
30603 : } else {
30604 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
30605 0 : return false;
30606 : }
30607 0 : talloc_str = talloc_strdup(r, test_str);
30608 0 : if (unicode != NULL) {
30609 0 : Py_DECREF(unicode);
30610 : }
30611 0 : if (talloc_str == NULL) {
30612 0 : PyErr_NoMemory();
30613 0 : return false;
30614 : }
30615 0 : r->in.pszZone = talloc_str;
30616 : }
30617 : }
30618 0 : if (py_pszNodeName == NULL) {
30619 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszNodeName");
30620 0 : return false;
30621 : }
30622 0 : if (py_pszNodeName == Py_None) {
30623 0 : r->in.pszNodeName = NULL;
30624 : } else {
30625 0 : r->in.pszNodeName = NULL;
30626 : {
30627 0 : const char *test_str;
30628 0 : const char *talloc_str;
30629 0 : PyObject *unicode = NULL;
30630 0 : if (PyUnicode_Check(py_pszNodeName)) {
30631 0 : unicode = PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore");
30632 0 : if (unicode == NULL) {
30633 0 : PyErr_NoMemory();
30634 0 : return false;
30635 : }
30636 0 : test_str = PyBytes_AS_STRING(unicode);
30637 0 : } else if (PyBytes_Check(py_pszNodeName)) {
30638 0 : test_str = PyBytes_AS_STRING(py_pszNodeName);
30639 : } else {
30640 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
30641 0 : return false;
30642 : }
30643 0 : talloc_str = talloc_strdup(r, test_str);
30644 0 : if (unicode != NULL) {
30645 0 : Py_DECREF(unicode);
30646 : }
30647 0 : if (talloc_str == NULL) {
30648 0 : PyErr_NoMemory();
30649 0 : return false;
30650 : }
30651 0 : r->in.pszNodeName = talloc_str;
30652 : }
30653 : }
30654 0 : if (py_pszStartChild == NULL) {
30655 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszStartChild");
30656 0 : return false;
30657 : }
30658 0 : if (py_pszStartChild == Py_None) {
30659 0 : r->in.pszStartChild = NULL;
30660 : } else {
30661 0 : r->in.pszStartChild = NULL;
30662 : {
30663 0 : const char *test_str;
30664 0 : const char *talloc_str;
30665 0 : PyObject *unicode = NULL;
30666 0 : if (PyUnicode_Check(py_pszStartChild)) {
30667 0 : unicode = PyUnicode_AsEncodedString(py_pszStartChild, "utf-8", "ignore");
30668 0 : if (unicode == NULL) {
30669 0 : PyErr_NoMemory();
30670 0 : return false;
30671 : }
30672 0 : test_str = PyBytes_AS_STRING(unicode);
30673 0 : } else if (PyBytes_Check(py_pszStartChild)) {
30674 0 : test_str = PyBytes_AS_STRING(py_pszStartChild);
30675 : } else {
30676 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszStartChild)->tp_name);
30677 0 : return false;
30678 : }
30679 0 : talloc_str = talloc_strdup(r, test_str);
30680 0 : if (unicode != NULL) {
30681 0 : Py_DECREF(unicode);
30682 : }
30683 0 : if (talloc_str == NULL) {
30684 0 : PyErr_NoMemory();
30685 0 : return false;
30686 : }
30687 0 : r->in.pszStartChild = talloc_str;
30688 : }
30689 : }
30690 0 : if (py_wRecordType == NULL) {
30691 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.wRecordType");
30692 0 : return false;
30693 : }
30694 : {
30695 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.wRecordType));
30696 0 : if (PyLong_Check(py_wRecordType)) {
30697 0 : unsigned long long test_var;
30698 0 : test_var = PyLong_AsUnsignedLongLong(py_wRecordType);
30699 0 : if (PyErr_Occurred() != NULL) {
30700 0 : return false;
30701 : }
30702 0 : if (test_var > uint_max) {
30703 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30704 : PyLong_Type.tp_name, uint_max, test_var);
30705 0 : return false;
30706 : }
30707 0 : r->in.wRecordType = test_var;
30708 : } else {
30709 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30710 : PyLong_Type.tp_name);
30711 0 : return false;
30712 : }
30713 : }
30714 0 : if (py_fSelectFlag == NULL) {
30715 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.fSelectFlag");
30716 0 : return false;
30717 : }
30718 : {
30719 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fSelectFlag));
30720 0 : if (PyLong_Check(py_fSelectFlag)) {
30721 0 : unsigned long long test_var;
30722 0 : test_var = PyLong_AsUnsignedLongLong(py_fSelectFlag);
30723 0 : if (PyErr_Occurred() != NULL) {
30724 0 : return false;
30725 : }
30726 0 : if (test_var > uint_max) {
30727 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
30728 : PyLong_Type.tp_name, uint_max, test_var);
30729 0 : return false;
30730 : }
30731 0 : r->in.fSelectFlag = test_var;
30732 : } else {
30733 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
30734 : PyLong_Type.tp_name);
30735 0 : return false;
30736 : }
30737 : }
30738 0 : if (py_pszFilterStart == NULL) {
30739 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszFilterStart");
30740 0 : return false;
30741 : }
30742 0 : if (py_pszFilterStart == Py_None) {
30743 0 : r->in.pszFilterStart = NULL;
30744 : } else {
30745 0 : r->in.pszFilterStart = NULL;
30746 : {
30747 0 : const char *test_str;
30748 0 : const char *talloc_str;
30749 0 : PyObject *unicode = NULL;
30750 0 : if (PyUnicode_Check(py_pszFilterStart)) {
30751 0 : unicode = PyUnicode_AsEncodedString(py_pszFilterStart, "utf-8", "ignore");
30752 0 : if (unicode == NULL) {
30753 0 : PyErr_NoMemory();
30754 0 : return false;
30755 : }
30756 0 : test_str = PyBytes_AS_STRING(unicode);
30757 0 : } else if (PyBytes_Check(py_pszFilterStart)) {
30758 0 : test_str = PyBytes_AS_STRING(py_pszFilterStart);
30759 : } else {
30760 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStart)->tp_name);
30761 0 : return false;
30762 : }
30763 0 : talloc_str = talloc_strdup(r, test_str);
30764 0 : if (unicode != NULL) {
30765 0 : Py_DECREF(unicode);
30766 : }
30767 0 : if (talloc_str == NULL) {
30768 0 : PyErr_NoMemory();
30769 0 : return false;
30770 : }
30771 0 : r->in.pszFilterStart = talloc_str;
30772 : }
30773 : }
30774 0 : if (py_pszFilterStop == NULL) {
30775 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszFilterStop");
30776 0 : return false;
30777 : }
30778 0 : if (py_pszFilterStop == Py_None) {
30779 0 : r->in.pszFilterStop = NULL;
30780 : } else {
30781 0 : r->in.pszFilterStop = NULL;
30782 : {
30783 0 : const char *test_str;
30784 0 : const char *talloc_str;
30785 0 : PyObject *unicode = NULL;
30786 0 : if (PyUnicode_Check(py_pszFilterStop)) {
30787 0 : unicode = PyUnicode_AsEncodedString(py_pszFilterStop, "utf-8", "ignore");
30788 0 : if (unicode == NULL) {
30789 0 : PyErr_NoMemory();
30790 0 : return false;
30791 : }
30792 0 : test_str = PyBytes_AS_STRING(unicode);
30793 0 : } else if (PyBytes_Check(py_pszFilterStop)) {
30794 0 : test_str = PyBytes_AS_STRING(py_pszFilterStop);
30795 : } else {
30796 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStop)->tp_name);
30797 0 : return false;
30798 : }
30799 0 : talloc_str = talloc_strdup(r, test_str);
30800 0 : if (unicode != NULL) {
30801 0 : Py_DECREF(unicode);
30802 : }
30803 0 : if (talloc_str == NULL) {
30804 0 : PyErr_NoMemory();
30805 0 : return false;
30806 : }
30807 0 : r->in.pszFilterStop = talloc_str;
30808 : }
30809 : }
30810 0 : return true;
30811 : }
30812 :
30813 0 : static PyObject *unpack_py_DnssrvEnumRecords_args_out(struct DnssrvEnumRecords *r)
30814 : {
30815 0 : PyObject *result;
30816 0 : PyObject *py_pdwBufferLength;
30817 0 : PyObject *py_pBuffer;
30818 0 : result = PyTuple_New(2);
30819 0 : py_pdwBufferLength = PyLong_FromUnsignedLongLong((uint32_t)*r->out.pdwBufferLength);
30820 0 : PyTuple_SetItem(result, 0, py_pdwBufferLength);
30821 0 : if (*r->out.pBuffer == NULL) {
30822 0 : py_pBuffer = Py_None;
30823 0 : Py_INCREF(py_pBuffer);
30824 : } else {
30825 0 : py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *r->out.pBuffer, *r->out.pBuffer);
30826 : }
30827 0 : PyTuple_SetItem(result, 1, py_pBuffer);
30828 0 : if (!W_ERROR_IS_OK(r->out.result)) {
30829 0 : PyErr_SetWERROR(r->out.result);
30830 0 : return NULL;
30831 : }
30832 :
30833 0 : return result;
30834 : }
30835 :
30836 :
30837 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pwszServerName(PyObject *obj, void *closure)
30838 : {
30839 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(obj);
30840 0 : PyObject *py_pwszServerName;
30841 0 : if (object->in.pwszServerName == NULL) {
30842 0 : Py_RETURN_NONE;
30843 : }
30844 0 : if (object->in.pwszServerName == NULL) {
30845 0 : py_pwszServerName = Py_None;
30846 0 : Py_INCREF(py_pwszServerName);
30847 : } else {
30848 0 : if (object->in.pwszServerName == NULL) {
30849 0 : py_pwszServerName = Py_None;
30850 0 : Py_INCREF(py_pwszServerName);
30851 : } else {
30852 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
30853 : }
30854 : }
30855 0 : return py_pwszServerName;
30856 : }
30857 :
30858 0 : static int py_DnssrvUpdateRecord_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
30859 : {
30860 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
30861 0 : if (value == NULL) {
30862 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
30863 0 : return -1;
30864 : }
30865 0 : if (value == Py_None) {
30866 0 : object->in.pwszServerName = NULL;
30867 : } else {
30868 0 : object->in.pwszServerName = NULL;
30869 : {
30870 0 : const char *test_str;
30871 0 : const char *talloc_str;
30872 0 : PyObject *unicode = NULL;
30873 0 : if (PyUnicode_Check(value)) {
30874 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30875 0 : if (unicode == NULL) {
30876 0 : PyErr_NoMemory();
30877 0 : return -1;
30878 : }
30879 0 : test_str = PyBytes_AS_STRING(unicode);
30880 0 : } else if (PyBytes_Check(value)) {
30881 0 : test_str = PyBytes_AS_STRING(value);
30882 : } else {
30883 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30884 0 : return -1;
30885 : }
30886 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30887 0 : if (unicode != NULL) {
30888 0 : Py_DECREF(unicode);
30889 : }
30890 0 : if (talloc_str == NULL) {
30891 0 : PyErr_NoMemory();
30892 0 : return -1;
30893 : }
30894 0 : object->in.pwszServerName = talloc_str;
30895 : }
30896 : }
30897 0 : return 0;
30898 : }
30899 :
30900 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pszZone(PyObject *obj, void *closure)
30901 : {
30902 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(obj);
30903 0 : PyObject *py_pszZone;
30904 0 : if (object->in.pszZone == NULL) {
30905 0 : Py_RETURN_NONE;
30906 : }
30907 0 : if (object->in.pszZone == NULL) {
30908 0 : py_pszZone = Py_None;
30909 0 : Py_INCREF(py_pszZone);
30910 : } else {
30911 0 : if (object->in.pszZone == NULL) {
30912 0 : py_pszZone = Py_None;
30913 0 : Py_INCREF(py_pszZone);
30914 : } else {
30915 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
30916 : }
30917 : }
30918 0 : return py_pszZone;
30919 : }
30920 :
30921 0 : static int py_DnssrvUpdateRecord_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
30922 : {
30923 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
30924 0 : if (value == NULL) {
30925 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
30926 0 : return -1;
30927 : }
30928 0 : if (value == Py_None) {
30929 0 : object->in.pszZone = NULL;
30930 : } else {
30931 0 : object->in.pszZone = NULL;
30932 : {
30933 0 : const char *test_str;
30934 0 : const char *talloc_str;
30935 0 : PyObject *unicode = NULL;
30936 0 : if (PyUnicode_Check(value)) {
30937 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
30938 0 : if (unicode == NULL) {
30939 0 : PyErr_NoMemory();
30940 0 : return -1;
30941 : }
30942 0 : test_str = PyBytes_AS_STRING(unicode);
30943 0 : } else if (PyBytes_Check(value)) {
30944 0 : test_str = PyBytes_AS_STRING(value);
30945 : } else {
30946 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
30947 0 : return -1;
30948 : }
30949 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
30950 0 : if (unicode != NULL) {
30951 0 : Py_DECREF(unicode);
30952 : }
30953 0 : if (talloc_str == NULL) {
30954 0 : PyErr_NoMemory();
30955 0 : return -1;
30956 : }
30957 0 : object->in.pszZone = talloc_str;
30958 : }
30959 : }
30960 0 : return 0;
30961 : }
30962 :
30963 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pszNodeName(PyObject *obj, void *closure)
30964 : {
30965 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(obj);
30966 0 : PyObject *py_pszNodeName;
30967 0 : if (object->in.pszNodeName == NULL) {
30968 0 : Py_RETURN_NONE;
30969 : }
30970 0 : if (object->in.pszNodeName == NULL) {
30971 0 : py_pszNodeName = Py_None;
30972 0 : Py_INCREF(py_pszNodeName);
30973 : } else {
30974 0 : if (object->in.pszNodeName == NULL) {
30975 0 : py_pszNodeName = Py_None;
30976 0 : Py_INCREF(py_pszNodeName);
30977 : } else {
30978 0 : py_pszNodeName = PyUnicode_Decode(object->in.pszNodeName, strlen(object->in.pszNodeName), "utf-8", "ignore");
30979 : }
30980 : }
30981 0 : return py_pszNodeName;
30982 : }
30983 :
30984 0 : static int py_DnssrvUpdateRecord_in_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
30985 : {
30986 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
30987 0 : if (value == NULL) {
30988 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszNodeName");
30989 0 : return -1;
30990 : }
30991 0 : if (value == Py_None) {
30992 0 : object->in.pszNodeName = NULL;
30993 : } else {
30994 0 : object->in.pszNodeName = NULL;
30995 : {
30996 0 : const char *test_str;
30997 0 : const char *talloc_str;
30998 0 : PyObject *unicode = NULL;
30999 0 : if (PyUnicode_Check(value)) {
31000 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31001 0 : if (unicode == NULL) {
31002 0 : PyErr_NoMemory();
31003 0 : return -1;
31004 : }
31005 0 : test_str = PyBytes_AS_STRING(unicode);
31006 0 : } else if (PyBytes_Check(value)) {
31007 0 : test_str = PyBytes_AS_STRING(value);
31008 : } else {
31009 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31010 0 : return -1;
31011 : }
31012 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31013 0 : if (unicode != NULL) {
31014 0 : Py_DECREF(unicode);
31015 : }
31016 0 : if (talloc_str == NULL) {
31017 0 : PyErr_NoMemory();
31018 0 : return -1;
31019 : }
31020 0 : object->in.pszNodeName = talloc_str;
31021 : }
31022 : }
31023 0 : return 0;
31024 : }
31025 :
31026 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pAddRecord(PyObject *obj, void *closure)
31027 : {
31028 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(obj);
31029 0 : PyObject *py_pAddRecord;
31030 0 : if (object->in.pAddRecord == NULL) {
31031 0 : Py_RETURN_NONE;
31032 : }
31033 0 : if (object->in.pAddRecord == NULL) {
31034 0 : py_pAddRecord = Py_None;
31035 0 : Py_INCREF(py_pAddRecord);
31036 : } else {
31037 0 : py_pAddRecord = pytalloc_reference_ex(&DNS_RPC_RECORD_BUF_Type, object->in.pAddRecord, object->in.pAddRecord);
31038 : }
31039 0 : return py_pAddRecord;
31040 : }
31041 :
31042 0 : static int py_DnssrvUpdateRecord_in_set_pAddRecord(PyObject *py_obj, PyObject *value, void *closure)
31043 : {
31044 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
31045 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pAddRecord));
31046 0 : if (value == NULL) {
31047 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pAddRecord");
31048 0 : return -1;
31049 : }
31050 0 : if (value == Py_None) {
31051 0 : object->in.pAddRecord = NULL;
31052 : } else {
31053 0 : object->in.pAddRecord = NULL;
31054 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, value, return -1;);
31055 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
31056 0 : PyErr_NoMemory();
31057 0 : return -1;
31058 : }
31059 0 : object->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(value);
31060 : }
31061 0 : return 0;
31062 : }
31063 :
31064 0 : static PyObject *py_DnssrvUpdateRecord_in_get_pDeleteRecord(PyObject *obj, void *closure)
31065 : {
31066 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(obj);
31067 0 : PyObject *py_pDeleteRecord;
31068 0 : if (object->in.pDeleteRecord == NULL) {
31069 0 : Py_RETURN_NONE;
31070 : }
31071 0 : if (object->in.pDeleteRecord == NULL) {
31072 0 : py_pDeleteRecord = Py_None;
31073 0 : Py_INCREF(py_pDeleteRecord);
31074 : } else {
31075 0 : py_pDeleteRecord = pytalloc_reference_ex(&DNS_RPC_RECORD_BUF_Type, object->in.pDeleteRecord, object->in.pDeleteRecord);
31076 : }
31077 0 : return py_pDeleteRecord;
31078 : }
31079 :
31080 0 : static int py_DnssrvUpdateRecord_in_set_pDeleteRecord(PyObject *py_obj, PyObject *value, void *closure)
31081 : {
31082 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
31083 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pDeleteRecord));
31084 0 : if (value == NULL) {
31085 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pDeleteRecord");
31086 0 : return -1;
31087 : }
31088 0 : if (value == Py_None) {
31089 0 : object->in.pDeleteRecord = NULL;
31090 : } else {
31091 0 : object->in.pDeleteRecord = NULL;
31092 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, value, return -1;);
31093 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
31094 0 : PyErr_NoMemory();
31095 0 : return -1;
31096 : }
31097 0 : object->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(value);
31098 : }
31099 0 : return 0;
31100 : }
31101 :
31102 0 : static PyObject *py_DnssrvUpdateRecord_get_result(PyObject *obj, void *closure)
31103 : {
31104 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(obj);
31105 0 : PyObject *py_result;
31106 0 : py_result = PyErr_FromWERROR(object->out.result);
31107 0 : return py_result;
31108 : }
31109 :
31110 0 : static int py_DnssrvUpdateRecord_set_result(PyObject *py_obj, PyObject *value, void *closure)
31111 : {
31112 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
31113 0 : if (value == NULL) {
31114 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
31115 0 : return -1;
31116 : }
31117 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
31118 0 : return 0;
31119 : }
31120 :
31121 : static PyGetSetDef py_DnssrvUpdateRecord_getsetters[] = {
31122 : {
31123 : .name = discard_const_p(char, "in_pwszServerName"),
31124 : .get = py_DnssrvUpdateRecord_in_get_pwszServerName,
31125 : .set = py_DnssrvUpdateRecord_in_set_pwszServerName,
31126 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
31127 : },
31128 : {
31129 : .name = discard_const_p(char, "in_pszZone"),
31130 : .get = py_DnssrvUpdateRecord_in_get_pszZone,
31131 : .set = py_DnssrvUpdateRecord_in_set_pszZone,
31132 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
31133 : },
31134 : {
31135 : .name = discard_const_p(char, "in_pszNodeName"),
31136 : .get = py_DnssrvUpdateRecord_in_get_pszNodeName,
31137 : .set = py_DnssrvUpdateRecord_in_set_pszNodeName,
31138 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
31139 : },
31140 : {
31141 : .name = discard_const_p(char, "in_pAddRecord"),
31142 : .get = py_DnssrvUpdateRecord_in_get_pAddRecord,
31143 : .set = py_DnssrvUpdateRecord_in_set_pAddRecord,
31144 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_BUF")
31145 : },
31146 : {
31147 : .name = discard_const_p(char, "in_pDeleteRecord"),
31148 : .get = py_DnssrvUpdateRecord_in_get_pDeleteRecord,
31149 : .set = py_DnssrvUpdateRecord_in_set_pDeleteRecord,
31150 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_BUF")
31151 : },
31152 : {
31153 : .name = discard_const_p(char, "result"),
31154 : .get = py_DnssrvUpdateRecord_get_result,
31155 : .set = py_DnssrvUpdateRecord_set_result,
31156 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
31157 : },
31158 : { .name = NULL }
31159 : };
31160 :
31161 0 : static PyObject *py_DnssrvUpdateRecord_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
31162 : {
31163 0 : PyObject *self = pytalloc_new(struct DnssrvUpdateRecord, type);
31164 0 : return self;
31165 : }
31166 :
31167 0 : static PyObject *py_DnssrvUpdateRecord_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
31168 : {
31169 :
31170 :
31171 0 : return PyLong_FromLong(4);
31172 : }
31173 :
31174 0 : static PyObject *py_DnssrvUpdateRecord_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
31175 : {
31176 0 : const struct ndr_interface_call *call = NULL;
31177 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
31178 0 : PyObject *ret = NULL;
31179 0 : struct ndr_push *push = NULL;
31180 0 : DATA_BLOB blob;
31181 0 : enum ndr_err_code err;
31182 :
31183 0 : if (ndr_table_dnsserver.num_calls < 5) {
31184 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord_ndr_pack");
31185 0 : return NULL;
31186 : }
31187 0 : call = &ndr_table_dnsserver.calls[4];
31188 :
31189 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
31190 0 : if (push == NULL) {
31191 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
31192 0 : return NULL;
31193 : }
31194 :
31195 0 : push->flags |= ndr_push_flags;
31196 :
31197 0 : err = call->ndr_push(push, ndr_inout_flags, object);
31198 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
31199 0 : TALLOC_FREE(push);
31200 0 : PyErr_SetNdrError(err);
31201 0 : return NULL;
31202 : }
31203 0 : blob = ndr_push_blob(push);
31204 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
31205 0 : TALLOC_FREE(push);
31206 0 : return ret;
31207 : }
31208 :
31209 0 : static PyObject *py_DnssrvUpdateRecord_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31210 : {
31211 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
31212 0 : PyObject *bigendian_obj = NULL;
31213 0 : PyObject *ndr64_obj = NULL;
31214 0 : libndr_flags ndr_push_flags = 0;
31215 :
31216 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
31217 : discard_const_p(char *, kwnames),
31218 : &bigendian_obj,
31219 : &ndr64_obj)) {
31220 0 : return NULL;
31221 : }
31222 :
31223 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31224 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
31225 : }
31226 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
31227 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
31228 : }
31229 :
31230 0 : return py_DnssrvUpdateRecord_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
31231 : }
31232 :
31233 0 : static PyObject *py_DnssrvUpdateRecord_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31234 : {
31235 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
31236 0 : PyObject *bigendian_obj = NULL;
31237 0 : PyObject *ndr64_obj = NULL;
31238 0 : libndr_flags ndr_push_flags = 0;
31239 :
31240 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
31241 : discard_const_p(char *, kwnames),
31242 : &bigendian_obj,
31243 : &ndr64_obj)) {
31244 0 : return NULL;
31245 : }
31246 :
31247 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31248 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
31249 : }
31250 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
31251 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
31252 : }
31253 :
31254 0 : return py_DnssrvUpdateRecord_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
31255 : }
31256 :
31257 0 : static PyObject *py_DnssrvUpdateRecord_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
31258 : {
31259 0 : const struct ndr_interface_call *call = NULL;
31260 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
31261 0 : struct ndr_pull *pull = NULL;
31262 0 : enum ndr_err_code err;
31263 :
31264 0 : if (ndr_table_dnsserver.num_calls < 5) {
31265 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord_ndr_unpack");
31266 0 : return NULL;
31267 : }
31268 0 : call = &ndr_table_dnsserver.calls[4];
31269 :
31270 0 : pull = ndr_pull_init_blob(blob, object);
31271 0 : if (pull == NULL) {
31272 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
31273 0 : return NULL;
31274 : }
31275 :
31276 0 : pull->flags |= ndr_pull_flags;
31277 :
31278 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
31279 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
31280 0 : TALLOC_FREE(pull);
31281 0 : PyErr_SetNdrError(err);
31282 0 : return NULL;
31283 : }
31284 0 : if (!allow_remaining) {
31285 0 : uint32_t highest_ofs;
31286 :
31287 0 : if (pull->offset > pull->relative_highest_offset) {
31288 0 : highest_ofs = pull->offset;
31289 : } else {
31290 0 : highest_ofs = pull->relative_highest_offset;
31291 : }
31292 0 : if (highest_ofs < pull->data_size) {
31293 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
31294 : "not all bytes consumed ofs[%u] size[%u]",
31295 : highest_ofs, pull->data_size);
31296 0 : TALLOC_FREE(pull);
31297 0 : PyErr_SetNdrError(err);
31298 0 : return NULL;
31299 : }
31300 : }
31301 :
31302 0 : TALLOC_FREE(pull);
31303 0 : Py_RETURN_NONE;
31304 : }
31305 :
31306 0 : static PyObject *py_DnssrvUpdateRecord_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31307 : {
31308 0 : DATA_BLOB blob;
31309 0 : Py_ssize_t blob_length = 0;
31310 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
31311 0 : PyObject *bigendian_obj = NULL;
31312 0 : PyObject *ndr64_obj = NULL;
31313 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
31314 0 : PyObject *allow_remaining_obj = NULL;
31315 0 : bool allow_remaining = false;
31316 :
31317 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
31318 : discard_const_p(char *, kwnames),
31319 : &blob.data, &blob_length,
31320 : &bigendian_obj,
31321 : &ndr64_obj,
31322 : &allow_remaining_obj)) {
31323 0 : return NULL;
31324 : }
31325 0 : blob.length = blob_length;
31326 :
31327 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31328 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
31329 : }
31330 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
31331 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
31332 : }
31333 :
31334 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
31335 0 : allow_remaining = true;
31336 : }
31337 :
31338 0 : return py_DnssrvUpdateRecord_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
31339 : }
31340 :
31341 0 : static PyObject *py_DnssrvUpdateRecord_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
31342 : {
31343 0 : DATA_BLOB blob;
31344 0 : Py_ssize_t blob_length = 0;
31345 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
31346 0 : PyObject *bigendian_obj = NULL;
31347 0 : PyObject *ndr64_obj = NULL;
31348 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
31349 0 : PyObject *allow_remaining_obj = NULL;
31350 0 : bool allow_remaining = false;
31351 :
31352 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
31353 : discard_const_p(char *, kwnames),
31354 : &blob.data, &blob_length,
31355 : &bigendian_obj,
31356 : &ndr64_obj,
31357 : &allow_remaining_obj)) {
31358 0 : return NULL;
31359 : }
31360 0 : blob.length = blob_length;
31361 :
31362 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
31363 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
31364 : }
31365 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
31366 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
31367 : }
31368 :
31369 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
31370 0 : allow_remaining = true;
31371 : }
31372 :
31373 0 : return py_DnssrvUpdateRecord_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
31374 : }
31375 :
31376 0 : static PyObject *py_DnssrvUpdateRecord_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
31377 : {
31378 0 : const struct ndr_interface_call *call = NULL;
31379 0 : struct DnssrvUpdateRecord *object = (struct DnssrvUpdateRecord *)pytalloc_get_ptr(py_obj);
31380 0 : PyObject *ret;
31381 0 : char *retstr;
31382 :
31383 0 : if (ndr_table_dnsserver.num_calls < 5) {
31384 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord_ndr_print");
31385 0 : return NULL;
31386 : }
31387 0 : call = &ndr_table_dnsserver.calls[4];
31388 :
31389 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
31390 0 : ret = PyUnicode_FromString(retstr);
31391 0 : TALLOC_FREE(retstr);
31392 :
31393 0 : return ret;
31394 : }
31395 :
31396 0 : static PyObject *py_DnssrvUpdateRecord_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
31397 : {
31398 0 : return py_DnssrvUpdateRecord_ndr_print(py_obj, "DnssrvUpdateRecord_in", NDR_IN);
31399 : }
31400 :
31401 0 : static PyObject *py_DnssrvUpdateRecord_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
31402 : {
31403 0 : return py_DnssrvUpdateRecord_ndr_print(py_obj, "DnssrvUpdateRecord_out", NDR_OUT);
31404 : }
31405 :
31406 : static PyMethodDef py_DnssrvUpdateRecord_methods[] = {
31407 : { "opnum", (PyCFunction)py_DnssrvUpdateRecord_ndr_opnum, METH_NOARGS|METH_CLASS,
31408 : "dnsserver.DnssrvUpdateRecord.opnum() -> 4 (0x04) " },
31409 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
31410 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
31411 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
31412 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
31413 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
31414 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
31415 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
31416 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
31417 : { "__ndr_print_in__", (PyCFunction)py_DnssrvUpdateRecord_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
31418 : { "__ndr_print_out__", (PyCFunction)py_DnssrvUpdateRecord_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
31419 : { NULL, NULL, 0, NULL }
31420 : };
31421 :
31422 :
31423 : static PyTypeObject DnssrvUpdateRecord_Type = {
31424 : PyVarObject_HEAD_INIT(NULL, 0)
31425 : .tp_name = "dnsserver.DnssrvUpdateRecord",
31426 : .tp_getset = py_DnssrvUpdateRecord_getsetters,
31427 : .tp_methods = py_DnssrvUpdateRecord_methods,
31428 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
31429 : .tp_new = py_DnssrvUpdateRecord_new,
31430 : };
31431 :
31432 0 : static bool pack_py_DnssrvUpdateRecord_args_in(PyObject *args, PyObject *kwargs, struct DnssrvUpdateRecord *r)
31433 : {
31434 0 : PyObject *py_pwszServerName;
31435 0 : PyObject *py_pszZone;
31436 0 : PyObject *py_pszNodeName;
31437 0 : PyObject *py_pAddRecord;
31438 0 : PyObject *py_pDeleteRecord;
31439 0 : const char *kwnames[] = {
31440 : "pwszServerName", "pszZone", "pszNodeName", "pAddRecord", "pDeleteRecord", NULL
31441 : };
31442 :
31443 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvUpdateRecord", discard_const_p(char *, kwnames), &py_pwszServerName, &py_pszZone, &py_pszNodeName, &py_pAddRecord, &py_pDeleteRecord)) {
31444 0 : return false;
31445 : }
31446 :
31447 0 : if (py_pwszServerName == NULL) {
31448 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
31449 0 : return false;
31450 : }
31451 0 : if (py_pwszServerName == Py_None) {
31452 0 : r->in.pwszServerName = NULL;
31453 : } else {
31454 0 : r->in.pwszServerName = NULL;
31455 : {
31456 0 : const char *test_str;
31457 0 : const char *talloc_str;
31458 0 : PyObject *unicode = NULL;
31459 0 : if (PyUnicode_Check(py_pwszServerName)) {
31460 0 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
31461 0 : if (unicode == NULL) {
31462 0 : PyErr_NoMemory();
31463 0 : return false;
31464 : }
31465 0 : test_str = PyBytes_AS_STRING(unicode);
31466 0 : } else if (PyBytes_Check(py_pwszServerName)) {
31467 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
31468 : } else {
31469 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
31470 0 : return false;
31471 : }
31472 0 : talloc_str = talloc_strdup(r, test_str);
31473 0 : if (unicode != NULL) {
31474 0 : Py_DECREF(unicode);
31475 : }
31476 0 : if (talloc_str == NULL) {
31477 0 : PyErr_NoMemory();
31478 0 : return false;
31479 : }
31480 0 : r->in.pwszServerName = talloc_str;
31481 : }
31482 : }
31483 0 : if (py_pszZone == NULL) {
31484 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
31485 0 : return false;
31486 : }
31487 0 : if (py_pszZone == Py_None) {
31488 0 : r->in.pszZone = NULL;
31489 : } else {
31490 0 : r->in.pszZone = NULL;
31491 : {
31492 0 : const char *test_str;
31493 0 : const char *talloc_str;
31494 0 : PyObject *unicode = NULL;
31495 0 : if (PyUnicode_Check(py_pszZone)) {
31496 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
31497 0 : if (unicode == NULL) {
31498 0 : PyErr_NoMemory();
31499 0 : return false;
31500 : }
31501 0 : test_str = PyBytes_AS_STRING(unicode);
31502 0 : } else if (PyBytes_Check(py_pszZone)) {
31503 0 : test_str = PyBytes_AS_STRING(py_pszZone);
31504 : } else {
31505 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
31506 0 : return false;
31507 : }
31508 0 : talloc_str = talloc_strdup(r, test_str);
31509 0 : if (unicode != NULL) {
31510 0 : Py_DECREF(unicode);
31511 : }
31512 0 : if (talloc_str == NULL) {
31513 0 : PyErr_NoMemory();
31514 0 : return false;
31515 : }
31516 0 : r->in.pszZone = talloc_str;
31517 : }
31518 : }
31519 0 : if (py_pszNodeName == NULL) {
31520 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszNodeName");
31521 0 : return false;
31522 : }
31523 0 : if (py_pszNodeName == Py_None) {
31524 0 : r->in.pszNodeName = NULL;
31525 : } else {
31526 0 : r->in.pszNodeName = NULL;
31527 : {
31528 0 : const char *test_str;
31529 0 : const char *talloc_str;
31530 0 : PyObject *unicode = NULL;
31531 0 : if (PyUnicode_Check(py_pszNodeName)) {
31532 0 : unicode = PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore");
31533 0 : if (unicode == NULL) {
31534 0 : PyErr_NoMemory();
31535 0 : return false;
31536 : }
31537 0 : test_str = PyBytes_AS_STRING(unicode);
31538 0 : } else if (PyBytes_Check(py_pszNodeName)) {
31539 0 : test_str = PyBytes_AS_STRING(py_pszNodeName);
31540 : } else {
31541 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
31542 0 : return false;
31543 : }
31544 0 : talloc_str = talloc_strdup(r, test_str);
31545 0 : if (unicode != NULL) {
31546 0 : Py_DECREF(unicode);
31547 : }
31548 0 : if (talloc_str == NULL) {
31549 0 : PyErr_NoMemory();
31550 0 : return false;
31551 : }
31552 0 : r->in.pszNodeName = talloc_str;
31553 : }
31554 : }
31555 0 : if (py_pAddRecord == NULL) {
31556 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pAddRecord");
31557 0 : return false;
31558 : }
31559 0 : if (py_pAddRecord == Py_None) {
31560 0 : r->in.pAddRecord = NULL;
31561 : } else {
31562 0 : r->in.pAddRecord = NULL;
31563 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pAddRecord, return false;);
31564 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_pAddRecord)) == NULL) {
31565 0 : PyErr_NoMemory();
31566 0 : return false;
31567 : }
31568 0 : r->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pAddRecord);
31569 : }
31570 0 : if (py_pDeleteRecord == NULL) {
31571 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pDeleteRecord");
31572 0 : return false;
31573 : }
31574 0 : if (py_pDeleteRecord == Py_None) {
31575 0 : r->in.pDeleteRecord = NULL;
31576 : } else {
31577 0 : r->in.pDeleteRecord = NULL;
31578 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pDeleteRecord, return false;);
31579 0 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_pDeleteRecord)) == NULL) {
31580 0 : PyErr_NoMemory();
31581 0 : return false;
31582 : }
31583 0 : r->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pDeleteRecord);
31584 : }
31585 0 : return true;
31586 : }
31587 :
31588 0 : static PyObject *unpack_py_DnssrvUpdateRecord_args_out(struct DnssrvUpdateRecord *r)
31589 : {
31590 0 : PyObject *result;
31591 0 : result = Py_None;
31592 0 : Py_INCREF(result);
31593 0 : if (!W_ERROR_IS_OK(r->out.result)) {
31594 0 : PyErr_SetWERROR(r->out.result);
31595 0 : return NULL;
31596 : }
31597 :
31598 0 : return result;
31599 : }
31600 :
31601 :
31602 0 : static PyObject *py_DnssrvOperation2_in_get_dwClientVersion(PyObject *obj, void *closure)
31603 : {
31604 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31605 0 : PyObject *py_dwClientVersion;
31606 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwClientVersion);
31607 0 : return py_dwClientVersion;
31608 : }
31609 :
31610 0 : static int py_DnssrvOperation2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
31611 : {
31612 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31613 0 : if (value == NULL) {
31614 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwClientVersion");
31615 0 : return -1;
31616 : }
31617 : {
31618 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
31619 0 : if (PyLong_Check(value)) {
31620 0 : 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->in.dwClientVersion = 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_DnssrvOperation2_in_get_dwSettingFlags(PyObject *obj, void *closure)
31641 : {
31642 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31643 0 : PyObject *py_dwSettingFlags;
31644 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwSettingFlags);
31645 0 : return py_dwSettingFlags;
31646 : }
31647 :
31648 0 : static int py_DnssrvOperation2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
31649 : {
31650 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31651 0 : if (value == NULL) {
31652 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwSettingFlags");
31653 0 : return -1;
31654 : }
31655 : {
31656 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
31657 0 : if (PyLong_Check(value)) {
31658 0 : 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->in.dwSettingFlags = 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_DnssrvOperation2_in_get_pwszServerName(PyObject *obj, void *closure)
31679 : {
31680 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31681 0 : PyObject *py_pwszServerName;
31682 0 : if (object->in.pwszServerName == NULL) {
31683 0 : Py_RETURN_NONE;
31684 : }
31685 0 : if (object->in.pwszServerName == NULL) {
31686 0 : py_pwszServerName = Py_None;
31687 0 : Py_INCREF(py_pwszServerName);
31688 : } else {
31689 0 : if (object->in.pwszServerName == NULL) {
31690 0 : py_pwszServerName = Py_None;
31691 0 : Py_INCREF(py_pwszServerName);
31692 : } else {
31693 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
31694 : }
31695 : }
31696 0 : return py_pwszServerName;
31697 : }
31698 :
31699 0 : static int py_DnssrvOperation2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
31700 : {
31701 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31702 0 : if (value == NULL) {
31703 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
31704 0 : return -1;
31705 : }
31706 0 : if (value == Py_None) {
31707 0 : object->in.pwszServerName = NULL;
31708 : } else {
31709 0 : object->in.pwszServerName = NULL;
31710 : {
31711 0 : const char *test_str;
31712 0 : const char *talloc_str;
31713 0 : PyObject *unicode = NULL;
31714 0 : if (PyUnicode_Check(value)) {
31715 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31716 0 : if (unicode == NULL) {
31717 0 : PyErr_NoMemory();
31718 0 : return -1;
31719 : }
31720 0 : test_str = PyBytes_AS_STRING(unicode);
31721 0 : } else if (PyBytes_Check(value)) {
31722 0 : test_str = PyBytes_AS_STRING(value);
31723 : } else {
31724 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31725 0 : return -1;
31726 : }
31727 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31728 0 : if (unicode != NULL) {
31729 0 : Py_DECREF(unicode);
31730 : }
31731 0 : if (talloc_str == NULL) {
31732 0 : PyErr_NoMemory();
31733 0 : return -1;
31734 : }
31735 0 : object->in.pwszServerName = talloc_str;
31736 : }
31737 : }
31738 0 : return 0;
31739 : }
31740 :
31741 0 : static PyObject *py_DnssrvOperation2_in_get_pszZone(PyObject *obj, void *closure)
31742 : {
31743 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31744 0 : PyObject *py_pszZone;
31745 0 : if (object->in.pszZone == NULL) {
31746 0 : Py_RETURN_NONE;
31747 : }
31748 0 : if (object->in.pszZone == NULL) {
31749 0 : py_pszZone = Py_None;
31750 0 : Py_INCREF(py_pszZone);
31751 : } else {
31752 0 : if (object->in.pszZone == NULL) {
31753 0 : py_pszZone = Py_None;
31754 0 : Py_INCREF(py_pszZone);
31755 : } else {
31756 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
31757 : }
31758 : }
31759 0 : return py_pszZone;
31760 : }
31761 :
31762 0 : static int py_DnssrvOperation2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
31763 : {
31764 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31765 0 : if (value == NULL) {
31766 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
31767 0 : return -1;
31768 : }
31769 0 : if (value == Py_None) {
31770 0 : object->in.pszZone = NULL;
31771 : } else {
31772 0 : object->in.pszZone = NULL;
31773 : {
31774 0 : const char *test_str;
31775 0 : const char *talloc_str;
31776 0 : PyObject *unicode = NULL;
31777 0 : if (PyUnicode_Check(value)) {
31778 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31779 0 : if (unicode == NULL) {
31780 0 : PyErr_NoMemory();
31781 0 : return -1;
31782 : }
31783 0 : test_str = PyBytes_AS_STRING(unicode);
31784 0 : } else if (PyBytes_Check(value)) {
31785 0 : test_str = PyBytes_AS_STRING(value);
31786 : } else {
31787 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31788 0 : return -1;
31789 : }
31790 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31791 0 : if (unicode != NULL) {
31792 0 : Py_DECREF(unicode);
31793 : }
31794 0 : if (talloc_str == NULL) {
31795 0 : PyErr_NoMemory();
31796 0 : return -1;
31797 : }
31798 0 : object->in.pszZone = talloc_str;
31799 : }
31800 : }
31801 0 : return 0;
31802 : }
31803 :
31804 0 : static PyObject *py_DnssrvOperation2_in_get_dwContext(PyObject *obj, void *closure)
31805 : {
31806 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31807 0 : PyObject *py_dwContext;
31808 0 : py_dwContext = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwContext);
31809 0 : return py_dwContext;
31810 : }
31811 :
31812 0 : static int py_DnssrvOperation2_in_set_dwContext(PyObject *py_obj, PyObject *value, void *closure)
31813 : {
31814 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31815 0 : if (value == NULL) {
31816 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwContext");
31817 0 : return -1;
31818 : }
31819 : {
31820 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwContext));
31821 0 : if (PyLong_Check(value)) {
31822 0 : unsigned long long test_var;
31823 0 : test_var = PyLong_AsUnsignedLongLong(value);
31824 0 : if (PyErr_Occurred() != NULL) {
31825 0 : return -1;
31826 : }
31827 0 : if (test_var > uint_max) {
31828 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31829 : PyLong_Type.tp_name, uint_max, test_var);
31830 0 : return -1;
31831 : }
31832 0 : object->in.dwContext = test_var;
31833 : } else {
31834 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31835 : PyLong_Type.tp_name);
31836 0 : return -1;
31837 : }
31838 : }
31839 0 : return 0;
31840 : }
31841 :
31842 0 : static PyObject *py_DnssrvOperation2_in_get_pszOperation(PyObject *obj, void *closure)
31843 : {
31844 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31845 0 : PyObject *py_pszOperation;
31846 0 : if (object->in.pszOperation == NULL) {
31847 0 : Py_RETURN_NONE;
31848 : }
31849 0 : if (object->in.pszOperation == NULL) {
31850 0 : py_pszOperation = Py_None;
31851 0 : Py_INCREF(py_pszOperation);
31852 : } else {
31853 0 : if (object->in.pszOperation == NULL) {
31854 0 : py_pszOperation = Py_None;
31855 0 : Py_INCREF(py_pszOperation);
31856 : } else {
31857 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
31858 : }
31859 : }
31860 0 : return py_pszOperation;
31861 : }
31862 :
31863 0 : static int py_DnssrvOperation2_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
31864 : {
31865 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31866 0 : if (value == NULL) {
31867 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszOperation");
31868 0 : return -1;
31869 : }
31870 0 : if (value == Py_None) {
31871 0 : object->in.pszOperation = NULL;
31872 : } else {
31873 0 : object->in.pszOperation = NULL;
31874 : {
31875 0 : const char *test_str;
31876 0 : const char *talloc_str;
31877 0 : PyObject *unicode = NULL;
31878 0 : if (PyUnicode_Check(value)) {
31879 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
31880 0 : if (unicode == NULL) {
31881 0 : PyErr_NoMemory();
31882 0 : return -1;
31883 : }
31884 0 : test_str = PyBytes_AS_STRING(unicode);
31885 0 : } else if (PyBytes_Check(value)) {
31886 0 : test_str = PyBytes_AS_STRING(value);
31887 : } else {
31888 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
31889 0 : return -1;
31890 : }
31891 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
31892 0 : if (unicode != NULL) {
31893 0 : Py_DECREF(unicode);
31894 : }
31895 0 : if (talloc_str == NULL) {
31896 0 : PyErr_NoMemory();
31897 0 : return -1;
31898 : }
31899 0 : object->in.pszOperation = talloc_str;
31900 : }
31901 : }
31902 0 : return 0;
31903 : }
31904 :
31905 0 : static PyObject *py_DnssrvOperation2_in_get_dwTypeId(PyObject *obj, void *closure)
31906 : {
31907 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31908 0 : PyObject *py_dwTypeId;
31909 0 : py_dwTypeId = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwTypeId);
31910 0 : return py_dwTypeId;
31911 : }
31912 :
31913 0 : static int py_DnssrvOperation2_in_set_dwTypeId(PyObject *py_obj, PyObject *value, void *closure)
31914 : {
31915 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31916 0 : if (value == NULL) {
31917 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwTypeId");
31918 0 : return -1;
31919 : }
31920 : {
31921 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwTypeId));
31922 0 : if (PyLong_Check(value)) {
31923 0 : unsigned long long test_var;
31924 0 : test_var = PyLong_AsUnsignedLongLong(value);
31925 0 : if (PyErr_Occurred() != NULL) {
31926 0 : return -1;
31927 : }
31928 0 : if (test_var > uint_max) {
31929 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
31930 : PyLong_Type.tp_name, uint_max, test_var);
31931 0 : return -1;
31932 : }
31933 0 : object->in.dwTypeId = test_var;
31934 : } else {
31935 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
31936 : PyLong_Type.tp_name);
31937 0 : return -1;
31938 : }
31939 : }
31940 0 : return 0;
31941 : }
31942 :
31943 0 : static PyObject *py_DnssrvOperation2_in_get_pData(PyObject *obj, void *closure)
31944 : {
31945 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31946 0 : PyObject *py_pData;
31947 0 : py_pData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(obj), object->in.dwTypeId, &object->in.pData, "union DNSSRV_RPC_UNION");
31948 0 : if (py_pData == NULL) {
31949 0 : return NULL;
31950 : }
31951 0 : return py_pData;
31952 : }
31953 :
31954 0 : static int py_DnssrvOperation2_in_set_pData(PyObject *py_obj, PyObject *value, void *closure)
31955 : {
31956 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31957 0 : if (value == NULL) {
31958 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pData");
31959 0 : return -1;
31960 : }
31961 : {
31962 0 : union DNSSRV_RPC_UNION *pData_switch_0;
31963 0 : pData_switch_0 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(py_obj), object->in.dwTypeId, value, "union DNSSRV_RPC_UNION");
31964 0 : if (pData_switch_0 == NULL) {
31965 0 : return -1;
31966 : }
31967 0 : object->in.pData = *pData_switch_0;
31968 : }
31969 0 : return 0;
31970 : }
31971 :
31972 0 : static PyObject *py_DnssrvOperation2_get_result(PyObject *obj, void *closure)
31973 : {
31974 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(obj);
31975 0 : PyObject *py_result;
31976 0 : py_result = PyErr_FromWERROR(object->out.result);
31977 0 : return py_result;
31978 : }
31979 :
31980 0 : static int py_DnssrvOperation2_set_result(PyObject *py_obj, PyObject *value, void *closure)
31981 : {
31982 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
31983 0 : if (value == NULL) {
31984 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
31985 0 : return -1;
31986 : }
31987 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
31988 0 : return 0;
31989 : }
31990 :
31991 : static PyGetSetDef py_DnssrvOperation2_getsetters[] = {
31992 : {
31993 : .name = discard_const_p(char, "in_dwClientVersion"),
31994 : .get = py_DnssrvOperation2_in_get_dwClientVersion,
31995 : .set = py_DnssrvOperation2_in_set_dwClientVersion,
31996 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
31997 : },
31998 : {
31999 : .name = discard_const_p(char, "in_dwSettingFlags"),
32000 : .get = py_DnssrvOperation2_in_get_dwSettingFlags,
32001 : .set = py_DnssrvOperation2_in_set_dwSettingFlags,
32002 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
32003 : },
32004 : {
32005 : .name = discard_const_p(char, "in_pwszServerName"),
32006 : .get = py_DnssrvOperation2_in_get_pwszServerName,
32007 : .set = py_DnssrvOperation2_in_set_pwszServerName,
32008 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
32009 : },
32010 : {
32011 : .name = discard_const_p(char, "in_pszZone"),
32012 : .get = py_DnssrvOperation2_in_get_pszZone,
32013 : .set = py_DnssrvOperation2_in_set_pszZone,
32014 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
32015 : },
32016 : {
32017 : .name = discard_const_p(char, "in_dwContext"),
32018 : .get = py_DnssrvOperation2_in_get_dwContext,
32019 : .set = py_DnssrvOperation2_in_set_dwContext,
32020 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
32021 : },
32022 : {
32023 : .name = discard_const_p(char, "in_pszOperation"),
32024 : .get = py_DnssrvOperation2_in_get_pszOperation,
32025 : .set = py_DnssrvOperation2_in_set_pszOperation,
32026 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
32027 : },
32028 : {
32029 : .name = discard_const_p(char, "in_dwTypeId"),
32030 : .get = py_DnssrvOperation2_in_get_dwTypeId,
32031 : .set = py_DnssrvOperation2_in_set_dwTypeId,
32032 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
32033 : },
32034 : {
32035 : .name = discard_const_p(char, "in_pData"),
32036 : .get = py_DnssrvOperation2_in_get_pData,
32037 : .set = py_DnssrvOperation2_in_set_pData,
32038 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
32039 : },
32040 : {
32041 : .name = discard_const_p(char, "result"),
32042 : .get = py_DnssrvOperation2_get_result,
32043 : .set = py_DnssrvOperation2_set_result,
32044 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
32045 : },
32046 : { .name = NULL }
32047 : };
32048 :
32049 0 : static PyObject *py_DnssrvOperation2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32050 : {
32051 0 : PyObject *self = pytalloc_new(struct DnssrvOperation2, type);
32052 0 : return self;
32053 : }
32054 :
32055 0 : static PyObject *py_DnssrvOperation2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
32056 : {
32057 :
32058 :
32059 0 : return PyLong_FromLong(5);
32060 : }
32061 :
32062 0 : static PyObject *py_DnssrvOperation2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
32063 : {
32064 0 : const struct ndr_interface_call *call = NULL;
32065 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
32066 0 : PyObject *ret = NULL;
32067 0 : struct ndr_push *push = NULL;
32068 0 : DATA_BLOB blob;
32069 0 : enum ndr_err_code err;
32070 :
32071 0 : if (ndr_table_dnsserver.num_calls < 6) {
32072 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation2_ndr_pack");
32073 0 : return NULL;
32074 : }
32075 0 : call = &ndr_table_dnsserver.calls[5];
32076 :
32077 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
32078 0 : if (push == NULL) {
32079 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
32080 0 : return NULL;
32081 : }
32082 :
32083 0 : push->flags |= ndr_push_flags;
32084 :
32085 0 : err = call->ndr_push(push, ndr_inout_flags, object);
32086 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
32087 0 : TALLOC_FREE(push);
32088 0 : PyErr_SetNdrError(err);
32089 0 : return NULL;
32090 : }
32091 0 : blob = ndr_push_blob(push);
32092 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
32093 0 : TALLOC_FREE(push);
32094 0 : return ret;
32095 : }
32096 :
32097 0 : static PyObject *py_DnssrvOperation2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32098 : {
32099 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
32100 0 : PyObject *bigendian_obj = NULL;
32101 0 : PyObject *ndr64_obj = NULL;
32102 0 : libndr_flags ndr_push_flags = 0;
32103 :
32104 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
32105 : discard_const_p(char *, kwnames),
32106 : &bigendian_obj,
32107 : &ndr64_obj)) {
32108 0 : return NULL;
32109 : }
32110 :
32111 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32112 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
32113 : }
32114 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32115 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
32116 : }
32117 :
32118 0 : return py_DnssrvOperation2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
32119 : }
32120 :
32121 0 : static PyObject *py_DnssrvOperation2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32122 : {
32123 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
32124 0 : PyObject *bigendian_obj = NULL;
32125 0 : PyObject *ndr64_obj = NULL;
32126 0 : libndr_flags ndr_push_flags = 0;
32127 :
32128 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
32129 : discard_const_p(char *, kwnames),
32130 : &bigendian_obj,
32131 : &ndr64_obj)) {
32132 0 : return NULL;
32133 : }
32134 :
32135 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32136 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
32137 : }
32138 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32139 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
32140 : }
32141 :
32142 0 : return py_DnssrvOperation2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
32143 : }
32144 :
32145 0 : static PyObject *py_DnssrvOperation2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
32146 : {
32147 0 : const struct ndr_interface_call *call = NULL;
32148 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
32149 0 : struct ndr_pull *pull = NULL;
32150 0 : enum ndr_err_code err;
32151 :
32152 0 : if (ndr_table_dnsserver.num_calls < 6) {
32153 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation2_ndr_unpack");
32154 0 : return NULL;
32155 : }
32156 0 : call = &ndr_table_dnsserver.calls[5];
32157 :
32158 0 : pull = ndr_pull_init_blob(blob, object);
32159 0 : if (pull == NULL) {
32160 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
32161 0 : return NULL;
32162 : }
32163 :
32164 0 : pull->flags |= ndr_pull_flags;
32165 :
32166 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
32167 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
32168 0 : TALLOC_FREE(pull);
32169 0 : PyErr_SetNdrError(err);
32170 0 : return NULL;
32171 : }
32172 0 : if (!allow_remaining) {
32173 0 : uint32_t highest_ofs;
32174 :
32175 0 : if (pull->offset > pull->relative_highest_offset) {
32176 0 : highest_ofs = pull->offset;
32177 : } else {
32178 0 : highest_ofs = pull->relative_highest_offset;
32179 : }
32180 0 : if (highest_ofs < pull->data_size) {
32181 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
32182 : "not all bytes consumed ofs[%u] size[%u]",
32183 : highest_ofs, pull->data_size);
32184 0 : TALLOC_FREE(pull);
32185 0 : PyErr_SetNdrError(err);
32186 0 : return NULL;
32187 : }
32188 : }
32189 :
32190 0 : TALLOC_FREE(pull);
32191 0 : Py_RETURN_NONE;
32192 : }
32193 :
32194 0 : static PyObject *py_DnssrvOperation2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32195 : {
32196 0 : DATA_BLOB blob;
32197 0 : Py_ssize_t blob_length = 0;
32198 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
32199 0 : PyObject *bigendian_obj = NULL;
32200 0 : PyObject *ndr64_obj = NULL;
32201 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
32202 0 : PyObject *allow_remaining_obj = NULL;
32203 0 : bool allow_remaining = false;
32204 :
32205 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
32206 : discard_const_p(char *, kwnames),
32207 : &blob.data, &blob_length,
32208 : &bigendian_obj,
32209 : &ndr64_obj,
32210 : &allow_remaining_obj)) {
32211 0 : return NULL;
32212 : }
32213 0 : blob.length = blob_length;
32214 :
32215 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32216 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
32217 : }
32218 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32219 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
32220 : }
32221 :
32222 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
32223 0 : allow_remaining = true;
32224 : }
32225 :
32226 0 : return py_DnssrvOperation2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
32227 : }
32228 :
32229 0 : static PyObject *py_DnssrvOperation2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
32230 : {
32231 0 : DATA_BLOB blob;
32232 0 : Py_ssize_t blob_length = 0;
32233 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
32234 0 : PyObject *bigendian_obj = NULL;
32235 0 : PyObject *ndr64_obj = NULL;
32236 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
32237 0 : PyObject *allow_remaining_obj = NULL;
32238 0 : bool allow_remaining = false;
32239 :
32240 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
32241 : discard_const_p(char *, kwnames),
32242 : &blob.data, &blob_length,
32243 : &bigendian_obj,
32244 : &ndr64_obj,
32245 : &allow_remaining_obj)) {
32246 0 : return NULL;
32247 : }
32248 0 : blob.length = blob_length;
32249 :
32250 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
32251 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
32252 : }
32253 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
32254 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
32255 : }
32256 :
32257 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
32258 0 : allow_remaining = true;
32259 : }
32260 :
32261 0 : return py_DnssrvOperation2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
32262 : }
32263 :
32264 0 : static PyObject *py_DnssrvOperation2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
32265 : {
32266 0 : const struct ndr_interface_call *call = NULL;
32267 0 : struct DnssrvOperation2 *object = (struct DnssrvOperation2 *)pytalloc_get_ptr(py_obj);
32268 0 : PyObject *ret;
32269 0 : char *retstr;
32270 :
32271 0 : if (ndr_table_dnsserver.num_calls < 6) {
32272 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvOperation2_ndr_print");
32273 0 : return NULL;
32274 : }
32275 0 : call = &ndr_table_dnsserver.calls[5];
32276 :
32277 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
32278 0 : ret = PyUnicode_FromString(retstr);
32279 0 : TALLOC_FREE(retstr);
32280 :
32281 0 : return ret;
32282 : }
32283 :
32284 0 : static PyObject *py_DnssrvOperation2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
32285 : {
32286 0 : return py_DnssrvOperation2_ndr_print(py_obj, "DnssrvOperation2_in", NDR_IN);
32287 : }
32288 :
32289 0 : static PyObject *py_DnssrvOperation2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
32290 : {
32291 0 : return py_DnssrvOperation2_ndr_print(py_obj, "DnssrvOperation2_out", NDR_OUT);
32292 : }
32293 :
32294 : static PyMethodDef py_DnssrvOperation2_methods[] = {
32295 : { "opnum", (PyCFunction)py_DnssrvOperation2_ndr_opnum, METH_NOARGS|METH_CLASS,
32296 : "dnsserver.DnssrvOperation2.opnum() -> 5 (0x05) " },
32297 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
32298 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
32299 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
32300 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
32301 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
32302 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
32303 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvOperation2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
32304 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
32305 : { "__ndr_print_in__", (PyCFunction)py_DnssrvOperation2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
32306 : { "__ndr_print_out__", (PyCFunction)py_DnssrvOperation2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
32307 : { NULL, NULL, 0, NULL }
32308 : };
32309 :
32310 :
32311 : static PyTypeObject DnssrvOperation2_Type = {
32312 : PyVarObject_HEAD_INIT(NULL, 0)
32313 : .tp_name = "dnsserver.DnssrvOperation2",
32314 : .tp_getset = py_DnssrvOperation2_getsetters,
32315 : .tp_methods = py_DnssrvOperation2_methods,
32316 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
32317 : .tp_new = py_DnssrvOperation2_new,
32318 : };
32319 :
32320 1652 : static bool pack_py_DnssrvOperation2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvOperation2 *r)
32321 : {
32322 0 : PyObject *py_dwClientVersion;
32323 0 : PyObject *py_dwSettingFlags;
32324 0 : PyObject *py_pwszServerName;
32325 0 : PyObject *py_pszZone;
32326 0 : PyObject *py_dwContext;
32327 0 : PyObject *py_pszOperation;
32328 0 : PyObject *py_dwTypeId;
32329 0 : PyObject *py_pData;
32330 1652 : const char *kwnames[] = {
32331 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "dwContext", "pszOperation", "dwTypeId", "pData", NULL
32332 : };
32333 :
32334 1652 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:DnssrvOperation2", discard_const_p(char *, kwnames), &py_dwClientVersion, &py_dwSettingFlags, &py_pwszServerName, &py_pszZone, &py_dwContext, &py_pszOperation, &py_dwTypeId, &py_pData)) {
32335 0 : return false;
32336 : }
32337 :
32338 1652 : if (py_dwClientVersion == NULL) {
32339 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwClientVersion");
32340 0 : return false;
32341 : }
32342 : {
32343 1652 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
32344 1652 : if (PyLong_Check(py_dwClientVersion)) {
32345 0 : unsigned long long test_var;
32346 1652 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
32347 1652 : if (PyErr_Occurred() != NULL) {
32348 0 : return false;
32349 : }
32350 1652 : if (test_var > uint_max) {
32351 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32352 : PyLong_Type.tp_name, uint_max, test_var);
32353 0 : return false;
32354 : }
32355 1652 : r->in.dwClientVersion = test_var;
32356 : } else {
32357 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32358 : PyLong_Type.tp_name);
32359 0 : return false;
32360 : }
32361 : }
32362 1652 : if (py_dwSettingFlags == NULL) {
32363 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwSettingFlags");
32364 0 : return false;
32365 : }
32366 : {
32367 1652 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
32368 1652 : if (PyLong_Check(py_dwSettingFlags)) {
32369 0 : unsigned long long test_var;
32370 1652 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
32371 1652 : if (PyErr_Occurred() != NULL) {
32372 0 : return false;
32373 : }
32374 1652 : if (test_var > uint_max) {
32375 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32376 : PyLong_Type.tp_name, uint_max, test_var);
32377 0 : return false;
32378 : }
32379 1652 : r->in.dwSettingFlags = test_var;
32380 : } else {
32381 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32382 : PyLong_Type.tp_name);
32383 0 : return false;
32384 : }
32385 : }
32386 1652 : if (py_pwszServerName == NULL) {
32387 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
32388 0 : return false;
32389 : }
32390 1652 : if (py_pwszServerName == Py_None) {
32391 0 : r->in.pwszServerName = NULL;
32392 : } else {
32393 1652 : r->in.pwszServerName = NULL;
32394 : {
32395 0 : const char *test_str;
32396 0 : const char *talloc_str;
32397 1652 : PyObject *unicode = NULL;
32398 1652 : if (PyUnicode_Check(py_pwszServerName)) {
32399 1652 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
32400 1652 : if (unicode == NULL) {
32401 0 : PyErr_NoMemory();
32402 0 : return false;
32403 : }
32404 1652 : test_str = PyBytes_AS_STRING(unicode);
32405 0 : } else if (PyBytes_Check(py_pwszServerName)) {
32406 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
32407 : } else {
32408 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
32409 0 : return false;
32410 : }
32411 1652 : talloc_str = talloc_strdup(r, test_str);
32412 1652 : if (unicode != NULL) {
32413 1652 : Py_DECREF(unicode);
32414 : }
32415 1652 : if (talloc_str == NULL) {
32416 0 : PyErr_NoMemory();
32417 0 : return false;
32418 : }
32419 1652 : r->in.pwszServerName = talloc_str;
32420 : }
32421 : }
32422 1652 : if (py_pszZone == NULL) {
32423 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
32424 0 : return false;
32425 : }
32426 1652 : if (py_pszZone == Py_None) {
32427 429 : r->in.pszZone = NULL;
32428 : } else {
32429 1223 : r->in.pszZone = NULL;
32430 : {
32431 0 : const char *test_str;
32432 0 : const char *talloc_str;
32433 1223 : PyObject *unicode = NULL;
32434 1223 : if (PyUnicode_Check(py_pszZone)) {
32435 1223 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
32436 1223 : if (unicode == NULL) {
32437 0 : PyErr_NoMemory();
32438 0 : return false;
32439 : }
32440 1223 : test_str = PyBytes_AS_STRING(unicode);
32441 0 : } else if (PyBytes_Check(py_pszZone)) {
32442 0 : test_str = PyBytes_AS_STRING(py_pszZone);
32443 : } else {
32444 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
32445 0 : return false;
32446 : }
32447 1223 : talloc_str = talloc_strdup(r, test_str);
32448 1223 : if (unicode != NULL) {
32449 1223 : Py_DECREF(unicode);
32450 : }
32451 1223 : if (talloc_str == NULL) {
32452 0 : PyErr_NoMemory();
32453 0 : return false;
32454 : }
32455 1223 : r->in.pszZone = talloc_str;
32456 : }
32457 : }
32458 1652 : if (py_dwContext == NULL) {
32459 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwContext");
32460 0 : return false;
32461 : }
32462 : {
32463 1652 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwContext));
32464 1652 : if (PyLong_Check(py_dwContext)) {
32465 0 : unsigned long long test_var;
32466 1652 : test_var = PyLong_AsUnsignedLongLong(py_dwContext);
32467 1652 : if (PyErr_Occurred() != NULL) {
32468 0 : return false;
32469 : }
32470 1652 : if (test_var > uint_max) {
32471 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32472 : PyLong_Type.tp_name, uint_max, test_var);
32473 0 : return false;
32474 : }
32475 1652 : r->in.dwContext = test_var;
32476 : } else {
32477 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32478 : PyLong_Type.tp_name);
32479 0 : return false;
32480 : }
32481 : }
32482 1652 : if (py_pszOperation == NULL) {
32483 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszOperation");
32484 0 : return false;
32485 : }
32486 1652 : if (py_pszOperation == Py_None) {
32487 0 : r->in.pszOperation = NULL;
32488 : } else {
32489 1652 : r->in.pszOperation = NULL;
32490 : {
32491 0 : const char *test_str;
32492 0 : const char *talloc_str;
32493 1652 : PyObject *unicode = NULL;
32494 1652 : if (PyUnicode_Check(py_pszOperation)) {
32495 1652 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
32496 1652 : if (unicode == NULL) {
32497 0 : PyErr_NoMemory();
32498 0 : return false;
32499 : }
32500 1652 : test_str = PyBytes_AS_STRING(unicode);
32501 0 : } else if (PyBytes_Check(py_pszOperation)) {
32502 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
32503 : } else {
32504 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
32505 0 : return false;
32506 : }
32507 1652 : talloc_str = talloc_strdup(r, test_str);
32508 1652 : if (unicode != NULL) {
32509 1652 : Py_DECREF(unicode);
32510 : }
32511 1652 : if (talloc_str == NULL) {
32512 0 : PyErr_NoMemory();
32513 0 : return false;
32514 : }
32515 1652 : r->in.pszOperation = talloc_str;
32516 : }
32517 : }
32518 1652 : if (py_dwTypeId == NULL) {
32519 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwTypeId");
32520 0 : return false;
32521 : }
32522 : {
32523 1652 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwTypeId));
32524 1652 : if (PyLong_Check(py_dwTypeId)) {
32525 0 : unsigned long long test_var;
32526 1652 : test_var = PyLong_AsUnsignedLongLong(py_dwTypeId);
32527 1652 : if (PyErr_Occurred() != NULL) {
32528 0 : return false;
32529 : }
32530 1652 : if (test_var > uint_max) {
32531 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32532 : PyLong_Type.tp_name, uint_max, test_var);
32533 0 : return false;
32534 : }
32535 1652 : r->in.dwTypeId = test_var;
32536 : } else {
32537 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32538 : PyLong_Type.tp_name);
32539 0 : return false;
32540 : }
32541 : }
32542 1652 : if (py_pData == NULL) {
32543 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pData");
32544 0 : return false;
32545 : }
32546 : {
32547 0 : union DNSSRV_RPC_UNION *pData_switch_0;
32548 1652 : pData_switch_0 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, r, r->in.dwTypeId, py_pData, "union DNSSRV_RPC_UNION");
32549 1652 : if (pData_switch_0 == NULL) {
32550 0 : return false;
32551 : }
32552 1652 : r->in.pData = *pData_switch_0;
32553 : }
32554 1652 : return true;
32555 : }
32556 :
32557 1652 : static PyObject *unpack_py_DnssrvOperation2_args_out(struct DnssrvOperation2 *r)
32558 : {
32559 0 : PyObject *result;
32560 1652 : result = Py_None;
32561 1652 : Py_INCREF(result);
32562 1652 : if (!W_ERROR_IS_OK(r->out.result)) {
32563 53 : PyErr_SetWERROR(r->out.result);
32564 53 : return NULL;
32565 : }
32566 :
32567 1599 : return result;
32568 : }
32569 :
32570 :
32571 0 : static PyObject *py_DnssrvQuery2_in_get_dwClientVersion(PyObject *obj, void *closure)
32572 : {
32573 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(obj);
32574 0 : PyObject *py_dwClientVersion;
32575 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwClientVersion);
32576 0 : return py_dwClientVersion;
32577 : }
32578 :
32579 0 : static int py_DnssrvQuery2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
32580 : {
32581 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
32582 0 : if (value == NULL) {
32583 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwClientVersion");
32584 0 : return -1;
32585 : }
32586 : {
32587 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
32588 0 : if (PyLong_Check(value)) {
32589 0 : unsigned long long test_var;
32590 0 : test_var = PyLong_AsUnsignedLongLong(value);
32591 0 : if (PyErr_Occurred() != NULL) {
32592 0 : return -1;
32593 : }
32594 0 : if (test_var > uint_max) {
32595 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32596 : PyLong_Type.tp_name, uint_max, test_var);
32597 0 : return -1;
32598 : }
32599 0 : object->in.dwClientVersion = test_var;
32600 : } else {
32601 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32602 : PyLong_Type.tp_name);
32603 0 : return -1;
32604 : }
32605 : }
32606 0 : return 0;
32607 : }
32608 :
32609 0 : static PyObject *py_DnssrvQuery2_in_get_dwSettingFlags(PyObject *obj, void *closure)
32610 : {
32611 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(obj);
32612 0 : PyObject *py_dwSettingFlags;
32613 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwSettingFlags);
32614 0 : return py_dwSettingFlags;
32615 : }
32616 :
32617 0 : static int py_DnssrvQuery2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
32618 : {
32619 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
32620 0 : if (value == NULL) {
32621 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwSettingFlags");
32622 0 : return -1;
32623 : }
32624 : {
32625 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
32626 0 : if (PyLong_Check(value)) {
32627 0 : unsigned long long test_var;
32628 0 : test_var = PyLong_AsUnsignedLongLong(value);
32629 0 : if (PyErr_Occurred() != NULL) {
32630 0 : return -1;
32631 : }
32632 0 : if (test_var > uint_max) {
32633 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32634 : PyLong_Type.tp_name, uint_max, test_var);
32635 0 : return -1;
32636 : }
32637 0 : object->in.dwSettingFlags = test_var;
32638 : } else {
32639 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32640 : PyLong_Type.tp_name);
32641 0 : return -1;
32642 : }
32643 : }
32644 0 : return 0;
32645 : }
32646 :
32647 0 : static PyObject *py_DnssrvQuery2_in_get_pwszServerName(PyObject *obj, void *closure)
32648 : {
32649 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(obj);
32650 0 : PyObject *py_pwszServerName;
32651 0 : if (object->in.pwszServerName == NULL) {
32652 0 : Py_RETURN_NONE;
32653 : }
32654 0 : if (object->in.pwszServerName == NULL) {
32655 0 : py_pwszServerName = Py_None;
32656 0 : Py_INCREF(py_pwszServerName);
32657 : } else {
32658 0 : if (object->in.pwszServerName == NULL) {
32659 0 : py_pwszServerName = Py_None;
32660 0 : Py_INCREF(py_pwszServerName);
32661 : } else {
32662 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
32663 : }
32664 : }
32665 0 : return py_pwszServerName;
32666 : }
32667 :
32668 0 : static int py_DnssrvQuery2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
32669 : {
32670 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
32671 0 : if (value == NULL) {
32672 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
32673 0 : return -1;
32674 : }
32675 0 : if (value == Py_None) {
32676 0 : object->in.pwszServerName = NULL;
32677 : } else {
32678 0 : object->in.pwszServerName = NULL;
32679 : {
32680 0 : const char *test_str;
32681 0 : const char *talloc_str;
32682 0 : PyObject *unicode = NULL;
32683 0 : if (PyUnicode_Check(value)) {
32684 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
32685 0 : if (unicode == NULL) {
32686 0 : PyErr_NoMemory();
32687 0 : return -1;
32688 : }
32689 0 : test_str = PyBytes_AS_STRING(unicode);
32690 0 : } else if (PyBytes_Check(value)) {
32691 0 : test_str = PyBytes_AS_STRING(value);
32692 : } else {
32693 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
32694 0 : return -1;
32695 : }
32696 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
32697 0 : if (unicode != NULL) {
32698 0 : Py_DECREF(unicode);
32699 : }
32700 0 : if (talloc_str == NULL) {
32701 0 : PyErr_NoMemory();
32702 0 : return -1;
32703 : }
32704 0 : object->in.pwszServerName = talloc_str;
32705 : }
32706 : }
32707 0 : return 0;
32708 : }
32709 :
32710 0 : static PyObject *py_DnssrvQuery2_in_get_pszZone(PyObject *obj, void *closure)
32711 : {
32712 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(obj);
32713 0 : PyObject *py_pszZone;
32714 0 : if (object->in.pszZone == NULL) {
32715 0 : Py_RETURN_NONE;
32716 : }
32717 0 : if (object->in.pszZone == NULL) {
32718 0 : py_pszZone = Py_None;
32719 0 : Py_INCREF(py_pszZone);
32720 : } else {
32721 0 : if (object->in.pszZone == NULL) {
32722 0 : py_pszZone = Py_None;
32723 0 : Py_INCREF(py_pszZone);
32724 : } else {
32725 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
32726 : }
32727 : }
32728 0 : return py_pszZone;
32729 : }
32730 :
32731 0 : static int py_DnssrvQuery2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
32732 : {
32733 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
32734 0 : if (value == NULL) {
32735 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
32736 0 : return -1;
32737 : }
32738 0 : if (value == Py_None) {
32739 0 : object->in.pszZone = NULL;
32740 : } else {
32741 0 : object->in.pszZone = NULL;
32742 : {
32743 0 : const char *test_str;
32744 0 : const char *talloc_str;
32745 0 : PyObject *unicode = NULL;
32746 0 : if (PyUnicode_Check(value)) {
32747 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
32748 0 : if (unicode == NULL) {
32749 0 : PyErr_NoMemory();
32750 0 : return -1;
32751 : }
32752 0 : test_str = PyBytes_AS_STRING(unicode);
32753 0 : } else if (PyBytes_Check(value)) {
32754 0 : test_str = PyBytes_AS_STRING(value);
32755 : } else {
32756 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
32757 0 : return -1;
32758 : }
32759 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
32760 0 : if (unicode != NULL) {
32761 0 : Py_DECREF(unicode);
32762 : }
32763 0 : if (talloc_str == NULL) {
32764 0 : PyErr_NoMemory();
32765 0 : return -1;
32766 : }
32767 0 : object->in.pszZone = talloc_str;
32768 : }
32769 : }
32770 0 : return 0;
32771 : }
32772 :
32773 0 : static PyObject *py_DnssrvQuery2_in_get_pszOperation(PyObject *obj, void *closure)
32774 : {
32775 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(obj);
32776 0 : PyObject *py_pszOperation;
32777 0 : if (object->in.pszOperation == NULL) {
32778 0 : Py_RETURN_NONE;
32779 : }
32780 0 : if (object->in.pszOperation == NULL) {
32781 0 : py_pszOperation = Py_None;
32782 0 : Py_INCREF(py_pszOperation);
32783 : } else {
32784 0 : if (object->in.pszOperation == NULL) {
32785 0 : py_pszOperation = Py_None;
32786 0 : Py_INCREF(py_pszOperation);
32787 : } else {
32788 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
32789 : }
32790 : }
32791 0 : return py_pszOperation;
32792 : }
32793 :
32794 0 : static int py_DnssrvQuery2_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
32795 : {
32796 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
32797 0 : if (value == NULL) {
32798 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszOperation");
32799 0 : return -1;
32800 : }
32801 0 : if (value == Py_None) {
32802 0 : object->in.pszOperation = NULL;
32803 : } else {
32804 0 : object->in.pszOperation = NULL;
32805 : {
32806 0 : const char *test_str;
32807 0 : const char *talloc_str;
32808 0 : PyObject *unicode = NULL;
32809 0 : if (PyUnicode_Check(value)) {
32810 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
32811 0 : if (unicode == NULL) {
32812 0 : PyErr_NoMemory();
32813 0 : return -1;
32814 : }
32815 0 : test_str = PyBytes_AS_STRING(unicode);
32816 0 : } else if (PyBytes_Check(value)) {
32817 0 : test_str = PyBytes_AS_STRING(value);
32818 : } else {
32819 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
32820 0 : return -1;
32821 : }
32822 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
32823 0 : if (unicode != NULL) {
32824 0 : Py_DECREF(unicode);
32825 : }
32826 0 : if (talloc_str == NULL) {
32827 0 : PyErr_NoMemory();
32828 0 : return -1;
32829 : }
32830 0 : object->in.pszOperation = talloc_str;
32831 : }
32832 : }
32833 0 : return 0;
32834 : }
32835 :
32836 0 : static PyObject *py_DnssrvQuery2_out_get_pdwTypeId(PyObject *obj, void *closure)
32837 : {
32838 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(obj);
32839 0 : PyObject *py_pdwTypeId;
32840 0 : if (object->out.pdwTypeId == NULL) {
32841 0 : Py_RETURN_NONE;
32842 : }
32843 0 : py_pdwTypeId = PyLong_FromUnsignedLongLong((uint32_t)*object->out.pdwTypeId);
32844 0 : return py_pdwTypeId;
32845 : }
32846 :
32847 0 : static int py_DnssrvQuery2_out_set_pdwTypeId(PyObject *py_obj, PyObject *value, void *closure)
32848 : {
32849 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
32850 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwTypeId));
32851 0 : if (value == NULL) {
32852 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pdwTypeId");
32853 0 : return -1;
32854 : }
32855 0 : object->out.pdwTypeId = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwTypeId);
32856 0 : if (object->out.pdwTypeId == NULL) {
32857 0 : PyErr_NoMemory();
32858 0 : return -1;
32859 : }
32860 : {
32861 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwTypeId));
32862 0 : if (PyLong_Check(value)) {
32863 0 : unsigned long long test_var;
32864 0 : test_var = PyLong_AsUnsignedLongLong(value);
32865 0 : if (PyErr_Occurred() != NULL) {
32866 0 : return -1;
32867 : }
32868 0 : if (test_var > uint_max) {
32869 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
32870 : PyLong_Type.tp_name, uint_max, test_var);
32871 0 : return -1;
32872 : }
32873 0 : *object->out.pdwTypeId = test_var;
32874 : } else {
32875 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
32876 : PyLong_Type.tp_name);
32877 0 : return -1;
32878 : }
32879 : }
32880 0 : return 0;
32881 : }
32882 :
32883 0 : static PyObject *py_DnssrvQuery2_out_get_ppData(PyObject *obj, void *closure)
32884 : {
32885 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(obj);
32886 0 : PyObject *py_ppData;
32887 0 : if (object->out.ppData == NULL) {
32888 0 : Py_RETURN_NONE;
32889 : }
32890 0 : py_ppData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, object->out.ppData, *object->out.pdwTypeId, object->out.ppData, "union DNSSRV_RPC_UNION");
32891 0 : if (py_ppData == NULL) {
32892 0 : return NULL;
32893 : }
32894 0 : return py_ppData;
32895 : }
32896 :
32897 0 : static int py_DnssrvQuery2_out_set_ppData(PyObject *py_obj, PyObject *value, void *closure)
32898 : {
32899 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
32900 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ppData));
32901 0 : if (value == NULL) {
32902 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ppData");
32903 0 : return -1;
32904 : }
32905 0 : object->out.ppData = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ppData);
32906 0 : if (object->out.ppData == NULL) {
32907 0 : PyErr_NoMemory();
32908 0 : return -1;
32909 : }
32910 : {
32911 0 : union DNSSRV_RPC_UNION *ppData_switch_1;
32912 0 : ppData_switch_1 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(py_obj), *object->out.pdwTypeId, value, "union DNSSRV_RPC_UNION");
32913 0 : if (ppData_switch_1 == NULL) {
32914 0 : return -1;
32915 : }
32916 0 : object->out.ppData = ppData_switch_1;
32917 : }
32918 0 : return 0;
32919 : }
32920 :
32921 0 : static PyObject *py_DnssrvQuery2_get_result(PyObject *obj, void *closure)
32922 : {
32923 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(obj);
32924 0 : PyObject *py_result;
32925 0 : py_result = PyErr_FromWERROR(object->out.result);
32926 0 : return py_result;
32927 : }
32928 :
32929 0 : static int py_DnssrvQuery2_set_result(PyObject *py_obj, PyObject *value, void *closure)
32930 : {
32931 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
32932 0 : if (value == NULL) {
32933 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
32934 0 : return -1;
32935 : }
32936 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
32937 0 : return 0;
32938 : }
32939 :
32940 : static PyGetSetDef py_DnssrvQuery2_getsetters[] = {
32941 : {
32942 : .name = discard_const_p(char, "in_dwClientVersion"),
32943 : .get = py_DnssrvQuery2_in_get_dwClientVersion,
32944 : .set = py_DnssrvQuery2_in_set_dwClientVersion,
32945 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
32946 : },
32947 : {
32948 : .name = discard_const_p(char, "in_dwSettingFlags"),
32949 : .get = py_DnssrvQuery2_in_get_dwSettingFlags,
32950 : .set = py_DnssrvQuery2_in_set_dwSettingFlags,
32951 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
32952 : },
32953 : {
32954 : .name = discard_const_p(char, "in_pwszServerName"),
32955 : .get = py_DnssrvQuery2_in_get_pwszServerName,
32956 : .set = py_DnssrvQuery2_in_set_pwszServerName,
32957 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
32958 : },
32959 : {
32960 : .name = discard_const_p(char, "in_pszZone"),
32961 : .get = py_DnssrvQuery2_in_get_pszZone,
32962 : .set = py_DnssrvQuery2_in_set_pszZone,
32963 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
32964 : },
32965 : {
32966 : .name = discard_const_p(char, "in_pszOperation"),
32967 : .get = py_DnssrvQuery2_in_get_pszOperation,
32968 : .set = py_DnssrvQuery2_in_set_pszOperation,
32969 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
32970 : },
32971 : {
32972 : .name = discard_const_p(char, "out_pdwTypeId"),
32973 : .get = py_DnssrvQuery2_out_get_pdwTypeId,
32974 : .set = py_DnssrvQuery2_out_set_pdwTypeId,
32975 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
32976 : },
32977 : {
32978 : .name = discard_const_p(char, "out_ppData"),
32979 : .get = py_DnssrvQuery2_out_get_ppData,
32980 : .set = py_DnssrvQuery2_out_set_ppData,
32981 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
32982 : },
32983 : {
32984 : .name = discard_const_p(char, "result"),
32985 : .get = py_DnssrvQuery2_get_result,
32986 : .set = py_DnssrvQuery2_set_result,
32987 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
32988 : },
32989 : { .name = NULL }
32990 : };
32991 :
32992 0 : static PyObject *py_DnssrvQuery2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
32993 : {
32994 0 : PyObject *self = pytalloc_new(struct DnssrvQuery2, type);
32995 0 : struct DnssrvQuery2 *_self = (struct DnssrvQuery2 *)pytalloc_get_ptr(self);
32996 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
32997 0 : _self->out.pdwTypeId = talloc_zero(mem_ctx, enum DNS_RPC_TYPEID);
32998 0 : _self->out.ppData = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
32999 0 : return self;
33000 : }
33001 :
33002 0 : static PyObject *py_DnssrvQuery2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
33003 : {
33004 :
33005 :
33006 0 : return PyLong_FromLong(6);
33007 : }
33008 :
33009 0 : static PyObject *py_DnssrvQuery2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
33010 : {
33011 0 : const struct ndr_interface_call *call = NULL;
33012 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
33013 0 : PyObject *ret = NULL;
33014 0 : struct ndr_push *push = NULL;
33015 0 : DATA_BLOB blob;
33016 0 : enum ndr_err_code err;
33017 :
33018 0 : if (ndr_table_dnsserver.num_calls < 7) {
33019 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery2_ndr_pack");
33020 0 : return NULL;
33021 : }
33022 0 : call = &ndr_table_dnsserver.calls[6];
33023 :
33024 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
33025 0 : if (push == NULL) {
33026 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
33027 0 : return NULL;
33028 : }
33029 :
33030 0 : push->flags |= ndr_push_flags;
33031 :
33032 0 : err = call->ndr_push(push, ndr_inout_flags, object);
33033 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
33034 0 : TALLOC_FREE(push);
33035 0 : PyErr_SetNdrError(err);
33036 0 : return NULL;
33037 : }
33038 0 : blob = ndr_push_blob(push);
33039 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
33040 0 : TALLOC_FREE(push);
33041 0 : return ret;
33042 : }
33043 :
33044 0 : static PyObject *py_DnssrvQuery2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33045 : {
33046 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
33047 0 : PyObject *bigendian_obj = NULL;
33048 0 : PyObject *ndr64_obj = NULL;
33049 0 : libndr_flags ndr_push_flags = 0;
33050 :
33051 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
33052 : discard_const_p(char *, kwnames),
33053 : &bigendian_obj,
33054 : &ndr64_obj)) {
33055 0 : return NULL;
33056 : }
33057 :
33058 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
33059 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
33060 : }
33061 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
33062 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
33063 : }
33064 :
33065 0 : return py_DnssrvQuery2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
33066 : }
33067 :
33068 0 : static PyObject *py_DnssrvQuery2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33069 : {
33070 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
33071 0 : PyObject *bigendian_obj = NULL;
33072 0 : PyObject *ndr64_obj = NULL;
33073 0 : libndr_flags ndr_push_flags = 0;
33074 :
33075 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
33076 : discard_const_p(char *, kwnames),
33077 : &bigendian_obj,
33078 : &ndr64_obj)) {
33079 0 : return NULL;
33080 : }
33081 :
33082 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
33083 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
33084 : }
33085 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
33086 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
33087 : }
33088 :
33089 0 : return py_DnssrvQuery2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
33090 : }
33091 :
33092 0 : static PyObject *py_DnssrvQuery2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
33093 : {
33094 0 : const struct ndr_interface_call *call = NULL;
33095 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
33096 0 : struct ndr_pull *pull = NULL;
33097 0 : enum ndr_err_code err;
33098 :
33099 0 : if (ndr_table_dnsserver.num_calls < 7) {
33100 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery2_ndr_unpack");
33101 0 : return NULL;
33102 : }
33103 0 : call = &ndr_table_dnsserver.calls[6];
33104 :
33105 0 : pull = ndr_pull_init_blob(blob, object);
33106 0 : if (pull == NULL) {
33107 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
33108 0 : return NULL;
33109 : }
33110 :
33111 0 : pull->flags |= ndr_pull_flags;
33112 :
33113 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
33114 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
33115 0 : TALLOC_FREE(pull);
33116 0 : PyErr_SetNdrError(err);
33117 0 : return NULL;
33118 : }
33119 0 : if (!allow_remaining) {
33120 0 : uint32_t highest_ofs;
33121 :
33122 0 : if (pull->offset > pull->relative_highest_offset) {
33123 0 : highest_ofs = pull->offset;
33124 : } else {
33125 0 : highest_ofs = pull->relative_highest_offset;
33126 : }
33127 0 : if (highest_ofs < pull->data_size) {
33128 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
33129 : "not all bytes consumed ofs[%u] size[%u]",
33130 : highest_ofs, pull->data_size);
33131 0 : TALLOC_FREE(pull);
33132 0 : PyErr_SetNdrError(err);
33133 0 : return NULL;
33134 : }
33135 : }
33136 :
33137 0 : TALLOC_FREE(pull);
33138 0 : Py_RETURN_NONE;
33139 : }
33140 :
33141 0 : static PyObject *py_DnssrvQuery2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33142 : {
33143 0 : DATA_BLOB blob;
33144 0 : Py_ssize_t blob_length = 0;
33145 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
33146 0 : PyObject *bigendian_obj = NULL;
33147 0 : PyObject *ndr64_obj = NULL;
33148 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
33149 0 : PyObject *allow_remaining_obj = NULL;
33150 0 : bool allow_remaining = false;
33151 :
33152 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
33153 : discard_const_p(char *, kwnames),
33154 : &blob.data, &blob_length,
33155 : &bigendian_obj,
33156 : &ndr64_obj,
33157 : &allow_remaining_obj)) {
33158 0 : return NULL;
33159 : }
33160 0 : blob.length = blob_length;
33161 :
33162 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
33163 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
33164 : }
33165 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
33166 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
33167 : }
33168 :
33169 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
33170 0 : allow_remaining = true;
33171 : }
33172 :
33173 0 : return py_DnssrvQuery2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
33174 : }
33175 :
33176 0 : static PyObject *py_DnssrvQuery2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
33177 : {
33178 0 : DATA_BLOB blob;
33179 0 : Py_ssize_t blob_length = 0;
33180 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
33181 0 : PyObject *bigendian_obj = NULL;
33182 0 : PyObject *ndr64_obj = NULL;
33183 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
33184 0 : PyObject *allow_remaining_obj = NULL;
33185 0 : bool allow_remaining = false;
33186 :
33187 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
33188 : discard_const_p(char *, kwnames),
33189 : &blob.data, &blob_length,
33190 : &bigendian_obj,
33191 : &ndr64_obj,
33192 : &allow_remaining_obj)) {
33193 0 : return NULL;
33194 : }
33195 0 : blob.length = blob_length;
33196 :
33197 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
33198 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
33199 : }
33200 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
33201 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
33202 : }
33203 :
33204 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
33205 0 : allow_remaining = true;
33206 : }
33207 :
33208 0 : return py_DnssrvQuery2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
33209 : }
33210 :
33211 0 : static PyObject *py_DnssrvQuery2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
33212 : {
33213 0 : const struct ndr_interface_call *call = NULL;
33214 0 : struct DnssrvQuery2 *object = (struct DnssrvQuery2 *)pytalloc_get_ptr(py_obj);
33215 0 : PyObject *ret;
33216 0 : char *retstr;
33217 :
33218 0 : if (ndr_table_dnsserver.num_calls < 7) {
33219 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvQuery2_ndr_print");
33220 0 : return NULL;
33221 : }
33222 0 : call = &ndr_table_dnsserver.calls[6];
33223 :
33224 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
33225 0 : ret = PyUnicode_FromString(retstr);
33226 0 : TALLOC_FREE(retstr);
33227 :
33228 0 : return ret;
33229 : }
33230 :
33231 0 : static PyObject *py_DnssrvQuery2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
33232 : {
33233 0 : return py_DnssrvQuery2_ndr_print(py_obj, "DnssrvQuery2_in", NDR_IN);
33234 : }
33235 :
33236 0 : static PyObject *py_DnssrvQuery2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
33237 : {
33238 0 : return py_DnssrvQuery2_ndr_print(py_obj, "DnssrvQuery2_out", NDR_OUT);
33239 : }
33240 :
33241 : static PyMethodDef py_DnssrvQuery2_methods[] = {
33242 : { "opnum", (PyCFunction)py_DnssrvQuery2_ndr_opnum, METH_NOARGS|METH_CLASS,
33243 : "dnsserver.DnssrvQuery2.opnum() -> 6 (0x06) " },
33244 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
33245 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
33246 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
33247 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
33248 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
33249 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
33250 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvQuery2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
33251 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
33252 : { "__ndr_print_in__", (PyCFunction)py_DnssrvQuery2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
33253 : { "__ndr_print_out__", (PyCFunction)py_DnssrvQuery2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
33254 : { NULL, NULL, 0, NULL }
33255 : };
33256 :
33257 :
33258 : static PyTypeObject DnssrvQuery2_Type = {
33259 : PyVarObject_HEAD_INIT(NULL, 0)
33260 : .tp_name = "dnsserver.DnssrvQuery2",
33261 : .tp_getset = py_DnssrvQuery2_getsetters,
33262 : .tp_methods = py_DnssrvQuery2_methods,
33263 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
33264 : .tp_new = py_DnssrvQuery2_new,
33265 : };
33266 :
33267 29 : static bool pack_py_DnssrvQuery2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvQuery2 *r)
33268 : {
33269 0 : PyObject *py_dwClientVersion;
33270 0 : PyObject *py_dwSettingFlags;
33271 0 : PyObject *py_pwszServerName;
33272 0 : PyObject *py_pszZone;
33273 0 : PyObject *py_pszOperation;
33274 29 : const char *kwnames[] = {
33275 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszOperation", NULL
33276 : };
33277 :
33278 29 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:DnssrvQuery2", discard_const_p(char *, kwnames), &py_dwClientVersion, &py_dwSettingFlags, &py_pwszServerName, &py_pszZone, &py_pszOperation)) {
33279 0 : return false;
33280 : }
33281 :
33282 29 : if (py_dwClientVersion == NULL) {
33283 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwClientVersion");
33284 0 : return false;
33285 : }
33286 : {
33287 29 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
33288 29 : if (PyLong_Check(py_dwClientVersion)) {
33289 0 : unsigned long long test_var;
33290 29 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
33291 29 : if (PyErr_Occurred() != NULL) {
33292 0 : return false;
33293 : }
33294 29 : if (test_var > uint_max) {
33295 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33296 : PyLong_Type.tp_name, uint_max, test_var);
33297 0 : return false;
33298 : }
33299 29 : r->in.dwClientVersion = test_var;
33300 : } else {
33301 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33302 : PyLong_Type.tp_name);
33303 0 : return false;
33304 : }
33305 : }
33306 29 : if (py_dwSettingFlags == NULL) {
33307 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwSettingFlags");
33308 0 : return false;
33309 : }
33310 : {
33311 29 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
33312 29 : if (PyLong_Check(py_dwSettingFlags)) {
33313 0 : unsigned long long test_var;
33314 29 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
33315 29 : if (PyErr_Occurred() != NULL) {
33316 0 : return false;
33317 : }
33318 29 : if (test_var > uint_max) {
33319 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33320 : PyLong_Type.tp_name, uint_max, test_var);
33321 0 : return false;
33322 : }
33323 29 : r->in.dwSettingFlags = test_var;
33324 : } else {
33325 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33326 : PyLong_Type.tp_name);
33327 0 : return false;
33328 : }
33329 : }
33330 29 : if (py_pwszServerName == NULL) {
33331 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
33332 0 : return false;
33333 : }
33334 29 : if (py_pwszServerName == Py_None) {
33335 0 : r->in.pwszServerName = NULL;
33336 : } else {
33337 29 : r->in.pwszServerName = NULL;
33338 : {
33339 0 : const char *test_str;
33340 0 : const char *talloc_str;
33341 29 : PyObject *unicode = NULL;
33342 29 : if (PyUnicode_Check(py_pwszServerName)) {
33343 29 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
33344 29 : if (unicode == NULL) {
33345 0 : PyErr_NoMemory();
33346 0 : return false;
33347 : }
33348 29 : test_str = PyBytes_AS_STRING(unicode);
33349 0 : } else if (PyBytes_Check(py_pwszServerName)) {
33350 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
33351 : } else {
33352 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
33353 0 : return false;
33354 : }
33355 29 : talloc_str = talloc_strdup(r, test_str);
33356 29 : if (unicode != NULL) {
33357 29 : Py_DECREF(unicode);
33358 : }
33359 29 : if (talloc_str == NULL) {
33360 0 : PyErr_NoMemory();
33361 0 : return false;
33362 : }
33363 29 : r->in.pwszServerName = talloc_str;
33364 : }
33365 : }
33366 29 : if (py_pszZone == NULL) {
33367 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
33368 0 : return false;
33369 : }
33370 29 : if (py_pszZone == Py_None) {
33371 12 : r->in.pszZone = NULL;
33372 : } else {
33373 17 : r->in.pszZone = NULL;
33374 : {
33375 0 : const char *test_str;
33376 0 : const char *talloc_str;
33377 17 : PyObject *unicode = NULL;
33378 17 : if (PyUnicode_Check(py_pszZone)) {
33379 17 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
33380 17 : if (unicode == NULL) {
33381 0 : PyErr_NoMemory();
33382 0 : return false;
33383 : }
33384 17 : test_str = PyBytes_AS_STRING(unicode);
33385 0 : } else if (PyBytes_Check(py_pszZone)) {
33386 0 : test_str = PyBytes_AS_STRING(py_pszZone);
33387 : } else {
33388 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
33389 0 : return false;
33390 : }
33391 17 : talloc_str = talloc_strdup(r, test_str);
33392 17 : if (unicode != NULL) {
33393 17 : Py_DECREF(unicode);
33394 : }
33395 17 : if (talloc_str == NULL) {
33396 0 : PyErr_NoMemory();
33397 0 : return false;
33398 : }
33399 17 : r->in.pszZone = talloc_str;
33400 : }
33401 : }
33402 29 : if (py_pszOperation == NULL) {
33403 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszOperation");
33404 0 : return false;
33405 : }
33406 29 : if (py_pszOperation == Py_None) {
33407 0 : r->in.pszOperation = NULL;
33408 : } else {
33409 29 : r->in.pszOperation = NULL;
33410 : {
33411 0 : const char *test_str;
33412 0 : const char *talloc_str;
33413 29 : PyObject *unicode = NULL;
33414 29 : if (PyUnicode_Check(py_pszOperation)) {
33415 29 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
33416 29 : if (unicode == NULL) {
33417 0 : PyErr_NoMemory();
33418 0 : return false;
33419 : }
33420 29 : test_str = PyBytes_AS_STRING(unicode);
33421 0 : } else if (PyBytes_Check(py_pszOperation)) {
33422 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
33423 : } else {
33424 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
33425 0 : return false;
33426 : }
33427 29 : talloc_str = talloc_strdup(r, test_str);
33428 29 : if (unicode != NULL) {
33429 29 : Py_DECREF(unicode);
33430 : }
33431 29 : if (talloc_str == NULL) {
33432 0 : PyErr_NoMemory();
33433 0 : return false;
33434 : }
33435 29 : r->in.pszOperation = talloc_str;
33436 : }
33437 : }
33438 29 : return true;
33439 : }
33440 :
33441 29 : static PyObject *unpack_py_DnssrvQuery2_args_out(struct DnssrvQuery2 *r)
33442 : {
33443 0 : PyObject *result;
33444 0 : PyObject *py_pdwTypeId;
33445 0 : PyObject *py_ppData;
33446 29 : result = PyTuple_New(2);
33447 29 : py_pdwTypeId = PyLong_FromUnsignedLongLong((uint32_t)*r->out.pdwTypeId);
33448 29 : PyTuple_SetItem(result, 0, py_pdwTypeId);
33449 29 : py_ppData = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, r->out.ppData, *r->out.pdwTypeId, r->out.ppData, "union DNSSRV_RPC_UNION");
33450 29 : if (py_ppData == NULL) {
33451 0 : return NULL;
33452 : }
33453 29 : PyTuple_SetItem(result, 1, py_ppData);
33454 29 : if (!W_ERROR_IS_OK(r->out.result)) {
33455 0 : PyErr_SetWERROR(r->out.result);
33456 0 : return NULL;
33457 : }
33458 :
33459 29 : return result;
33460 : }
33461 :
33462 :
33463 0 : static PyObject *py_DnssrvComplexOperation2_in_get_dwClientVersion(PyObject *obj, void *closure)
33464 : {
33465 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33466 0 : PyObject *py_dwClientVersion;
33467 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwClientVersion);
33468 0 : return py_dwClientVersion;
33469 : }
33470 :
33471 0 : static int py_DnssrvComplexOperation2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
33472 : {
33473 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33474 0 : if (value == NULL) {
33475 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwClientVersion");
33476 0 : return -1;
33477 : }
33478 : {
33479 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
33480 0 : if (PyLong_Check(value)) {
33481 0 : unsigned long long test_var;
33482 0 : test_var = PyLong_AsUnsignedLongLong(value);
33483 0 : if (PyErr_Occurred() != NULL) {
33484 0 : return -1;
33485 : }
33486 0 : if (test_var > uint_max) {
33487 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33488 : PyLong_Type.tp_name, uint_max, test_var);
33489 0 : return -1;
33490 : }
33491 0 : object->in.dwClientVersion = test_var;
33492 : } else {
33493 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33494 : PyLong_Type.tp_name);
33495 0 : return -1;
33496 : }
33497 : }
33498 0 : return 0;
33499 : }
33500 :
33501 0 : static PyObject *py_DnssrvComplexOperation2_in_get_dwSettingFlags(PyObject *obj, void *closure)
33502 : {
33503 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33504 0 : PyObject *py_dwSettingFlags;
33505 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwSettingFlags);
33506 0 : return py_dwSettingFlags;
33507 : }
33508 :
33509 0 : static int py_DnssrvComplexOperation2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
33510 : {
33511 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33512 0 : if (value == NULL) {
33513 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwSettingFlags");
33514 0 : return -1;
33515 : }
33516 : {
33517 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
33518 0 : if (PyLong_Check(value)) {
33519 0 : unsigned long long test_var;
33520 0 : test_var = PyLong_AsUnsignedLongLong(value);
33521 0 : if (PyErr_Occurred() != NULL) {
33522 0 : return -1;
33523 : }
33524 0 : if (test_var > uint_max) {
33525 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33526 : PyLong_Type.tp_name, uint_max, test_var);
33527 0 : return -1;
33528 : }
33529 0 : object->in.dwSettingFlags = test_var;
33530 : } else {
33531 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33532 : PyLong_Type.tp_name);
33533 0 : return -1;
33534 : }
33535 : }
33536 0 : return 0;
33537 : }
33538 :
33539 0 : static PyObject *py_DnssrvComplexOperation2_in_get_pwszServerName(PyObject *obj, void *closure)
33540 : {
33541 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33542 0 : PyObject *py_pwszServerName;
33543 0 : if (object->in.pwszServerName == NULL) {
33544 0 : Py_RETURN_NONE;
33545 : }
33546 0 : if (object->in.pwszServerName == NULL) {
33547 0 : py_pwszServerName = Py_None;
33548 0 : Py_INCREF(py_pwszServerName);
33549 : } else {
33550 0 : if (object->in.pwszServerName == NULL) {
33551 0 : py_pwszServerName = Py_None;
33552 0 : Py_INCREF(py_pwszServerName);
33553 : } else {
33554 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
33555 : }
33556 : }
33557 0 : return py_pwszServerName;
33558 : }
33559 :
33560 0 : static int py_DnssrvComplexOperation2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
33561 : {
33562 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33563 0 : if (value == NULL) {
33564 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
33565 0 : return -1;
33566 : }
33567 0 : if (value == Py_None) {
33568 0 : object->in.pwszServerName = NULL;
33569 : } else {
33570 0 : object->in.pwszServerName = NULL;
33571 : {
33572 0 : const char *test_str;
33573 0 : 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->in.pwszServerName = talloc_str;
33597 : }
33598 : }
33599 0 : return 0;
33600 : }
33601 :
33602 0 : static PyObject *py_DnssrvComplexOperation2_in_get_pszZone(PyObject *obj, void *closure)
33603 : {
33604 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33605 0 : PyObject *py_pszZone;
33606 0 : if (object->in.pszZone == NULL) {
33607 0 : Py_RETURN_NONE;
33608 : }
33609 0 : if (object->in.pszZone == NULL) {
33610 0 : py_pszZone = Py_None;
33611 0 : Py_INCREF(py_pszZone);
33612 : } else {
33613 0 : if (object->in.pszZone == NULL) {
33614 0 : py_pszZone = Py_None;
33615 0 : Py_INCREF(py_pszZone);
33616 : } else {
33617 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
33618 : }
33619 : }
33620 0 : return py_pszZone;
33621 : }
33622 :
33623 0 : static int py_DnssrvComplexOperation2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
33624 : {
33625 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33626 0 : if (value == NULL) {
33627 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
33628 0 : return -1;
33629 : }
33630 0 : if (value == Py_None) {
33631 0 : object->in.pszZone = NULL;
33632 : } else {
33633 0 : object->in.pszZone = NULL;
33634 : {
33635 0 : const char *test_str;
33636 0 : const char *talloc_str;
33637 0 : PyObject *unicode = NULL;
33638 0 : if (PyUnicode_Check(value)) {
33639 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
33640 0 : if (unicode == NULL) {
33641 0 : PyErr_NoMemory();
33642 0 : return -1;
33643 : }
33644 0 : test_str = PyBytes_AS_STRING(unicode);
33645 0 : } else if (PyBytes_Check(value)) {
33646 0 : test_str = PyBytes_AS_STRING(value);
33647 : } else {
33648 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
33649 0 : return -1;
33650 : }
33651 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
33652 0 : if (unicode != NULL) {
33653 0 : Py_DECREF(unicode);
33654 : }
33655 0 : if (talloc_str == NULL) {
33656 0 : PyErr_NoMemory();
33657 0 : return -1;
33658 : }
33659 0 : object->in.pszZone = talloc_str;
33660 : }
33661 : }
33662 0 : return 0;
33663 : }
33664 :
33665 0 : static PyObject *py_DnssrvComplexOperation2_in_get_pszOperation(PyObject *obj, void *closure)
33666 : {
33667 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33668 0 : PyObject *py_pszOperation;
33669 0 : if (object->in.pszOperation == NULL) {
33670 0 : Py_RETURN_NONE;
33671 : }
33672 0 : if (object->in.pszOperation == NULL) {
33673 0 : py_pszOperation = Py_None;
33674 0 : Py_INCREF(py_pszOperation);
33675 : } else {
33676 0 : if (object->in.pszOperation == NULL) {
33677 0 : py_pszOperation = Py_None;
33678 0 : Py_INCREF(py_pszOperation);
33679 : } else {
33680 0 : py_pszOperation = PyUnicode_Decode(object->in.pszOperation, strlen(object->in.pszOperation), "utf-8", "ignore");
33681 : }
33682 : }
33683 0 : return py_pszOperation;
33684 : }
33685 :
33686 0 : static int py_DnssrvComplexOperation2_in_set_pszOperation(PyObject *py_obj, PyObject *value, void *closure)
33687 : {
33688 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33689 0 : if (value == NULL) {
33690 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszOperation");
33691 0 : return -1;
33692 : }
33693 0 : if (value == Py_None) {
33694 0 : object->in.pszOperation = NULL;
33695 : } else {
33696 0 : object->in.pszOperation = NULL;
33697 : {
33698 0 : const char *test_str;
33699 0 : const char *talloc_str;
33700 0 : PyObject *unicode = NULL;
33701 0 : if (PyUnicode_Check(value)) {
33702 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
33703 0 : if (unicode == NULL) {
33704 0 : PyErr_NoMemory();
33705 0 : return -1;
33706 : }
33707 0 : test_str = PyBytes_AS_STRING(unicode);
33708 0 : } else if (PyBytes_Check(value)) {
33709 0 : test_str = PyBytes_AS_STRING(value);
33710 : } else {
33711 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
33712 0 : return -1;
33713 : }
33714 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
33715 0 : if (unicode != NULL) {
33716 0 : Py_DECREF(unicode);
33717 : }
33718 0 : if (talloc_str == NULL) {
33719 0 : PyErr_NoMemory();
33720 0 : return -1;
33721 : }
33722 0 : object->in.pszOperation = talloc_str;
33723 : }
33724 : }
33725 0 : return 0;
33726 : }
33727 :
33728 0 : static PyObject *py_DnssrvComplexOperation2_in_get_dwTypeIn(PyObject *obj, void *closure)
33729 : {
33730 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33731 0 : PyObject *py_dwTypeIn;
33732 0 : py_dwTypeIn = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwTypeIn);
33733 0 : return py_dwTypeIn;
33734 : }
33735 :
33736 0 : static int py_DnssrvComplexOperation2_in_set_dwTypeIn(PyObject *py_obj, PyObject *value, void *closure)
33737 : {
33738 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33739 0 : if (value == NULL) {
33740 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwTypeIn");
33741 0 : return -1;
33742 : }
33743 : {
33744 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwTypeIn));
33745 0 : if (PyLong_Check(value)) {
33746 0 : unsigned long long test_var;
33747 0 : test_var = PyLong_AsUnsignedLongLong(value);
33748 0 : if (PyErr_Occurred() != NULL) {
33749 0 : return -1;
33750 : }
33751 0 : if (test_var > uint_max) {
33752 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33753 : PyLong_Type.tp_name, uint_max, test_var);
33754 0 : return -1;
33755 : }
33756 0 : object->in.dwTypeIn = test_var;
33757 : } else {
33758 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33759 : PyLong_Type.tp_name);
33760 0 : return -1;
33761 : }
33762 : }
33763 0 : return 0;
33764 : }
33765 :
33766 0 : static PyObject *py_DnssrvComplexOperation2_in_get_pDataIn(PyObject *obj, void *closure)
33767 : {
33768 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33769 0 : PyObject *py_pDataIn;
33770 0 : py_pDataIn = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(obj), object->in.dwTypeIn, &object->in.pDataIn, "union DNSSRV_RPC_UNION");
33771 0 : if (py_pDataIn == NULL) {
33772 0 : return NULL;
33773 : }
33774 0 : return py_pDataIn;
33775 : }
33776 :
33777 0 : static int py_DnssrvComplexOperation2_in_set_pDataIn(PyObject *py_obj, PyObject *value, void *closure)
33778 : {
33779 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33780 0 : if (value == NULL) {
33781 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pDataIn");
33782 0 : return -1;
33783 : }
33784 : {
33785 0 : union DNSSRV_RPC_UNION *pDataIn_switch_0;
33786 0 : pDataIn_switch_0 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(py_obj), object->in.dwTypeIn, value, "union DNSSRV_RPC_UNION");
33787 0 : if (pDataIn_switch_0 == NULL) {
33788 0 : return -1;
33789 : }
33790 0 : object->in.pDataIn = *pDataIn_switch_0;
33791 : }
33792 0 : return 0;
33793 : }
33794 :
33795 0 : static PyObject *py_DnssrvComplexOperation2_out_get_pdwTypeOut(PyObject *obj, void *closure)
33796 : {
33797 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33798 0 : PyObject *py_pdwTypeOut;
33799 0 : if (object->out.pdwTypeOut == NULL) {
33800 0 : Py_RETURN_NONE;
33801 : }
33802 0 : py_pdwTypeOut = PyLong_FromUnsignedLongLong((uint32_t)*object->out.pdwTypeOut);
33803 0 : return py_pdwTypeOut;
33804 : }
33805 :
33806 0 : static int py_DnssrvComplexOperation2_out_set_pdwTypeOut(PyObject *py_obj, PyObject *value, void *closure)
33807 : {
33808 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33809 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwTypeOut));
33810 0 : if (value == NULL) {
33811 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pdwTypeOut");
33812 0 : return -1;
33813 : }
33814 0 : object->out.pdwTypeOut = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwTypeOut);
33815 0 : if (object->out.pdwTypeOut == NULL) {
33816 0 : PyErr_NoMemory();
33817 0 : return -1;
33818 : }
33819 : {
33820 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwTypeOut));
33821 0 : if (PyLong_Check(value)) {
33822 0 : unsigned long long test_var;
33823 0 : test_var = PyLong_AsUnsignedLongLong(value);
33824 0 : if (PyErr_Occurred() != NULL) {
33825 0 : return -1;
33826 : }
33827 0 : if (test_var > uint_max) {
33828 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
33829 : PyLong_Type.tp_name, uint_max, test_var);
33830 0 : return -1;
33831 : }
33832 0 : *object->out.pdwTypeOut = test_var;
33833 : } else {
33834 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
33835 : PyLong_Type.tp_name);
33836 0 : return -1;
33837 : }
33838 : }
33839 0 : return 0;
33840 : }
33841 :
33842 0 : static PyObject *py_DnssrvComplexOperation2_out_get_ppDataOut(PyObject *obj, void *closure)
33843 : {
33844 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33845 0 : PyObject *py_ppDataOut;
33846 0 : if (object->out.ppDataOut == NULL) {
33847 0 : Py_RETURN_NONE;
33848 : }
33849 0 : py_ppDataOut = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, object->out.ppDataOut, *object->out.pdwTypeOut, object->out.ppDataOut, "union DNSSRV_RPC_UNION");
33850 0 : if (py_ppDataOut == NULL) {
33851 0 : return NULL;
33852 : }
33853 0 : return py_ppDataOut;
33854 : }
33855 :
33856 0 : static int py_DnssrvComplexOperation2_out_set_ppDataOut(PyObject *py_obj, PyObject *value, void *closure)
33857 : {
33858 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33859 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.ppDataOut));
33860 0 : if (value == NULL) {
33861 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.ppDataOut");
33862 0 : return -1;
33863 : }
33864 0 : object->out.ppDataOut = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.ppDataOut);
33865 0 : if (object->out.ppDataOut == NULL) {
33866 0 : PyErr_NoMemory();
33867 0 : return -1;
33868 : }
33869 : {
33870 0 : union DNSSRV_RPC_UNION *ppDataOut_switch_1;
33871 0 : ppDataOut_switch_1 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, pytalloc_get_mem_ctx(py_obj), *object->out.pdwTypeOut, value, "union DNSSRV_RPC_UNION");
33872 0 : if (ppDataOut_switch_1 == NULL) {
33873 0 : return -1;
33874 : }
33875 0 : object->out.ppDataOut = ppDataOut_switch_1;
33876 : }
33877 0 : return 0;
33878 : }
33879 :
33880 0 : static PyObject *py_DnssrvComplexOperation2_get_result(PyObject *obj, void *closure)
33881 : {
33882 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(obj);
33883 0 : PyObject *py_result;
33884 0 : py_result = PyErr_FromWERROR(object->out.result);
33885 0 : return py_result;
33886 : }
33887 :
33888 0 : static int py_DnssrvComplexOperation2_set_result(PyObject *py_obj, PyObject *value, void *closure)
33889 : {
33890 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33891 0 : if (value == NULL) {
33892 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
33893 0 : return -1;
33894 : }
33895 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
33896 0 : return 0;
33897 : }
33898 :
33899 : static PyGetSetDef py_DnssrvComplexOperation2_getsetters[] = {
33900 : {
33901 : .name = discard_const_p(char, "in_dwClientVersion"),
33902 : .get = py_DnssrvComplexOperation2_in_get_dwClientVersion,
33903 : .set = py_DnssrvComplexOperation2_in_set_dwClientVersion,
33904 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
33905 : },
33906 : {
33907 : .name = discard_const_p(char, "in_dwSettingFlags"),
33908 : .get = py_DnssrvComplexOperation2_in_get_dwSettingFlags,
33909 : .set = py_DnssrvComplexOperation2_in_set_dwSettingFlags,
33910 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
33911 : },
33912 : {
33913 : .name = discard_const_p(char, "in_pwszServerName"),
33914 : .get = py_DnssrvComplexOperation2_in_get_pwszServerName,
33915 : .set = py_DnssrvComplexOperation2_in_set_pwszServerName,
33916 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
33917 : },
33918 : {
33919 : .name = discard_const_p(char, "in_pszZone"),
33920 : .get = py_DnssrvComplexOperation2_in_get_pszZone,
33921 : .set = py_DnssrvComplexOperation2_in_set_pszZone,
33922 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
33923 : },
33924 : {
33925 : .name = discard_const_p(char, "in_pszOperation"),
33926 : .get = py_DnssrvComplexOperation2_in_get_pszOperation,
33927 : .set = py_DnssrvComplexOperation2_in_set_pszOperation,
33928 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
33929 : },
33930 : {
33931 : .name = discard_const_p(char, "in_dwTypeIn"),
33932 : .get = py_DnssrvComplexOperation2_in_get_dwTypeIn,
33933 : .set = py_DnssrvComplexOperation2_in_set_dwTypeIn,
33934 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
33935 : },
33936 : {
33937 : .name = discard_const_p(char, "in_pDataIn"),
33938 : .get = py_DnssrvComplexOperation2_in_get_pDataIn,
33939 : .set = py_DnssrvComplexOperation2_in_set_pDataIn,
33940 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
33941 : },
33942 : {
33943 : .name = discard_const_p(char, "out_pdwTypeOut"),
33944 : .get = py_DnssrvComplexOperation2_out_get_pdwTypeOut,
33945 : .set = py_DnssrvComplexOperation2_out_set_pdwTypeOut,
33946 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_TYPEID")
33947 : },
33948 : {
33949 : .name = discard_const_p(char, "out_ppDataOut"),
33950 : .get = py_DnssrvComplexOperation2_out_get_ppDataOut,
33951 : .set = py_DnssrvComplexOperation2_out_set_ppDataOut,
33952 : .doc = discard_const_p(char, "PIDL-generated element of base type DNSSRV_RPC_UNION")
33953 : },
33954 : {
33955 : .name = discard_const_p(char, "result"),
33956 : .get = py_DnssrvComplexOperation2_get_result,
33957 : .set = py_DnssrvComplexOperation2_set_result,
33958 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
33959 : },
33960 : { .name = NULL }
33961 : };
33962 :
33963 0 : static PyObject *py_DnssrvComplexOperation2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
33964 : {
33965 0 : PyObject *self = pytalloc_new(struct DnssrvComplexOperation2, type);
33966 0 : struct DnssrvComplexOperation2 *_self = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(self);
33967 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
33968 0 : _self->out.pdwTypeOut = talloc_zero(mem_ctx, enum DNS_RPC_TYPEID);
33969 0 : _self->out.ppDataOut = talloc_zero(mem_ctx, union DNSSRV_RPC_UNION);
33970 0 : return self;
33971 : }
33972 :
33973 0 : static PyObject *py_DnssrvComplexOperation2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
33974 : {
33975 :
33976 :
33977 0 : return PyLong_FromLong(7);
33978 : }
33979 :
33980 0 : static PyObject *py_DnssrvComplexOperation2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
33981 : {
33982 0 : const struct ndr_interface_call *call = NULL;
33983 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
33984 0 : PyObject *ret = NULL;
33985 0 : struct ndr_push *push = NULL;
33986 0 : DATA_BLOB blob;
33987 0 : enum ndr_err_code err;
33988 :
33989 0 : if (ndr_table_dnsserver.num_calls < 8) {
33990 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation2_ndr_pack");
33991 0 : return NULL;
33992 : }
33993 0 : call = &ndr_table_dnsserver.calls[7];
33994 :
33995 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
33996 0 : if (push == NULL) {
33997 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
33998 0 : return NULL;
33999 : }
34000 :
34001 0 : push->flags |= ndr_push_flags;
34002 :
34003 0 : err = call->ndr_push(push, ndr_inout_flags, object);
34004 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
34005 0 : TALLOC_FREE(push);
34006 0 : PyErr_SetNdrError(err);
34007 0 : return NULL;
34008 : }
34009 0 : blob = ndr_push_blob(push);
34010 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
34011 0 : TALLOC_FREE(push);
34012 0 : return ret;
34013 : }
34014 :
34015 0 : static PyObject *py_DnssrvComplexOperation2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34016 : {
34017 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
34018 0 : PyObject *bigendian_obj = NULL;
34019 0 : PyObject *ndr64_obj = NULL;
34020 0 : libndr_flags ndr_push_flags = 0;
34021 :
34022 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
34023 : discard_const_p(char *, kwnames),
34024 : &bigendian_obj,
34025 : &ndr64_obj)) {
34026 0 : return NULL;
34027 : }
34028 :
34029 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34030 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
34031 : }
34032 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34033 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
34034 : }
34035 :
34036 0 : return py_DnssrvComplexOperation2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
34037 : }
34038 :
34039 0 : static PyObject *py_DnssrvComplexOperation2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34040 : {
34041 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
34042 0 : PyObject *bigendian_obj = NULL;
34043 0 : PyObject *ndr64_obj = NULL;
34044 0 : libndr_flags ndr_push_flags = 0;
34045 :
34046 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
34047 : discard_const_p(char *, kwnames),
34048 : &bigendian_obj,
34049 : &ndr64_obj)) {
34050 0 : return NULL;
34051 : }
34052 :
34053 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34054 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
34055 : }
34056 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34057 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
34058 : }
34059 :
34060 0 : return py_DnssrvComplexOperation2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
34061 : }
34062 :
34063 0 : static PyObject *py_DnssrvComplexOperation2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
34064 : {
34065 0 : const struct ndr_interface_call *call = NULL;
34066 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
34067 0 : struct ndr_pull *pull = NULL;
34068 0 : enum ndr_err_code err;
34069 :
34070 0 : if (ndr_table_dnsserver.num_calls < 8) {
34071 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation2_ndr_unpack");
34072 0 : return NULL;
34073 : }
34074 0 : call = &ndr_table_dnsserver.calls[7];
34075 :
34076 0 : pull = ndr_pull_init_blob(blob, object);
34077 0 : if (pull == NULL) {
34078 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
34079 0 : return NULL;
34080 : }
34081 :
34082 0 : pull->flags |= ndr_pull_flags;
34083 :
34084 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
34085 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
34086 0 : TALLOC_FREE(pull);
34087 0 : PyErr_SetNdrError(err);
34088 0 : return NULL;
34089 : }
34090 0 : if (!allow_remaining) {
34091 0 : uint32_t highest_ofs;
34092 :
34093 0 : if (pull->offset > pull->relative_highest_offset) {
34094 0 : highest_ofs = pull->offset;
34095 : } else {
34096 0 : highest_ofs = pull->relative_highest_offset;
34097 : }
34098 0 : if (highest_ofs < pull->data_size) {
34099 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
34100 : "not all bytes consumed ofs[%u] size[%u]",
34101 : highest_ofs, pull->data_size);
34102 0 : TALLOC_FREE(pull);
34103 0 : PyErr_SetNdrError(err);
34104 0 : return NULL;
34105 : }
34106 : }
34107 :
34108 0 : TALLOC_FREE(pull);
34109 0 : Py_RETURN_NONE;
34110 : }
34111 :
34112 0 : static PyObject *py_DnssrvComplexOperation2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34113 : {
34114 0 : DATA_BLOB blob;
34115 0 : Py_ssize_t blob_length = 0;
34116 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
34117 0 : PyObject *bigendian_obj = NULL;
34118 0 : PyObject *ndr64_obj = NULL;
34119 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
34120 0 : PyObject *allow_remaining_obj = NULL;
34121 0 : bool allow_remaining = false;
34122 :
34123 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
34124 : discard_const_p(char *, kwnames),
34125 : &blob.data, &blob_length,
34126 : &bigendian_obj,
34127 : &ndr64_obj,
34128 : &allow_remaining_obj)) {
34129 0 : return NULL;
34130 : }
34131 0 : blob.length = blob_length;
34132 :
34133 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34134 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
34135 : }
34136 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34137 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
34138 : }
34139 :
34140 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
34141 0 : allow_remaining = true;
34142 : }
34143 :
34144 0 : return py_DnssrvComplexOperation2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
34145 : }
34146 :
34147 0 : static PyObject *py_DnssrvComplexOperation2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
34148 : {
34149 0 : DATA_BLOB blob;
34150 0 : Py_ssize_t blob_length = 0;
34151 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
34152 0 : PyObject *bigendian_obj = NULL;
34153 0 : PyObject *ndr64_obj = NULL;
34154 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
34155 0 : PyObject *allow_remaining_obj = NULL;
34156 0 : bool allow_remaining = false;
34157 :
34158 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
34159 : discard_const_p(char *, kwnames),
34160 : &blob.data, &blob_length,
34161 : &bigendian_obj,
34162 : &ndr64_obj,
34163 : &allow_remaining_obj)) {
34164 0 : return NULL;
34165 : }
34166 0 : blob.length = blob_length;
34167 :
34168 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
34169 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
34170 : }
34171 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
34172 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
34173 : }
34174 :
34175 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
34176 0 : allow_remaining = true;
34177 : }
34178 :
34179 0 : return py_DnssrvComplexOperation2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
34180 : }
34181 :
34182 0 : static PyObject *py_DnssrvComplexOperation2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
34183 : {
34184 0 : const struct ndr_interface_call *call = NULL;
34185 0 : struct DnssrvComplexOperation2 *object = (struct DnssrvComplexOperation2 *)pytalloc_get_ptr(py_obj);
34186 0 : PyObject *ret;
34187 0 : char *retstr;
34188 :
34189 0 : if (ndr_table_dnsserver.num_calls < 8) {
34190 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvComplexOperation2_ndr_print");
34191 0 : return NULL;
34192 : }
34193 0 : call = &ndr_table_dnsserver.calls[7];
34194 :
34195 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
34196 0 : ret = PyUnicode_FromString(retstr);
34197 0 : TALLOC_FREE(retstr);
34198 :
34199 0 : return ret;
34200 : }
34201 :
34202 0 : static PyObject *py_DnssrvComplexOperation2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
34203 : {
34204 0 : return py_DnssrvComplexOperation2_ndr_print(py_obj, "DnssrvComplexOperation2_in", NDR_IN);
34205 : }
34206 :
34207 0 : static PyObject *py_DnssrvComplexOperation2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
34208 : {
34209 0 : return py_DnssrvComplexOperation2_ndr_print(py_obj, "DnssrvComplexOperation2_out", NDR_OUT);
34210 : }
34211 :
34212 : static PyMethodDef py_DnssrvComplexOperation2_methods[] = {
34213 : { "opnum", (PyCFunction)py_DnssrvComplexOperation2_ndr_opnum, METH_NOARGS|METH_CLASS,
34214 : "dnsserver.DnssrvComplexOperation2.opnum() -> 7 (0x07) " },
34215 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
34216 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
34217 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
34218 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
34219 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
34220 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
34221 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvComplexOperation2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
34222 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
34223 : { "__ndr_print_in__", (PyCFunction)py_DnssrvComplexOperation2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
34224 : { "__ndr_print_out__", (PyCFunction)py_DnssrvComplexOperation2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
34225 : { NULL, NULL, 0, NULL }
34226 : };
34227 :
34228 :
34229 : static PyTypeObject DnssrvComplexOperation2_Type = {
34230 : PyVarObject_HEAD_INIT(NULL, 0)
34231 : .tp_name = "dnsserver.DnssrvComplexOperation2",
34232 : .tp_getset = py_DnssrvComplexOperation2_getsetters,
34233 : .tp_methods = py_DnssrvComplexOperation2_methods,
34234 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
34235 : .tp_new = py_DnssrvComplexOperation2_new,
34236 : };
34237 :
34238 20 : static bool pack_py_DnssrvComplexOperation2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvComplexOperation2 *r)
34239 : {
34240 0 : PyObject *py_dwClientVersion;
34241 0 : PyObject *py_dwSettingFlags;
34242 0 : PyObject *py_pwszServerName;
34243 0 : PyObject *py_pszZone;
34244 0 : PyObject *py_pszOperation;
34245 0 : PyObject *py_dwTypeIn;
34246 0 : PyObject *py_pDataIn;
34247 20 : const char *kwnames[] = {
34248 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszOperation", "dwTypeIn", "pDataIn", NULL
34249 : };
34250 :
34251 20 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:DnssrvComplexOperation2", discard_const_p(char *, kwnames), &py_dwClientVersion, &py_dwSettingFlags, &py_pwszServerName, &py_pszZone, &py_pszOperation, &py_dwTypeIn, &py_pDataIn)) {
34252 0 : return false;
34253 : }
34254 :
34255 20 : if (py_dwClientVersion == NULL) {
34256 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwClientVersion");
34257 0 : return false;
34258 : }
34259 : {
34260 20 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
34261 20 : if (PyLong_Check(py_dwClientVersion)) {
34262 0 : unsigned long long test_var;
34263 20 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
34264 20 : if (PyErr_Occurred() != NULL) {
34265 0 : return false;
34266 : }
34267 20 : if (test_var > uint_max) {
34268 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34269 : PyLong_Type.tp_name, uint_max, test_var);
34270 0 : return false;
34271 : }
34272 20 : r->in.dwClientVersion = test_var;
34273 : } else {
34274 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34275 : PyLong_Type.tp_name);
34276 0 : return false;
34277 : }
34278 : }
34279 20 : if (py_dwSettingFlags == NULL) {
34280 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwSettingFlags");
34281 0 : return false;
34282 : }
34283 : {
34284 20 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
34285 20 : if (PyLong_Check(py_dwSettingFlags)) {
34286 0 : unsigned long long test_var;
34287 20 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
34288 20 : if (PyErr_Occurred() != NULL) {
34289 0 : return false;
34290 : }
34291 20 : if (test_var > uint_max) {
34292 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34293 : PyLong_Type.tp_name, uint_max, test_var);
34294 0 : return false;
34295 : }
34296 20 : r->in.dwSettingFlags = test_var;
34297 : } else {
34298 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34299 : PyLong_Type.tp_name);
34300 0 : return false;
34301 : }
34302 : }
34303 20 : if (py_pwszServerName == NULL) {
34304 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
34305 0 : return false;
34306 : }
34307 20 : if (py_pwszServerName == Py_None) {
34308 0 : r->in.pwszServerName = NULL;
34309 : } else {
34310 20 : r->in.pwszServerName = NULL;
34311 : {
34312 0 : const char *test_str;
34313 0 : const char *talloc_str;
34314 20 : PyObject *unicode = NULL;
34315 20 : if (PyUnicode_Check(py_pwszServerName)) {
34316 20 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
34317 20 : if (unicode == NULL) {
34318 0 : PyErr_NoMemory();
34319 0 : return false;
34320 : }
34321 20 : test_str = PyBytes_AS_STRING(unicode);
34322 0 : } else if (PyBytes_Check(py_pwszServerName)) {
34323 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
34324 : } else {
34325 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
34326 0 : return false;
34327 : }
34328 20 : talloc_str = talloc_strdup(r, test_str);
34329 20 : if (unicode != NULL) {
34330 20 : Py_DECREF(unicode);
34331 : }
34332 20 : if (talloc_str == NULL) {
34333 0 : PyErr_NoMemory();
34334 0 : return false;
34335 : }
34336 20 : r->in.pwszServerName = talloc_str;
34337 : }
34338 : }
34339 20 : if (py_pszZone == NULL) {
34340 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
34341 0 : return false;
34342 : }
34343 20 : if (py_pszZone == Py_None) {
34344 20 : r->in.pszZone = NULL;
34345 : } else {
34346 0 : r->in.pszZone = NULL;
34347 : {
34348 0 : const char *test_str;
34349 0 : const char *talloc_str;
34350 0 : PyObject *unicode = NULL;
34351 0 : if (PyUnicode_Check(py_pszZone)) {
34352 0 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
34353 0 : if (unicode == NULL) {
34354 0 : PyErr_NoMemory();
34355 0 : return false;
34356 : }
34357 0 : test_str = PyBytes_AS_STRING(unicode);
34358 0 : } else if (PyBytes_Check(py_pszZone)) {
34359 0 : test_str = PyBytes_AS_STRING(py_pszZone);
34360 : } else {
34361 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
34362 0 : return false;
34363 : }
34364 0 : talloc_str = talloc_strdup(r, test_str);
34365 0 : if (unicode != NULL) {
34366 0 : Py_DECREF(unicode);
34367 : }
34368 0 : if (talloc_str == NULL) {
34369 0 : PyErr_NoMemory();
34370 0 : return false;
34371 : }
34372 0 : r->in.pszZone = talloc_str;
34373 : }
34374 : }
34375 20 : if (py_pszOperation == NULL) {
34376 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszOperation");
34377 0 : return false;
34378 : }
34379 20 : if (py_pszOperation == Py_None) {
34380 0 : r->in.pszOperation = NULL;
34381 : } else {
34382 20 : r->in.pszOperation = NULL;
34383 : {
34384 0 : const char *test_str;
34385 0 : const char *talloc_str;
34386 20 : PyObject *unicode = NULL;
34387 20 : if (PyUnicode_Check(py_pszOperation)) {
34388 20 : unicode = PyUnicode_AsEncodedString(py_pszOperation, "utf-8", "ignore");
34389 20 : if (unicode == NULL) {
34390 0 : PyErr_NoMemory();
34391 0 : return false;
34392 : }
34393 20 : test_str = PyBytes_AS_STRING(unicode);
34394 0 : } else if (PyBytes_Check(py_pszOperation)) {
34395 0 : test_str = PyBytes_AS_STRING(py_pszOperation);
34396 : } else {
34397 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszOperation)->tp_name);
34398 0 : return false;
34399 : }
34400 20 : talloc_str = talloc_strdup(r, test_str);
34401 20 : if (unicode != NULL) {
34402 20 : Py_DECREF(unicode);
34403 : }
34404 20 : if (talloc_str == NULL) {
34405 0 : PyErr_NoMemory();
34406 0 : return false;
34407 : }
34408 20 : r->in.pszOperation = talloc_str;
34409 : }
34410 : }
34411 20 : if (py_dwTypeIn == NULL) {
34412 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwTypeIn");
34413 0 : return false;
34414 : }
34415 : {
34416 20 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwTypeIn));
34417 20 : if (PyLong_Check(py_dwTypeIn)) {
34418 0 : unsigned long long test_var;
34419 20 : test_var = PyLong_AsUnsignedLongLong(py_dwTypeIn);
34420 20 : if (PyErr_Occurred() != NULL) {
34421 0 : return false;
34422 : }
34423 20 : if (test_var > uint_max) {
34424 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34425 : PyLong_Type.tp_name, uint_max, test_var);
34426 0 : return false;
34427 : }
34428 20 : r->in.dwTypeIn = test_var;
34429 : } else {
34430 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34431 : PyLong_Type.tp_name);
34432 0 : return false;
34433 : }
34434 : }
34435 20 : if (py_pDataIn == NULL) {
34436 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pDataIn");
34437 0 : return false;
34438 : }
34439 : {
34440 0 : union DNSSRV_RPC_UNION *pDataIn_switch_0;
34441 20 : pDataIn_switch_0 = (union DNSSRV_RPC_UNION *)pyrpc_export_union(&DNSSRV_RPC_UNION_Type, r, r->in.dwTypeIn, py_pDataIn, "union DNSSRV_RPC_UNION");
34442 20 : if (pDataIn_switch_0 == NULL) {
34443 0 : return false;
34444 : }
34445 20 : r->in.pDataIn = *pDataIn_switch_0;
34446 : }
34447 20 : return true;
34448 : }
34449 :
34450 20 : static PyObject *unpack_py_DnssrvComplexOperation2_args_out(struct DnssrvComplexOperation2 *r)
34451 : {
34452 0 : PyObject *result;
34453 0 : PyObject *py_pdwTypeOut;
34454 0 : PyObject *py_ppDataOut;
34455 20 : result = PyTuple_New(2);
34456 20 : py_pdwTypeOut = PyLong_FromUnsignedLongLong((uint32_t)*r->out.pdwTypeOut);
34457 20 : PyTuple_SetItem(result, 0, py_pdwTypeOut);
34458 20 : py_ppDataOut = pyrpc_import_union(&DNSSRV_RPC_UNION_Type, r->out.ppDataOut, *r->out.pdwTypeOut, r->out.ppDataOut, "union DNSSRV_RPC_UNION");
34459 20 : if (py_ppDataOut == NULL) {
34460 0 : return NULL;
34461 : }
34462 20 : PyTuple_SetItem(result, 1, py_ppDataOut);
34463 20 : if (!W_ERROR_IS_OK(r->out.result)) {
34464 0 : PyErr_SetWERROR(r->out.result);
34465 0 : return NULL;
34466 : }
34467 :
34468 20 : return result;
34469 : }
34470 :
34471 :
34472 0 : static PyObject *py_DnssrvEnumRecords2_in_get_dwClientVersion(PyObject *obj, void *closure)
34473 : {
34474 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34475 0 : PyObject *py_dwClientVersion;
34476 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwClientVersion);
34477 0 : return py_dwClientVersion;
34478 : }
34479 :
34480 0 : static int py_DnssrvEnumRecords2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
34481 : {
34482 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34483 0 : if (value == NULL) {
34484 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwClientVersion");
34485 0 : return -1;
34486 : }
34487 : {
34488 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
34489 0 : if (PyLong_Check(value)) {
34490 0 : unsigned long long test_var;
34491 0 : test_var = PyLong_AsUnsignedLongLong(value);
34492 0 : if (PyErr_Occurred() != NULL) {
34493 0 : return -1;
34494 : }
34495 0 : if (test_var > uint_max) {
34496 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34497 : PyLong_Type.tp_name, uint_max, test_var);
34498 0 : return -1;
34499 : }
34500 0 : object->in.dwClientVersion = test_var;
34501 : } else {
34502 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34503 : PyLong_Type.tp_name);
34504 0 : return -1;
34505 : }
34506 : }
34507 0 : return 0;
34508 : }
34509 :
34510 0 : static PyObject *py_DnssrvEnumRecords2_in_get_dwSettingFlags(PyObject *obj, void *closure)
34511 : {
34512 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34513 0 : PyObject *py_dwSettingFlags;
34514 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwSettingFlags);
34515 0 : return py_dwSettingFlags;
34516 : }
34517 :
34518 0 : static int py_DnssrvEnumRecords2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
34519 : {
34520 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34521 0 : if (value == NULL) {
34522 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwSettingFlags");
34523 0 : return -1;
34524 : }
34525 : {
34526 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
34527 0 : if (PyLong_Check(value)) {
34528 0 : unsigned long long test_var;
34529 0 : test_var = PyLong_AsUnsignedLongLong(value);
34530 0 : if (PyErr_Occurred() != NULL) {
34531 0 : return -1;
34532 : }
34533 0 : if (test_var > uint_max) {
34534 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34535 : PyLong_Type.tp_name, uint_max, test_var);
34536 0 : return -1;
34537 : }
34538 0 : object->in.dwSettingFlags = test_var;
34539 : } else {
34540 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34541 : PyLong_Type.tp_name);
34542 0 : return -1;
34543 : }
34544 : }
34545 0 : return 0;
34546 : }
34547 :
34548 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pwszServerName(PyObject *obj, void *closure)
34549 : {
34550 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34551 0 : PyObject *py_pwszServerName;
34552 0 : if (object->in.pwszServerName == NULL) {
34553 0 : Py_RETURN_NONE;
34554 : }
34555 0 : if (object->in.pwszServerName == NULL) {
34556 0 : py_pwszServerName = Py_None;
34557 0 : Py_INCREF(py_pwszServerName);
34558 : } else {
34559 0 : if (object->in.pwszServerName == NULL) {
34560 0 : py_pwszServerName = Py_None;
34561 0 : Py_INCREF(py_pwszServerName);
34562 : } else {
34563 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
34564 : }
34565 : }
34566 0 : return py_pwszServerName;
34567 : }
34568 :
34569 0 : static int py_DnssrvEnumRecords2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
34570 : {
34571 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34572 0 : if (value == NULL) {
34573 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
34574 0 : return -1;
34575 : }
34576 0 : if (value == Py_None) {
34577 0 : object->in.pwszServerName = NULL;
34578 : } else {
34579 0 : object->in.pwszServerName = NULL;
34580 : {
34581 0 : const char *test_str;
34582 0 : const char *talloc_str;
34583 0 : PyObject *unicode = NULL;
34584 0 : if (PyUnicode_Check(value)) {
34585 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34586 0 : if (unicode == NULL) {
34587 0 : PyErr_NoMemory();
34588 0 : return -1;
34589 : }
34590 0 : test_str = PyBytes_AS_STRING(unicode);
34591 0 : } else if (PyBytes_Check(value)) {
34592 0 : test_str = PyBytes_AS_STRING(value);
34593 : } else {
34594 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34595 0 : return -1;
34596 : }
34597 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34598 0 : if (unicode != NULL) {
34599 0 : Py_DECREF(unicode);
34600 : }
34601 0 : if (talloc_str == NULL) {
34602 0 : PyErr_NoMemory();
34603 0 : return -1;
34604 : }
34605 0 : object->in.pwszServerName = talloc_str;
34606 : }
34607 : }
34608 0 : return 0;
34609 : }
34610 :
34611 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszZone(PyObject *obj, void *closure)
34612 : {
34613 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34614 0 : PyObject *py_pszZone;
34615 0 : if (object->in.pszZone == NULL) {
34616 0 : Py_RETURN_NONE;
34617 : }
34618 0 : if (object->in.pszZone == NULL) {
34619 0 : py_pszZone = Py_None;
34620 0 : Py_INCREF(py_pszZone);
34621 : } else {
34622 0 : if (object->in.pszZone == NULL) {
34623 0 : py_pszZone = Py_None;
34624 0 : Py_INCREF(py_pszZone);
34625 : } else {
34626 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
34627 : }
34628 : }
34629 0 : return py_pszZone;
34630 : }
34631 :
34632 0 : static int py_DnssrvEnumRecords2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
34633 : {
34634 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34635 0 : if (value == NULL) {
34636 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
34637 0 : return -1;
34638 : }
34639 0 : if (value == Py_None) {
34640 0 : object->in.pszZone = NULL;
34641 : } else {
34642 0 : object->in.pszZone = NULL;
34643 : {
34644 0 : const char *test_str;
34645 0 : const char *talloc_str;
34646 0 : PyObject *unicode = NULL;
34647 0 : if (PyUnicode_Check(value)) {
34648 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34649 0 : if (unicode == NULL) {
34650 0 : PyErr_NoMemory();
34651 0 : return -1;
34652 : }
34653 0 : test_str = PyBytes_AS_STRING(unicode);
34654 0 : } else if (PyBytes_Check(value)) {
34655 0 : test_str = PyBytes_AS_STRING(value);
34656 : } else {
34657 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34658 0 : return -1;
34659 : }
34660 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34661 0 : if (unicode != NULL) {
34662 0 : Py_DECREF(unicode);
34663 : }
34664 0 : if (talloc_str == NULL) {
34665 0 : PyErr_NoMemory();
34666 0 : return -1;
34667 : }
34668 0 : object->in.pszZone = talloc_str;
34669 : }
34670 : }
34671 0 : return 0;
34672 : }
34673 :
34674 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszNodeName(PyObject *obj, void *closure)
34675 : {
34676 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34677 0 : PyObject *py_pszNodeName;
34678 0 : if (object->in.pszNodeName == NULL) {
34679 0 : Py_RETURN_NONE;
34680 : }
34681 0 : if (object->in.pszNodeName == NULL) {
34682 0 : py_pszNodeName = Py_None;
34683 0 : Py_INCREF(py_pszNodeName);
34684 : } else {
34685 0 : if (object->in.pszNodeName == NULL) {
34686 0 : py_pszNodeName = Py_None;
34687 0 : Py_INCREF(py_pszNodeName);
34688 : } else {
34689 0 : py_pszNodeName = PyUnicode_Decode(object->in.pszNodeName, strlen(object->in.pszNodeName), "utf-8", "ignore");
34690 : }
34691 : }
34692 0 : return py_pszNodeName;
34693 : }
34694 :
34695 0 : static int py_DnssrvEnumRecords2_in_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
34696 : {
34697 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34698 0 : if (value == NULL) {
34699 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszNodeName");
34700 0 : return -1;
34701 : }
34702 0 : if (value == Py_None) {
34703 0 : object->in.pszNodeName = NULL;
34704 : } else {
34705 0 : object->in.pszNodeName = NULL;
34706 : {
34707 0 : const char *test_str;
34708 0 : const char *talloc_str;
34709 0 : PyObject *unicode = NULL;
34710 0 : if (PyUnicode_Check(value)) {
34711 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34712 0 : if (unicode == NULL) {
34713 0 : PyErr_NoMemory();
34714 0 : return -1;
34715 : }
34716 0 : test_str = PyBytes_AS_STRING(unicode);
34717 0 : } else if (PyBytes_Check(value)) {
34718 0 : test_str = PyBytes_AS_STRING(value);
34719 : } else {
34720 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34721 0 : return -1;
34722 : }
34723 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34724 0 : if (unicode != NULL) {
34725 0 : Py_DECREF(unicode);
34726 : }
34727 0 : if (talloc_str == NULL) {
34728 0 : PyErr_NoMemory();
34729 0 : return -1;
34730 : }
34731 0 : object->in.pszNodeName = talloc_str;
34732 : }
34733 : }
34734 0 : return 0;
34735 : }
34736 :
34737 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszStartChild(PyObject *obj, void *closure)
34738 : {
34739 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34740 0 : PyObject *py_pszStartChild;
34741 0 : if (object->in.pszStartChild == NULL) {
34742 0 : Py_RETURN_NONE;
34743 : }
34744 0 : if (object->in.pszStartChild == NULL) {
34745 0 : py_pszStartChild = Py_None;
34746 0 : Py_INCREF(py_pszStartChild);
34747 : } else {
34748 0 : if (object->in.pszStartChild == NULL) {
34749 0 : py_pszStartChild = Py_None;
34750 0 : Py_INCREF(py_pszStartChild);
34751 : } else {
34752 0 : py_pszStartChild = PyUnicode_Decode(object->in.pszStartChild, strlen(object->in.pszStartChild), "utf-8", "ignore");
34753 : }
34754 : }
34755 0 : return py_pszStartChild;
34756 : }
34757 :
34758 0 : static int py_DnssrvEnumRecords2_in_set_pszStartChild(PyObject *py_obj, PyObject *value, void *closure)
34759 : {
34760 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34761 0 : if (value == NULL) {
34762 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszStartChild");
34763 0 : return -1;
34764 : }
34765 0 : if (value == Py_None) {
34766 0 : object->in.pszStartChild = NULL;
34767 : } else {
34768 0 : object->in.pszStartChild = NULL;
34769 : {
34770 0 : const char *test_str;
34771 0 : const char *talloc_str;
34772 0 : PyObject *unicode = NULL;
34773 0 : if (PyUnicode_Check(value)) {
34774 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34775 0 : if (unicode == NULL) {
34776 0 : PyErr_NoMemory();
34777 0 : return -1;
34778 : }
34779 0 : test_str = PyBytes_AS_STRING(unicode);
34780 0 : } else if (PyBytes_Check(value)) {
34781 0 : test_str = PyBytes_AS_STRING(value);
34782 : } else {
34783 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34784 0 : return -1;
34785 : }
34786 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34787 0 : if (unicode != NULL) {
34788 0 : Py_DECREF(unicode);
34789 : }
34790 0 : if (talloc_str == NULL) {
34791 0 : PyErr_NoMemory();
34792 0 : return -1;
34793 : }
34794 0 : object->in.pszStartChild = talloc_str;
34795 : }
34796 : }
34797 0 : return 0;
34798 : }
34799 :
34800 0 : static PyObject *py_DnssrvEnumRecords2_in_get_wRecordType(PyObject *obj, void *closure)
34801 : {
34802 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34803 0 : PyObject *py_wRecordType;
34804 0 : py_wRecordType = PyLong_FromLong((uint16_t)object->in.wRecordType);
34805 0 : return py_wRecordType;
34806 : }
34807 :
34808 0 : static int py_DnssrvEnumRecords2_in_set_wRecordType(PyObject *py_obj, PyObject *value, void *closure)
34809 : {
34810 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34811 0 : if (value == NULL) {
34812 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.wRecordType");
34813 0 : return -1;
34814 : }
34815 : {
34816 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.wRecordType));
34817 0 : if (PyLong_Check(value)) {
34818 0 : unsigned long long test_var;
34819 0 : test_var = PyLong_AsUnsignedLongLong(value);
34820 0 : if (PyErr_Occurred() != NULL) {
34821 0 : return -1;
34822 : }
34823 0 : if (test_var > uint_max) {
34824 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34825 : PyLong_Type.tp_name, uint_max, test_var);
34826 0 : return -1;
34827 : }
34828 0 : object->in.wRecordType = test_var;
34829 : } else {
34830 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34831 : PyLong_Type.tp_name);
34832 0 : return -1;
34833 : }
34834 : }
34835 0 : return 0;
34836 : }
34837 :
34838 0 : static PyObject *py_DnssrvEnumRecords2_in_get_fSelectFlag(PyObject *obj, void *closure)
34839 : {
34840 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34841 0 : PyObject *py_fSelectFlag;
34842 0 : py_fSelectFlag = PyLong_FromUnsignedLongLong((uint32_t)object->in.fSelectFlag);
34843 0 : return py_fSelectFlag;
34844 : }
34845 :
34846 0 : static int py_DnssrvEnumRecords2_in_set_fSelectFlag(PyObject *py_obj, PyObject *value, void *closure)
34847 : {
34848 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34849 0 : if (value == NULL) {
34850 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.fSelectFlag");
34851 0 : return -1;
34852 : }
34853 : {
34854 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.fSelectFlag));
34855 0 : if (PyLong_Check(value)) {
34856 0 : unsigned long long test_var;
34857 0 : test_var = PyLong_AsUnsignedLongLong(value);
34858 0 : if (PyErr_Occurred() != NULL) {
34859 0 : return -1;
34860 : }
34861 0 : if (test_var > uint_max) {
34862 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
34863 : PyLong_Type.tp_name, uint_max, test_var);
34864 0 : return -1;
34865 : }
34866 0 : object->in.fSelectFlag = test_var;
34867 : } else {
34868 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
34869 : PyLong_Type.tp_name);
34870 0 : return -1;
34871 : }
34872 : }
34873 0 : return 0;
34874 : }
34875 :
34876 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszFilterStart(PyObject *obj, void *closure)
34877 : {
34878 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34879 0 : PyObject *py_pszFilterStart;
34880 0 : if (object->in.pszFilterStart == NULL) {
34881 0 : Py_RETURN_NONE;
34882 : }
34883 0 : if (object->in.pszFilterStart == NULL) {
34884 0 : py_pszFilterStart = Py_None;
34885 0 : Py_INCREF(py_pszFilterStart);
34886 : } else {
34887 0 : if (object->in.pszFilterStart == NULL) {
34888 0 : py_pszFilterStart = Py_None;
34889 0 : Py_INCREF(py_pszFilterStart);
34890 : } else {
34891 0 : py_pszFilterStart = PyUnicode_Decode(object->in.pszFilterStart, strlen(object->in.pszFilterStart), "utf-8", "ignore");
34892 : }
34893 : }
34894 0 : return py_pszFilterStart;
34895 : }
34896 :
34897 0 : static int py_DnssrvEnumRecords2_in_set_pszFilterStart(PyObject *py_obj, PyObject *value, void *closure)
34898 : {
34899 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34900 0 : if (value == NULL) {
34901 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszFilterStart");
34902 0 : return -1;
34903 : }
34904 0 : if (value == Py_None) {
34905 0 : object->in.pszFilterStart = NULL;
34906 : } else {
34907 0 : object->in.pszFilterStart = NULL;
34908 : {
34909 0 : const char *test_str;
34910 0 : const char *talloc_str;
34911 0 : PyObject *unicode = NULL;
34912 0 : if (PyUnicode_Check(value)) {
34913 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34914 0 : if (unicode == NULL) {
34915 0 : PyErr_NoMemory();
34916 0 : return -1;
34917 : }
34918 0 : test_str = PyBytes_AS_STRING(unicode);
34919 0 : } else if (PyBytes_Check(value)) {
34920 0 : test_str = PyBytes_AS_STRING(value);
34921 : } else {
34922 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34923 0 : return -1;
34924 : }
34925 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34926 0 : if (unicode != NULL) {
34927 0 : Py_DECREF(unicode);
34928 : }
34929 0 : if (talloc_str == NULL) {
34930 0 : PyErr_NoMemory();
34931 0 : return -1;
34932 : }
34933 0 : object->in.pszFilterStart = talloc_str;
34934 : }
34935 : }
34936 0 : return 0;
34937 : }
34938 :
34939 0 : static PyObject *py_DnssrvEnumRecords2_in_get_pszFilterStop(PyObject *obj, void *closure)
34940 : {
34941 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
34942 0 : PyObject *py_pszFilterStop;
34943 0 : if (object->in.pszFilterStop == NULL) {
34944 0 : Py_RETURN_NONE;
34945 : }
34946 0 : if (object->in.pszFilterStop == NULL) {
34947 0 : py_pszFilterStop = Py_None;
34948 0 : Py_INCREF(py_pszFilterStop);
34949 : } else {
34950 0 : if (object->in.pszFilterStop == NULL) {
34951 0 : py_pszFilterStop = Py_None;
34952 0 : Py_INCREF(py_pszFilterStop);
34953 : } else {
34954 0 : py_pszFilterStop = PyUnicode_Decode(object->in.pszFilterStop, strlen(object->in.pszFilterStop), "utf-8", "ignore");
34955 : }
34956 : }
34957 0 : return py_pszFilterStop;
34958 : }
34959 :
34960 0 : static int py_DnssrvEnumRecords2_in_set_pszFilterStop(PyObject *py_obj, PyObject *value, void *closure)
34961 : {
34962 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
34963 0 : if (value == NULL) {
34964 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszFilterStop");
34965 0 : return -1;
34966 : }
34967 0 : if (value == Py_None) {
34968 0 : object->in.pszFilterStop = NULL;
34969 : } else {
34970 0 : object->in.pszFilterStop = NULL;
34971 : {
34972 0 : const char *test_str;
34973 0 : const char *talloc_str;
34974 0 : PyObject *unicode = NULL;
34975 0 : if (PyUnicode_Check(value)) {
34976 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
34977 0 : if (unicode == NULL) {
34978 0 : PyErr_NoMemory();
34979 0 : return -1;
34980 : }
34981 0 : test_str = PyBytes_AS_STRING(unicode);
34982 0 : } else if (PyBytes_Check(value)) {
34983 0 : test_str = PyBytes_AS_STRING(value);
34984 : } else {
34985 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
34986 0 : return -1;
34987 : }
34988 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
34989 0 : if (unicode != NULL) {
34990 0 : Py_DECREF(unicode);
34991 : }
34992 0 : if (talloc_str == NULL) {
34993 0 : PyErr_NoMemory();
34994 0 : return -1;
34995 : }
34996 0 : object->in.pszFilterStop = talloc_str;
34997 : }
34998 : }
34999 0 : return 0;
35000 : }
35001 :
35002 0 : static PyObject *py_DnssrvEnumRecords2_out_get_pdwBufferLength(PyObject *obj, void *closure)
35003 : {
35004 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
35005 0 : PyObject *py_pdwBufferLength;
35006 0 : if (object->out.pdwBufferLength == NULL) {
35007 0 : Py_RETURN_NONE;
35008 : }
35009 0 : py_pdwBufferLength = PyLong_FromUnsignedLongLong((uint32_t)*object->out.pdwBufferLength);
35010 0 : return py_pdwBufferLength;
35011 : }
35012 :
35013 0 : static int py_DnssrvEnumRecords2_out_set_pdwBufferLength(PyObject *py_obj, PyObject *value, void *closure)
35014 : {
35015 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
35016 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pdwBufferLength));
35017 0 : if (value == NULL) {
35018 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pdwBufferLength");
35019 0 : return -1;
35020 : }
35021 0 : object->out.pdwBufferLength = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pdwBufferLength);
35022 0 : if (object->out.pdwBufferLength == NULL) {
35023 0 : PyErr_NoMemory();
35024 0 : return -1;
35025 : }
35026 : {
35027 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(*object->out.pdwBufferLength));
35028 0 : if (PyLong_Check(value)) {
35029 0 : unsigned long long test_var;
35030 0 : test_var = PyLong_AsUnsignedLongLong(value);
35031 0 : if (PyErr_Occurred() != NULL) {
35032 0 : return -1;
35033 : }
35034 0 : if (test_var > uint_max) {
35035 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35036 : PyLong_Type.tp_name, uint_max, test_var);
35037 0 : return -1;
35038 : }
35039 0 : *object->out.pdwBufferLength = test_var;
35040 : } else {
35041 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35042 : PyLong_Type.tp_name);
35043 0 : return -1;
35044 : }
35045 : }
35046 0 : return 0;
35047 : }
35048 :
35049 0 : static PyObject *py_DnssrvEnumRecords2_out_get_pBuffer(PyObject *obj, void *closure)
35050 : {
35051 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
35052 0 : PyObject *py_pBuffer;
35053 0 : if (object->out.pBuffer == NULL) {
35054 0 : Py_RETURN_NONE;
35055 : }
35056 0 : if (*object->out.pBuffer == NULL) {
35057 0 : py_pBuffer = Py_None;
35058 0 : Py_INCREF(py_pBuffer);
35059 : } else {
35060 0 : py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *object->out.pBuffer, *object->out.pBuffer);
35061 : }
35062 0 : return py_pBuffer;
35063 : }
35064 :
35065 0 : static int py_DnssrvEnumRecords2_out_set_pBuffer(PyObject *py_obj, PyObject *value, void *closure)
35066 : {
35067 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
35068 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->out.pBuffer));
35069 0 : if (value == NULL) {
35070 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.pBuffer");
35071 0 : return -1;
35072 : }
35073 0 : object->out.pBuffer = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->out.pBuffer);
35074 0 : if (object->out.pBuffer == NULL) {
35075 0 : PyErr_NoMemory();
35076 0 : return -1;
35077 : }
35078 0 : if (value == Py_None) {
35079 0 : *object->out.pBuffer = NULL;
35080 : } else {
35081 0 : *object->out.pBuffer = NULL;
35082 0 : PY_CHECK_TYPE(&DNS_RPC_RECORDS_ARRAY_Type, value, return -1;);
35083 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
35084 0 : PyErr_NoMemory();
35085 0 : return -1;
35086 : }
35087 0 : *object->out.pBuffer = (struct DNS_RPC_RECORDS_ARRAY *)pytalloc_get_ptr(value);
35088 : }
35089 0 : return 0;
35090 : }
35091 :
35092 0 : static PyObject *py_DnssrvEnumRecords2_get_result(PyObject *obj, void *closure)
35093 : {
35094 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(obj);
35095 0 : PyObject *py_result;
35096 0 : py_result = PyErr_FromWERROR(object->out.result);
35097 0 : return py_result;
35098 : }
35099 :
35100 0 : static int py_DnssrvEnumRecords2_set_result(PyObject *py_obj, PyObject *value, void *closure)
35101 : {
35102 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
35103 0 : if (value == NULL) {
35104 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
35105 0 : return -1;
35106 : }
35107 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
35108 0 : return 0;
35109 : }
35110 :
35111 : static PyGetSetDef py_DnssrvEnumRecords2_getsetters[] = {
35112 : {
35113 : .name = discard_const_p(char, "in_dwClientVersion"),
35114 : .get = py_DnssrvEnumRecords2_in_get_dwClientVersion,
35115 : .set = py_DnssrvEnumRecords2_in_set_dwClientVersion,
35116 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
35117 : },
35118 : {
35119 : .name = discard_const_p(char, "in_dwSettingFlags"),
35120 : .get = py_DnssrvEnumRecords2_in_get_dwSettingFlags,
35121 : .set = py_DnssrvEnumRecords2_in_set_dwSettingFlags,
35122 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
35123 : },
35124 : {
35125 : .name = discard_const_p(char, "in_pwszServerName"),
35126 : .get = py_DnssrvEnumRecords2_in_get_pwszServerName,
35127 : .set = py_DnssrvEnumRecords2_in_set_pwszServerName,
35128 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
35129 : },
35130 : {
35131 : .name = discard_const_p(char, "in_pszZone"),
35132 : .get = py_DnssrvEnumRecords2_in_get_pszZone,
35133 : .set = py_DnssrvEnumRecords2_in_set_pszZone,
35134 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35135 : },
35136 : {
35137 : .name = discard_const_p(char, "in_pszNodeName"),
35138 : .get = py_DnssrvEnumRecords2_in_get_pszNodeName,
35139 : .set = py_DnssrvEnumRecords2_in_set_pszNodeName,
35140 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35141 : },
35142 : {
35143 : .name = discard_const_p(char, "in_pszStartChild"),
35144 : .get = py_DnssrvEnumRecords2_in_get_pszStartChild,
35145 : .set = py_DnssrvEnumRecords2_in_set_pszStartChild,
35146 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35147 : },
35148 : {
35149 : .name = discard_const_p(char, "in_wRecordType"),
35150 : .get = py_DnssrvEnumRecords2_in_get_wRecordType,
35151 : .set = py_DnssrvEnumRecords2_in_set_wRecordType,
35152 : .doc = discard_const_p(char, "PIDL-generated element of base type dns_record_type")
35153 : },
35154 : {
35155 : .name = discard_const_p(char, "in_fSelectFlag"),
35156 : .get = py_DnssrvEnumRecords2_in_get_fSelectFlag,
35157 : .set = py_DnssrvEnumRecords2_in_set_fSelectFlag,
35158 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_SELECT_FLAGS")
35159 : },
35160 : {
35161 : .name = discard_const_p(char, "in_pszFilterStart"),
35162 : .get = py_DnssrvEnumRecords2_in_get_pszFilterStart,
35163 : .set = py_DnssrvEnumRecords2_in_set_pszFilterStart,
35164 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35165 : },
35166 : {
35167 : .name = discard_const_p(char, "in_pszFilterStop"),
35168 : .get = py_DnssrvEnumRecords2_in_get_pszFilterStop,
35169 : .set = py_DnssrvEnumRecords2_in_set_pszFilterStop,
35170 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
35171 : },
35172 : {
35173 : .name = discard_const_p(char, "out_pdwBufferLength"),
35174 : .get = py_DnssrvEnumRecords2_out_get_pdwBufferLength,
35175 : .set = py_DnssrvEnumRecords2_out_set_pdwBufferLength,
35176 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
35177 : },
35178 : {
35179 : .name = discard_const_p(char, "out_pBuffer"),
35180 : .get = py_DnssrvEnumRecords2_out_get_pBuffer,
35181 : .set = py_DnssrvEnumRecords2_out_set_pBuffer,
35182 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORDS_ARRAY")
35183 : },
35184 : {
35185 : .name = discard_const_p(char, "result"),
35186 : .get = py_DnssrvEnumRecords2_get_result,
35187 : .set = py_DnssrvEnumRecords2_set_result,
35188 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
35189 : },
35190 : { .name = NULL }
35191 : };
35192 :
35193 0 : static PyObject *py_DnssrvEnumRecords2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
35194 : {
35195 0 : PyObject *self = pytalloc_new(struct DnssrvEnumRecords2, type);
35196 0 : struct DnssrvEnumRecords2 *_self = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(self);
35197 0 : TALLOC_CTX *mem_ctx = pytalloc_get_mem_ctx(self);
35198 0 : _self->out.pdwBufferLength = talloc_zero(mem_ctx, uint32_t);
35199 : /* a pointer to a NULL pointer */
35200 0 : _self->out.pBuffer = talloc_zero(mem_ctx, struct DNS_RPC_RECORDS_ARRAY *);
35201 0 : return self;
35202 : }
35203 :
35204 0 : static PyObject *py_DnssrvEnumRecords2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
35205 : {
35206 :
35207 :
35208 0 : return PyLong_FromLong(8);
35209 : }
35210 :
35211 0 : static PyObject *py_DnssrvEnumRecords2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
35212 : {
35213 0 : const struct ndr_interface_call *call = NULL;
35214 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
35215 0 : PyObject *ret = NULL;
35216 0 : struct ndr_push *push = NULL;
35217 0 : DATA_BLOB blob;
35218 0 : enum ndr_err_code err;
35219 :
35220 0 : if (ndr_table_dnsserver.num_calls < 9) {
35221 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords2_ndr_pack");
35222 0 : return NULL;
35223 : }
35224 0 : call = &ndr_table_dnsserver.calls[8];
35225 :
35226 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
35227 0 : if (push == NULL) {
35228 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
35229 0 : return NULL;
35230 : }
35231 :
35232 0 : push->flags |= ndr_push_flags;
35233 :
35234 0 : err = call->ndr_push(push, ndr_inout_flags, object);
35235 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
35236 0 : TALLOC_FREE(push);
35237 0 : PyErr_SetNdrError(err);
35238 0 : return NULL;
35239 : }
35240 0 : blob = ndr_push_blob(push);
35241 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
35242 0 : TALLOC_FREE(push);
35243 0 : return ret;
35244 : }
35245 :
35246 0 : static PyObject *py_DnssrvEnumRecords2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35247 : {
35248 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
35249 0 : PyObject *bigendian_obj = NULL;
35250 0 : PyObject *ndr64_obj = NULL;
35251 0 : libndr_flags ndr_push_flags = 0;
35252 :
35253 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
35254 : discard_const_p(char *, kwnames),
35255 : &bigendian_obj,
35256 : &ndr64_obj)) {
35257 0 : return NULL;
35258 : }
35259 :
35260 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35261 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
35262 : }
35263 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35264 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
35265 : }
35266 :
35267 0 : return py_DnssrvEnumRecords2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
35268 : }
35269 :
35270 0 : static PyObject *py_DnssrvEnumRecords2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35271 : {
35272 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
35273 0 : PyObject *bigendian_obj = NULL;
35274 0 : PyObject *ndr64_obj = NULL;
35275 0 : libndr_flags ndr_push_flags = 0;
35276 :
35277 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
35278 : discard_const_p(char *, kwnames),
35279 : &bigendian_obj,
35280 : &ndr64_obj)) {
35281 0 : return NULL;
35282 : }
35283 :
35284 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35285 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
35286 : }
35287 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35288 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
35289 : }
35290 :
35291 0 : return py_DnssrvEnumRecords2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
35292 : }
35293 :
35294 0 : static PyObject *py_DnssrvEnumRecords2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
35295 : {
35296 0 : const struct ndr_interface_call *call = NULL;
35297 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
35298 0 : struct ndr_pull *pull = NULL;
35299 0 : enum ndr_err_code err;
35300 :
35301 0 : if (ndr_table_dnsserver.num_calls < 9) {
35302 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords2_ndr_unpack");
35303 0 : return NULL;
35304 : }
35305 0 : call = &ndr_table_dnsserver.calls[8];
35306 :
35307 0 : pull = ndr_pull_init_blob(blob, object);
35308 0 : if (pull == NULL) {
35309 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
35310 0 : return NULL;
35311 : }
35312 :
35313 0 : pull->flags |= ndr_pull_flags;
35314 :
35315 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
35316 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
35317 0 : TALLOC_FREE(pull);
35318 0 : PyErr_SetNdrError(err);
35319 0 : return NULL;
35320 : }
35321 0 : if (!allow_remaining) {
35322 0 : uint32_t highest_ofs;
35323 :
35324 0 : if (pull->offset > pull->relative_highest_offset) {
35325 0 : highest_ofs = pull->offset;
35326 : } else {
35327 0 : highest_ofs = pull->relative_highest_offset;
35328 : }
35329 0 : if (highest_ofs < pull->data_size) {
35330 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
35331 : "not all bytes consumed ofs[%u] size[%u]",
35332 : highest_ofs, pull->data_size);
35333 0 : TALLOC_FREE(pull);
35334 0 : PyErr_SetNdrError(err);
35335 0 : return NULL;
35336 : }
35337 : }
35338 :
35339 0 : TALLOC_FREE(pull);
35340 0 : Py_RETURN_NONE;
35341 : }
35342 :
35343 0 : static PyObject *py_DnssrvEnumRecords2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35344 : {
35345 0 : DATA_BLOB blob;
35346 0 : Py_ssize_t blob_length = 0;
35347 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
35348 0 : PyObject *bigendian_obj = NULL;
35349 0 : PyObject *ndr64_obj = NULL;
35350 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
35351 0 : PyObject *allow_remaining_obj = NULL;
35352 0 : bool allow_remaining = false;
35353 :
35354 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
35355 : discard_const_p(char *, kwnames),
35356 : &blob.data, &blob_length,
35357 : &bigendian_obj,
35358 : &ndr64_obj,
35359 : &allow_remaining_obj)) {
35360 0 : return NULL;
35361 : }
35362 0 : blob.length = blob_length;
35363 :
35364 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35365 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
35366 : }
35367 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35368 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
35369 : }
35370 :
35371 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
35372 0 : allow_remaining = true;
35373 : }
35374 :
35375 0 : return py_DnssrvEnumRecords2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
35376 : }
35377 :
35378 0 : static PyObject *py_DnssrvEnumRecords2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
35379 : {
35380 0 : DATA_BLOB blob;
35381 0 : Py_ssize_t blob_length = 0;
35382 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
35383 0 : PyObject *bigendian_obj = NULL;
35384 0 : PyObject *ndr64_obj = NULL;
35385 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
35386 0 : PyObject *allow_remaining_obj = NULL;
35387 0 : bool allow_remaining = false;
35388 :
35389 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
35390 : discard_const_p(char *, kwnames),
35391 : &blob.data, &blob_length,
35392 : &bigendian_obj,
35393 : &ndr64_obj,
35394 : &allow_remaining_obj)) {
35395 0 : return NULL;
35396 : }
35397 0 : blob.length = blob_length;
35398 :
35399 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
35400 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
35401 : }
35402 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
35403 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
35404 : }
35405 :
35406 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
35407 0 : allow_remaining = true;
35408 : }
35409 :
35410 0 : return py_DnssrvEnumRecords2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
35411 : }
35412 :
35413 0 : static PyObject *py_DnssrvEnumRecords2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
35414 : {
35415 0 : const struct ndr_interface_call *call = NULL;
35416 0 : struct DnssrvEnumRecords2 *object = (struct DnssrvEnumRecords2 *)pytalloc_get_ptr(py_obj);
35417 0 : PyObject *ret;
35418 0 : char *retstr;
35419 :
35420 0 : if (ndr_table_dnsserver.num_calls < 9) {
35421 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvEnumRecords2_ndr_print");
35422 0 : return NULL;
35423 : }
35424 0 : call = &ndr_table_dnsserver.calls[8];
35425 :
35426 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
35427 0 : ret = PyUnicode_FromString(retstr);
35428 0 : TALLOC_FREE(retstr);
35429 :
35430 0 : return ret;
35431 : }
35432 :
35433 0 : static PyObject *py_DnssrvEnumRecords2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
35434 : {
35435 0 : return py_DnssrvEnumRecords2_ndr_print(py_obj, "DnssrvEnumRecords2_in", NDR_IN);
35436 : }
35437 :
35438 0 : static PyObject *py_DnssrvEnumRecords2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
35439 : {
35440 0 : return py_DnssrvEnumRecords2_ndr_print(py_obj, "DnssrvEnumRecords2_out", NDR_OUT);
35441 : }
35442 :
35443 : static PyMethodDef py_DnssrvEnumRecords2_methods[] = {
35444 : { "opnum", (PyCFunction)py_DnssrvEnumRecords2_ndr_opnum, METH_NOARGS|METH_CLASS,
35445 : "dnsserver.DnssrvEnumRecords2.opnum() -> 8 (0x08) " },
35446 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
35447 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
35448 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
35449 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
35450 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
35451 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
35452 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvEnumRecords2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
35453 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
35454 : { "__ndr_print_in__", (PyCFunction)py_DnssrvEnumRecords2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
35455 : { "__ndr_print_out__", (PyCFunction)py_DnssrvEnumRecords2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
35456 : { NULL, NULL, 0, NULL }
35457 : };
35458 :
35459 :
35460 : static PyTypeObject DnssrvEnumRecords2_Type = {
35461 : PyVarObject_HEAD_INIT(NULL, 0)
35462 : .tp_name = "dnsserver.DnssrvEnumRecords2",
35463 : .tp_getset = py_DnssrvEnumRecords2_getsetters,
35464 : .tp_methods = py_DnssrvEnumRecords2_methods,
35465 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
35466 : .tp_new = py_DnssrvEnumRecords2_new,
35467 : };
35468 :
35469 1262 : static bool pack_py_DnssrvEnumRecords2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvEnumRecords2 *r)
35470 : {
35471 0 : PyObject *py_dwClientVersion;
35472 0 : PyObject *py_dwSettingFlags;
35473 0 : PyObject *py_pwszServerName;
35474 0 : PyObject *py_pszZone;
35475 0 : PyObject *py_pszNodeName;
35476 0 : PyObject *py_pszStartChild;
35477 0 : PyObject *py_wRecordType;
35478 0 : PyObject *py_fSelectFlag;
35479 0 : PyObject *py_pszFilterStart;
35480 0 : PyObject *py_pszFilterStop;
35481 1262 : const char *kwnames[] = {
35482 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszNodeName", "pszStartChild", "wRecordType", "fSelectFlag", "pszFilterStart", "pszFilterStop", NULL
35483 : };
35484 :
35485 1262 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOOO:DnssrvEnumRecords2", discard_const_p(char *, kwnames), &py_dwClientVersion, &py_dwSettingFlags, &py_pwszServerName, &py_pszZone, &py_pszNodeName, &py_pszStartChild, &py_wRecordType, &py_fSelectFlag, &py_pszFilterStart, &py_pszFilterStop)) {
35486 0 : return false;
35487 : }
35488 :
35489 1262 : if (py_dwClientVersion == NULL) {
35490 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwClientVersion");
35491 0 : return false;
35492 : }
35493 : {
35494 1262 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
35495 1262 : if (PyLong_Check(py_dwClientVersion)) {
35496 0 : unsigned long long test_var;
35497 1262 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
35498 1262 : if (PyErr_Occurred() != NULL) {
35499 0 : return false;
35500 : }
35501 1262 : if (test_var > uint_max) {
35502 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35503 : PyLong_Type.tp_name, uint_max, test_var);
35504 0 : return false;
35505 : }
35506 1262 : r->in.dwClientVersion = test_var;
35507 : } else {
35508 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35509 : PyLong_Type.tp_name);
35510 0 : return false;
35511 : }
35512 : }
35513 1262 : if (py_dwSettingFlags == NULL) {
35514 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwSettingFlags");
35515 0 : return false;
35516 : }
35517 : {
35518 1262 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
35519 1262 : if (PyLong_Check(py_dwSettingFlags)) {
35520 0 : unsigned long long test_var;
35521 1262 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
35522 1262 : if (PyErr_Occurred() != NULL) {
35523 0 : return false;
35524 : }
35525 1262 : if (test_var > uint_max) {
35526 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35527 : PyLong_Type.tp_name, uint_max, test_var);
35528 0 : return false;
35529 : }
35530 1262 : r->in.dwSettingFlags = test_var;
35531 : } else {
35532 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35533 : PyLong_Type.tp_name);
35534 0 : return false;
35535 : }
35536 : }
35537 1262 : if (py_pwszServerName == NULL) {
35538 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
35539 0 : return false;
35540 : }
35541 1262 : if (py_pwszServerName == Py_None) {
35542 0 : r->in.pwszServerName = NULL;
35543 : } else {
35544 1262 : r->in.pwszServerName = NULL;
35545 : {
35546 0 : const char *test_str;
35547 0 : const char *talloc_str;
35548 1262 : PyObject *unicode = NULL;
35549 1262 : if (PyUnicode_Check(py_pwszServerName)) {
35550 1262 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
35551 1262 : if (unicode == NULL) {
35552 0 : PyErr_NoMemory();
35553 0 : return false;
35554 : }
35555 1262 : test_str = PyBytes_AS_STRING(unicode);
35556 0 : } else if (PyBytes_Check(py_pwszServerName)) {
35557 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
35558 : } else {
35559 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
35560 0 : return false;
35561 : }
35562 1262 : talloc_str = talloc_strdup(r, test_str);
35563 1262 : if (unicode != NULL) {
35564 1262 : Py_DECREF(unicode);
35565 : }
35566 1262 : if (talloc_str == NULL) {
35567 0 : PyErr_NoMemory();
35568 0 : return false;
35569 : }
35570 1262 : r->in.pwszServerName = talloc_str;
35571 : }
35572 : }
35573 1262 : if (py_pszZone == NULL) {
35574 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
35575 0 : return false;
35576 : }
35577 1262 : if (py_pszZone == Py_None) {
35578 0 : r->in.pszZone = NULL;
35579 : } else {
35580 1262 : r->in.pszZone = NULL;
35581 : {
35582 0 : const char *test_str;
35583 0 : const char *talloc_str;
35584 1262 : PyObject *unicode = NULL;
35585 1262 : if (PyUnicode_Check(py_pszZone)) {
35586 1262 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
35587 1262 : if (unicode == NULL) {
35588 0 : PyErr_NoMemory();
35589 0 : return false;
35590 : }
35591 1262 : test_str = PyBytes_AS_STRING(unicode);
35592 0 : } else if (PyBytes_Check(py_pszZone)) {
35593 0 : test_str = PyBytes_AS_STRING(py_pszZone);
35594 : } else {
35595 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
35596 0 : return false;
35597 : }
35598 1262 : talloc_str = talloc_strdup(r, test_str);
35599 1262 : if (unicode != NULL) {
35600 1262 : Py_DECREF(unicode);
35601 : }
35602 1262 : if (talloc_str == NULL) {
35603 0 : PyErr_NoMemory();
35604 0 : return false;
35605 : }
35606 1262 : r->in.pszZone = talloc_str;
35607 : }
35608 : }
35609 1262 : if (py_pszNodeName == NULL) {
35610 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszNodeName");
35611 0 : return false;
35612 : }
35613 1262 : if (py_pszNodeName == Py_None) {
35614 0 : r->in.pszNodeName = NULL;
35615 : } else {
35616 1262 : r->in.pszNodeName = NULL;
35617 : {
35618 0 : const char *test_str;
35619 0 : const char *talloc_str;
35620 1262 : PyObject *unicode = NULL;
35621 1262 : if (PyUnicode_Check(py_pszNodeName)) {
35622 1262 : unicode = PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore");
35623 1262 : if (unicode == NULL) {
35624 0 : PyErr_NoMemory();
35625 0 : return false;
35626 : }
35627 1262 : test_str = PyBytes_AS_STRING(unicode);
35628 0 : } else if (PyBytes_Check(py_pszNodeName)) {
35629 0 : test_str = PyBytes_AS_STRING(py_pszNodeName);
35630 : } else {
35631 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
35632 0 : return false;
35633 : }
35634 1262 : talloc_str = talloc_strdup(r, test_str);
35635 1262 : if (unicode != NULL) {
35636 1262 : Py_DECREF(unicode);
35637 : }
35638 1262 : if (talloc_str == NULL) {
35639 0 : PyErr_NoMemory();
35640 0 : return false;
35641 : }
35642 1262 : r->in.pszNodeName = talloc_str;
35643 : }
35644 : }
35645 1262 : if (py_pszStartChild == NULL) {
35646 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszStartChild");
35647 0 : return false;
35648 : }
35649 1262 : if (py_pszStartChild == Py_None) {
35650 1262 : r->in.pszStartChild = NULL;
35651 : } else {
35652 0 : r->in.pszStartChild = NULL;
35653 : {
35654 0 : const char *test_str;
35655 0 : const char *talloc_str;
35656 0 : PyObject *unicode = NULL;
35657 0 : if (PyUnicode_Check(py_pszStartChild)) {
35658 0 : unicode = PyUnicode_AsEncodedString(py_pszStartChild, "utf-8", "ignore");
35659 0 : if (unicode == NULL) {
35660 0 : PyErr_NoMemory();
35661 0 : return false;
35662 : }
35663 0 : test_str = PyBytes_AS_STRING(unicode);
35664 0 : } else if (PyBytes_Check(py_pszStartChild)) {
35665 0 : test_str = PyBytes_AS_STRING(py_pszStartChild);
35666 : } else {
35667 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszStartChild)->tp_name);
35668 0 : return false;
35669 : }
35670 0 : talloc_str = talloc_strdup(r, test_str);
35671 0 : if (unicode != NULL) {
35672 0 : Py_DECREF(unicode);
35673 : }
35674 0 : if (talloc_str == NULL) {
35675 0 : PyErr_NoMemory();
35676 0 : return false;
35677 : }
35678 0 : r->in.pszStartChild = talloc_str;
35679 : }
35680 : }
35681 1262 : if (py_wRecordType == NULL) {
35682 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.wRecordType");
35683 0 : return false;
35684 : }
35685 : {
35686 1262 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.wRecordType));
35687 1262 : if (PyLong_Check(py_wRecordType)) {
35688 0 : unsigned long long test_var;
35689 1262 : test_var = PyLong_AsUnsignedLongLong(py_wRecordType);
35690 1262 : if (PyErr_Occurred() != NULL) {
35691 0 : return false;
35692 : }
35693 1262 : if (test_var > uint_max) {
35694 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35695 : PyLong_Type.tp_name, uint_max, test_var);
35696 0 : return false;
35697 : }
35698 1262 : r->in.wRecordType = test_var;
35699 : } else {
35700 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35701 : PyLong_Type.tp_name);
35702 0 : return false;
35703 : }
35704 : }
35705 1262 : if (py_fSelectFlag == NULL) {
35706 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.fSelectFlag");
35707 0 : return false;
35708 : }
35709 : {
35710 1262 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.fSelectFlag));
35711 1262 : if (PyLong_Check(py_fSelectFlag)) {
35712 0 : unsigned long long test_var;
35713 1262 : test_var = PyLong_AsUnsignedLongLong(py_fSelectFlag);
35714 1262 : if (PyErr_Occurred() != NULL) {
35715 0 : return false;
35716 : }
35717 1262 : if (test_var > uint_max) {
35718 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35719 : PyLong_Type.tp_name, uint_max, test_var);
35720 0 : return false;
35721 : }
35722 1262 : r->in.fSelectFlag = test_var;
35723 : } else {
35724 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35725 : PyLong_Type.tp_name);
35726 0 : return false;
35727 : }
35728 : }
35729 1262 : if (py_pszFilterStart == NULL) {
35730 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszFilterStart");
35731 0 : return false;
35732 : }
35733 1262 : if (py_pszFilterStart == Py_None) {
35734 1262 : r->in.pszFilterStart = NULL;
35735 : } else {
35736 0 : r->in.pszFilterStart = NULL;
35737 : {
35738 0 : const char *test_str;
35739 0 : const char *talloc_str;
35740 0 : PyObject *unicode = NULL;
35741 0 : if (PyUnicode_Check(py_pszFilterStart)) {
35742 0 : unicode = PyUnicode_AsEncodedString(py_pszFilterStart, "utf-8", "ignore");
35743 0 : if (unicode == NULL) {
35744 0 : PyErr_NoMemory();
35745 0 : return false;
35746 : }
35747 0 : test_str = PyBytes_AS_STRING(unicode);
35748 0 : } else if (PyBytes_Check(py_pszFilterStart)) {
35749 0 : test_str = PyBytes_AS_STRING(py_pszFilterStart);
35750 : } else {
35751 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStart)->tp_name);
35752 0 : return false;
35753 : }
35754 0 : talloc_str = talloc_strdup(r, test_str);
35755 0 : if (unicode != NULL) {
35756 0 : Py_DECREF(unicode);
35757 : }
35758 0 : if (talloc_str == NULL) {
35759 0 : PyErr_NoMemory();
35760 0 : return false;
35761 : }
35762 0 : r->in.pszFilterStart = talloc_str;
35763 : }
35764 : }
35765 1262 : if (py_pszFilterStop == NULL) {
35766 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszFilterStop");
35767 0 : return false;
35768 : }
35769 1262 : if (py_pszFilterStop == Py_None) {
35770 1262 : r->in.pszFilterStop = NULL;
35771 : } else {
35772 0 : r->in.pszFilterStop = NULL;
35773 : {
35774 0 : const char *test_str;
35775 0 : const char *talloc_str;
35776 0 : PyObject *unicode = NULL;
35777 0 : if (PyUnicode_Check(py_pszFilterStop)) {
35778 0 : unicode = PyUnicode_AsEncodedString(py_pszFilterStop, "utf-8", "ignore");
35779 0 : if (unicode == NULL) {
35780 0 : PyErr_NoMemory();
35781 0 : return false;
35782 : }
35783 0 : test_str = PyBytes_AS_STRING(unicode);
35784 0 : } else if (PyBytes_Check(py_pszFilterStop)) {
35785 0 : test_str = PyBytes_AS_STRING(py_pszFilterStop);
35786 : } else {
35787 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszFilterStop)->tp_name);
35788 0 : return false;
35789 : }
35790 0 : talloc_str = talloc_strdup(r, test_str);
35791 0 : if (unicode != NULL) {
35792 0 : Py_DECREF(unicode);
35793 : }
35794 0 : if (talloc_str == NULL) {
35795 0 : PyErr_NoMemory();
35796 0 : return false;
35797 : }
35798 0 : r->in.pszFilterStop = talloc_str;
35799 : }
35800 : }
35801 1262 : return true;
35802 : }
35803 :
35804 1262 : static PyObject *unpack_py_DnssrvEnumRecords2_args_out(struct DnssrvEnumRecords2 *r)
35805 : {
35806 0 : PyObject *result;
35807 0 : PyObject *py_pdwBufferLength;
35808 0 : PyObject *py_pBuffer;
35809 1262 : result = PyTuple_New(2);
35810 1262 : py_pdwBufferLength = PyLong_FromUnsignedLongLong((uint32_t)*r->out.pdwBufferLength);
35811 1262 : PyTuple_SetItem(result, 0, py_pdwBufferLength);
35812 1262 : if (*r->out.pBuffer == NULL) {
35813 182 : py_pBuffer = Py_None;
35814 182 : Py_INCREF(py_pBuffer);
35815 : } else {
35816 1080 : py_pBuffer = pytalloc_reference_ex(&DNS_RPC_RECORDS_ARRAY_Type, *r->out.pBuffer, *r->out.pBuffer);
35817 : }
35818 1262 : PyTuple_SetItem(result, 1, py_pBuffer);
35819 1262 : if (!W_ERROR_IS_OK(r->out.result)) {
35820 182 : PyErr_SetWERROR(r->out.result);
35821 182 : return NULL;
35822 : }
35823 :
35824 1080 : return result;
35825 : }
35826 :
35827 :
35828 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_dwClientVersion(PyObject *obj, void *closure)
35829 : {
35830 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(obj);
35831 0 : PyObject *py_dwClientVersion;
35832 0 : py_dwClientVersion = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwClientVersion);
35833 0 : return py_dwClientVersion;
35834 : }
35835 :
35836 0 : static int py_DnssrvUpdateRecord2_in_set_dwClientVersion(PyObject *py_obj, PyObject *value, void *closure)
35837 : {
35838 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
35839 0 : if (value == NULL) {
35840 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwClientVersion");
35841 0 : return -1;
35842 : }
35843 : {
35844 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwClientVersion));
35845 0 : if (PyLong_Check(value)) {
35846 0 : unsigned long long test_var;
35847 0 : test_var = PyLong_AsUnsignedLongLong(value);
35848 0 : if (PyErr_Occurred() != NULL) {
35849 0 : return -1;
35850 : }
35851 0 : if (test_var > uint_max) {
35852 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35853 : PyLong_Type.tp_name, uint_max, test_var);
35854 0 : return -1;
35855 : }
35856 0 : object->in.dwClientVersion = test_var;
35857 : } else {
35858 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35859 : PyLong_Type.tp_name);
35860 0 : return -1;
35861 : }
35862 : }
35863 0 : return 0;
35864 : }
35865 :
35866 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_dwSettingFlags(PyObject *obj, void *closure)
35867 : {
35868 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(obj);
35869 0 : PyObject *py_dwSettingFlags;
35870 0 : py_dwSettingFlags = PyLong_FromUnsignedLongLong((uint32_t)object->in.dwSettingFlags);
35871 0 : return py_dwSettingFlags;
35872 : }
35873 :
35874 0 : static int py_DnssrvUpdateRecord2_in_set_dwSettingFlags(PyObject *py_obj, PyObject *value, void *closure)
35875 : {
35876 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
35877 0 : if (value == NULL) {
35878 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.dwSettingFlags");
35879 0 : return -1;
35880 : }
35881 : {
35882 0 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(object->in.dwSettingFlags));
35883 0 : if (PyLong_Check(value)) {
35884 0 : unsigned long long test_var;
35885 0 : test_var = PyLong_AsUnsignedLongLong(value);
35886 0 : if (PyErr_Occurred() != NULL) {
35887 0 : return -1;
35888 : }
35889 0 : if (test_var > uint_max) {
35890 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
35891 : PyLong_Type.tp_name, uint_max, test_var);
35892 0 : return -1;
35893 : }
35894 0 : object->in.dwSettingFlags = test_var;
35895 : } else {
35896 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
35897 : PyLong_Type.tp_name);
35898 0 : return -1;
35899 : }
35900 : }
35901 0 : return 0;
35902 : }
35903 :
35904 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pwszServerName(PyObject *obj, void *closure)
35905 : {
35906 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(obj);
35907 0 : PyObject *py_pwszServerName;
35908 0 : if (object->in.pwszServerName == NULL) {
35909 0 : Py_RETURN_NONE;
35910 : }
35911 0 : if (object->in.pwszServerName == NULL) {
35912 0 : py_pwszServerName = Py_None;
35913 0 : Py_INCREF(py_pwszServerName);
35914 : } else {
35915 0 : if (object->in.pwszServerName == NULL) {
35916 0 : py_pwszServerName = Py_None;
35917 0 : Py_INCREF(py_pwszServerName);
35918 : } else {
35919 0 : py_pwszServerName = PyUnicode_Decode(object->in.pwszServerName, strlen(object->in.pwszServerName), "utf-8", "ignore");
35920 : }
35921 : }
35922 0 : return py_pwszServerName;
35923 : }
35924 :
35925 0 : static int py_DnssrvUpdateRecord2_in_set_pwszServerName(PyObject *py_obj, PyObject *value, void *closure)
35926 : {
35927 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
35928 0 : if (value == NULL) {
35929 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pwszServerName");
35930 0 : return -1;
35931 : }
35932 0 : if (value == Py_None) {
35933 0 : object->in.pwszServerName = NULL;
35934 : } else {
35935 0 : object->in.pwszServerName = NULL;
35936 : {
35937 0 : const char *test_str;
35938 0 : const char *talloc_str;
35939 0 : PyObject *unicode = NULL;
35940 0 : if (PyUnicode_Check(value)) {
35941 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
35942 0 : if (unicode == NULL) {
35943 0 : PyErr_NoMemory();
35944 0 : return -1;
35945 : }
35946 0 : test_str = PyBytes_AS_STRING(unicode);
35947 0 : } else if (PyBytes_Check(value)) {
35948 0 : test_str = PyBytes_AS_STRING(value);
35949 : } else {
35950 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
35951 0 : return -1;
35952 : }
35953 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
35954 0 : if (unicode != NULL) {
35955 0 : Py_DECREF(unicode);
35956 : }
35957 0 : if (talloc_str == NULL) {
35958 0 : PyErr_NoMemory();
35959 0 : return -1;
35960 : }
35961 0 : object->in.pwszServerName = talloc_str;
35962 : }
35963 : }
35964 0 : return 0;
35965 : }
35966 :
35967 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pszZone(PyObject *obj, void *closure)
35968 : {
35969 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(obj);
35970 0 : PyObject *py_pszZone;
35971 0 : if (object->in.pszZone == NULL) {
35972 0 : Py_RETURN_NONE;
35973 : }
35974 0 : if (object->in.pszZone == NULL) {
35975 0 : py_pszZone = Py_None;
35976 0 : Py_INCREF(py_pszZone);
35977 : } else {
35978 0 : if (object->in.pszZone == NULL) {
35979 0 : py_pszZone = Py_None;
35980 0 : Py_INCREF(py_pszZone);
35981 : } else {
35982 0 : py_pszZone = PyUnicode_Decode(object->in.pszZone, strlen(object->in.pszZone), "utf-8", "ignore");
35983 : }
35984 : }
35985 0 : return py_pszZone;
35986 : }
35987 :
35988 0 : static int py_DnssrvUpdateRecord2_in_set_pszZone(PyObject *py_obj, PyObject *value, void *closure)
35989 : {
35990 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
35991 0 : if (value == NULL) {
35992 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszZone");
35993 0 : return -1;
35994 : }
35995 0 : if (value == Py_None) {
35996 0 : object->in.pszZone = NULL;
35997 : } else {
35998 0 : object->in.pszZone = NULL;
35999 : {
36000 0 : const char *test_str;
36001 0 : const char *talloc_str;
36002 0 : PyObject *unicode = NULL;
36003 0 : if (PyUnicode_Check(value)) {
36004 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
36005 0 : if (unicode == NULL) {
36006 0 : PyErr_NoMemory();
36007 0 : return -1;
36008 : }
36009 0 : test_str = PyBytes_AS_STRING(unicode);
36010 0 : } else if (PyBytes_Check(value)) {
36011 0 : test_str = PyBytes_AS_STRING(value);
36012 : } else {
36013 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
36014 0 : return -1;
36015 : }
36016 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
36017 0 : if (unicode != NULL) {
36018 0 : Py_DECREF(unicode);
36019 : }
36020 0 : if (talloc_str == NULL) {
36021 0 : PyErr_NoMemory();
36022 0 : return -1;
36023 : }
36024 0 : object->in.pszZone = talloc_str;
36025 : }
36026 : }
36027 0 : return 0;
36028 : }
36029 :
36030 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pszNodeName(PyObject *obj, void *closure)
36031 : {
36032 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(obj);
36033 0 : PyObject *py_pszNodeName;
36034 0 : if (object->in.pszNodeName == NULL) {
36035 0 : Py_RETURN_NONE;
36036 : }
36037 0 : if (object->in.pszNodeName == NULL) {
36038 0 : py_pszNodeName = Py_None;
36039 0 : Py_INCREF(py_pszNodeName);
36040 : } else {
36041 0 : py_pszNodeName = PyUnicode_Decode(object->in.pszNodeName, strlen(object->in.pszNodeName), "utf-8", "ignore");
36042 : }
36043 0 : return py_pszNodeName;
36044 : }
36045 :
36046 0 : static int py_DnssrvUpdateRecord2_in_set_pszNodeName(PyObject *py_obj, PyObject *value, void *closure)
36047 : {
36048 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
36049 0 : if (value == NULL) {
36050 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pszNodeName");
36051 0 : return -1;
36052 : }
36053 0 : object->in.pszNodeName = talloc_ptrtype(pytalloc_get_mem_ctx(py_obj), object->in.pszNodeName);
36054 0 : if (object->in.pszNodeName == NULL) {
36055 0 : PyErr_NoMemory();
36056 0 : return -1;
36057 : }
36058 : {
36059 0 : const char *test_str;
36060 0 : const char *talloc_str;
36061 0 : PyObject *unicode = NULL;
36062 0 : if (PyUnicode_Check(value)) {
36063 0 : unicode = PyUnicode_AsEncodedString(value, "utf-8", "ignore");
36064 0 : if (unicode == NULL) {
36065 0 : PyErr_NoMemory();
36066 0 : return -1;
36067 : }
36068 0 : test_str = PyBytes_AS_STRING(unicode);
36069 0 : } else if (PyBytes_Check(value)) {
36070 0 : test_str = PyBytes_AS_STRING(value);
36071 : } else {
36072 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(value)->tp_name);
36073 0 : return -1;
36074 : }
36075 0 : talloc_str = talloc_strdup(pytalloc_get_mem_ctx(py_obj), test_str);
36076 0 : if (unicode != NULL) {
36077 0 : Py_DECREF(unicode);
36078 : }
36079 0 : if (talloc_str == NULL) {
36080 0 : PyErr_NoMemory();
36081 0 : return -1;
36082 : }
36083 0 : object->in.pszNodeName = talloc_str;
36084 : }
36085 0 : return 0;
36086 : }
36087 :
36088 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pAddRecord(PyObject *obj, void *closure)
36089 : {
36090 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(obj);
36091 0 : PyObject *py_pAddRecord;
36092 0 : if (object->in.pAddRecord == NULL) {
36093 0 : Py_RETURN_NONE;
36094 : }
36095 0 : if (object->in.pAddRecord == NULL) {
36096 0 : py_pAddRecord = Py_None;
36097 0 : Py_INCREF(py_pAddRecord);
36098 : } else {
36099 0 : py_pAddRecord = pytalloc_reference_ex(&DNS_RPC_RECORD_BUF_Type, object->in.pAddRecord, object->in.pAddRecord);
36100 : }
36101 0 : return py_pAddRecord;
36102 : }
36103 :
36104 0 : static int py_DnssrvUpdateRecord2_in_set_pAddRecord(PyObject *py_obj, PyObject *value, void *closure)
36105 : {
36106 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
36107 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pAddRecord));
36108 0 : if (value == NULL) {
36109 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pAddRecord");
36110 0 : return -1;
36111 : }
36112 0 : if (value == Py_None) {
36113 0 : object->in.pAddRecord = NULL;
36114 : } else {
36115 0 : object->in.pAddRecord = NULL;
36116 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, value, return -1;);
36117 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
36118 0 : PyErr_NoMemory();
36119 0 : return -1;
36120 : }
36121 0 : object->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(value);
36122 : }
36123 0 : return 0;
36124 : }
36125 :
36126 0 : static PyObject *py_DnssrvUpdateRecord2_in_get_pDeleteRecord(PyObject *obj, void *closure)
36127 : {
36128 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(obj);
36129 0 : PyObject *py_pDeleteRecord;
36130 0 : if (object->in.pDeleteRecord == NULL) {
36131 0 : Py_RETURN_NONE;
36132 : }
36133 0 : if (object->in.pDeleteRecord == NULL) {
36134 0 : py_pDeleteRecord = Py_None;
36135 0 : Py_INCREF(py_pDeleteRecord);
36136 : } else {
36137 0 : py_pDeleteRecord = pytalloc_reference_ex(&DNS_RPC_RECORD_BUF_Type, object->in.pDeleteRecord, object->in.pDeleteRecord);
36138 : }
36139 0 : return py_pDeleteRecord;
36140 : }
36141 :
36142 0 : static int py_DnssrvUpdateRecord2_in_set_pDeleteRecord(PyObject *py_obj, PyObject *value, void *closure)
36143 : {
36144 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
36145 0 : talloc_unlink(pytalloc_get_mem_ctx(py_obj), discard_const(object->in.pDeleteRecord));
36146 0 : if (value == NULL) {
36147 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->in.pDeleteRecord");
36148 0 : return -1;
36149 : }
36150 0 : if (value == Py_None) {
36151 0 : object->in.pDeleteRecord = NULL;
36152 : } else {
36153 0 : object->in.pDeleteRecord = NULL;
36154 0 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, value, return -1;);
36155 0 : if (talloc_reference(pytalloc_get_mem_ctx(py_obj), pytalloc_get_mem_ctx(value)) == NULL) {
36156 0 : PyErr_NoMemory();
36157 0 : return -1;
36158 : }
36159 0 : object->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(value);
36160 : }
36161 0 : return 0;
36162 : }
36163 :
36164 0 : static PyObject *py_DnssrvUpdateRecord2_get_result(PyObject *obj, void *closure)
36165 : {
36166 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(obj);
36167 0 : PyObject *py_result;
36168 0 : py_result = PyErr_FromWERROR(object->out.result);
36169 0 : return py_result;
36170 : }
36171 :
36172 0 : static int py_DnssrvUpdateRecord2_set_result(PyObject *py_obj, PyObject *value, void *closure)
36173 : {
36174 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
36175 0 : if (value == NULL) {
36176 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct object->out.result");
36177 0 : return -1;
36178 : }
36179 0 : object->out.result = W_ERROR(PyLong_AsLong(value));
36180 0 : return 0;
36181 : }
36182 :
36183 : static PyGetSetDef py_DnssrvUpdateRecord2_getsetters[] = {
36184 : {
36185 : .name = discard_const_p(char, "in_dwClientVersion"),
36186 : .get = py_DnssrvUpdateRecord2_in_get_dwClientVersion,
36187 : .set = py_DnssrvUpdateRecord2_in_set_dwClientVersion,
36188 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_CLIENT_VERSION")
36189 : },
36190 : {
36191 : .name = discard_const_p(char, "in_dwSettingFlags"),
36192 : .get = py_DnssrvUpdateRecord2_in_get_dwSettingFlags,
36193 : .set = py_DnssrvUpdateRecord2_in_set_dwSettingFlags,
36194 : .doc = discard_const_p(char, "PIDL-generated element of base type uint32")
36195 : },
36196 : {
36197 : .name = discard_const_p(char, "in_pwszServerName"),
36198 : .get = py_DnssrvUpdateRecord2_in_get_pwszServerName,
36199 : .set = py_DnssrvUpdateRecord2_in_set_pwszServerName,
36200 : .doc = discard_const_p(char, "PIDL-generated element of base type uint16")
36201 : },
36202 : {
36203 : .name = discard_const_p(char, "in_pszZone"),
36204 : .get = py_DnssrvUpdateRecord2_in_get_pszZone,
36205 : .set = py_DnssrvUpdateRecord2_in_set_pszZone,
36206 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
36207 : },
36208 : {
36209 : .name = discard_const_p(char, "in_pszNodeName"),
36210 : .get = py_DnssrvUpdateRecord2_in_get_pszNodeName,
36211 : .set = py_DnssrvUpdateRecord2_in_set_pszNodeName,
36212 : .doc = discard_const_p(char, "PIDL-generated element of base type uint8")
36213 : },
36214 : {
36215 : .name = discard_const_p(char, "in_pAddRecord"),
36216 : .get = py_DnssrvUpdateRecord2_in_get_pAddRecord,
36217 : .set = py_DnssrvUpdateRecord2_in_set_pAddRecord,
36218 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_BUF")
36219 : },
36220 : {
36221 : .name = discard_const_p(char, "in_pDeleteRecord"),
36222 : .get = py_DnssrvUpdateRecord2_in_get_pDeleteRecord,
36223 : .set = py_DnssrvUpdateRecord2_in_set_pDeleteRecord,
36224 : .doc = discard_const_p(char, "PIDL-generated element of base type DNS_RPC_RECORD_BUF")
36225 : },
36226 : {
36227 : .name = discard_const_p(char, "result"),
36228 : .get = py_DnssrvUpdateRecord2_get_result,
36229 : .set = py_DnssrvUpdateRecord2_set_result,
36230 : .doc = discard_const_p(char, "PIDL-generated element of type WERROR")
36231 : },
36232 : { .name = NULL }
36233 : };
36234 :
36235 0 : static PyObject *py_DnssrvUpdateRecord2_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
36236 : {
36237 0 : PyObject *self = pytalloc_new(struct DnssrvUpdateRecord2, type);
36238 0 : return self;
36239 : }
36240 :
36241 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_opnum(PyTypeObject *type, PyObject *Py_UNUSED(ignored))
36242 : {
36243 :
36244 :
36245 0 : return PyLong_FromLong(9);
36246 : }
36247 :
36248 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_pack(PyObject *py_obj, ndr_flags_type ndr_inout_flags, libndr_flags ndr_push_flags)
36249 : {
36250 0 : const struct ndr_interface_call *call = NULL;
36251 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
36252 0 : PyObject *ret = NULL;
36253 0 : struct ndr_push *push = NULL;
36254 0 : DATA_BLOB blob;
36255 0 : enum ndr_err_code err;
36256 :
36257 0 : if (ndr_table_dnsserver.num_calls < 10) {
36258 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord2_ndr_pack");
36259 0 : return NULL;
36260 : }
36261 0 : call = &ndr_table_dnsserver.calls[9];
36262 :
36263 0 : push = ndr_push_init_ctx(pytalloc_get_mem_ctx(py_obj));
36264 0 : if (push == NULL) {
36265 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
36266 0 : return NULL;
36267 : }
36268 :
36269 0 : push->flags |= ndr_push_flags;
36270 :
36271 0 : err = call->ndr_push(push, ndr_inout_flags, object);
36272 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
36273 0 : TALLOC_FREE(push);
36274 0 : PyErr_SetNdrError(err);
36275 0 : return NULL;
36276 : }
36277 0 : blob = ndr_push_blob(push);
36278 0 : ret = PyBytes_FromStringAndSize((char *)blob.data, blob.length);
36279 0 : TALLOC_FREE(push);
36280 0 : return ret;
36281 : }
36282 :
36283 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_pack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36284 : {
36285 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
36286 0 : PyObject *bigendian_obj = NULL;
36287 0 : PyObject *ndr64_obj = NULL;
36288 0 : libndr_flags ndr_push_flags = 0;
36289 :
36290 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_in__",
36291 : discard_const_p(char *, kwnames),
36292 : &bigendian_obj,
36293 : &ndr64_obj)) {
36294 0 : return NULL;
36295 : }
36296 :
36297 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36298 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
36299 : }
36300 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36301 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
36302 : }
36303 :
36304 0 : return py_DnssrvUpdateRecord2_ndr_pack(py_obj, NDR_IN, ndr_push_flags);
36305 : }
36306 :
36307 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_pack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36308 : {
36309 0 : const char * const kwnames[] = { "bigendian", "ndr64", NULL };
36310 0 : PyObject *bigendian_obj = NULL;
36311 0 : PyObject *ndr64_obj = NULL;
36312 0 : libndr_flags ndr_push_flags = 0;
36313 :
36314 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OO:__ndr_pack_out__",
36315 : discard_const_p(char *, kwnames),
36316 : &bigendian_obj,
36317 : &ndr64_obj)) {
36318 0 : return NULL;
36319 : }
36320 :
36321 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36322 0 : ndr_push_flags |= LIBNDR_FLAG_BIGENDIAN;
36323 : }
36324 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36325 0 : ndr_push_flags |= LIBNDR_FLAG_NDR64;
36326 : }
36327 :
36328 0 : return py_DnssrvUpdateRecord2_ndr_pack(py_obj, NDR_OUT, ndr_push_flags);
36329 : }
36330 :
36331 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_unpack(PyObject *py_obj, const DATA_BLOB *blob, ndr_flags_type ndr_inout_flags, libndr_flags ndr_pull_flags, bool allow_remaining)
36332 : {
36333 0 : const struct ndr_interface_call *call = NULL;
36334 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
36335 0 : struct ndr_pull *pull = NULL;
36336 0 : enum ndr_err_code err;
36337 :
36338 0 : if (ndr_table_dnsserver.num_calls < 10) {
36339 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord2_ndr_unpack");
36340 0 : return NULL;
36341 : }
36342 0 : call = &ndr_table_dnsserver.calls[9];
36343 :
36344 0 : pull = ndr_pull_init_blob(blob, object);
36345 0 : if (pull == NULL) {
36346 0 : PyErr_SetNdrError(NDR_ERR_ALLOC);
36347 0 : return NULL;
36348 : }
36349 :
36350 0 : pull->flags |= ndr_pull_flags;
36351 :
36352 0 : err = call->ndr_pull(pull, ndr_inout_flags, object);
36353 0 : if (!NDR_ERR_CODE_IS_SUCCESS(err)) {
36354 0 : TALLOC_FREE(pull);
36355 0 : PyErr_SetNdrError(err);
36356 0 : return NULL;
36357 : }
36358 0 : if (!allow_remaining) {
36359 0 : uint32_t highest_ofs;
36360 :
36361 0 : if (pull->offset > pull->relative_highest_offset) {
36362 0 : highest_ofs = pull->offset;
36363 : } else {
36364 0 : highest_ofs = pull->relative_highest_offset;
36365 : }
36366 0 : if (highest_ofs < pull->data_size) {
36367 0 : err = ndr_pull_error(pull, NDR_ERR_UNREAD_BYTES,
36368 : "not all bytes consumed ofs[%u] size[%u]",
36369 : highest_ofs, pull->data_size);
36370 0 : TALLOC_FREE(pull);
36371 0 : PyErr_SetNdrError(err);
36372 0 : return NULL;
36373 : }
36374 : }
36375 :
36376 0 : TALLOC_FREE(pull);
36377 0 : Py_RETURN_NONE;
36378 : }
36379 :
36380 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_unpack_in(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36381 : {
36382 0 : DATA_BLOB blob;
36383 0 : Py_ssize_t blob_length = 0;
36384 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
36385 0 : PyObject *bigendian_obj = NULL;
36386 0 : PyObject *ndr64_obj = NULL;
36387 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
36388 0 : PyObject *allow_remaining_obj = NULL;
36389 0 : bool allow_remaining = false;
36390 :
36391 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_in__",
36392 : discard_const_p(char *, kwnames),
36393 : &blob.data, &blob_length,
36394 : &bigendian_obj,
36395 : &ndr64_obj,
36396 : &allow_remaining_obj)) {
36397 0 : return NULL;
36398 : }
36399 0 : blob.length = blob_length;
36400 :
36401 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36402 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
36403 : }
36404 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36405 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
36406 : }
36407 :
36408 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
36409 0 : allow_remaining = true;
36410 : }
36411 :
36412 0 : return py_DnssrvUpdateRecord2_ndr_unpack(py_obj, &blob, NDR_IN, ndr_pull_flags, allow_remaining);
36413 : }
36414 :
36415 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_unpack_out(PyObject *py_obj, PyObject *args, PyObject *kwargs)
36416 : {
36417 0 : DATA_BLOB blob;
36418 0 : Py_ssize_t blob_length = 0;
36419 0 : const char * const kwnames[] = { "data_blob", "bigendian", "ndr64", "allow_remaining", NULL };
36420 0 : PyObject *bigendian_obj = NULL;
36421 0 : PyObject *ndr64_obj = NULL;
36422 0 : libndr_flags ndr_pull_flags = LIBNDR_FLAG_REF_ALLOC;
36423 0 : PyObject *allow_remaining_obj = NULL;
36424 0 : bool allow_remaining = false;
36425 :
36426 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, PYARG_BYTES_LEN "|OOO:__ndr_unpack_out__",
36427 : discard_const_p(char *, kwnames),
36428 : &blob.data, &blob_length,
36429 : &bigendian_obj,
36430 : &ndr64_obj,
36431 : &allow_remaining_obj)) {
36432 0 : return NULL;
36433 : }
36434 0 : blob.length = blob_length;
36435 :
36436 0 : if (bigendian_obj && PyObject_IsTrue(bigendian_obj)) {
36437 0 : ndr_pull_flags |= LIBNDR_FLAG_BIGENDIAN;
36438 : }
36439 0 : if (ndr64_obj && PyObject_IsTrue(ndr64_obj)) {
36440 0 : ndr_pull_flags |= LIBNDR_FLAG_NDR64;
36441 : }
36442 :
36443 0 : if (allow_remaining_obj && PyObject_IsTrue(allow_remaining_obj)) {
36444 0 : allow_remaining = true;
36445 : }
36446 :
36447 0 : return py_DnssrvUpdateRecord2_ndr_unpack(py_obj, &blob, NDR_OUT, ndr_pull_flags, allow_remaining);
36448 : }
36449 :
36450 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_print(PyObject *py_obj, const char *name, ndr_flags_type ndr_inout_flags)
36451 : {
36452 0 : const struct ndr_interface_call *call = NULL;
36453 0 : struct DnssrvUpdateRecord2 *object = (struct DnssrvUpdateRecord2 *)pytalloc_get_ptr(py_obj);
36454 0 : PyObject *ret;
36455 0 : char *retstr;
36456 :
36457 0 : if (ndr_table_dnsserver.num_calls < 10) {
36458 0 : PyErr_SetString(PyExc_TypeError, "Internal Error, ndr_interface_call missing for py_DnssrvUpdateRecord2_ndr_print");
36459 0 : return NULL;
36460 : }
36461 0 : call = &ndr_table_dnsserver.calls[9];
36462 :
36463 0 : retstr = ndr_print_function_string(pytalloc_get_mem_ctx(py_obj), call->ndr_print, name, ndr_inout_flags, object);
36464 0 : ret = PyUnicode_FromString(retstr);
36465 0 : TALLOC_FREE(retstr);
36466 :
36467 0 : return ret;
36468 : }
36469 :
36470 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_print_in(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
36471 : {
36472 0 : return py_DnssrvUpdateRecord2_ndr_print(py_obj, "DnssrvUpdateRecord2_in", NDR_IN);
36473 : }
36474 :
36475 0 : static PyObject *py_DnssrvUpdateRecord2_ndr_print_out(PyObject *py_obj, PyObject *Py_UNUSED(ignored))
36476 : {
36477 0 : return py_DnssrvUpdateRecord2_ndr_print(py_obj, "DnssrvUpdateRecord2_out", NDR_OUT);
36478 : }
36479 :
36480 : static PyMethodDef py_DnssrvUpdateRecord2_methods[] = {
36481 : { "opnum", (PyCFunction)py_DnssrvUpdateRecord2_ndr_opnum, METH_NOARGS|METH_CLASS,
36482 : "dnsserver.DnssrvUpdateRecord2.opnum() -> 9 (0x09) " },
36483 : { "__ndr_pack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord2_ndr_pack_in), METH_VARARGS|METH_KEYWORDS,
36484 : "S.ndr_pack_in(object, bigendian=False, ndr64=False) -> blob\nNDR pack input" },
36485 : { "__ndr_pack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord2_ndr_pack_out), METH_VARARGS|METH_KEYWORDS,
36486 : "S.ndr_pack_out(object, bigendian=False, ndr64=False) -> blob\nNDR pack output" },
36487 : { "__ndr_unpack_in__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord2_ndr_unpack_in), METH_VARARGS|METH_KEYWORDS,
36488 : "S.ndr_unpack_in(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack input" },
36489 : { "__ndr_unpack_out__", PY_DISCARD_FUNC_SIG(PyCFunction,py_DnssrvUpdateRecord2_ndr_unpack_out), METH_VARARGS|METH_KEYWORDS,
36490 : "S.ndr_unpack_out(class, blob, bigendian=False, ndr64=False, allow_remaining=False) -> None\nNDR unpack output" },
36491 : { "__ndr_print_in__", (PyCFunction)py_DnssrvUpdateRecord2_ndr_print_in, METH_NOARGS, "S.ndr_print_in(object) -> None\nNDR print input" },
36492 : { "__ndr_print_out__", (PyCFunction)py_DnssrvUpdateRecord2_ndr_print_out, METH_NOARGS, "S.ndr_print_out(object) -> None\nNDR print output" },
36493 : { NULL, NULL, 0, NULL }
36494 : };
36495 :
36496 :
36497 : static PyTypeObject DnssrvUpdateRecord2_Type = {
36498 : PyVarObject_HEAD_INIT(NULL, 0)
36499 : .tp_name = "dnsserver.DnssrvUpdateRecord2",
36500 : .tp_getset = py_DnssrvUpdateRecord2_getsetters,
36501 : .tp_methods = py_DnssrvUpdateRecord2_methods,
36502 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
36503 : .tp_new = py_DnssrvUpdateRecord2_new,
36504 : };
36505 :
36506 4083 : static bool pack_py_DnssrvUpdateRecord2_args_in(PyObject *args, PyObject *kwargs, struct DnssrvUpdateRecord2 *r)
36507 : {
36508 0 : PyObject *py_dwClientVersion;
36509 0 : PyObject *py_dwSettingFlags;
36510 0 : PyObject *py_pwszServerName;
36511 0 : PyObject *py_pszZone;
36512 0 : PyObject *py_pszNodeName;
36513 0 : PyObject *py_pAddRecord;
36514 0 : PyObject *py_pDeleteRecord;
36515 4083 : const char *kwnames[] = {
36516 : "dwClientVersion", "dwSettingFlags", "pwszServerName", "pszZone", "pszNodeName", "pAddRecord", "pDeleteRecord", NULL
36517 : };
36518 :
36519 4083 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:DnssrvUpdateRecord2", discard_const_p(char *, kwnames), &py_dwClientVersion, &py_dwSettingFlags, &py_pwszServerName, &py_pszZone, &py_pszNodeName, &py_pAddRecord, &py_pDeleteRecord)) {
36520 0 : return false;
36521 : }
36522 :
36523 4083 : if (py_dwClientVersion == NULL) {
36524 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwClientVersion");
36525 0 : return false;
36526 : }
36527 : {
36528 4083 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwClientVersion));
36529 4083 : if (PyLong_Check(py_dwClientVersion)) {
36530 0 : unsigned long long test_var;
36531 4083 : test_var = PyLong_AsUnsignedLongLong(py_dwClientVersion);
36532 4083 : if (PyErr_Occurred() != NULL) {
36533 0 : return false;
36534 : }
36535 4083 : if (test_var > uint_max) {
36536 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
36537 : PyLong_Type.tp_name, uint_max, test_var);
36538 0 : return false;
36539 : }
36540 4083 : r->in.dwClientVersion = test_var;
36541 : } else {
36542 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
36543 : PyLong_Type.tp_name);
36544 0 : return false;
36545 : }
36546 : }
36547 4083 : if (py_dwSettingFlags == NULL) {
36548 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.dwSettingFlags");
36549 0 : return false;
36550 : }
36551 : {
36552 4083 : const unsigned long long uint_max = ndr_sizeof2uintmax(sizeof(r->in.dwSettingFlags));
36553 4083 : if (PyLong_Check(py_dwSettingFlags)) {
36554 0 : unsigned long long test_var;
36555 4083 : test_var = PyLong_AsUnsignedLongLong(py_dwSettingFlags);
36556 4083 : if (PyErr_Occurred() != NULL) {
36557 0 : return false;
36558 : }
36559 4083 : if (test_var > uint_max) {
36560 0 : PyErr_Format(PyExc_OverflowError, "Expected type %s within range 0 - %llu, got %llu",
36561 : PyLong_Type.tp_name, uint_max, test_var);
36562 0 : return false;
36563 : }
36564 4083 : r->in.dwSettingFlags = test_var;
36565 : } else {
36566 0 : PyErr_Format(PyExc_TypeError, "Expected type %s",
36567 : PyLong_Type.tp_name);
36568 0 : return false;
36569 : }
36570 : }
36571 4083 : if (py_pwszServerName == NULL) {
36572 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pwszServerName");
36573 0 : return false;
36574 : }
36575 4083 : if (py_pwszServerName == Py_None) {
36576 0 : r->in.pwszServerName = NULL;
36577 : } else {
36578 4083 : r->in.pwszServerName = NULL;
36579 : {
36580 0 : const char *test_str;
36581 0 : const char *talloc_str;
36582 4083 : PyObject *unicode = NULL;
36583 4083 : if (PyUnicode_Check(py_pwszServerName)) {
36584 4083 : unicode = PyUnicode_AsEncodedString(py_pwszServerName, "utf-8", "ignore");
36585 4083 : if (unicode == NULL) {
36586 0 : PyErr_NoMemory();
36587 0 : return false;
36588 : }
36589 4083 : test_str = PyBytes_AS_STRING(unicode);
36590 0 : } else if (PyBytes_Check(py_pwszServerName)) {
36591 0 : test_str = PyBytes_AS_STRING(py_pwszServerName);
36592 : } else {
36593 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pwszServerName)->tp_name);
36594 0 : return false;
36595 : }
36596 4083 : talloc_str = talloc_strdup(r, test_str);
36597 4083 : if (unicode != NULL) {
36598 4083 : Py_DECREF(unicode);
36599 : }
36600 4083 : if (talloc_str == NULL) {
36601 0 : PyErr_NoMemory();
36602 0 : return false;
36603 : }
36604 4083 : r->in.pwszServerName = talloc_str;
36605 : }
36606 : }
36607 4083 : if (py_pszZone == NULL) {
36608 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszZone");
36609 0 : return false;
36610 : }
36611 4083 : if (py_pszZone == Py_None) {
36612 0 : r->in.pszZone = NULL;
36613 : } else {
36614 4083 : r->in.pszZone = NULL;
36615 : {
36616 0 : const char *test_str;
36617 0 : const char *talloc_str;
36618 4083 : PyObject *unicode = NULL;
36619 4083 : if (PyUnicode_Check(py_pszZone)) {
36620 4083 : unicode = PyUnicode_AsEncodedString(py_pszZone, "utf-8", "ignore");
36621 4083 : if (unicode == NULL) {
36622 0 : PyErr_NoMemory();
36623 0 : return false;
36624 : }
36625 4083 : test_str = PyBytes_AS_STRING(unicode);
36626 0 : } else if (PyBytes_Check(py_pszZone)) {
36627 0 : test_str = PyBytes_AS_STRING(py_pszZone);
36628 : } else {
36629 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszZone)->tp_name);
36630 0 : return false;
36631 : }
36632 4083 : talloc_str = talloc_strdup(r, test_str);
36633 4083 : if (unicode != NULL) {
36634 4083 : Py_DECREF(unicode);
36635 : }
36636 4083 : if (talloc_str == NULL) {
36637 0 : PyErr_NoMemory();
36638 0 : return false;
36639 : }
36640 4083 : r->in.pszZone = talloc_str;
36641 : }
36642 : }
36643 4083 : if (py_pszNodeName == NULL) {
36644 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pszNodeName");
36645 0 : return false;
36646 : }
36647 4083 : r->in.pszNodeName = talloc_ptrtype(r, r->in.pszNodeName);
36648 4083 : if (r->in.pszNodeName == NULL) {
36649 0 : PyErr_NoMemory();
36650 0 : return false;
36651 : }
36652 : {
36653 0 : const char *test_str;
36654 0 : const char *talloc_str;
36655 4083 : PyObject *unicode = NULL;
36656 4083 : if (PyUnicode_Check(py_pszNodeName)) {
36657 4083 : unicode = PyUnicode_AsEncodedString(py_pszNodeName, "utf-8", "ignore");
36658 4083 : if (unicode == NULL) {
36659 0 : PyErr_NoMemory();
36660 0 : return false;
36661 : }
36662 4083 : test_str = PyBytes_AS_STRING(unicode);
36663 0 : } else if (PyBytes_Check(py_pszNodeName)) {
36664 0 : test_str = PyBytes_AS_STRING(py_pszNodeName);
36665 : } else {
36666 0 : PyErr_Format(PyExc_TypeError, "Expected string or unicode object, got %s", Py_TYPE(py_pszNodeName)->tp_name);
36667 0 : return false;
36668 : }
36669 4083 : talloc_str = talloc_strdup(r, test_str);
36670 4083 : if (unicode != NULL) {
36671 4083 : Py_DECREF(unicode);
36672 : }
36673 4083 : if (talloc_str == NULL) {
36674 0 : PyErr_NoMemory();
36675 0 : return false;
36676 : }
36677 4083 : r->in.pszNodeName = talloc_str;
36678 : }
36679 4083 : if (py_pAddRecord == NULL) {
36680 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pAddRecord");
36681 0 : return false;
36682 : }
36683 4083 : if (py_pAddRecord == Py_None) {
36684 1653 : r->in.pAddRecord = NULL;
36685 : } else {
36686 2430 : r->in.pAddRecord = NULL;
36687 2430 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pAddRecord, return false;);
36688 2430 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_pAddRecord)) == NULL) {
36689 0 : PyErr_NoMemory();
36690 0 : return false;
36691 : }
36692 2430 : r->in.pAddRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pAddRecord);
36693 : }
36694 4083 : if (py_pDeleteRecord == NULL) {
36695 0 : PyErr_Format(PyExc_AttributeError, "Cannot delete NDR object: struct r->in.pDeleteRecord");
36696 0 : return false;
36697 : }
36698 4083 : if (py_pDeleteRecord == Py_None) {
36699 2289 : r->in.pDeleteRecord = NULL;
36700 : } else {
36701 1794 : r->in.pDeleteRecord = NULL;
36702 1794 : PY_CHECK_TYPE(&DNS_RPC_RECORD_BUF_Type, py_pDeleteRecord, return false;);
36703 1794 : if (talloc_reference(r, pytalloc_get_mem_ctx(py_pDeleteRecord)) == NULL) {
36704 0 : PyErr_NoMemory();
36705 0 : return false;
36706 : }
36707 1794 : r->in.pDeleteRecord = (struct DNS_RPC_RECORD_BUF *)pytalloc_get_ptr(py_pDeleteRecord);
36708 : }
36709 4083 : return true;
36710 : }
36711 :
36712 3995 : static PyObject *unpack_py_DnssrvUpdateRecord2_args_out(struct DnssrvUpdateRecord2 *r)
36713 : {
36714 0 : PyObject *result;
36715 3995 : result = Py_None;
36716 3995 : Py_INCREF(result);
36717 3995 : if (!W_ERROR_IS_OK(r->out.result)) {
36718 556 : PyErr_SetWERROR(r->out.result);
36719 556 : return NULL;
36720 : }
36721 :
36722 3439 : return result;
36723 : }
36724 :
36725 : const struct PyNdrRpcMethodDef py_ndr_dnsserver_methods[] = {
36726 : { "DnssrvOperation", "S.DnssrvOperation(pwszServerName, pszZone, dwContext, pszOperation, dwTypeId, pData) -> None", (py_dcerpc_call_fn)dcerpc_DnssrvOperation_r, (py_data_pack_fn)pack_py_DnssrvOperation_args_in, (py_data_unpack_fn)unpack_py_DnssrvOperation_args_out, 0, &ndr_table_dnsserver },
36727 : { "DnssrvQuery", "S.DnssrvQuery(pwszServerName, pszZone, pszOperation) -> (pdwTypeId, ppData)", (py_dcerpc_call_fn)dcerpc_DnssrvQuery_r, (py_data_pack_fn)pack_py_DnssrvQuery_args_in, (py_data_unpack_fn)unpack_py_DnssrvQuery_args_out, 1, &ndr_table_dnsserver },
36728 : { "DnssrvComplexOperation", "S.DnssrvComplexOperation(pwszServerName, pszZone, pszOperation, dwTypeIn, pDataIn) -> (pdwTypeOut, ppDataOut)", (py_dcerpc_call_fn)dcerpc_DnssrvComplexOperation_r, (py_data_pack_fn)pack_py_DnssrvComplexOperation_args_in, (py_data_unpack_fn)unpack_py_DnssrvComplexOperation_args_out, 2, &ndr_table_dnsserver },
36729 : { "DnssrvEnumRecords", "S.DnssrvEnumRecords(pwszServerName, pszZone, pszNodeName, pszStartChild, wRecordType, fSelectFlag, pszFilterStart, pszFilterStop) -> (pdwBufferLength, pBuffer)", (py_dcerpc_call_fn)dcerpc_DnssrvEnumRecords_r, (py_data_pack_fn)pack_py_DnssrvEnumRecords_args_in, (py_data_unpack_fn)unpack_py_DnssrvEnumRecords_args_out, 3, &ndr_table_dnsserver },
36730 : { "DnssrvUpdateRecord", "S.DnssrvUpdateRecord(pwszServerName, pszZone, pszNodeName, pAddRecord, pDeleteRecord) -> None", (py_dcerpc_call_fn)dcerpc_DnssrvUpdateRecord_r, (py_data_pack_fn)pack_py_DnssrvUpdateRecord_args_in, (py_data_unpack_fn)unpack_py_DnssrvUpdateRecord_args_out, 4, &ndr_table_dnsserver },
36731 : { "DnssrvOperation2", "S.DnssrvOperation2(dwClientVersion, dwSettingFlags, pwszServerName, pszZone, dwContext, pszOperation, dwTypeId, pData) -> None", (py_dcerpc_call_fn)dcerpc_DnssrvOperation2_r, (py_data_pack_fn)pack_py_DnssrvOperation2_args_in, (py_data_unpack_fn)unpack_py_DnssrvOperation2_args_out, 5, &ndr_table_dnsserver },
36732 : { "DnssrvQuery2", "S.DnssrvQuery2(dwClientVersion, dwSettingFlags, pwszServerName, pszZone, pszOperation) -> (pdwTypeId, ppData)", (py_dcerpc_call_fn)dcerpc_DnssrvQuery2_r, (py_data_pack_fn)pack_py_DnssrvQuery2_args_in, (py_data_unpack_fn)unpack_py_DnssrvQuery2_args_out, 6, &ndr_table_dnsserver },
36733 : { "DnssrvComplexOperation2", "S.DnssrvComplexOperation2(dwClientVersion, dwSettingFlags, pwszServerName, pszZone, pszOperation, dwTypeIn, pDataIn) -> (pdwTypeOut, ppDataOut)", (py_dcerpc_call_fn)dcerpc_DnssrvComplexOperation2_r, (py_data_pack_fn)pack_py_DnssrvComplexOperation2_args_in, (py_data_unpack_fn)unpack_py_DnssrvComplexOperation2_args_out, 7, &ndr_table_dnsserver },
36734 : { "DnssrvEnumRecords2", "S.DnssrvEnumRecords2(dwClientVersion, dwSettingFlags, pwszServerName, pszZone, pszNodeName, pszStartChild, wRecordType, fSelectFlag, pszFilterStart, pszFilterStop) -> (pdwBufferLength, pBuffer)", (py_dcerpc_call_fn)dcerpc_DnssrvEnumRecords2_r, (py_data_pack_fn)pack_py_DnssrvEnumRecords2_args_in, (py_data_unpack_fn)unpack_py_DnssrvEnumRecords2_args_out, 8, &ndr_table_dnsserver },
36735 : { "DnssrvUpdateRecord2", "S.DnssrvUpdateRecord2(dwClientVersion, dwSettingFlags, pwszServerName, pszZone, pszNodeName, pAddRecord, pDeleteRecord) -> None", (py_dcerpc_call_fn)dcerpc_DnssrvUpdateRecord2_r, (py_data_pack_fn)pack_py_DnssrvUpdateRecord2_args_in, (py_data_unpack_fn)unpack_py_DnssrvUpdateRecord2_args_out, 9, &ndr_table_dnsserver },
36736 : {0}
36737 : };
36738 :
36739 1609 : static PyObject *interface_dnsserver_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
36740 : {
36741 1609 : return py_dcerpc_interface_init_helper(type, args, kwargs, &ndr_table_dnsserver);
36742 : }
36743 :
36744 : #define PY_DOC_DNSSERVER "DNS Management Server"
36745 : static PyTypeObject dnsserver_InterfaceType = {
36746 : PyVarObject_HEAD_INIT(NULL, 0)
36747 : .tp_name = "dnsserver.dnsserver",
36748 : .tp_basicsize = sizeof(dcerpc_InterfaceObject),
36749 : .tp_doc = "dnsserver(binding, lp_ctx=None, credentials=None) -> connection\n"
36750 : "\n"
36751 : "binding should be a DCE/RPC binding string (for example: ncacn_ip_tcp:127.0.0.1)\n"
36752 : "lp_ctx should be a path to a smb.conf file or a param.LoadParm object\n"
36753 : "credentials should be a credentials.Credentials object.\n\n"PY_DOC_DNSSERVER,
36754 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
36755 : .tp_new = interface_dnsserver_new,
36756 : };
36757 :
36758 0 : static PyObject *syntax_dnsserver_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
36759 : {
36760 0 : return py_dcerpc_syntax_init_helper(type, args, kwargs, &ndr_table_dnsserver.syntax_id);
36761 : }
36762 :
36763 : #define PY_DOC_DNSSERVER_SYNTAX "DNS Management Server"
36764 : static PyTypeObject dnsserver_SyntaxType = {
36765 : PyVarObject_HEAD_INIT(NULL, 0)
36766 : .tp_name = "dnsserver.dnsserver_abstract_syntax",
36767 : .tp_doc = "dnsserver_abstract_syntax()\n"PY_DOC_DNSSERVER_SYNTAX,
36768 : .tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
36769 : .tp_new = syntax_dnsserver_new,
36770 : };
36771 :
36772 : static PyMethodDef dnsserver_methods[] = {
36773 : { NULL, NULL, 0, NULL }
36774 : };
36775 :
36776 : static struct PyModuleDef moduledef = {
36777 : PyModuleDef_HEAD_INIT,
36778 : .m_name = "dnsserver",
36779 : .m_doc = "dnsserver DCE/RPC",
36780 : .m_size = -1,
36781 : .m_methods = dnsserver_methods,
36782 : };
36783 1696 : MODULE_INIT_FUNC(dnsserver)
36784 : {
36785 1696 : PyObject *m = NULL;
36786 1696 : PyObject *dep_samba_dcerpc_misc = NULL;
36787 1696 : PyObject *dep_samba_dcerpc_dnsp = NULL;
36788 1696 : PyObject *dep_talloc = NULL;
36789 1696 : PyObject *dep_samba_dcerpc_base = NULL;
36790 :
36791 1696 : dep_samba_dcerpc_misc = PyImport_ImportModule("samba.dcerpc.misc");
36792 1696 : if (dep_samba_dcerpc_misc == NULL)
36793 0 : goto out;
36794 :
36795 1696 : dep_samba_dcerpc_dnsp = PyImport_ImportModule("samba.dcerpc.dnsp");
36796 1696 : if (dep_samba_dcerpc_dnsp == NULL)
36797 0 : goto out;
36798 :
36799 1696 : dep_talloc = PyImport_ImportModule("talloc");
36800 1696 : if (dep_talloc == NULL)
36801 0 : goto out;
36802 :
36803 1696 : dep_samba_dcerpc_base = PyImport_ImportModule("samba.dcerpc.base");
36804 1696 : if (dep_samba_dcerpc_base == NULL)
36805 0 : goto out;
36806 :
36807 1696 : BaseObject_Type = (PyTypeObject *)PyObject_GetAttrString(dep_talloc, "BaseObject");
36808 1696 : if (BaseObject_Type == NULL)
36809 0 : goto out;
36810 :
36811 1696 : ClientConnection_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_base, "ClientConnection");
36812 1696 : if (ClientConnection_Type == NULL)
36813 0 : goto out;
36814 :
36815 1696 : ndr_syntax_id_Type = (PyTypeObject *)PyObject_GetAttrString(dep_samba_dcerpc_misc, "ndr_syntax_id");
36816 1696 : if (ndr_syntax_id_Type == NULL)
36817 0 : goto out;
36818 :
36819 1696 : DNS_RPC_BUFFER_Type.tp_base = BaseObject_Type;
36820 1696 : DNS_RPC_BUFFER_Type.tp_basicsize = pytalloc_BaseObject_size();
36821 :
36822 1696 : DNS_RPC_UTF8_STRING_LIST_Type.tp_base = BaseObject_Type;
36823 1696 : DNS_RPC_UTF8_STRING_LIST_Type.tp_basicsize = pytalloc_BaseObject_size();
36824 :
36825 1696 : DNS_RPC_NAME_AND_PARAM_Type.tp_base = BaseObject_Type;
36826 1696 : DNS_RPC_NAME_AND_PARAM_Type.tp_basicsize = pytalloc_BaseObject_size();
36827 :
36828 1696 : DNS_RPC_NAME_Type.tp_base = BaseObject_Type;
36829 1696 : DNS_RPC_NAME_Type.tp_basicsize = pytalloc_BaseObject_size();
36830 :
36831 1696 : DNS_RPC_NODE_Type.tp_base = BaseObject_Type;
36832 1696 : DNS_RPC_NODE_Type.tp_basicsize = pytalloc_BaseObject_size();
36833 :
36834 1696 : DNS_RPC_RECORD_SOA_Type.tp_base = BaseObject_Type;
36835 1696 : DNS_RPC_RECORD_SOA_Type.tp_basicsize = pytalloc_BaseObject_size();
36836 :
36837 1696 : DNS_RPC_RECORD_NAME_PREFERENCE_Type.tp_base = BaseObject_Type;
36838 1696 : DNS_RPC_RECORD_NAME_PREFERENCE_Type.tp_basicsize = pytalloc_BaseObject_size();
36839 :
36840 1696 : DNS_RPC_RECORD_STRING_Type.tp_base = BaseObject_Type;
36841 1696 : DNS_RPC_RECORD_STRING_Type.tp_basicsize = pytalloc_BaseObject_size();
36842 :
36843 1696 : DNS_RPC_RECORD_SRV_Type.tp_base = BaseObject_Type;
36844 1696 : DNS_RPC_RECORD_SRV_Type.tp_basicsize = pytalloc_BaseObject_size();
36845 :
36846 1696 : DNS_RPC_RECORD_DATA_Type.tp_base = BaseObject_Type;
36847 1696 : DNS_RPC_RECORD_DATA_Type.tp_basicsize = pytalloc_BaseObject_size();
36848 :
36849 1696 : DNS_RPC_RECORD_Type.tp_base = BaseObject_Type;
36850 1696 : DNS_RPC_RECORD_Type.tp_basicsize = pytalloc_BaseObject_size();
36851 :
36852 1696 : DNS_RPC_RECORD_BUF_Type.tp_base = BaseObject_Type;
36853 1696 : DNS_RPC_RECORD_BUF_Type.tp_basicsize = pytalloc_BaseObject_size();
36854 :
36855 1696 : IP4_ARRAY_Type.tp_base = BaseObject_Type;
36856 1696 : IP4_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
36857 :
36858 1696 : DNS_ADDR_Type.tp_base = BaseObject_Type;
36859 1696 : DNS_ADDR_Type.tp_basicsize = pytalloc_BaseObject_size();
36860 :
36861 1696 : DNS_ADDR_ARRAY_Type.tp_base = BaseObject_Type;
36862 1696 : DNS_ADDR_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
36863 :
36864 1696 : DNS_RPC_IP_VALIDATE_Type.tp_base = BaseObject_Type;
36865 1696 : DNS_RPC_IP_VALIDATE_Type.tp_basicsize = pytalloc_BaseObject_size();
36866 :
36867 1696 : DNS_RPC_SERVER_INFO_W2K_Type.tp_base = BaseObject_Type;
36868 1696 : DNS_RPC_SERVER_INFO_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36869 :
36870 1696 : DNS_EXTENSION_Type.tp_base = BaseObject_Type;
36871 1696 : DNS_EXTENSION_Type.tp_basicsize = pytalloc_BaseObject_size();
36872 :
36873 1696 : DNS_RPC_SERVER_INFO_DOTNET_Type.tp_base = BaseObject_Type;
36874 1696 : DNS_RPC_SERVER_INFO_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36875 :
36876 1696 : DNS_RPC_SERVER_INFO_LONGHORN_Type.tp_base = BaseObject_Type;
36877 1696 : DNS_RPC_SERVER_INFO_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36878 :
36879 1696 : DNS_RPC_DP_REPLICA_Type.tp_base = BaseObject_Type;
36880 1696 : DNS_RPC_DP_REPLICA_Type.tp_basicsize = pytalloc_BaseObject_size();
36881 :
36882 1696 : DNS_RPC_DP_INFO_Type.tp_base = BaseObject_Type;
36883 1696 : DNS_RPC_DP_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
36884 :
36885 1696 : DNS_RPC_DP_ENUM_Type.tp_base = BaseObject_Type;
36886 1696 : DNS_RPC_DP_ENUM_Type.tp_basicsize = pytalloc_BaseObject_size();
36887 :
36888 1696 : DNS_RPC_DP_LIST_Type.tp_base = BaseObject_Type;
36889 1696 : DNS_RPC_DP_LIST_Type.tp_basicsize = pytalloc_BaseObject_size();
36890 :
36891 1696 : DNS_RPC_ENLIST_DP_Type.tp_base = BaseObject_Type;
36892 1696 : DNS_RPC_ENLIST_DP_Type.tp_basicsize = pytalloc_BaseObject_size();
36893 :
36894 1696 : DNS_RPC_ZONE_CHANGE_DP_Type.tp_base = BaseObject_Type;
36895 1696 : DNS_RPC_ZONE_CHANGE_DP_Type.tp_basicsize = pytalloc_BaseObject_size();
36896 :
36897 1696 : DNS_RPC_ZONE_W2K_Type.tp_base = BaseObject_Type;
36898 1696 : DNS_RPC_ZONE_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36899 :
36900 1696 : DNS_RPC_ZONE_DOTNET_Type.tp_base = BaseObject_Type;
36901 1696 : DNS_RPC_ZONE_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36902 :
36903 1696 : DNS_RPC_ZONE_LIST_W2K_Type.tp_base = BaseObject_Type;
36904 1696 : DNS_RPC_ZONE_LIST_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36905 :
36906 1696 : DNS_RPC_ZONE_LIST_DOTNET_Type.tp_base = BaseObject_Type;
36907 1696 : DNS_RPC_ZONE_LIST_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36908 :
36909 1696 : DNS_RPC_ZONE_INFO_W2K_Type.tp_base = BaseObject_Type;
36910 1696 : DNS_RPC_ZONE_INFO_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36911 :
36912 1696 : DNS_RPC_ZONE_INFO_DOTNET_Type.tp_base = BaseObject_Type;
36913 1696 : DNS_RPC_ZONE_INFO_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36914 :
36915 1696 : DNS_RPC_ZONE_INFO_LONGHORN_Type.tp_base = BaseObject_Type;
36916 1696 : DNS_RPC_ZONE_INFO_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36917 :
36918 1696 : DNS_RPC_ZONE_SECONDARIES_W2K_Type.tp_base = BaseObject_Type;
36919 1696 : DNS_RPC_ZONE_SECONDARIES_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36920 :
36921 1696 : DNS_RPC_ZONE_SECONDARIES_DOTNET_Type.tp_base = BaseObject_Type;
36922 1696 : DNS_RPC_ZONE_SECONDARIES_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36923 :
36924 1696 : DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type.tp_base = BaseObject_Type;
36925 1696 : DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36926 :
36927 1696 : DNS_RPC_ZONE_DATABASE_W2K_Type.tp_base = BaseObject_Type;
36928 1696 : DNS_RPC_ZONE_DATABASE_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36929 :
36930 1696 : DNS_RPC_ZONE_DATABASE_DOTNET_Type.tp_base = BaseObject_Type;
36931 1696 : DNS_RPC_ZONE_DATABASE_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36932 :
36933 1696 : DNS_RPC_ZONE_CREATE_INFO_W2K_Type.tp_base = BaseObject_Type;
36934 1696 : DNS_RPC_ZONE_CREATE_INFO_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36935 :
36936 1696 : DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type.tp_base = BaseObject_Type;
36937 1696 : DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36938 :
36939 1696 : DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type.tp_base = BaseObject_Type;
36940 1696 : DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36941 :
36942 1696 : DNS_RPC_ZONE_EXPORT_INFO_Type.tp_base = BaseObject_Type;
36943 1696 : DNS_RPC_ZONE_EXPORT_INFO_Type.tp_basicsize = pytalloc_BaseObject_size();
36944 :
36945 1696 : DNS_RPC_ENUM_ZONES_FILTER_Type.tp_base = BaseObject_Type;
36946 1696 : DNS_RPC_ENUM_ZONES_FILTER_Type.tp_basicsize = pytalloc_BaseObject_size();
36947 :
36948 1696 : DNS_RPC_FORWARDERS_W2K_Type.tp_base = BaseObject_Type;
36949 1696 : DNS_RPC_FORWARDERS_W2K_Type.tp_basicsize = pytalloc_BaseObject_size();
36950 :
36951 1696 : DNS_RPC_FORWARDERS_DOTNET_Type.tp_base = BaseObject_Type;
36952 1696 : DNS_RPC_FORWARDERS_DOTNET_Type.tp_basicsize = pytalloc_BaseObject_size();
36953 :
36954 1696 : DNS_RPC_FORWARDERS_LONGHORN_Type.tp_base = BaseObject_Type;
36955 1696 : DNS_RPC_FORWARDERS_LONGHORN_Type.tp_basicsize = pytalloc_BaseObject_size();
36956 :
36957 1696 : DNS_RPC_AUTOCONFIGURE_Type.tp_base = BaseObject_Type;
36958 1696 : DNS_RPC_AUTOCONFIGURE_Type.tp_basicsize = pytalloc_BaseObject_size();
36959 :
36960 1696 : DNSSRV_STAT_HEADER_Type.tp_base = BaseObject_Type;
36961 1696 : DNSSRV_STAT_HEADER_Type.tp_basicsize = pytalloc_BaseObject_size();
36962 :
36963 1696 : DNSSRV_STAT_Type.tp_base = BaseObject_Type;
36964 1696 : DNSSRV_STAT_Type.tp_basicsize = pytalloc_BaseObject_size();
36965 :
36966 1696 : DNSSRV_RPC_UNION_Type.tp_base = BaseObject_Type;
36967 1696 : DNSSRV_RPC_UNION_Type.tp_basicsize = pytalloc_BaseObject_size();
36968 :
36969 1696 : DNS_RPC_RECORDS_Type.tp_base = BaseObject_Type;
36970 1696 : DNS_RPC_RECORDS_Type.tp_basicsize = pytalloc_BaseObject_size();
36971 :
36972 1696 : DNS_RPC_RECORDS_ARRAY_Type.tp_base = BaseObject_Type;
36973 1696 : DNS_RPC_RECORDS_ARRAY_Type.tp_basicsize = pytalloc_BaseObject_size();
36974 :
36975 1696 : DnssrvOperation_Type.tp_base = BaseObject_Type;
36976 1696 : DnssrvOperation_Type.tp_basicsize = pytalloc_BaseObject_size();
36977 :
36978 1696 : DnssrvQuery_Type.tp_base = BaseObject_Type;
36979 1696 : DnssrvQuery_Type.tp_basicsize = pytalloc_BaseObject_size();
36980 :
36981 1696 : DnssrvComplexOperation_Type.tp_base = BaseObject_Type;
36982 1696 : DnssrvComplexOperation_Type.tp_basicsize = pytalloc_BaseObject_size();
36983 :
36984 1696 : DnssrvEnumRecords_Type.tp_base = BaseObject_Type;
36985 1696 : DnssrvEnumRecords_Type.tp_basicsize = pytalloc_BaseObject_size();
36986 :
36987 1696 : DnssrvUpdateRecord_Type.tp_base = BaseObject_Type;
36988 1696 : DnssrvUpdateRecord_Type.tp_basicsize = pytalloc_BaseObject_size();
36989 :
36990 1696 : DnssrvOperation2_Type.tp_base = BaseObject_Type;
36991 1696 : DnssrvOperation2_Type.tp_basicsize = pytalloc_BaseObject_size();
36992 :
36993 1696 : DnssrvQuery2_Type.tp_base = BaseObject_Type;
36994 1696 : DnssrvQuery2_Type.tp_basicsize = pytalloc_BaseObject_size();
36995 :
36996 1696 : DnssrvComplexOperation2_Type.tp_base = BaseObject_Type;
36997 1696 : DnssrvComplexOperation2_Type.tp_basicsize = pytalloc_BaseObject_size();
36998 :
36999 1696 : DnssrvEnumRecords2_Type.tp_base = BaseObject_Type;
37000 1696 : DnssrvEnumRecords2_Type.tp_basicsize = pytalloc_BaseObject_size();
37001 :
37002 1696 : DnssrvUpdateRecord2_Type.tp_base = BaseObject_Type;
37003 1696 : DnssrvUpdateRecord2_Type.tp_basicsize = pytalloc_BaseObject_size();
37004 :
37005 1696 : dnsserver_InterfaceType.tp_base = ClientConnection_Type;
37006 :
37007 1696 : dnsserver_SyntaxType.tp_base = ndr_syntax_id_Type;
37008 1696 : dnsserver_SyntaxType.tp_basicsize = pytalloc_BaseObject_size();
37009 :
37010 1696 : if (PyType_Ready(&DNS_RPC_BUFFER_Type) < 0)
37011 0 : goto out;
37012 1696 : if (PyType_Ready(&DNS_RPC_UTF8_STRING_LIST_Type) < 0)
37013 0 : goto out;
37014 1696 : if (PyType_Ready(&DNS_RPC_NAME_AND_PARAM_Type) < 0)
37015 0 : goto out;
37016 1696 : if (PyType_Ready(&DNS_RPC_NAME_Type) < 0)
37017 0 : goto out;
37018 1696 : if (PyType_Ready(&DNS_RPC_NODE_Type) < 0)
37019 0 : goto out;
37020 1696 : if (PyType_Ready(&DNS_RPC_RECORD_SOA_Type) < 0)
37021 0 : goto out;
37022 1696 : if (PyType_Ready(&DNS_RPC_RECORD_NAME_PREFERENCE_Type) < 0)
37023 0 : goto out;
37024 1696 : if (PyType_Ready(&DNS_RPC_RECORD_STRING_Type) < 0)
37025 0 : goto out;
37026 1696 : if (PyType_Ready(&DNS_RPC_RECORD_SRV_Type) < 0)
37027 0 : goto out;
37028 1696 : if (PyType_Ready(&DNS_RPC_RECORD_DATA_Type) < 0)
37029 0 : goto out;
37030 1696 : if (PyType_Ready(&DNS_RPC_RECORD_Type) < 0)
37031 0 : goto out;
37032 1696 : if (PyType_Ready(&DNS_RPC_RECORD_BUF_Type) < 0)
37033 0 : goto out;
37034 1696 : if (PyType_Ready(&IP4_ARRAY_Type) < 0)
37035 0 : goto out;
37036 1696 : if (PyType_Ready(&DNS_ADDR_Type) < 0)
37037 0 : goto out;
37038 1696 : if (PyType_Ready(&DNS_ADDR_ARRAY_Type) < 0)
37039 0 : goto out;
37040 1696 : if (PyType_Ready(&DNS_RPC_IP_VALIDATE_Type) < 0)
37041 0 : goto out;
37042 1696 : if (PyType_Ready(&DNS_RPC_SERVER_INFO_W2K_Type) < 0)
37043 0 : goto out;
37044 1696 : if (PyType_Ready(&DNS_EXTENSION_Type) < 0)
37045 0 : goto out;
37046 1696 : if (PyType_Ready(&DNS_RPC_SERVER_INFO_DOTNET_Type) < 0)
37047 0 : goto out;
37048 1696 : if (PyType_Ready(&DNS_RPC_SERVER_INFO_LONGHORN_Type) < 0)
37049 0 : goto out;
37050 1696 : if (PyType_Ready(&DNS_RPC_DP_REPLICA_Type) < 0)
37051 0 : goto out;
37052 1696 : if (PyType_Ready(&DNS_RPC_DP_INFO_Type) < 0)
37053 0 : goto out;
37054 1696 : if (PyType_Ready(&DNS_RPC_DP_ENUM_Type) < 0)
37055 0 : goto out;
37056 1696 : if (PyType_Ready(&DNS_RPC_DP_LIST_Type) < 0)
37057 0 : goto out;
37058 1696 : if (PyType_Ready(&DNS_RPC_ENLIST_DP_Type) < 0)
37059 0 : goto out;
37060 1696 : if (PyType_Ready(&DNS_RPC_ZONE_CHANGE_DP_Type) < 0)
37061 0 : goto out;
37062 1696 : if (PyType_Ready(&DNS_RPC_ZONE_W2K_Type) < 0)
37063 0 : goto out;
37064 1696 : if (PyType_Ready(&DNS_RPC_ZONE_DOTNET_Type) < 0)
37065 0 : goto out;
37066 1696 : if (PyType_Ready(&DNS_RPC_ZONE_LIST_W2K_Type) < 0)
37067 0 : goto out;
37068 1696 : if (PyType_Ready(&DNS_RPC_ZONE_LIST_DOTNET_Type) < 0)
37069 0 : goto out;
37070 1696 : if (PyType_Ready(&DNS_RPC_ZONE_INFO_W2K_Type) < 0)
37071 0 : goto out;
37072 1696 : if (PyType_Ready(&DNS_RPC_ZONE_INFO_DOTNET_Type) < 0)
37073 0 : goto out;
37074 1696 : if (PyType_Ready(&DNS_RPC_ZONE_INFO_LONGHORN_Type) < 0)
37075 0 : goto out;
37076 1696 : if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_W2K_Type) < 0)
37077 0 : goto out;
37078 1696 : if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type) < 0)
37079 0 : goto out;
37080 1696 : if (PyType_Ready(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type) < 0)
37081 0 : goto out;
37082 1696 : if (PyType_Ready(&DNS_RPC_ZONE_DATABASE_W2K_Type) < 0)
37083 0 : goto out;
37084 1696 : if (PyType_Ready(&DNS_RPC_ZONE_DATABASE_DOTNET_Type) < 0)
37085 0 : goto out;
37086 1696 : if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type) < 0)
37087 0 : goto out;
37088 1696 : if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type) < 0)
37089 0 : goto out;
37090 1696 : if (PyType_Ready(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type) < 0)
37091 0 : goto out;
37092 1696 : if (PyType_Ready(&DNS_RPC_ZONE_EXPORT_INFO_Type) < 0)
37093 0 : goto out;
37094 1696 : if (PyType_Ready(&DNS_RPC_ENUM_ZONES_FILTER_Type) < 0)
37095 0 : goto out;
37096 1696 : if (PyType_Ready(&DNS_RPC_FORWARDERS_W2K_Type) < 0)
37097 0 : goto out;
37098 1696 : if (PyType_Ready(&DNS_RPC_FORWARDERS_DOTNET_Type) < 0)
37099 0 : goto out;
37100 1696 : if (PyType_Ready(&DNS_RPC_FORWARDERS_LONGHORN_Type) < 0)
37101 0 : goto out;
37102 1696 : if (PyType_Ready(&DNS_RPC_AUTOCONFIGURE_Type) < 0)
37103 0 : goto out;
37104 1696 : if (PyType_Ready(&DNSSRV_STAT_HEADER_Type) < 0)
37105 0 : goto out;
37106 1696 : if (PyType_Ready(&DNSSRV_STAT_Type) < 0)
37107 0 : goto out;
37108 1696 : if (PyType_Ready(&DNSSRV_RPC_UNION_Type) < 0)
37109 0 : goto out;
37110 1696 : if (PyType_Ready(&DNS_RPC_RECORDS_Type) < 0)
37111 0 : goto out;
37112 1696 : if (PyType_Ready(&DNS_RPC_RECORDS_ARRAY_Type) < 0)
37113 0 : goto out;
37114 1696 : if (PyType_Ready(&DnssrvOperation_Type) < 0)
37115 0 : goto out;
37116 1696 : if (PyType_Ready(&DnssrvQuery_Type) < 0)
37117 0 : goto out;
37118 1696 : if (PyType_Ready(&DnssrvComplexOperation_Type) < 0)
37119 0 : goto out;
37120 1696 : if (PyType_Ready(&DnssrvEnumRecords_Type) < 0)
37121 0 : goto out;
37122 1696 : if (PyType_Ready(&DnssrvUpdateRecord_Type) < 0)
37123 0 : goto out;
37124 1696 : if (PyType_Ready(&DnssrvOperation2_Type) < 0)
37125 0 : goto out;
37126 1696 : if (PyType_Ready(&DnssrvQuery2_Type) < 0)
37127 0 : goto out;
37128 1696 : if (PyType_Ready(&DnssrvComplexOperation2_Type) < 0)
37129 0 : goto out;
37130 1696 : if (PyType_Ready(&DnssrvEnumRecords2_Type) < 0)
37131 0 : goto out;
37132 1696 : if (PyType_Ready(&DnssrvUpdateRecord2_Type) < 0)
37133 0 : goto out;
37134 1696 : if (PyType_Ready(&dnsserver_InterfaceType) < 0)
37135 0 : goto out;
37136 1696 : if (PyType_Ready(&dnsserver_SyntaxType) < 0)
37137 0 : goto out;
37138 1696 : if (!PyInterface_AddNdrRpcMethods(&dnsserver_InterfaceType, py_ndr_dnsserver_methods))
37139 0 : return NULL;
37140 :
37141 : #ifdef PY_DNS_RPC_BUFFER_PATCH
37142 : PY_DNS_RPC_BUFFER_PATCH(&DNS_RPC_BUFFER_Type);
37143 : #endif
37144 : #ifdef PY_DNS_RPC_UTF8_STRING_LIST_PATCH
37145 : PY_DNS_RPC_UTF8_STRING_LIST_PATCH(&DNS_RPC_UTF8_STRING_LIST_Type);
37146 : #endif
37147 : #ifdef PY_DNS_RPC_NAME_AND_PARAM_PATCH
37148 : PY_DNS_RPC_NAME_AND_PARAM_PATCH(&DNS_RPC_NAME_AND_PARAM_Type);
37149 : #endif
37150 : #ifdef PY_DNS_RPC_NAME_PATCH
37151 : PY_DNS_RPC_NAME_PATCH(&DNS_RPC_NAME_Type);
37152 : #endif
37153 : #ifdef PY_DNS_RPC_NODE_PATCH
37154 : PY_DNS_RPC_NODE_PATCH(&DNS_RPC_NODE_Type);
37155 : #endif
37156 : #ifdef PY_DNS_RPC_RECORD_SOA_PATCH
37157 : PY_DNS_RPC_RECORD_SOA_PATCH(&DNS_RPC_RECORD_SOA_Type);
37158 : #endif
37159 : #ifdef PY_DNS_RPC_RECORD_NAME_PREFERENCE_PATCH
37160 : PY_DNS_RPC_RECORD_NAME_PREFERENCE_PATCH(&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
37161 : #endif
37162 : #ifdef PY_DNS_RPC_RECORD_STRING_PATCH
37163 : PY_DNS_RPC_RECORD_STRING_PATCH(&DNS_RPC_RECORD_STRING_Type);
37164 : #endif
37165 : #ifdef PY_DNS_RPC_RECORD_SRV_PATCH
37166 : PY_DNS_RPC_RECORD_SRV_PATCH(&DNS_RPC_RECORD_SRV_Type);
37167 : #endif
37168 : #ifdef PY_DNS_RPC_RECORD_DATA_PATCH
37169 : PY_DNS_RPC_RECORD_DATA_PATCH(&DNS_RPC_RECORD_DATA_Type);
37170 : #endif
37171 : #ifdef PY_DNS_RPC_RECORD_PATCH
37172 : PY_DNS_RPC_RECORD_PATCH(&DNS_RPC_RECORD_Type);
37173 : #endif
37174 : #ifdef PY_DNS_RPC_RECORD_BUF_PATCH
37175 : PY_DNS_RPC_RECORD_BUF_PATCH(&DNS_RPC_RECORD_BUF_Type);
37176 : #endif
37177 : #ifdef PY_IP4_ARRAY_PATCH
37178 : PY_IP4_ARRAY_PATCH(&IP4_ARRAY_Type);
37179 : #endif
37180 : #ifdef PY_DNS_ADDR_PATCH
37181 : PY_DNS_ADDR_PATCH(&DNS_ADDR_Type);
37182 : #endif
37183 : #ifdef PY_DNS_ADDR_ARRAY_PATCH
37184 : PY_DNS_ADDR_ARRAY_PATCH(&DNS_ADDR_ARRAY_Type);
37185 : #endif
37186 : #ifdef PY_DNS_RPC_IP_VALIDATE_PATCH
37187 : PY_DNS_RPC_IP_VALIDATE_PATCH(&DNS_RPC_IP_VALIDATE_Type);
37188 : #endif
37189 : #ifdef PY_DNS_RPC_SERVER_INFO_W2K_PATCH
37190 : PY_DNS_RPC_SERVER_INFO_W2K_PATCH(&DNS_RPC_SERVER_INFO_W2K_Type);
37191 : #endif
37192 : #ifdef PY_DNS_EXTENSION_PATCH
37193 : PY_DNS_EXTENSION_PATCH(&DNS_EXTENSION_Type);
37194 : #endif
37195 : #ifdef PY_DNS_RPC_SERVER_INFO_DOTNET_PATCH
37196 : PY_DNS_RPC_SERVER_INFO_DOTNET_PATCH(&DNS_RPC_SERVER_INFO_DOTNET_Type);
37197 : #endif
37198 : #ifdef PY_DNS_RPC_SERVER_INFO_LONGHORN_PATCH
37199 : PY_DNS_RPC_SERVER_INFO_LONGHORN_PATCH(&DNS_RPC_SERVER_INFO_LONGHORN_Type);
37200 : #endif
37201 : #ifdef PY_DNS_RPC_DP_REPLICA_PATCH
37202 : PY_DNS_RPC_DP_REPLICA_PATCH(&DNS_RPC_DP_REPLICA_Type);
37203 : #endif
37204 : #ifdef PY_DNS_RPC_DP_INFO_PATCH
37205 : PY_DNS_RPC_DP_INFO_PATCH(&DNS_RPC_DP_INFO_Type);
37206 : #endif
37207 : #ifdef PY_DNS_RPC_DP_ENUM_PATCH
37208 : PY_DNS_RPC_DP_ENUM_PATCH(&DNS_RPC_DP_ENUM_Type);
37209 : #endif
37210 : #ifdef PY_DNS_RPC_DP_LIST_PATCH
37211 : PY_DNS_RPC_DP_LIST_PATCH(&DNS_RPC_DP_LIST_Type);
37212 : #endif
37213 : #ifdef PY_DNS_RPC_ENLIST_DP_PATCH
37214 : PY_DNS_RPC_ENLIST_DP_PATCH(&DNS_RPC_ENLIST_DP_Type);
37215 : #endif
37216 : #ifdef PY_DNS_RPC_ZONE_CHANGE_DP_PATCH
37217 : PY_DNS_RPC_ZONE_CHANGE_DP_PATCH(&DNS_RPC_ZONE_CHANGE_DP_Type);
37218 : #endif
37219 : #ifdef PY_DNS_RPC_ZONE_W2K_PATCH
37220 : PY_DNS_RPC_ZONE_W2K_PATCH(&DNS_RPC_ZONE_W2K_Type);
37221 : #endif
37222 : #ifdef PY_DNS_RPC_ZONE_DOTNET_PATCH
37223 : PY_DNS_RPC_ZONE_DOTNET_PATCH(&DNS_RPC_ZONE_DOTNET_Type);
37224 : #endif
37225 : #ifdef PY_DNS_RPC_ZONE_LIST_W2K_PATCH
37226 : PY_DNS_RPC_ZONE_LIST_W2K_PATCH(&DNS_RPC_ZONE_LIST_W2K_Type);
37227 : #endif
37228 : #ifdef PY_DNS_RPC_ZONE_LIST_DOTNET_PATCH
37229 : PY_DNS_RPC_ZONE_LIST_DOTNET_PATCH(&DNS_RPC_ZONE_LIST_DOTNET_Type);
37230 : #endif
37231 : #ifdef PY_DNS_RPC_ZONE_INFO_W2K_PATCH
37232 : PY_DNS_RPC_ZONE_INFO_W2K_PATCH(&DNS_RPC_ZONE_INFO_W2K_Type);
37233 : #endif
37234 : #ifdef PY_DNS_RPC_ZONE_INFO_DOTNET_PATCH
37235 : PY_DNS_RPC_ZONE_INFO_DOTNET_PATCH(&DNS_RPC_ZONE_INFO_DOTNET_Type);
37236 : #endif
37237 : #ifdef PY_DNS_RPC_ZONE_INFO_LONGHORN_PATCH
37238 : PY_DNS_RPC_ZONE_INFO_LONGHORN_PATCH(&DNS_RPC_ZONE_INFO_LONGHORN_Type);
37239 : #endif
37240 : #ifdef PY_DNS_RPC_ZONE_SECONDARIES_W2K_PATCH
37241 : PY_DNS_RPC_ZONE_SECONDARIES_W2K_PATCH(&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
37242 : #endif
37243 : #ifdef PY_DNS_RPC_ZONE_SECONDARIES_DOTNET_PATCH
37244 : PY_DNS_RPC_ZONE_SECONDARIES_DOTNET_PATCH(&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
37245 : #endif
37246 : #ifdef PY_DNS_RPC_ZONE_SECONDARIES_LONGHORN_PATCH
37247 : PY_DNS_RPC_ZONE_SECONDARIES_LONGHORN_PATCH(&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
37248 : #endif
37249 : #ifdef PY_DNS_RPC_ZONE_DATABASE_W2K_PATCH
37250 : PY_DNS_RPC_ZONE_DATABASE_W2K_PATCH(&DNS_RPC_ZONE_DATABASE_W2K_Type);
37251 : #endif
37252 : #ifdef PY_DNS_RPC_ZONE_DATABASE_DOTNET_PATCH
37253 : PY_DNS_RPC_ZONE_DATABASE_DOTNET_PATCH(&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
37254 : #endif
37255 : #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_W2K_PATCH
37256 : PY_DNS_RPC_ZONE_CREATE_INFO_W2K_PATCH(&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
37257 : #endif
37258 : #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_DOTNET_PATCH
37259 : PY_DNS_RPC_ZONE_CREATE_INFO_DOTNET_PATCH(&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
37260 : #endif
37261 : #ifdef PY_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_PATCH
37262 : PY_DNS_RPC_ZONE_CREATE_INFO_LONGHORN_PATCH(&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
37263 : #endif
37264 : #ifdef PY_DNS_RPC_ZONE_EXPORT_INFO_PATCH
37265 : PY_DNS_RPC_ZONE_EXPORT_INFO_PATCH(&DNS_RPC_ZONE_EXPORT_INFO_Type);
37266 : #endif
37267 : #ifdef PY_DNS_RPC_ENUM_ZONES_FILTER_PATCH
37268 : PY_DNS_RPC_ENUM_ZONES_FILTER_PATCH(&DNS_RPC_ENUM_ZONES_FILTER_Type);
37269 : #endif
37270 : #ifdef PY_DNS_RPC_FORWARDERS_W2K_PATCH
37271 : PY_DNS_RPC_FORWARDERS_W2K_PATCH(&DNS_RPC_FORWARDERS_W2K_Type);
37272 : #endif
37273 : #ifdef PY_DNS_RPC_FORWARDERS_DOTNET_PATCH
37274 : PY_DNS_RPC_FORWARDERS_DOTNET_PATCH(&DNS_RPC_FORWARDERS_DOTNET_Type);
37275 : #endif
37276 : #ifdef PY_DNS_RPC_FORWARDERS_LONGHORN_PATCH
37277 : PY_DNS_RPC_FORWARDERS_LONGHORN_PATCH(&DNS_RPC_FORWARDERS_LONGHORN_Type);
37278 : #endif
37279 : #ifdef PY_DNS_RPC_AUTOCONFIGURE_PATCH
37280 : PY_DNS_RPC_AUTOCONFIGURE_PATCH(&DNS_RPC_AUTOCONFIGURE_Type);
37281 : #endif
37282 : #ifdef PY_DNSSRV_STAT_HEADER_PATCH
37283 : PY_DNSSRV_STAT_HEADER_PATCH(&DNSSRV_STAT_HEADER_Type);
37284 : #endif
37285 : #ifdef PY_DNSSRV_STAT_PATCH
37286 : PY_DNSSRV_STAT_PATCH(&DNSSRV_STAT_Type);
37287 : #endif
37288 : #ifdef PY_DNSSRV_RPC_UNION_PATCH
37289 : PY_DNSSRV_RPC_UNION_PATCH(&DNSSRV_RPC_UNION_Type);
37290 : #endif
37291 : #ifdef PY_DNS_RPC_RECORDS_PATCH
37292 : PY_DNS_RPC_RECORDS_PATCH(&DNS_RPC_RECORDS_Type);
37293 : #endif
37294 : #ifdef PY_DNS_RPC_RECORDS_ARRAY_PATCH
37295 : PY_DNS_RPC_RECORDS_ARRAY_PATCH(&DNS_RPC_RECORDS_ARRAY_Type);
37296 : #endif
37297 : #ifdef PY_DNSSRVOPERATION_PATCH
37298 : PY_DNSSRVOPERATION_PATCH(&DnssrvOperation_Type);
37299 : #endif
37300 : #ifdef PY_DNSSRVQUERY_PATCH
37301 : PY_DNSSRVQUERY_PATCH(&DnssrvQuery_Type);
37302 : #endif
37303 : #ifdef PY_DNSSRVCOMPLEXOPERATION_PATCH
37304 : PY_DNSSRVCOMPLEXOPERATION_PATCH(&DnssrvComplexOperation_Type);
37305 : #endif
37306 : #ifdef PY_DNSSRVENUMRECORDS_PATCH
37307 : PY_DNSSRVENUMRECORDS_PATCH(&DnssrvEnumRecords_Type);
37308 : #endif
37309 : #ifdef PY_DNSSRVUPDATERECORD_PATCH
37310 : PY_DNSSRVUPDATERECORD_PATCH(&DnssrvUpdateRecord_Type);
37311 : #endif
37312 : #ifdef PY_DNSSRVOPERATION2_PATCH
37313 : PY_DNSSRVOPERATION2_PATCH(&DnssrvOperation2_Type);
37314 : #endif
37315 : #ifdef PY_DNSSRVQUERY2_PATCH
37316 : PY_DNSSRVQUERY2_PATCH(&DnssrvQuery2_Type);
37317 : #endif
37318 : #ifdef PY_DNSSRVCOMPLEXOPERATION2_PATCH
37319 : PY_DNSSRVCOMPLEXOPERATION2_PATCH(&DnssrvComplexOperation2_Type);
37320 : #endif
37321 : #ifdef PY_DNSSRVENUMRECORDS2_PATCH
37322 : PY_DNSSRVENUMRECORDS2_PATCH(&DnssrvEnumRecords2_Type);
37323 : #endif
37324 : #ifdef PY_DNSSRVUPDATERECORD2_PATCH
37325 : PY_DNSSRVUPDATERECORD2_PATCH(&DnssrvUpdateRecord2_Type);
37326 : #endif
37327 : #ifdef PY_DNSSERVER_PATCH
37328 : PY_DNSSERVER_PATCH(&dnsserver_InterfaceType);
37329 : #endif
37330 : #ifdef PY_DNSSERVER_ABSTRACT_SYNTAX_PATCH
37331 : PY_DNSSERVER_ABSTRACT_SYNTAX_PATCH(&dnsserver_SyntaxType);
37332 : #endif
37333 : #ifdef PY_ABSTRACT_SYNTAX_PATCH
37334 : PY_ABSTRACT_SYNTAX_PATCH(&dnsserver_SyntaxType);
37335 : #endif
37336 :
37337 1696 : m = PyModule_Create(&moduledef);
37338 1696 : if (m == NULL)
37339 0 : goto out;
37340 :
37341 1696 : PyModule_AddObject(m, "DNS_RPC_USE_TCPIP", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_USE_TCPIP));
37342 1696 : PyModule_AddObject(m, "DNS_RPC_USE_NAMED_PIPE", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_USE_NAMED_PIPE));
37343 1696 : PyModule_AddObject(m, "DNS_RPC_USE_LPC", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_USE_LPC));
37344 1696 : PyModule_AddObject(m, "DNS_RPC_USE_ALL_PROTOCOLS", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_USE_ALL_PROTOCOLS));
37345 1696 : PyModule_AddObject(m, "DNS_CLIENT_VERSION_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNS_CLIENT_VERSION_W2K));
37346 1696 : PyModule_AddObject(m, "DNS_CLIENT_VERSION_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)DNS_CLIENT_VERSION_DOTNET));
37347 1696 : PyModule_AddObject(m, "DNS_CLIENT_VERSION_LONGHORN", PyLong_FromUnsignedLongLong((uint32_t)DNS_CLIENT_VERSION_LONGHORN));
37348 1696 : PyModule_AddObject(m, "DNS_IPVAL_DNS_SERVERS", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_DNS_SERVERS));
37349 1696 : PyModule_AddObject(m, "DNS_IPVAL_DNS_ROOTHINTS", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_DNS_ROOTHINTS));
37350 1696 : PyModule_AddObject(m, "DNS_IPVAL_DNS_FORWARDERS", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_DNS_FORWARDERS));
37351 1696 : PyModule_AddObject(m, "DNS_IPVAL_DNS_ZONE_MASTERS", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_DNS_ZONE_MASTERS));
37352 1696 : PyModule_AddObject(m, "DNS_IPVAL_DNS_DELEGATIONS", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_DNS_DELEGATIONS));
37353 1696 : PyModule_AddObject(m, "ERROR_SUCCESS", PyLong_FromUnsignedLongLong((uint32_t)ERROR_SUCCESS));
37354 1696 : PyModule_AddObject(m, "DNS_IPVAL_INVALID_ADDR", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_INVALID_ADDR));
37355 1696 : PyModule_AddObject(m, "DNS_IPVAL_UNREACHABLE", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_UNREACHABLE));
37356 1696 : PyModule_AddObject(m, "DNS_IPVAL_NO_RESPONSE", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_NO_RESPONSE));
37357 1696 : PyModule_AddObject(m, "DNS_IPVAL_NOT_AUTH_FOR_ZONE", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_NOT_AUTH_FOR_ZONE));
37358 1696 : PyModule_AddObject(m, "DNS_IPVAL_UNKNOWN_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_UNKNOWN_ERROR));
37359 1696 : PyModule_AddObject(m, "DNS_IPVAL_NO_TCP", PyLong_FromUnsignedLongLong((uint32_t)DNS_IPVAL_NO_TCP));
37360 1696 : PyModule_AddObject(m, "DNS_BOOT_METHOD_UNINITIALIZED", PyLong_FromLong((uint16_t)DNS_BOOT_METHOD_UNINITIALIZED));
37361 1696 : PyModule_AddObject(m, "DNS_BOOT_METHOD_FILE", PyLong_FromLong((uint16_t)DNS_BOOT_METHOD_FILE));
37362 1696 : PyModule_AddObject(m, "DNS_BOOT_METHOD_REGISTRY", PyLong_FromLong((uint16_t)DNS_BOOT_METHOD_REGISTRY));
37363 1696 : PyModule_AddObject(m, "DNS_BOOT_METHOD_DIRECTORY", PyLong_FromLong((uint16_t)DNS_BOOT_METHOD_DIRECTORY));
37364 1696 : PyModule_AddObject(m, "DNS_ALLOW_RFC_NAMES_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DNS_ALLOW_RFC_NAMES_ONLY));
37365 1696 : PyModule_AddObject(m, "DNS_ALLOW_NONRFC_NAMES", PyLong_FromUnsignedLongLong((uint32_t)DNS_ALLOW_NONRFC_NAMES));
37366 1696 : PyModule_AddObject(m, "DNS_ALLOW_MULTIBYTE_NAMES", PyLong_FromUnsignedLongLong((uint32_t)DNS_ALLOW_MULTIBYTE_NAMES));
37367 1696 : PyModule_AddObject(m, "DNS_ALLOW_ALL_NAMES", PyLong_FromUnsignedLongLong((uint32_t)DNS_ALLOW_ALL_NAMES));
37368 1696 : PyModule_AddObject(m, "DNS_DP_AUTOCREATED", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_AUTOCREATED));
37369 1696 : PyModule_AddObject(m, "DNS_DP_LEGACY", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_LEGACY));
37370 1696 : PyModule_AddObject(m, "DNS_DP_DOMAIN_DEFAULT", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_DOMAIN_DEFAULT));
37371 1696 : PyModule_AddObject(m, "DNS_DP_FOREST_DEFAULT", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_FOREST_DEFAULT));
37372 1696 : PyModule_AddObject(m, "DNS_DP_ENLISTED", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_ENLISTED));
37373 1696 : PyModule_AddObject(m, "DNS_DP_DELETED", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_DELETED));
37374 1696 : PyModule_AddObject(m, "DNS_DP_OKAY", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_OKAY));
37375 1696 : PyModule_AddObject(m, "DNS_DP_STATE_REPL_INCOMING", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_STATE_REPL_INCOMING));
37376 1696 : PyModule_AddObject(m, "DNS_DP_STATE_REPL_OUTGOING", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_STATE_REPL_OUTGOING));
37377 1696 : PyModule_AddObject(m, "DNS_DP_STATE_UNKNOWN", PyLong_FromUnsignedLongLong((uint32_t)DNS_DP_STATE_UNKNOWN));
37378 1696 : PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NO_SECURITY", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_SECSECURE_NO_SECURITY));
37379 1696 : PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NS_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_SECSECURE_NS_ONLY));
37380 1696 : PyModule_AddObject(m, "DNS_ZONE_SECSECURE_LIST_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_SECSECURE_LIST_ONLY));
37381 1696 : PyModule_AddObject(m, "DNS_ZONE_SECSECURE_NO_XFER", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_SECSECURE_NO_XFER));
37382 1696 : PyModule_AddObject(m, "DNS_ZONE_NOTIFY_OFF", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_NOTIFY_OFF));
37383 1696 : PyModule_AddObject(m, "DNS_ZONE_NOTIFY_ALL_SECONDARIES", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_NOTIFY_ALL_SECONDARIES));
37384 1696 : PyModule_AddObject(m, "DNS_ZONE_NOTIFY_LIST_ONLY", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_NOTIFY_LIST_ONLY));
37385 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_PRIMARY", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_PRIMARY));
37386 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_SECONDARY", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_SECONDARY));
37387 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_CACHE", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_CACHE));
37388 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_AUTO", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_AUTO));
37389 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_FORWARD", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_FORWARD));
37390 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_REVERSE", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_REVERSE));
37391 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_FORWARDER", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_FORWARDER));
37392 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_STUB", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_STUB));
37393 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_DS", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_DS));
37394 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_NON_DS", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_NON_DS));
37395 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_DOMAIN_DP", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_DOMAIN_DP));
37396 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_FOREST_DP", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_FOREST_DP));
37397 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_CUSTOM_DP", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_CUSTOM_DP));
37398 1696 : PyModule_AddObject(m, "DNS_ZONE_REQUEST_LEGACY_DP", PyLong_FromUnsignedLongLong((uint32_t)DNS_ZONE_REQUEST_LEGACY_DP));
37399 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_PAUSED", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_PAUSED));
37400 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_SHUTDOWN", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_SHUTDOWN));
37401 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_REVERSE", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_REVERSE));
37402 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_AUTOCREATED", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_AUTOCREATED));
37403 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_DSINTEGRATED", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_DSINTEGRATED));
37404 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_AGING", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_AGING));
37405 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_UPDATE_UNSECURE", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_UPDATE_UNSECURE));
37406 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_UPDATE_SECURE", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_UPDATE_SECURE));
37407 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_READONLY", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_ZONE_READONLY));
37408 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_AUTOCONFIG_INTERNAL_ROOTHINTS));
37409 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_AUTOCONFIG_INTERNAL_FORWARDERS));
37410 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_ZONES", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_AUTOCONFIG_INTERNAL_ZONES));
37411 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT));
37412 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_PREPEND));
37413 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_AUTOCONFIG_INTERNAL_SELFPOINT_APPEND));
37414 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_AUTOCONFIG_INTERNAL_RETURN_ERROR));
37415 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIG_ALL", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_AUTOCONFIG_ALL));
37416 1696 : PyModule_AddObject(m, "DNS_EVENT_LOG_SUCCESS", PyLong_FromUnsignedLongLong((uint32_t)DNS_EVENT_LOG_SUCCESS));
37417 1696 : PyModule_AddObject(m, "DNS_EVENT_LOG_ERROR_TYPE", PyLong_FromUnsignedLongLong((uint32_t)DNS_EVENT_LOG_ERROR_TYPE));
37418 1696 : PyModule_AddObject(m, "DNS_EVENT_LOG_WARNING_TYPE", PyLong_FromUnsignedLongLong((uint32_t)DNS_EVENT_LOG_WARNING_TYPE));
37419 1696 : PyModule_AddObject(m, "DNS_EVENT_LOG_INFORMATION_TYPE", PyLong_FromUnsignedLongLong((uint32_t)DNS_EVENT_LOG_INFORMATION_TYPE));
37420 1696 : PyModule_AddObject(m, "DNS_RPC_VIEW_AUTHORITY_DATA", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_VIEW_AUTHORITY_DATA));
37421 1696 : PyModule_AddObject(m, "DNS_RPC_VIEW_CACHE_DATA", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_VIEW_CACHE_DATA));
37422 1696 : PyModule_AddObject(m, "DNS_RPC_VIEW_GLUE_DATA", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_VIEW_GLUE_DATA));
37423 1696 : PyModule_AddObject(m, "DNS_RPC_VIEW_ROOT_HINT_DATA", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_VIEW_ROOT_HINT_DATA));
37424 1696 : PyModule_AddObject(m, "DNS_RPC_VIEW_ADDITIONAL_DATA", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_VIEW_ADDITIONAL_DATA));
37425 1696 : PyModule_AddObject(m, "DNS_RPC_VIEW_NO_CHILDREN", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_VIEW_NO_CHILDREN));
37426 1696 : PyModule_AddObject(m, "DNS_RPC_VIEW_ONLY_CHILDREN", PyLong_FromUnsignedLongLong((uint32_t)DNS_RPC_VIEW_ONLY_CHILDREN));
37427 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_NULL", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_NULL));
37428 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_DWORD", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_DWORD));
37429 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_LPSTR", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_LPSTR));
37430 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_LPWSTR", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_LPWSTR));
37431 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_IPARRAY", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_IPARRAY));
37432 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_BUFFER", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_BUFFER));
37433 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_SERVER_INFO_W2K));
37434 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_STATS", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_STATS));
37435 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_FORWARDERS_W2K));
37436 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_W2K));
37437 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_INFO_W2K));
37438 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_SECONDARIES_W2K));
37439 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_DATABASE_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_DATABASE_W2K));
37440 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_TYPE_RESET_W2K));
37441 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_CREATE_W2K));
37442 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_NAME_AND_PARAM", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_NAME_AND_PARAM));
37443 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_LIST_W2K", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_LIST_W2K));
37444 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_RENAME", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_RENAME));
37445 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_EXPORT", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_EXPORT));
37446 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_SERVER_INFO_DOTNET));
37447 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_FORWARDERS_DOTNET));
37448 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE));
37449 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_INFO_DOTNET));
37450 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_SECONDARIES_DOTNET));
37451 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_DATABASE", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_DATABASE));
37452 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_TYPE_RESET_DOTNET));
37453 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE_DOTNET", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_CREATE_DOTNET));
37454 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_LIST", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_LIST));
37455 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_DP_ENUM", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_DP_ENUM));
37456 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_DP_INFO", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_DP_INFO));
37457 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_DP_LIST", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_DP_LIST));
37458 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ENLIST_DP", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ENLIST_DP));
37459 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CHANGE_DP", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_CHANGE_DP));
37460 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ENUM_ZONES_FILTER", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ENUM_ZONES_FILTER));
37461 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ADDRARRAY", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ADDRARRAY));
37462 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_SERVER_INFO", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_SERVER_INFO));
37463 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_INFO", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_INFO));
37464 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_FORWARDERS", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_FORWARDERS));
37465 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_SECONDARIES", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_SECONDARIES));
37466 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_TYPE_RESET", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_TYPE_RESET));
37467 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_ZONE_CREATE", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_ZONE_CREATE));
37468 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_IP_VALIDATE", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_IP_VALIDATE));
37469 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_AUTOCONFIGURE", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_AUTOCONFIGURE));
37470 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_UTF8_STRING_LIST", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_UTF8_STRING_LIST));
37471 1696 : PyModule_AddObject(m, "DNSSRV_TYPEID_UNICODE_STRING_LIST", PyLong_FromUnsignedLongLong((uint32_t)DNSSRV_TYPEID_UNICODE_STRING_LIST));
37472 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_BUFFER_Type);
37473 1696 : PyModule_AddObject(m, "DNS_RPC_BUFFER", (PyObject *)(void *)&DNS_RPC_BUFFER_Type);
37474 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_UTF8_STRING_LIST_Type);
37475 1696 : PyModule_AddObject(m, "DNS_RPC_UTF8_STRING_LIST", (PyObject *)(void *)&DNS_RPC_UTF8_STRING_LIST_Type);
37476 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_NAME_AND_PARAM_Type);
37477 1696 : PyModule_AddObject(m, "DNS_RPC_NAME_AND_PARAM", (PyObject *)(void *)&DNS_RPC_NAME_AND_PARAM_Type);
37478 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_NAME_Type);
37479 1696 : PyModule_AddObject(m, "DNS_RPC_NAME", (PyObject *)(void *)&DNS_RPC_NAME_Type);
37480 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_NODE_Type);
37481 1696 : PyModule_AddObject(m, "DNS_RPC_NODE", (PyObject *)(void *)&DNS_RPC_NODE_Type);
37482 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_SOA_Type);
37483 1696 : PyModule_AddObject(m, "DNS_RPC_RECORD_SOA", (PyObject *)(void *)&DNS_RPC_RECORD_SOA_Type);
37484 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
37485 1696 : PyModule_AddObject(m, "DNS_RPC_RECORD_NAME_PREFERENCE", (PyObject *)(void *)&DNS_RPC_RECORD_NAME_PREFERENCE_Type);
37486 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_STRING_Type);
37487 1696 : PyModule_AddObject(m, "DNS_RPC_RECORD_STRING", (PyObject *)(void *)&DNS_RPC_RECORD_STRING_Type);
37488 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_SRV_Type);
37489 1696 : PyModule_AddObject(m, "DNS_RPC_RECORD_SRV", (PyObject *)(void *)&DNS_RPC_RECORD_SRV_Type);
37490 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_DATA_Type);
37491 1696 : PyModule_AddObject(m, "DNS_RPC_RECORD_DATA", (PyObject *)(void *)&DNS_RPC_RECORD_DATA_Type);
37492 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_Type);
37493 1696 : PyModule_AddObject(m, "DNS_RPC_RECORD", (PyObject *)(void *)&DNS_RPC_RECORD_Type);
37494 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORD_BUF_Type);
37495 1696 : PyModule_AddObject(m, "DNS_RPC_RECORD_BUF", (PyObject *)(void *)&DNS_RPC_RECORD_BUF_Type);
37496 1696 : Py_INCREF((PyObject *)(void *)&IP4_ARRAY_Type);
37497 1696 : PyModule_AddObject(m, "IP4_ARRAY", (PyObject *)(void *)&IP4_ARRAY_Type);
37498 1696 : Py_INCREF((PyObject *)(void *)&DNS_ADDR_Type);
37499 1696 : PyModule_AddObject(m, "DNS_ADDR", (PyObject *)(void *)&DNS_ADDR_Type);
37500 1696 : Py_INCREF((PyObject *)(void *)&DNS_ADDR_ARRAY_Type);
37501 1696 : PyModule_AddObject(m, "DNS_ADDR_ARRAY", (PyObject *)(void *)&DNS_ADDR_ARRAY_Type);
37502 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_IP_VALIDATE_Type);
37503 1696 : PyModule_AddObject(m, "DNS_RPC_IP_VALIDATE", (PyObject *)(void *)&DNS_RPC_IP_VALIDATE_Type);
37504 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_W2K_Type);
37505 1696 : PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_W2K", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_W2K_Type);
37506 1696 : Py_INCREF((PyObject *)(void *)&DNS_EXTENSION_Type);
37507 1696 : PyModule_AddObject(m, "DNS_EXTENSION", (PyObject *)(void *)&DNS_EXTENSION_Type);
37508 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_DOTNET_Type);
37509 1696 : PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_DOTNET_Type);
37510 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_SERVER_INFO_LONGHORN_Type);
37511 1696 : PyModule_AddObject(m, "DNS_RPC_SERVER_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_SERVER_INFO_LONGHORN_Type);
37512 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_REPLICA_Type);
37513 1696 : PyModule_AddObject(m, "DNS_RPC_DP_REPLICA", (PyObject *)(void *)&DNS_RPC_DP_REPLICA_Type);
37514 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_INFO_Type);
37515 1696 : PyModule_AddObject(m, "DNS_RPC_DP_INFO", (PyObject *)(void *)&DNS_RPC_DP_INFO_Type);
37516 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_ENUM_Type);
37517 1696 : PyModule_AddObject(m, "DNS_RPC_DP_ENUM", (PyObject *)(void *)&DNS_RPC_DP_ENUM_Type);
37518 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_DP_LIST_Type);
37519 1696 : PyModule_AddObject(m, "DNS_RPC_DP_LIST", (PyObject *)(void *)&DNS_RPC_DP_LIST_Type);
37520 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ENLIST_DP_Type);
37521 1696 : PyModule_AddObject(m, "DNS_RPC_ENLIST_DP", (PyObject *)(void *)&DNS_RPC_ENLIST_DP_Type);
37522 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CHANGE_DP_Type);
37523 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_CHANGE_DP", (PyObject *)(void *)&DNS_RPC_ZONE_CHANGE_DP_Type);
37524 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_W2K_Type);
37525 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_W2K_Type);
37526 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DOTNET_Type);
37527 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_DOTNET_Type);
37528 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_LIST_W2K_Type);
37529 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_LIST_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_LIST_W2K_Type);
37530 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_LIST_DOTNET_Type);
37531 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_LIST_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_LIST_DOTNET_Type);
37532 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_W2K_Type);
37533 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_W2K_Type);
37534 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_DOTNET_Type);
37535 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_DOTNET_Type);
37536 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_INFO_LONGHORN_Type);
37537 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_INFO_LONGHORN_Type);
37538 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
37539 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_W2K_Type);
37540 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
37541 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_DOTNET_Type);
37542 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
37543 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_SECONDARIES_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_SECONDARIES_LONGHORN_Type);
37544 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_W2K_Type);
37545 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_DATABASE_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_W2K_Type);
37546 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
37547 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_DATABASE_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_DATABASE_DOTNET_Type);
37548 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
37549 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_W2K", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_W2K_Type);
37550 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
37551 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_DOTNET", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_DOTNET_Type);
37552 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
37553 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_CREATE_INFO_LONGHORN", (PyObject *)(void *)&DNS_RPC_ZONE_CREATE_INFO_LONGHORN_Type);
37554 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ZONE_EXPORT_INFO_Type);
37555 1696 : PyModule_AddObject(m, "DNS_RPC_ZONE_EXPORT_INFO", (PyObject *)(void *)&DNS_RPC_ZONE_EXPORT_INFO_Type);
37556 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_ENUM_ZONES_FILTER_Type);
37557 1696 : PyModule_AddObject(m, "DNS_RPC_ENUM_ZONES_FILTER", (PyObject *)(void *)&DNS_RPC_ENUM_ZONES_FILTER_Type);
37558 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_W2K_Type);
37559 1696 : PyModule_AddObject(m, "DNS_RPC_FORWARDERS_W2K", (PyObject *)(void *)&DNS_RPC_FORWARDERS_W2K_Type);
37560 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_DOTNET_Type);
37561 1696 : PyModule_AddObject(m, "DNS_RPC_FORWARDERS_DOTNET", (PyObject *)(void *)&DNS_RPC_FORWARDERS_DOTNET_Type);
37562 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_FORWARDERS_LONGHORN_Type);
37563 1696 : PyModule_AddObject(m, "DNS_RPC_FORWARDERS_LONGHORN", (PyObject *)(void *)&DNS_RPC_FORWARDERS_LONGHORN_Type);
37564 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_AUTOCONFIGURE_Type);
37565 1696 : PyModule_AddObject(m, "DNS_RPC_AUTOCONFIGURE", (PyObject *)(void *)&DNS_RPC_AUTOCONFIGURE_Type);
37566 1696 : Py_INCREF((PyObject *)(void *)&DNSSRV_STAT_HEADER_Type);
37567 1696 : PyModule_AddObject(m, "DNSSRV_STAT_HEADER", (PyObject *)(void *)&DNSSRV_STAT_HEADER_Type);
37568 1696 : Py_INCREF((PyObject *)(void *)&DNSSRV_STAT_Type);
37569 1696 : PyModule_AddObject(m, "DNSSRV_STAT", (PyObject *)(void *)&DNSSRV_STAT_Type);
37570 1696 : Py_INCREF((PyObject *)(void *)&DNSSRV_RPC_UNION_Type);
37571 1696 : PyModule_AddObject(m, "DNSSRV_RPC_UNION", (PyObject *)(void *)&DNSSRV_RPC_UNION_Type);
37572 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORDS_Type);
37573 1696 : PyModule_AddObject(m, "DNS_RPC_RECORDS", (PyObject *)(void *)&DNS_RPC_RECORDS_Type);
37574 1696 : Py_INCREF((PyObject *)(void *)&DNS_RPC_RECORDS_ARRAY_Type);
37575 1696 : PyModule_AddObject(m, "DNS_RPC_RECORDS_ARRAY", (PyObject *)(void *)&DNS_RPC_RECORDS_ARRAY_Type);
37576 1696 : Py_INCREF((PyObject *)(void *)&DnssrvOperation_Type);
37577 1696 : PyModule_AddObject(m, "DnssrvOperation", (PyObject *)(void *)&DnssrvOperation_Type);
37578 1696 : Py_INCREF((PyObject *)(void *)&DnssrvQuery_Type);
37579 1696 : PyModule_AddObject(m, "DnssrvQuery", (PyObject *)(void *)&DnssrvQuery_Type);
37580 1696 : Py_INCREF((PyObject *)(void *)&DnssrvComplexOperation_Type);
37581 1696 : PyModule_AddObject(m, "DnssrvComplexOperation", (PyObject *)(void *)&DnssrvComplexOperation_Type);
37582 1696 : Py_INCREF((PyObject *)(void *)&DnssrvEnumRecords_Type);
37583 1696 : PyModule_AddObject(m, "DnssrvEnumRecords", (PyObject *)(void *)&DnssrvEnumRecords_Type);
37584 1696 : Py_INCREF((PyObject *)(void *)&DnssrvUpdateRecord_Type);
37585 1696 : PyModule_AddObject(m, "DnssrvUpdateRecord", (PyObject *)(void *)&DnssrvUpdateRecord_Type);
37586 1696 : Py_INCREF((PyObject *)(void *)&DnssrvOperation2_Type);
37587 1696 : PyModule_AddObject(m, "DnssrvOperation2", (PyObject *)(void *)&DnssrvOperation2_Type);
37588 1696 : Py_INCREF((PyObject *)(void *)&DnssrvQuery2_Type);
37589 1696 : PyModule_AddObject(m, "DnssrvQuery2", (PyObject *)(void *)&DnssrvQuery2_Type);
37590 1696 : Py_INCREF((PyObject *)(void *)&DnssrvComplexOperation2_Type);
37591 1696 : PyModule_AddObject(m, "DnssrvComplexOperation2", (PyObject *)(void *)&DnssrvComplexOperation2_Type);
37592 1696 : Py_INCREF((PyObject *)(void *)&DnssrvEnumRecords2_Type);
37593 1696 : PyModule_AddObject(m, "DnssrvEnumRecords2", (PyObject *)(void *)&DnssrvEnumRecords2_Type);
37594 1696 : Py_INCREF((PyObject *)(void *)&DnssrvUpdateRecord2_Type);
37595 1696 : PyModule_AddObject(m, "DnssrvUpdateRecord2", (PyObject *)(void *)&DnssrvUpdateRecord2_Type);
37596 1696 : Py_INCREF((PyObject *)(void *)&dnsserver_InterfaceType);
37597 1696 : PyModule_AddObject(m, "dnsserver", (PyObject *)(void *)&dnsserver_InterfaceType);
37598 1696 : Py_INCREF((PyObject *)(void *)&dnsserver_SyntaxType);
37599 1696 : PyModule_AddObject(m, "dnsserver_abstract_syntax", (PyObject *)(void *)&dnsserver_SyntaxType);
37600 1696 : Py_INCREF((PyObject *)(void *)&dnsserver_SyntaxType);
37601 1696 : PyModule_AddObject(m, "abstract_syntax", (PyObject *)(void *)&dnsserver_SyntaxType);
37602 : #ifdef PY_MOD_DNSSERVER_PATCH
37603 : PY_MOD_DNSSERVER_PATCH(m);
37604 : #endif
37605 1696 : out:
37606 1696 : Py_XDECREF(dep_samba_dcerpc_misc);
37607 1696 : Py_XDECREF(dep_samba_dcerpc_dnsp);
37608 1696 : Py_XDECREF(dep_talloc);
37609 1696 : Py_XDECREF(dep_samba_dcerpc_base);
37610 1660 : return m;
37611 :
37612 : }
|